In [1]:
%pylab inline
import convis
In [2]:
model = convis.filters.Conv1d()
model.exponential(0.01)
model.plot_impulse()
Out[2]:
In [3]:
model = convis.filters.Conv2d()
model.gaussian(0.1)
model.plot_impulse((10,21,21))
Out[3]:
In [4]:
model = convis.filters.Conv3d()
model.set_weight(randn(10,5,5))
model.plot_impulse((100,21,21))
Out[4]:
The RF class has only a 1 pixel output, so different receptive fields have to be created by using additional out_channels that each has a 3d filter. Similar to the Conv3d filter, RF does a 3d convolution, but it removes padding and cuts the input to the exact size of the weight. The result is a spatio-temporal receptive field that will give a single time series as an output.
In [5]:
model = convis.filters.RF()
model.set_weight(randn(10,5,5))
model.plot_impulse((100,9,9))
Out[5]:
In [6]:
model = convis.filters.RF(bias=False)
model.set_weight(randn(3,1,10,20,20))
inp = convis.samples.random_checker_stimulus(10,20,20).repeat(20,0)
o = model.run(inp,dt=200)
o
Out[6]: