记录tensorflow2.6遇到的问题

tensorflow.python.framework.errors_impl.AlreadyExistsError: Another metric with the same name already exists.

在tensorflow2.6环境下,调用命令

import tensorflow as tf
lstm = tf.keras.layers.LSTM(4)

报错tensorflow.python.framework.errors_impl.AlreadyExistsError: Another metric with the same name already exists.
查看了conda环境下的包版本,当前状态为tensorflow==2.6.0keras==2.7.0,经过其他大佬的解答,最终得出解决方案
卸载当前keras,再重新安装keras==2.6.0

pip uninstall keras
pip install keras==2.6.0

就OKK!!!

你可能感兴趣的:(tensorflow,深度学习,人工智能)