【解决方案】Pytorch搭建网络出现“raise NotImplementedError”
亲自入的坑
在搭建网络出现了上面这个错误
原因是网络未能识别
def forward(self, x):
pass
排查两种原因:
其一
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
def forward(self, x):
pass
两个方法是否对齐
其二
forward是否拼写正确