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

当使用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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章