Deep learning dm十四行诗中的snt.AbstractModule=2.0.0

Deep learning dm十四行诗中的snt.AbstractModule=2.0.0,deep-learning,tensorflow2.0,sonnet,Deep Learning,Tensorflow2.0,Sonnet,我一直在尝试运行2017年编写的代码,它使用了tensorflow=1.3.0和dm sonnet=1.14。所需的许多软件包都变得不可用,我被依赖性问题淹没了,所以我决定在tensorflow的新版本中重写代码 我有: tensorflow=2.3.1 tensorflow-addons=0.11.2 tensorflow-estimator=2.3.0 tensorflow-probability=0.11.1 dm-sonnet=2.0.0 许多更新只是简单地将tf1更新为tf2,但我

我一直在尝试运行2017年编写的代码,它使用了
tensorflow=1.3.0
dm sonnet=1.14
。所需的许多软件包都变得不可用,我被依赖性问题淹没了,所以我决定在tensorflow的新版本中重写代码

我有:

tensorflow=2.3.1
tensorflow-addons=0.11.2
tensorflow-estimator=2.3.0
tensorflow-probability=0.11.1
dm-sonnet=2.0.0

许多更新只是简单地将
tf1
更新为
tf2
,但我对
dm十四行诗
版本有着无尽的问题

守则包括:

class CosineWeights(snt.AbstractModule):

我得到:

AttributeError:模块“十四行诗”没有属性“AbstractModule”

我怀疑这只是将《十四行诗》的代码更新为《十四行诗》的问题,但我找不到它的“翻译”,也找不到AbstractModule现在是如何使用的。哪一个模块来代替,仅仅做snt.module就足够了吗?我将非常感谢任何帮助