I get this error report:
...
File "C:\Users\larsa\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow_probability\python\internal\backend\numpy\nest.py", line 68, in <module>
assert_same_structure = dm_tree.assert_same_structure
AttributeError: module 'tree' has no attribute 'assert_same_structure'我已经尝试过更新dm_tree。已经达到0.1.7。我还安装了tensorflow和tf_agents的夜间版本。
发布于 2022-07-02 11:23:06
assert_same_structure是tf.nest的子模块。因此,您需要给出正确的别名结构()来访问和使用这个api,如下所示:
tf.nest.assert_same_structure(
nest1, nest2, check_types=True, expand_composites=False
)https://stackoverflow.com/questions/72592437
复制相似问题