-
Hello! Here, cell b is receiving from cells a & c via static synapses a_b and c_b
And here is the output:
I would want to get a value of 2 from the b node, but the
with output:
Wondering if there is an established way of achieving this. Would greatly appreciate any help or pointers! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello there, Great to hear you are messing around with ngc-learn-beta! The canonical way of getting two or more inputs to combine together as input to the same compartment in ngc-learn is done via ngc-learn The way to get two or more incoming signals to be combined via addition (the two inputs should be summed, as per what you wish to do), you will need to use the
and then replace your proposed two lines:
with the following (single-liner):
Note that the
Using operators is the canonical way of wiring many things up in ngc-learn specifically b/c this will also play nicely with ngc-learn's compiler for producing globally Jax "jit-i-fied" functions (behind the scenes). It's also nice to know you can also do recurrence with these operators too:
where some time notation is used in the comment to the right to help illustrate what the ngc-learn backend compiler is understanding this expression to be. Note that ngc-learn https://ngc-learn.readthedocs.io/en/latest/tutorials/foundations/operations.html Technically, it's also possible to write your own operators that "plug in" to this bit of the compiler too (for example, we don't have the mathematical pi operator for generalized multiplication written internally, but it would be possible for one write their own custom operator to do this). Additional Clarification Note: |
Beta Was this translation helpful? Give feedback.
Hello there,
Great to hear you are messing around with ngc-learn-beta!
The canonical way of getting two or more inputs to combine together as input to the same compartment in ngc-learn is done via ngc-learn
operators
. By default, ngc-learn uses theoverwrite
operator which is why you will get what is being output fromc_b.outputs
overriding the output froma_b.outputs
; the overwrite operator will just end up placing the most "recent" or last-wired-in output signal into your compartmentj
.The way to get two or more incoming signals to be combined via addition (the two inputs should be summed, as per what you wish to do), you will need to use the
summation
operator. At the top of your scri…