1.pytorch报错:module 'torch.nn' has no attribute 'init
修改/home/expstu1/anaconda3/lib/python3.6/site-packages/torch/nn/__init__.py
文件在最后一行加from .init import *
2.AttributeError: module 'torch.nn.init' has no attribute 'xavier_uniform_'
去掉'xavier_uniform_'的_
3.AttributeError: 'torch.cuda.LongTensor' object has no attribute 'shape'
将shape改成size