In [42]:
import numpy
import sys

sys.path.append("./deepthought")
sys.path.append("/home/mrueckl/Theano/")

import theano

from deepthought.mlpdata import MLPData
from deepthought.factories import feed_forward_factory
from deepthought.activationfunctions import SimpleExpSigmoid


[autoreload of cutils_ext failed: Traceback (most recent call last):
  File "/home/mrueckl/lib/python2.7/site-packages/IPython/extensions/autoreload.py", line 229, in check
    superreload(m, reload, self.old_objects)
ImportError: No module named cutils_ext
]

In [35]:
m  = feed_forward_factory([1,2,3], SimpleExpSigmoid())

In [36]:
print m


MLPData with 3 layers and 6 neurons

In [37]:
f = SimpleExpSigmoid
d = SimpleExpSigmoid.derivative()

In [38]:
plt.plot(f.evaluate(numpy.linspace(-3,3,10)))
plt.plot(d.evaluate(numpy.linspace(-3,3,10)))


Out[38]:
[<matplotlib.lines.Line2D at 0x2da7750>]

In [7]:
for l in m.view().layers():
    print l
    for n in l.neurons():
        print n


View on layer 0 of MLPData with 3 layers and 6 neurons
View on neuron 0 of MLPData with 3 layers and 6 neurons
View on layer 1 of MLPData with 3 layers and 6 neurons
View on neuron 0 of MLPData with 3 layers and 6 neurons
View on neuron 1 of MLPData with 3 layers and 6 neurons
View on layer 2 of MLPData with 3 layers and 6 neurons
View on neuron 0 of MLPData with 3 layers and 6 neurons
View on neuron 1 of MLPData with 3 layers and 6 neurons
View on neuron 2 of MLPData with 3 layers and 6 neurons