Skip to content

Network converted from ANN doesn't retain weights after training? #601

@0xnurl

Description

@0xnurl

First of all thank you so much for this very impressive project!

My current process:

  1. Build a deep ANN using a regular PyTorch module.
  2. Convert the ANN to SNN using bindsnet.conversion.ann_to_snn().
  3. Train the SNN using Network.run()

For training, I am following the training and test methods in examples/eth_mnist.py.
For conversion from ANN to SNN, I am following this conversion example script.

The SNN seems to learn something, and reaches ~50% accuracy on MNIST.

However, the SNN doesn't seem to retain the weights learned while running Network.run(). When I test or retrain the SNN, it resets to the same performance it had before running run().

I am attaching a minimal reproduction script. The critical part is that after running _train_snn() for the second time, the performace resets and progresses in the same way as it did during the first training.

More details:

  • I am running the SNN training on the exact same data in both times.
  • If the ANN is trained before conversion to SNN, the weights of the ANN are retained (but the network still doesn't improve after training as an SNN)

Thank you in advance for any help!

bindnset_issue.py.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions