Reshape problems in the GAN discriminator (Tensorflow)

I was trying to implement various GANs in Tensorflow (after doing it successfully in PyTorch), and I am having some problems while coding the discriminator part. The code of the discriminator (very similar to the MNIST CNN tutorial) is: def discrimin

Convolutional neural network using openCV

I wonder if there is a way of building a convolutional neural network with openCV. Basically I have already trained the cifarnet cnn using the python API of Tensorflow but now I want to run the inference without tensorflow by using C++. The only open

Keras: How to Obtain Layer Shapes in a Sequential Model

I would like to access the layer size of all the layers in a Sequential Keras model. My code: model = Sequential() model.add(Conv2D(filters=32, kernel_size=(3,3), input_shape=(64,64,3) )) model.add(MaxPooling2D(pool_size=(3,3), strides=(2,2))) Then I

how to choose the size of the batch in caffe

I understand that bigger batch size gives more accurate results from here. But I'm not sure which batch size is "good enough". I guess bigger batch sizes will always be better but it seems like at a certain point you will only get a slight impro

I get a black image in FCN32

I trained FCN32 from the scratch on my data, unfortunately I am getting a black image as output. Here is the loss curve. I am not sure whether this training loss curve is normal or not, or whether I have done something wrong or not. I really apprecia

What does tf.gfile do in TensorFlow?

I've seen people using several functions from tf.gfile such as tf.gfile.GFile or tf.gfile.Exists. I have the idea that tf.gfile deals with files. However, I haven't been able to find the official documentation to see what else it offers. It'd be grea

Tensorflow TFLearn sample job

I'm approaching to the world of deep learning, and the framework that I'm using is Tensorflow. In order to start quickly, I've seen that there are high level api called TFLearn, wich makes the creation of a network a lot easier. Unfortunaly, there ar

Tensorboard incorporations do not display tensors?

Tensorboard provides embedding visualization of tensorflow variables by using tf.train.Saver(). The following is a working example (from this answer) import os import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data from te

how to change softmaxlayer with regression in matconvnet

I am trying to train MNIST data set with single output. It means when i give an 28*28 input (image) the model gives us a just number. For example i give '5', the model give me as a result 4.9,5, 5.002 or close to 5. So I have red some documents. Peop

Approach to the sentence similarity algorithm

I want to implement a sentence similarity algorithm. Is it possible to implement it using sequence prediction algorithm? If it is possible what kind of approach should i go forward with or is there any other method which is more suitable for sentence

Keras Maxpooling2d layer gives ValueError

I am trying to replicate VGG16 model in keras, the following is my code: model = Sequential() model.add(ZeroPadding2D((1,1),input_shape=(3,224,224))) model.add(Convolution2D(64, 3, 3, activation='relu')) model.add(ZeroPadding2D((1,1))) model.add(Conv

Tensorflow Inception resnet v2 input tensor

I'm trying to run this code import os import tensorflow as tf from datasets import imagenet from nets import inception_resnet_v2 from preprocessing import inception_preprocessing checkpoints_dir = 'model' slim = tf.contrib.slim batch_size = 3 image_s

WideNDeep Tutorial Code

Concerning this line of code in the WideNDeep tutorial: m.fit(input_fn=lambda: input_fn(df_train), steps=FLAGS.train_steps) What is the batch_size used for training the deep model? Presently, it seems to me that the model is not batch_trained? Is the

Keras VGG extract features

I have loaded a pre-trained VGG face CNN and have run it successfully. I want to extract the hyper-column average from layers 3 and 8. I was following the section about extracting hyper-columns from here. However, since the get_output function was no

Converting a patch image

I have a code which finds the single patch from the given center coordinate of the image. I want to convert it, so with that it shall find the multiple patches of size 32X32 and stride of 16. The patches should be from the image, neither from border

How can I form a neural network from many datasets?

I have many sets of related data that I want to use to train a neural network. The data is from racing pigeons that fly a set distance. The inputs could be weight, age, size, wing span, sex, distance, time etc. sampled lets say every minute. I am try

Loss splitting in the tensor flow (on the DeepMind DQN)

I am trying my own implementation of the DQN paper by Deepmind in tensor flow and am running into difficulty with clipping of the loss function. Here is an excerpt from the nature paper describing the loss clipping: We also found it helpful to clip t

Effective reading of your own images in tensorflow

I've skimmed over all tensorflow tutorials in which all data sets were loaded in RAM due to their small size. However, my own data (~30 Gb of images) can not be loaded in memory, therefore I'm looking for effective ways of reading images for further

How to calculate the size of the receptive field?

I'm reading paper about using CNN(Convolutional neural network) for object detection. Rich feature hierarchies for accurate object detection and semantic segmentation Here is a quote about receptive field: The pool5 feature map is 6x6x256 = 9216 dime

How Deconcentration and Deconvolution Works in DeConvNet

I have been trying to understand how unpooling and deconvolution works in DeConvNets. Unpooling While during the unpooling stage, the activations are restored back to the locations of maximum activation selections, which makes sense, but what about t

VGG face descriptor in python with caffe

I want implement VGG Face Descriptor in python. But I keep getting an error: TypeError: can only concatenate list (not "numpy.ndarray") to list My code: import numpy as np import cv2 import caffe img = cv2.imread("ak.png") img = cv2.cv

Changing the Caffe C ++ prediction code for multiple entries

I implemented a modified version of the Caffe C++ example and while it works really well, it's incredibly slow because it only accepts images one by one. Ideally I'd like to pass Caffe a vector of 200 images and return the best prediction for each on

What is the meta `weight_decay` parameter in Caffe?

Looking at an example 'solver.prototxt', posted on BVLC/caffe git, there is a training meta parameter weight_decay: 0.04 What does this meta parameter mean? And what value should I assign to it?The weight_decay meta parameter govern the regularizatio