Skip to content
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

Probe.size_in is sometimes incorrect #1568

Open
drasmuss opened this issue Sep 12, 2019 · 0 comments
Open

Probe.size_in is sometimes incorrect #1568

drasmuss opened this issue Sep 12, 2019 · 0 comments

Comments

@drasmuss
Copy link
Member

Describe the bug

The Probe.size_in is always set to be the size_out of the object being probed. This is often correct, but the assumption fails for more unusual probes.

For example, when probing connection weights this will just report the size of the pre object, not the size of the weights. Or any probe on a learning rule will report a size_in of 0.

To reproduce

A minimal code snippet to reproduce the behavior:

import nengo
import numpy as np

with nengo.Network() as net:
    a = nengo.Ensemble(1, 2)
    b = nengo.Node(size_in=10)
    c = nengo.Connection(a, b, transform=np.ones((10, 2)))
    print(nengo.Probe(c, "weights").size_in)  # prints 10

    d = nengo.Connection(
        a, b, learning_rule_type=nengo.PES(), transform=np.ones((10, 2))
    )
    print(nengo.Probe(d.learning_rule).size_in)  # prints 0

Expected behavior

Probe.size_in should report the size of the data that will be recorded by that probe (e.g., (10, 2) for the weights probe, or maybe just 20 if we want to stick to integers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant