deep-learning

Tensorflow, uninitialized variables despite running global_variable_initializer

泄露秘密 提交于 2021-01-28 07:30:42
问题 I'm new to Tensorflow. I worked in Caffe previously. I'm trying to implement http://cvlab.cse.msu.edu/pdfs/Tai_Yang_Liu_CVPR2017.pdf in Tensorflow. I'm having trouble with variables in Tensorflow, despite having them initialized. I tried using tf.get_variable instead of tf.Variable, but this didn't work. And setting initializer=tf.contrib.layers.xavier_initializer() did nothing. My code: import tensorflow as tf import sys, os import numpy as np global xseed def get_model(inp, train): #create

Tensorflow, uninitialized variables despite running global_variable_initializer

﹥>﹥吖頭↗ 提交于 2021-01-28 06:50:21
问题 I'm new to Tensorflow. I worked in Caffe previously. I'm trying to implement http://cvlab.cse.msu.edu/pdfs/Tai_Yang_Liu_CVPR2017.pdf in Tensorflow. I'm having trouble with variables in Tensorflow, despite having them initialized. I tried using tf.get_variable instead of tf.Variable, but this didn't work. And setting initializer=tf.contrib.layers.xavier_initializer() did nothing. My code: import tensorflow as tf import sys, os import numpy as np global xseed def get_model(inp, train): #create

Bias only Layer in Keras

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-28 05:18:38
问题 How could one build a layer in Keras which maps an input x to an output of the form x+b where b is a trainable weight of the same dimension? (Also the activation function here would be the identity). 回答1: You can always build a custom layer by extending tf.keras.layers.Layer class, here is how I'd do it import tensorflow as tf print('TensorFlow:', tf.__version__) class BiasLayer(tf.keras.layers.Layer): def __init__(self, *args, **kwargs): super(BiasLayer, self).__init__(*args, **kwargs) def

CNN architecture: classifying “good” and “bad” images

时光总嘲笑我的痴心妄想 提交于 2021-01-28 05:11:58
问题 I'm researching the possibility of implementing a CNN in order to classify images as "good" or "bad" but am having no luck with my current architecture. Characteristics that denote a "bad" image: Overexposure Oversaturation Incorrect white balance Blurriness Would it be feasible to implement a neural network to classify images based on these characteristics or is it best left to a traditional algorithm that simply looks at the variance in brightness/contrast throughout an image and classifies

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

Can't create datasets and load images in COCO annotator

故事扮演 提交于 2021-01-28 03:25:35
问题 I'm trying to annotate images with COCO key points for pose estimation using https://github.com/jsbroks/coco-annotator. As described in the Installation section I cloned the repo. I installed Docker and Docker-compose. Following this I started the container with $ docker-compose up and it is running. I am now on the website https://annotator.justinbrooks.ca/, I created one user and datasets but they do not appear in the repo datasets/ folder. I tried to create them manually and to load images

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

understanding conv net layers

梦想与她 提交于 2021-01-28 02:40:21
问题 I've been reading about Conv nets and I've programmed a few models myself. When I see visual diagrams of other models it shows each layer being smaller and deeper than the last ones. Layers have 3 dimensions like 256x256x32. What is this third number? I assume the first two numbers are the number of nodes but I don't know what the depth is. 回答1: TL;DR: 256x256x32 refers to the layer's output shape rather than the layer itself. There are many articles and posts out there explaining how

Gradient accumulation in an RNN

点点圈 提交于 2021-01-28 01:52:36
问题 I ran into some memory issues (GPU) when running a large RNN network, but I want to keep my batch size reasonable so I wanted to try out gradient accumulation. In a network where you predict the output in one go, that seems self-evident but in an RNN you do multiple forward passes for each input step. Because of that, I fear that my implementation does not work as intended. I started from user albanD's excellent examples here , but I think they should be modified when using an RNN. The reason