Here is some script from the tutorial for passing values
import nef net=nef.Network('Test Network') net.add_to(world) input=net.make_input('input',values=[0]) A=net.make('A',neurons=100,dimensions=1) B=net.make('B',neurons=100,dimensions=1) net.connect(input,A) net.connect(A,B)
Here it is broken down:
# this part sets it up
import nef net=nef.Network('Test Network') net.add_to(world)
# create an input
# input is the name of the input
# the fact that it is colored may mean input is a key word also
# probably best to use something else, e.g., input1
input=net.make_input('input',values=[0])
# create some networks
A=net.make('A',neurons=100,dimensions=1) B=net.make('B',neurons=100,dimensions=1)
# connect everything up
net.connect(input,A) net.connect(A,B)
No comments:
Post a Comment