XNOR-Net-PyTorch icon indicating copy to clipboard operation
XNOR-Net-PyTorch copied to clipboard

MNIST出现静态错误

Open YangNuoCheng opened this issue 4 years ago • 1 comments

这是在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

YangNuoCheng avatar Oct 30 '21 08:10 YangNuoCheng

谢谢你

pengzha0 avatar Jan 06 '23 09:01 pengzha0