Closed PikaPei closed 3 years ago
The neuron implementation was changed from using an array in the neuron to store the state dynamically. Now, neurons are stored in immutable structs with non-array-fields with a new neuron constructed on every iteration with an updated struct.
This means that the bang-mutating notation is incorrect; update!(neuronLIF, 0., 0.001, 0)
no longer updates neuronLIF
in place because neuronLIF
and its fields are immutable. The correct call to replace it is neuronLIF = update(neuronLIF, 0., 0.001, 0)
I forgot to update the docs to reflect this. I'll update the docs this weekend and close the issue when that's complete.
Sorry, I just noticed the release notes. Thanks for your kind reply and update!
@PikaPei I've updated the docs and the gh-pages
branch so the online docs should reflect the correct syntax.
Thanks for pointing this out!
Hello, nice project! I followed the example in the documentation but something wrong happened. Here are my codes.
It raised warning:
Warning: Neurons should use update, not update! function
And the result ofprintln(neuronLIF.state)
is -55.0.