-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make individual connection output probeable #974
Conversation
This LGTM and as a bugfix makes sense for 2.1. Can you add a changelog entry? |
A test would also be good; I can add that if you want. |
Sure, if you have a good idea for a test go for it. I'll add a changelog entry. |
334bfbd
to
c4385b7
Compare
Rebased to master and added a test. @drasmuss can you review? |
I think it might make sense to include the slice in the probed output. I.e., if I do conn = nengo.Connection(a, b[0])
probe = nengo.Probe(conn) I think I would expect the probed values to be 1D. Something like this instead: # Store the weighted-filtered output in case we want to probe it
model.sig[conn]['weighted'] = signal[post_slice] |
The slice is on where the function is going, though, not on the function itself. So I'm fine with leaving off the output slice. In your example, the probed values HAVE to be 1D, because your connection code is saying "compute this function and put it into the first dimension of 'b'", and since the first dimension of 'b' is 1D then the probed thing has to be 1D. So the output slice isn't being applied to the output of the connection, it's being applied to where the connection's output is going. Does that make sense? |
Ah yes of course you're right, I just glanced at the model.add_op(SlicedCopy(
signal, model.sig[conn]['out'], b_slice=post_slice,
inc=True, tag="%s.gain" % conn)) right beneath and was thinking "we should have that in", but of course the slicing is being done by the weights already. All looks good then! |
c4385b7
to
3ad892e
Compare
Fixes #973.