Pytorch 1.0.0版本问题(一)之module ‘torch.nn‘ has no attribute ‘Flatten‘
1.错误生成原因在使用nn.Flatten()函数的时候报错import torchfrom torch import nnnet = nn.Sequential(nn.Flatten(), nn.Linear(784, 256), nn.ReLU(), nn.Linear(256, 10))错误如下:AttributeError Traceback (most recent ca..
原创
2021-07-26 15:15:01 ·
10888 阅读 ·
15 评论