当前位置: 代码迷 >> 综合 >> AttributeError: 'module' object has no attribute 'AbstractModule'
  详细解决方案

AttributeError: 'module' object has no attribute 'AbstractModule'

热度:4   发布时间:2024-01-16 09:43:36.0

当使用sonnet进行网络构建时,出现AttributeError: 'module' object has no attribute 'AbstractModule',可以如下解决:

pip uninstall sonnet

pip install dm-sonnet

另外一个错误,SystemError: Sonnet requires tensorflow_probability (minimum version 0.4.0) to be installed. If using pip, run `pip install tensorflow-probability` or `pip install tensorflow-probability-gpu`

 

解决方法:

pip install -U dm-sonnet==1.23

 

  相关解决方案