1.问题:AttributeError: module 'torch' has no attribute 'flatten'

(PyTorch0.4.0) AttributeError: module 'torch' has no attribute 'flatten'

 

2. 解决:

参考:'tensorflow.python.layers.layers' has no attribute 'flatten'

torch没有flatten这个函数,看来确定无疑是我的PyTorch0.4.0版本太老了。 需要更新PyTorch版本

我估计需要重构装一个新版本的PyTorch。。。。。。。

相关文章:

  • 2021-08-27
  • 2021-10-09
  • 2021-09-09
  • 2021-10-09
  • 2021-12-13
  • 2021-06-06
  • 2021-07-27
  • 2021-05-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-09-15
  • 2021-12-19
  • 2021-11-02
  • 2021-11-28
相关资源
相似解决方案