Skip to content

Conversation

@etemtezcan
Copy link

to fix "Legacy autograd function with non-static forward method is deprecated. "
RuntimeError: Legacy autograd function with non-static forward method is deprecated. Please use new-style autograd function with static forward method
which appeared on when using pytorch1.8

to fix "Legacy autograd function with non-static forward method is deprecated. "
RuntimeError: Legacy autograd function with non-static forward method is deprecated. Please use new-style autograd function with static forward method
which appeared on when using pytorch1.8
@nuel77
Copy link

nuel77 commented Mar 13, 2022

This pr gives the following error..

Learning rate: 0.01
Traceback (most recent call last):
  File "C:\Users\emman\OneDrive\Desktop\s8\S7\MainProject\main_repo\XNOR-Net-PyTorch\MNIST\main.py", line 189, in <module>
    train(epoch)
  File "C:\Users\emman\OneDrive\Desktop\s8\S7\MainProject\main_repo\XNOR-Net-PyTorch\MNIST\main.py", line 39, in train
    output = model(data)
  File "C:\Users\emman\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\Users\emman\OneDrive\Desktop\s8\S7\MainProject\main_repo\XNOR-Net-PyTorch\MNIST\models\LeNet_5.py", line 95, in forward
    x = self.bin_conv2(x)
  File "C:\Users\emman\anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\Users\emman\OneDrive\Desktop\s8\S7\MainProject\main_repo\XNOR-Net-PyTorch\MNIST\models\LeNet_5.py", line 55, in forward
    x, mean = BinActive.apply(x)
ValueError: too many values to unpack (expected 2)

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

Successfully merging this pull request may close these issues.

2 participants