jiecaoyu / XNOR-Net-PyTorch

PyTorch Implementation of XNOR-Net
472 stars 119 forks source link

MNIST出现静态错误 #127

Open YangNuoCheng opened 2 years ago

YangNuoCheng commented 2 years ago

这是在torch1.4之后的新要求,改变了torch.autograd.Function的调用方法,需要使用.apply来调用。 解决方法,在XNOR-Net-PyTorch-master\MNIST\models下的LeNet_5.py第53行改为 x = BinActive.apply(x)即可正常运行

change LeNet_5.py line53 to 'x = BinActive.apply(x)' to slove problem as following: RuntimeError: Legacy autograd function with non-static forward method is deprecated

pengzha0 commented 1 year ago

谢谢你