neural-network

create hfd5 with float numbers for caffe

大兔子大兔子 提交于 2020-01-06 02:47:09
问题 I want to feed caffe vectors of labels (multi label regression problem), so I have used the following link for creating hdf5 files. Using this code, I created an image_list.txt which contains path of files and float labels in each line, e.g. /home/deep/00000.bmp 0.9997 0.0236 -0.0082 -0.0231 0.9980 0.0588 0.0096 -0.0586 0.9982 -0.0046 0.1084 0.3938 but it seems that it only works for integer label. when I run demo.m the following error comes: Error using dataread Trouble reading integer from

Feeding Labels with one hot encoded vectors in Neural Network

别等时光非礼了梦想. 提交于 2020-01-05 14:12:38
问题 I'm trying to create a Categorical classification Neural Network(NN) I have been given dataset which has 169307 rows. My output labels are [0,1,2] I one hot encoded them but I'm not able to operate on them using Neural Nets. I encounter Value Error. I guess I have made mistake in Reshaping my "target" column. I have converted into a list l Here is my complete Code to the Solution. # coding: utf-8 # In[349]: import pandas as pd import tensorflow as tf import matplotlib.pyplot as plt import

Keras that does not support TensorFlow 2.0. We recommend using `tf.keras`, or alternatively, downgrading to TensorFlow 1.14

南笙酒味 提交于 2020-01-05 08:27:09
问题 I am having an error regarding (Keras that does not support TensorFlow 2.0. We recommend using tf.keras , or alternatively, downgrading to TensorFlow 1.14.) any recommendations. thanks import keras #For building the Neural Network layer by layer from keras.models import Sequential #To randomly initialize the weights to small numbers close to 0(But not 0) from keras.layers import Dense classifier=tf.keras.Sequential() classifier.add(Dense(output_dim = 6, init = 'uniform', activation = 'relu',

Early Detection of peaks with Neural Network

£可爱£侵袭症+ 提交于 2020-01-05 08:23:26
问题 I am using Neural Network technique(Backward Learning). As a output for example I am giving the 18 point ahead value and as input I gave the latest 5 point to train.(I tried the many combinations of input data 5,10, 20 ,30...). For example, the way I trained my data: t, t+1, t+2, t+3, t+4... => t+22(4+18) t+1, t+2, t+3, t+4, t+5... => t+23 Exponential inputs: t, t+1, t+2, t+4, t+8... => t+26(8+18) t+1, t+2, t+3, t+8, t+9... => t+27 After I trained, I have done forward learning with the my

Which features can i use for handwritten OCR other than a downsampled binary grid of the image?

社会主义新天地 提交于 2020-01-05 07:15:16
问题 Hi I have been searching though research papers on what features would be good for me to use in my handwritten OCR classifying neural network. I am a beginner so I have been just taking the image of the handwritten character, made a bounding box around it, and then resize it into a 15x20 binary image. So this means i have an input layer of 300 features. From the papers i have found on google (most of which are quite old) the methods really vary. My accuracy is not bad with just a binary grid

Float Multi-label Regression in Caffe - loss results

痴心易碎 提交于 2020-01-05 06:36:14
问题 I have trained NN for Regression problem. my data type is HDF5_DATA that made of .jpg images (3X256X256) and float-label array (3 labels). Data-Set create script: import h5py, os import caffe import numpy as np SIZE = 256 # images size with open( '/home/path/trainingTintText.txt', 'r' ) as T : lines = T.readlines() X = np.zeros( (len(lines), 3, SIZE, SIZE), dtype='f4' ) labels = np.zeros( (len(lines),3), dtype='f4' ) for i,l in enumerate(lines): sp = l.split(' ') img = caffe.io.load_image( sp

cost function outputs 'nan' in tensorflow

允我心安 提交于 2020-01-05 06:35:33
问题 While studying the tensorflow, I faced a problem. The cost function output 'nan'. And, if you find any other wrong in source code let me know the links for it. I am trying to send the cost function value to my trained model, but its not working. tf.reset_default_graph() tf.set_random_seed(777) X = tf.placeholder(tf.float32, [None, 20, 20, 3]) Y = tf.placeholder(tf.float32, [None, 1]) with tf.variable_scope('conv1') as scope: W1 = tf.Variable(tf.random_normal([4, 4, 3, 32], stddev=0.01), name=

Float Multi-label Regression in Caffe - loss results

99封情书 提交于 2020-01-05 06:33:40
问题 I have trained NN for Regression problem. my data type is HDF5_DATA that made of .jpg images (3X256X256) and float-label array (3 labels). Data-Set create script: import h5py, os import caffe import numpy as np SIZE = 256 # images size with open( '/home/path/trainingTintText.txt', 'r' ) as T : lines = T.readlines() X = np.zeros( (len(lines), 3, SIZE, SIZE), dtype='f4' ) labels = np.zeros( (len(lines),3), dtype='f4' ) for i,l in enumerate(lines): sp = l.split(' ') img = caffe.io.load_image( sp

cost function outputs 'nan' in tensorflow

会有一股神秘感。 提交于 2020-01-05 06:33:34
问题 While studying the tensorflow, I faced a problem. The cost function output 'nan'. And, if you find any other wrong in source code let me know the links for it. I am trying to send the cost function value to my trained model, but its not working. tf.reset_default_graph() tf.set_random_seed(777) X = tf.placeholder(tf.float32, [None, 20, 20, 3]) Y = tf.placeholder(tf.float32, [None, 1]) with tf.variable_scope('conv1') as scope: W1 = tf.Variable(tf.random_normal([4, 4, 3, 32], stddev=0.01), name=

Why do predictions differ for Autoencoder vs. Encoder + Decoder?

有些话、适合烂在心里 提交于 2020-01-05 06:07:09
问题 I build a CNN 1d Autoencoder in Keras, following the advice in this SO question, where Encoder and Decoder are separated. My goal is to re-use the decoder, once the Autoencoder has been trained. The central layer of my Autoencoder is a Dense layer, because I would like to learn it afterwards. My problem is that if I compile and fit the whole Autoencoder, written as Decoder()Encoder()(x) where x is the input, I get a different prediction when I do autoencoder.predict(training_set) w.r.t. if I