For questions related to library of basic neural networks algorithms and learning algorithms for Python.
neurolab should be used on questions related to library of basic neural networks algorithms and learning algorithms for python
Sample
import neurolab as nl
# Create network
net = nl.net.newff([[-1, 1]], [5, 1])
# Change train function
net.trainf = nl.train.train_bfgs
# Change init function
for l in net.layers:
l.initf = nl.init.InitRand([-2., 2.], 'wb')
# new inicialized
net.init()
# Change error function
net.errorf = nl.error.MSE()
# Change weight of input layer
net.layers[0].np['w'][:] = 0.0
net.layers[0].np['w']
# => array([[ 0.],
# [ 0.],
# [ 0.],
# [ 0.],
# [ 0.]])
# Change bias of input layer
net.layers[0].np['b'][:] = 1.0
net.layers[0].np['b']
# => array([ 1., 1., 1., 1., 1.])
# Save network in file
net.save('test.net')
# Load network
net = nl.load('mynetwork.net')
References