错误如下:

AttributeError: module ‘torch.nn’ has no attribute ‘LocalResponseNorm’

错误原因:

我在Windows装的pytorch是0.3.1。查看0.3.1的文档发现确实没有这个模块。

查看0.4.1的官方文档发现,有这个模块

class torch.nn.LayerNorm(normalized_shape, eps=1e-05, elementwise_affine=True)
所以更新pytorch版本:
pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.0-cp35-cp35m-win_amd64.whl
pip3 install torchvision

如下:
AttributeError: module 'torch.nn' has no attribute 'LocalResponseNorm'问题的解决办法

相关文章:

  • 2021-07-26
  • 2021-08-22
  • 2022-12-23
  • 2021-09-19
  • 2021-04-26
  • 2022-12-23
  • 2021-04-23
  • 2021-06-11
猜你喜欢
  • 2021-09-04
  • 2022-12-23
  • 2021-10-10
  • 2021-12-20
  • 2021-12-28
  • 2021-07-19
  • 2022-12-23
相关资源
相似解决方案