RgcComputeSpikesNoiseInit

From VISTA LAB WIKI

Jump to: navigation, search

This function adds a few frames of noise to the absorption data before computing the spikes. This enables the network to "warm up" on the noise frames, in order to avoid oscillations of the spikes over time. rgcComputeEverything uses this function.

[edit] Use

This function is just a wrapper around rgcComputeSpikes, that adds noise frames before the spike computations. The extra frames are deleted after the computation.

  [spikes, rgcInterm] = rgcComputeSpikesNoiseInit(absorptions, param, noisyFrames,sameLayers)

The use is the same as rgcComputeSpikes, except for the noisyFrames parameter, which is the number of noise frames (default is 100).


[edit] Example

scene = sceneCreate('slantedBar');
rgcP = rgcParameters;
rgcP.addOneLayer('default');
abso = scene2Absorptions(scene,[],[],100,1,[],0.3,1.5);

%The normal rgcComputeSpikes will create an oscillation in the spikes :

spikes = rgcComputeSpikes(abso,rgcP);
mplay(255*spikes{1})

%The noisy initialisation in rgcComputeSpikesNoiseInit will avoid this :

rgcP.getLayer(1).resetCurrentState(); % reset the layer
spikes2 = rgcComputeSpikesNoiseInit(abso,rgcP);
mplay(255*spikes2{1})


You can also look at the example in the rgcLayer page for explanations about resetting the layer.

Personal tools