Closed colleenjg closed 5 months ago
@TomGeorge1234 Do you recall the rationale behind having "I" in the inputs keys?
Hmm, a quick search suggests it is a hangover from a very early version of FeedForwardLayer
(the DendriticCompartment
class in this old demo on path integration. It was likely something to do with only wanting to overwrite a variable on a online cell update but not when you plot the rate map etc. offline...or something like that.
As far as I can tell, this doesn't matter and we could get rid of "I_temp"
and just have "I"
. Does this match your understanding?
Ah, I see. For my part, the most useful approach would be to update "I"
only when .get_state()
is called with evaluate_at="last"
. In this way, "I"
would allow us to store the latest input firingrate from each input layer. If we use this approach, then I think we would only need keep "I_temp"
if we also want to store the last input firingrates computed using .get_state()
, even if it wasn't with evaluate_at="last"
.
I can't see problem with this. I just pushed a change that should implement that for you. Want to let me know if it works? It's now:
Yeah, that looks good to me!
Great, closing the issue :))
I just stumbled upon the fact that the "I" key in the
inputs
attribute of FeedForward Neurons is initialized with zeros when an input is added, but it is never updated thereafter. Only "I_temp" is updated whenget_state()
is called.I'm wondering whether it would be useful to update "I" during the update() step (i.e., when
get_state()
is called withevaluate_at="last"
).For example:
See https://github.com/RatInABox-Lab/RatInABox/blob/6c8f9c2a6cbb404bcb2222ac63ea4cb9e4b0a4e0/ratinabox/Neurons.py#L2635