Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues in training from scratch #1

Open
godatta opened this issue Apr 9, 2020 · 2 comments
Open

Issues in training from scratch #1

godatta opened this issue Apr 9, 2020 · 2 comments

Comments

@godatta
Copy link

godatta commented Apr 9, 2020

Hi,

When I am trying to train from scratch, I get such an error :

"Traceback (most recent call last):
File "cifar10_ResNet11.py", line 704, in
main()
File "cifar10_ResNet11.py", line 143, in main
train(train_loader, model, criterion, criterion_en, optimizer, epoch, time_steps=100, leak=0.99)
File "cifar10_ResNet11.py", line 206, in train
output, Total_11_output, LF_11_output, Total_21_output, LF_21_output, Total_22_output, LF_22_output, Total_31_output, LF_31_output, Total_32_output, LF_32_output, Total_41_output, LF_41_output, Total_42_output, LF_42_output, Total_51_output, LF_51_output, Total_52_output, LF_52_output, Total_f0_output, LF_f0_output, out11_temp, out21_temp, out22_temp, out31_temp, out32_temp, out41_temp, out42_temp, out51_temp, out52_temp, outf0_temp = model(input_var, steps=time_steps, l=leak)
File "/home/ubuntu/anaconda3/envs/pytorch_p27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "cifar10_ResNet11.py", line 570, in forward
mem_11, out = LIF_sNeuron(mem_11, self.cnn11.threshold, l, i)
File "cifar10_ResNet11.py", line 411, in LIF_sNeuron
out = SpikingNN()(ex_membrane)
TypeError: forward() takes exactly 2 arguments (1 given)".

Can you please check from your side?

@chan8972
Copy link
Owner

From my side, it works fine. Please check your python (should be 2.7) and PyTorch (should be 0.3.1) version.

@Po0ria
Copy link

Po0ria commented Mar 22, 2022

@godatta Try using this instead:
out = SpikingNN.apply(ex_membrane)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants