Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

number of strides per input pattern in algorithm.py #4

Open
piewchee opened this issue Sep 19, 2018 · 5 comments
Open

number of strides per input pattern in algorithm.py #4

piewchee opened this issue Sep 19, 2018 · 5 comments

Comments

@piewchee
Copy link

piewchee commented Sep 19, 2018

Hi Sven,
@SvenGronauer
With reference to line 348-349 regarding the calculation of number of strides per input pattern.
windows = ((tensor_prev[0]-tensor[0])/stride + 1)**2*tensor_prev[2]
If I understand correctly , this parameter is used for calculation of total time required for simulation.
However I am confused with the above equation. wouldn't be the number of strides for one input layer
equal to tensor{0]*tensor[0] ?

@SvenGronauer
Copy link
Owner

Hello @piewchee ,
Yes, you are write: the quantity of windows can be used to calculate the total time required for the simulation.
I refer the size of one kernel shift as stride.
If you assume tensor[0]*tensor[0], then you would calculate the right number of windows for stride=1 (shifting the kernel over the input one step by one step).

But if you choose a stride > 1, then the number of windows is reduced with respect to the parameter stride.

Greetings!

@piewchee
Copy link
Author

piewchee commented Sep 30, 2018 via email

@SvenGronauer
Copy link
Owner

Hello @piewchee ,

1.) Yes, that's true. If you increase the stride >=2, the number of windows is reduced.

2.) Have you changed any machine parameters (like machine time step or time_scale_factor or do you have too many neurons per core ?) I used 100 neurons per core, and the other two parameters set to default.

Otherwise, try to change these parameters in parameters.py to the following values:
SIM_INTERVAL = 50 IDLE_FIRING_TIME = 25

3.) In my script, each kernel is given a time window of 100ms (=sim_interval) to get potentiated by input neurons. After the 100ms sim interval, the kernel is shifted and the next neurons are potentiated.

@piewchee
Copy link
Author

piewchee commented Oct 2, 2018

HI @SvenGronauer
Yup I tried the reduced the timing. I did not change the 100 core limit.
The spinnnaker ppl think that the input_neurons in the same core fire at the same time step may have cause the overload. I noticed that there is a possibility of 5 neurons (out of 9 in 3x4 kernel) fire at the same time-step.
By the way, i noticed there is something strange with the rate_code spiketimes.
I understand that if intensity > threshold, it will fire 10 times randomly with t_d and offset.
However,
for eg. neuron id_0[ the spiketimes is the same for 10 times. eg. 54900, 54900, 54900 ..]

Rgds
Del

@SvenGronauer
Copy link
Owner

Hi @piewchee,
the amount of spikes is not exactly 10 times.
If the the intensity of the input pixel as greater than a threshold, then the amount of spikes should be proportional to the input pixel intensity. Do you present the input pixels (input image) as uint8 in the interval [0,255] ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants