NengoDL: Number of saved parameters error

Hi, I am facing the same issue and I am not using any optimizer. I was using an optimizer for training but even disabled that but again facing the same issue. Can anyone please help ?

def train(params_file="./keras_to_loihi_params", epochs=1, **kwargs):
    converter = nengo_dl.Converter(model, **kwargs)

    with nengo_dl.Simulator(, seed=0, minibatch_size=8) as sim:
#            optimizer=tf.optimizers.RMSprop(0.001),
                converter.outputs[dense3]: tf.losses.SparseCategoricalCrossentropy(
            metrics={converter.outputs[dense3]: tf.metrics.sparse_categorical_accuracy},
            {converter.inputs[inp]: train_imgs},
            {converter.outputs[dense3]: train_labels_2},

        # save the parameters to file

My error:

nengo.exceptions.SimulationError: Number of saved parameters in ./keras_to_loihi_params (30) != number of variables in the model (29)

Hi @saurav, and welcome to the Nengo forums! :grinning:

It’s a little hard to figure out exactly what is causing the issue without reference the code that is causing the issue. Can you post the code that defines your model, and the code that you used to train the model, and to load the model?