WARNING:tensorflow:AutoGraph could not transform <bound method TokenAndPositionEmbedding.call of <__main__.TokenAndPositionEmbedding object at 0x0000018165769888>> and will run it as-is. Please report this to the TensorFlow team. When filing the bug, set
AttributeError: module 'tensorflow_core.python.keras.api._v2.keras.layers' has no attribute 'MultiHeadAttention'
Cause: No module named 'tensorflow_core.estimator'
今天跑最近搭建的深度学习模型,突然就报错了,当时就把我吓出一身冷汗。。。
最后,仔细查看,可能是tensorflow版本有问题,于是把tensorflow的版本升到与tensorflow-estimator版本一致,最后完美解决该问题!!!nice
以后遇到类似的问题希望能长点经验,还有就是遇到问题一定要冷静思考,切莫乱了阵脚!!!

博主在运行深度学习模型时遇到AutoGraph转化失败及模块缺失的错误,通过升级TensorFlow和tensorflow-estimator版本至一致,成功解决问题。提醒遇到类似问题时要冷静分析,避免慌乱。
5384





