Feed-forward neural network solution for python
Project description
“ffnet” is a fast and easy-to-use feed-forward neural network training solution for python. Many nice features are implemented: arbitrary network connectivity, automatic data normalization, very efficient (also parallel) training tools, network export to fortran code…
Basic usage of the package is outlined below:
>>> from ffnet import ffnet, mlgraph, savenet, loadnet, exportnet >>> conec = mlgraph( (2,2,1) ) >>> net = ffnet(conec) >>> input = [ [0.,0.], [0.,1.], [1.,0.], [1.,1.] ] >>> target = [ [1.], [0.], [0.], [1.] ] >>> net.train_tnc(input, target, maxfun = 1000) >>> net.test(input, target, iprint = 2) >>> savenet(net, "xor.net") >>> exportnet(net, "xor.f") >>> net = loadnet("xor.net") >>> answer = net( [ 0., 0. ] ) >>> partial_derivatives = net.derivative( [ 0., 0. ] )
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
ffnet-0.7.zip
(64.6 kB
view hashes)
ffnet-0.7.tar.gz
(59.5 kB
view hashes)