python 2.7 - Looking for a way to train the final NN with all data? -


i'd need training neural network. know numpy has problems if weights 0 , can't handle this, neural network, if want use data, i've use trainsplit(eval_size=0.0). i'm trying run following network (based on theano 0.8.1, lasagne 0.2.dev1, nolearn 0.6.1dev0, numpy 1.12.0 , python 2.7.13):

net = neuralnet(     layers=[         ('input', layers.inputlayer),         ('dropout1', layers.dropoutlayer),         ('hidden', layers.denselayer),         ('dropout2', layers.dropoutlayer),         ('output', layers.denselayer),     ],     # layer parameters:     input_shape=(none, x.shape[1]),     dropout1_p=0.85,     dropout2_p=0.5,     hidden_num_units=2500,     hidden_nonlinearity=very_leaky_rectify,     output_nonlinearity=none,     output_num_units=y.shape[1],      # optimization method:     train_split=trainsplit(eval_size=0.0),  # !     update=nesterov_momentum,     update_learning_rate=theano.shared(float32(0.01)),     update_momentum=theano.shared(float32(0.9)),     regression=true,     max_epochs=5000,     verbose=1,     on_epoch_finished=[adjustvariable('update_learning_rate',                                       start=0.01, stop=0.00001),                        adjustvariable('update_momentum',                                       start=0.9, stop=0.999)],     custom_scores=[("acc", lambda y, yhat: accuracy(y, yhat))] )  np.random.seed(0) net.fit(x, y) 

but following error message:

traceback (most recent call last):     np.random.seed(0)   file "/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages/nolearn/lasagne/base.py", line 544, in fit     self.train_loop(x, y, epochs=epochs)   file "/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages/nolearn/lasagne/base.py", line 641, in train_loop     custom_scores, weights=batch_valid_sizes, axis=1)   file "/library/frameworks/python.framework/versions/3.6/lib/python3.6/site-packages/numpy/lib/function_base.py", line 1140, in average     "weights sum zero, can't normalized") zerodivisionerror: weights sum zero, can't normalized 

does know how fix this, i'd appriciate help, because i'm new in field. in advance:)


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -