Connection from connection output

I have a connection from nengo.Ensemble A to nengo.Ensemble B. I’ve probed specifically the input to B from A using nengo.Probe(net.conn, 'output'). This is different from probing nengo.Probe(net.B.neurons, 'input') because there are multiple inputs to B. Now I want to be able to access this in the simulation in real time; specifically I used the probed data to train a tensorflow model and now I want to integrate the model with my simulation, creating windows of this input to B from A and passing it to my tensornode. How do I access this? I tried a connection like this: nengo.Connection(net.conn, net.window_node, synapse=None) but that doesn’t work. And connecting just gives the neural activity in B, not the output from A to B.

Without having examples of the code that you are using, it’s hard to give specific advice. For your use case, I think the simplest approach is to recreate the connection from A to B in the connection from A to window_node.

As an example, doing this:


Should duplicate net.conn, and provide window_node with the same information that nengo.Probe(net.conn, "output") does.

As a note, the code snippet above is general purpose code. If you created the original connection using default values, you can exclude the default attributes (synapse, transform, etc.) from the duplicated connection.

1 Like