I recently started using pybrain and I was testing it out using the code seen below. I received a number when i printed trainer.train() and my question is how i can turn that into a program that when i plug in the inputs, it runs it through the network and creates an output akin to the targets. Any help would be much appreciated! PS Sorry if this is a stupid question, I'm somewhat new to python and very new to pybrain.
from pybrain.tools.shortcuts import buildNetwork
from pybrain.structure import TanhLayer
net = buildNetwork(2, 3, 1)
print net.activate([2, 1])
from pybrain.datasets import SupervisedDataSet
ds = SupervisedDataSet(2, 1)
ds.addSample((0, 0), (0,))
ds.addSample((0, 1), (1,))
ds.addSample((1, 0), (1,))
ds.addSample((1, 1), (0,))
from pybrain.supervised.trainers import BackpropTrainer
net = buildNetwork(2, 3, 1)
trainer = BackpropTrainer(net, ds)
print trainer.train()
trainer.trainUntilConvergence()