Nengo Loihi Builder Assertion Error

Hi,

sorry to bother you all, I just don’t have an idea how to solve this problem.
When trying to build the model in Nengo Loihi, I get an assertion error when discretizing vth within a compartment (assert (man > 0).all() in nengo_loihi/builder/discretize.py", line 98, in vth_to_manexp)
My model is like this:

        with nengo.Network() as self.network:
            self.input_node = nengo.Node(size_out=2,output= np.cos)
            self.spike_generators = nengo.Ensemble(n_neurons = p.resolution[0]*p.resolution[1], dimensions=2, neuron_type=nengo.SpikingRectifiedLinear(initial_state={"voltage":nengo.dists.Choice(np.array([0]))}))
            
            self.neuron_postLeft = nengo.Ensemble(label="left motor neuron", n_neurons=1, dimensions=1, neuron_type=nengo.LIF(initial_state={"voltage":nengo.dists.Choice(np.array([0]))}))
            self.neuron_postRight = nengo.Ensemble(label="right motor neuron", n_neurons=1, dimensions=1, neuron_type=nengo.LIF(initial_state={"voltage":nengo.dists.Choice(np.array([0]))}))
         
            self.conn_l = nengo.Connection(self.spike_generators.neurons, self.neuron_postLeft.neurons,transform=self.w_l)
            self.conn_r = nengo.Connection(self.spike_generators.neurons, self.neuron_postRight.neurons,transform=self.w_r)
            self.input_conn = nengo.Connection(self.input_node, self.spike_generators)
           
            self.spike_detectorLeft = nengo.Probe(self.neuron_postLeft.neurons)
            self.spike_detectorRight = nengo.Probe(self.neuron_postRight.neurons)

It has something to do with the self.conn_l and self.conn_r (they have a pre-set weight) since after removing those the assertion error goes away, but I don’t know in what way the “vth” value depends on that.
Thanks for the help in advance.

can you post the full script so i can just run it and see the error?

Hi,

I solved that error. The w_max was way too big, after being multiplied with the gain of neuron_postLeft and dt, which caused the vth to be very small and therefore being rounded to zero. Hence, the assertion error in vth_to_manexp().
I did lower my weights by dividing by dt and also setting the gain for neuron_postLeft and neuron_postRight to 1.