autoencoder

Graph disconnected: cannot obtain value for tensor Tensor(“conv2d_1_input:0”, shape=(?, 128, 128, 1), dtype=float32)

时间秒杀一切 提交于 2021-01-29 10:01:26
问题 I'm trying to implement an autoencoder which gets 3 different inputs and fuse this three image. I want to get the output of a layer in the encoder and concatenate it with a layer in the decoder but when I run it I get graph disconnected error. here is my code: def create_model(input_shape): input_1 = keras.layers.Input(input_shape) input_2 = keras.layers.Input(input_shape) input_3 = keras.layers.Input(input_shape) network = keras.models.Sequential([ keras.layers.Conv2D(32, (7, 7), activation

Error after combination of two Keras models into VAE: You must feed a value for placeholder tensor 'critic_input_2'

只愿长相守 提交于 2021-01-29 09:30:17
问题 Trying combine GAN generator and critic to train both as VAE. Base code is here. Code modified to create encoder on top of critic: def _build_critic(self): #### THE critic critic_input = Input(shape=self.input_dim, name='critic_input') x = critic_input for i in range(self.n_layers_critic): x = Conv2D( filters = self.critic_conv_filters[i] , kernel_size = self.critic_conv_kernel_size[i] , strides = self.critic_conv_strides[i] , padding = 'same' , name = 'critic_conv_' + str(i) , kernel

How to implement a gaussian renderer with mean and variance values as input in any deep modeling framework (needs to be back-propagable)

有些话、适合烂在心里 提交于 2021-01-29 04:32:54
问题 Imagine a typical auto-encoder-decoder model. However, instead of a general decoder where deconvoutions together with upscaling are used to create/synthesize a tensor similar to the model's input, I need to implement a structured/custom decoder. Here, I need the decoder to take its input, e.g. a 10x2 tensor where each row represents x,y positions or coordinates, and render a fixed predefined size image where there are 10 gaussian distributions generated at the location specified by the input.

Keras: Error when checking input

元气小坏坏 提交于 2021-01-28 06:36:51
问题 I am using Keras autoencodes with Theano backend. And want to make autoencode for 720x1080 RGB images. This is my code from keras.datasets import mnist import numpy as np from keras.layers import Input, LSTM, RepeatVector, Conv2D, MaxPooling2D, UpSampling2D from keras.models import Model from PIL import Image x_train = [] x_train_noisy = [] for i in range(5,1000): image = Image.open('data/trailerframes/frame' + str(i) + '.jpg', 'r') x_train.append(np.array(image)) image = Image.open('data

Deep Learning with Python code no longer working. “TypeError: An op outside of the function building code is being passed a ”Graph“ tensor.”

别说谁变了你拦得住时间么 提交于 2021-01-28 05:11:08
问题 I'm implementing a Tensorflow Variational Autoencoder, copying the code exactly from the book "Deep Learning with Python". Up until a few days ago, the code was working perfectly but as of yesterday it has stopped working (I have not changed the code). The code is for a generative model which can replicate images from the MNIST dataset. The specific error message is below: TypeError: An op outside of the function building code is being passed a "Graph" tensor. It is possible to have Graph

h2o.deeplearning autoencoder, calculating deep features manually

你离开我真会死。 提交于 2021-01-28 03:51:00
问题 I am trying to understand how deep features are made in an autoencoder. I created an autoencoder with h2o.deeplearning and then I tried to calculate the deepfeatures manually. The autoencoder fit = h2o.deeplearning( x = names(x_train), training_frame = x_train, activation = "Tanh", autoencoder = TRUE, hidden = c(25,10), epochs = 100, export_weights_and_biases = TRUE, ) I used as activation function Tanh and 2 hidden layers with no dropout, to make the things simple. Calculating hidden layer 1

Ada-Delta method doesn't converge when used in Denoising AutoEncoder with MSE loss & ReLU activation?

我们两清 提交于 2021-01-28 03:50:36
问题 I just implemented AdaDelta (http://arxiv.org/abs/1212.5701) for my own Deep Neural Network Library. The paper kind of says that SGD with AdaDelta is not sensitive to hyperparameters, and that it always converge to somewhere good. (at least the output reconstruction loss of AdaDelta-SGD is comparable to that of well-tuned Momentum method) When I used AdaDelta-SGD as learning method in in Denoising AutoEncoder, it did converge in some specific settings, but not always. When I used MSE as loss

Ada-Delta method doesn't converge when used in Denoising AutoEncoder with MSE loss & ReLU activation?

最后都变了- 提交于 2021-01-28 02:50:49
问题 I just implemented AdaDelta (http://arxiv.org/abs/1212.5701) for my own Deep Neural Network Library. The paper kind of says that SGD with AdaDelta is not sensitive to hyperparameters, and that it always converge to somewhere good. (at least the output reconstruction loss of AdaDelta-SGD is comparable to that of well-tuned Momentum method) When I used AdaDelta-SGD as learning method in in Denoising AutoEncoder, it did converge in some specific settings, but not always. When I used MSE as loss

Model inputs must come from `tf.keras.Input` …, they cannot be the output of a previous non-Input layer

∥☆過路亽.° 提交于 2020-12-29 18:21:01
问题 I'm using Python 3.7.7. and Tensorflow 2.1.0. I have a pre-trained U-Net network, and I want to get its encoder and its decoder . In the following picture: You can see a convolutional encoder-decoder architecture. I want to get the encoder part, that is, the layers that appears on the left of the image: And the decoder part: I get the U-Net model from this function: def get_unet_uncompiled(img_shape = (200,200,1)): inputs = Input(shape=img_shape) conv1 = Conv2D(64, (5, 5), activation='relu',

Model inputs must come from `tf.keras.Input` …, they cannot be the output of a previous non-Input layer

ⅰ亾dé卋堺 提交于 2020-12-29 18:10:57
问题 I'm using Python 3.7.7. and Tensorflow 2.1.0. I have a pre-trained U-Net network, and I want to get its encoder and its decoder . In the following picture: You can see a convolutional encoder-decoder architecture. I want to get the encoder part, that is, the layers that appears on the left of the image: And the decoder part: I get the U-Net model from this function: def get_unet_uncompiled(img_shape = (200,200,1)): inputs = Input(shape=img_shape) conv1 = Conv2D(64, (5, 5), activation='relu',