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