LIF neuron has a resting potential 0. I was wondering how to make it -70mV without changing the code
Heading on over to the Nengo documentation for nengo.LIF, we see:
class nengo.LIF(tau_rc=0.02, tau_ref=0.002, min_voltage=0, amplitude=1): ... min_voltage : float Minimum value for the membrane voltage. If -np.inf, the voltage is never clipped.
In your model, the usage looks like so:
x = nengo.Ensemble(..., neuron_type=nengo.LIF(min_voltage=...)))
However, it is important to note that voltages in this model are unitless. That is, voltages $v(t)$ are normalized to the range $[0, 1]$ for convenience. To determine the resting potential that corresponds to
-70mV you will need to do some math to determine its corresponding unitless value. Also note there is some interplay with the gains and biases of the neurons, and so care should be taken in interpreting these quantities in a biophysical context.