python 3.x - Missing method NeuralNet.train_split() in lasagne -
i learning deal python , lasagne. have following installed on pc:
- python 3.4.3
- theano 0.9.0
- lasagne 0.2.dev1
and six, scipy , numpy. call net.fit(), , stacktrace tries call train_split(x, y, self), which, guess, should split samples training set , validation set (both inputs x outputs y).
but there no method train_split(x, y, self) , there float field train_split - assume, ratio between training , validation set sizes. following error:
traceback (most recent call last):
file "...\workspaces\python\cnn\dl_tutorial\lasagne\test.py", line 72, in net = net1.fit(x[0:10,:,:,:],y[0:10])
file "...\python34\lib\site-packages\nolearn\lasagne\base.py", line 544, in fit self.train_loop(x, y, epochs=epochs)
file "...\python34\lib\site-packages\nolearn\lasagne\base.py", line 554, in train_loop x_train, x_valid, y_train, y_valid = self.train_split(x, y, self)
typeerror: 'float' object not callable
what wrong or missing? suggestions? thank much.
solved
in previous versions, input parameter train_split has been number, used same-named method. in nolearn 0.6.0, it's callable object, can implement own logic split data. instead of providing float number input parameter train_split, have provide callable instance (the default 1 trainsplit), executed in each training epoch.
Comments
Post a Comment