Latency Encoding #36
-
Hi @jeshraghian, Thanks a lot for your response. Here it is once again because I have not precisely understood how to use the Latency encoding. I present here a snippet that shows how I use the Latency encoding on my dataset, however, I am highly suspicious that it is incorrect, as the latency encoding is getting way better accuracy than the rate encoding. So, please have a look and If I doing the latency encoding incorrectly, then I will be glad if you can provide me with some code that shows how to use it correctly.
Also just in case if you wonder how my labels look like. I have 8 classes, and I know which parts of my dataset belong to which class. Accordingly, my labels are defined as the following:
In consequence, the Looking forward to your response as soon as possible. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 23 replies
-
Hey @Dola47,
|
Beta Was this translation helpful? Give feedback.
-
Unfortunately I don't have the time to write your training loop, though I may include it in future tutorials. Until then, here are some issues with your code that suggest you're training a rate coded output, and not latency:
If you want latency coding at your output, your loss must only promote the correct class to fire first. I am assuming Your next problem will be |
Beta Was this translation helpful? Give feedback.
-
Do you have any example code that uses Latency Encoding to recognize the MNIST dataset? If so, could you please provide a link to it? |
Beta Was this translation helpful? Give feedback.
Unfortunately I don't have the time to write your training loop, though I may include it in future tutorials.
Until then, here are some issues with your code that suggest you're training a rate coded output, and not latency:
loss_fn(log_p_y[step], targets_it)
- your target is encouraging your network to fire at every single time step. This is effectively rate…