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

Error autogenerating process inputs when data batch size does not match Simulator.minibatch_size #192

Open
drasmuss opened this issue Dec 10, 2020 · 0 comments

Comments

@drasmuss
Copy link
Member

import nengo
import numpy as np

import nengo_dl

with nengo.Network() as net:
    a = nengo.Node([0])
    b = nengo.Node(nengo.processes.WhiteNoise())

with nengo_dl.Simulator(net, minibatch_size=2) as sim:
    sim.predict(np.zeros((10, 1, 1)))

Gives error

ValueError: cannot copy sequence with size 2 to array axis with dimension 10

This is because with processes we generate a number of instances equal to the minibatch_size. But then when we call predict with a batch size of 10 (for the first node) but no inputs for the second node, we need to autogenerate data with a batch size of 10 for the second node (even though we only have 2 instances).

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