nitin-rathi / hybrid-snn-conversion

Training spiking networks with hybrid ann-snn conversion and spike-based backpropagation
https://openreview.net/forum?id=B1xSperKvH
94 stars 24 forks source link

Trained Model Issue #2

Closed Sangyeob-Kim closed 4 years ago

Sangyeob-Kim commented 4 years ago

Hello.

I want to use your pretrained model (snn_vgg16_cifar10.pth)

But, I got an Error message like below.

File "snn.py", line 474, in state = torch.load(pretrained_snn, map_location='cpu') File "/home/sangyeob/env/pytorch-python3.6/lib/python3.6/site-packages/torch/serialization.py", line 386, in load return _load(f, map_location, pickle_module, **pickle_load_args) File "/home/sangyeob/env/pytorch-python3.6/lib/python3.6/site-packages/torch/serialization.py", line 573, in _load result = unpickler.load() ModuleNotFoundError: No module named 'self_models.spiking_model'

How can I get spiking_model module? In your self_models file, there is no spiking_model.py.

Thank you.

nitin-rathi commented 4 years ago

Change the name of 'vgg_spiking.py' to 'spiking_model.py'

Sangyeob-Kim commented 4 years ago

Okay, I changed self_models/vgg_spiking.py to self_models/spiking_model.py.

However, I got this error message


AttributeError: Can't get attribute 'STDPSpike' on <module 'self_models.spiking_model' from '/home/sangyeob/gpu3/sangyeob/projects/SY_Tape_Out/hybrid-snn-conversion-rev-workspace-2/self_models/spiking_model.py'>

In the vgg_spiking.py or vgg.py, theer is no STDPSpike class. How can I solve this?

nitin-rathi commented 4 years ago

Change the class STDB to STDPSpike