nengo-dl
nengo-dl copied to clipboard
Error autogenerating process inputs when data batch size does not match Simulator.minibatch_size
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).