neural-network

Improving Accuracy of a Tensorflow neural network- python

白昼怎懂夜的黑 提交于 2020-01-17 06:02:17
问题 This is a continuation of my first question: Receiving random cost output on tensorflow regression- python I am using a multi-layered perceptron ANN to predict the Phyla of bacteria samples based on other observed data. Every time I run my code I get an accuracy of 0. The dataset is not the best as there are plenty of NaN's (that have been replaced with 0), but I expected better than nothing. I am looking for help to debug and improved accuracy The dataset that I am currently using can be

How to avoid overfitting (Encog3 C#)?

╄→гoц情女王★ 提交于 2020-01-17 05:32:52
问题 I am new to neural network and I'm working with Encog3. I have created feedforward neural network which can be train and tested. Problem is that I'm not sure how to prevent overfitting. I know I have to split data into training, testing and evaluation set, but I'm not sure where and when to use evaluation set. Currently, I split all data into training and testing set (50%, 50%), train network on one part, test on another. Accuracy is 85%. I tried with CrossValidationKFold but in that case

XOR Neural Network(FF) converges to 0.5

一世执手 提交于 2020-01-17 02:50:08
问题 I've created a program that allows me to create flexible Neural networks of any size/length, however I'm testing it using the simple structure of an XOR setup(Feed forward, Sigmoid activation, back propagation, no batching). EDIT: The following is a completely new approach to my original question which didn't supply enough information EDIT 2: I started my weight between -2.5 and 2.5, and fixed a problem in my code where I forgot some negatives. Now it either converges to 0 for all cases or 1

Model not learning in tensorflow

若如初见. 提交于 2020-01-17 02:20:09
问题 I am new to tensorflow and neural networks, and I am trying to create a model that just multiples two float values together. I wasn't sure how many neurons I would want, but I picked 10 neurons and tried to see where I could go from that. I figured that would probably introduce enough complexity in order to semi-accurately learn that operation. Anyways, here is my code: import tensorflow as tf import numpy as np # Teach how to multiply def generate_data(how_many): data = np.random.rand(how

how to setup Caffe imagenet_solver.prototxt file for fewer jpgs, program exited after iteration 0

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-16 18:19:28
问题 We need help to understand the parameters to use for smaller set of training (6000 jpgs) and val (170 jpgs) jpgs. Our execution was killed and exited after test score 0/1 in Iteration 0. We are trying to run the imagenet sample on the caffe website tutorial at http://caffe.berkeleyvision.org/gathered/examples/imagenet.html. Instead of using the full set of ILSVRC2 images in the package, we use our own training set of 6000 jpegs and val set of 170 jpeg images. They are each 256 x 256 jpeg

running a python file from the ipython notebook using command line in loop

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-16 13:17:19
问题 I have built a model that trains using training.py. I want to tune the hyperparameters and run the following script from the notebook in loop by varying the arguments passed. python training.py --cuda --emsize 1500 --nhid 1500 --dropout 0.65 --epochs 10 For eg: If the hyperparameter is dropout, I want to be able to run the script in loop by varying dropout values and plot the graph. 回答1: You can run a shell command using ! in an ipython environment as !ls -l If you want to use it with

Test net output #0: accuracy = 1 - Always- Caffe

試著忘記壹切 提交于 2020-01-16 08:34:12
问题 I'm always getting the same accuracy. When i run the classification, its always showing 1 label. I went through many articles and everyone recommending to shuffle the data. I did that using random.shuffle and also tried convert_imageset script as well but no help. Please find my solver.protoxt and caffenet_train.prototxt below. I have 1000 images in my dataset. 833 images in train_lmdb and rest of them in validation_lmdb. Training logs: I1112 22:41:26.373661 10633 solver.cpp:347] Iteration

how to make a dictionary that can hold more than 1 data?

耗尽温柔 提交于 2020-01-16 05:38:09
问题 i've been trying to modify the program so that it could accept more than one data for a single alphabet character for example letter "A". there were some sort of ContainsKey function that allow only one key from keyboard to hold only one data. how to make it possible to hold more than one data? I'm gonna make it very clear, this is an online OCR program using unsupervised neural network. when a user draw a character in the drawing space, they will have the option to add the character into the

how to connect the library alglib in QT C++

拈花ヽ惹草 提交于 2020-01-16 01:06:08
问题 I want to run the example from the official site link. When I am trying to compile mlptrainer trn; multilayerperceptron network; mlpreport rep; real_1d_array x = "[0]"; real_1d_array y = "[0,0]"; real_2d_array xy = "[[+1,0],[+2,0],[-1,1],[-2,1],[0,0],[0,1]]"; mlpcreatetrainercls(1, 2, trn); mlpcreatec1(1, 5, 2, network); mlpsetdataset(trn, xy, 6); mlptrainnetwork(trn, network, 5, rep); I get an many errors they all look C:\Qt\Tools\QtCreator\bin\VK_DotaFeed\neuralnet.cpp:-1: error: undefined

Tensorflow : ValueError: Shapes must be equal rank, but are 0 and 2

一个人想着一个人 提交于 2020-01-15 09:53:47
问题 I am getting shape error while multipying (x1,Wo1). But I can't find the reason for it. Error : ValueError: Shapes must be equal rank, but are 0 and 2 From merging shape 0 with other shapes. for 'add_2/x' (op: 'Pack') with input shapes: [], [20,1]. import tensorflow as tf import numpy as np import pandas as pd import math df1=pd.read_csv(r'C:\Ocean of knowledge\Acads\7th sem\UGP\datasets\xTrain.csv') df1 = df1.dropna() xTrain = df1.values df2 = pd.read_csv(r'C:\Ocean of knowledge\Acads\7th