Appropriate way to deal with processes with internal state and data propagation delay #877
Unanswered
waltergallegog
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear Lava community,
I'm currently working on a network that consists of several layers.
I'm using some custom processes, connected using dense processes.
Because I'm using dense processes for the connections, this introduces a delay in the data propagation. For the sake of simplicity lets assume my network is:
For the first 2 timesteps, L3 will process "garbage", as the Dense23 connection will output zeros even if there is no input. From the Dense23 code:
Only after the input has propagated to all Layers (timestep 3) we can consider the output of L3 valid.
This is usually not a problem, as I just have to wait for 3 timesteps before checking the output value.
However, I'm facing some issues when using processes that have an internal state.
For example, lets say in the above example L3 has an internal state that depends on some initial value, the input, and some calculations.
By the time the first data point is propagated through the network and reaches L3, L3 has already performed computations using the "garbage" data, and corrupted the initial value of its internal state. This leads to an incorrect network output.
My idea to deal with this is to add an additional "control" signal that is propagated through all the layers and indicates to L3 when it is actually safe to start computing and updating the internal state variables, but I'm not sure this is a good idea.
Do you have any other suggestion on how to deal with such cases?
Thanks and BR,
Walter.
Beta Was this translation helpful? Give feedback.
All reactions