TensorFlow 的 Eager Execution 是一种命令式编程环境,可立即评估运算,无需构建计算图:运算会返回具体的值,而非构建供稍后运行的计算图
在tersorflow2.0版本后,是默认启动eager execution的
使用tensorflow训练模型,写入时报错NotImplementedError: numpy() is only available when eager execution is enable
在import tensorflow as tf下面加一句tf.enable_eager_execution()即可解决问题
原文链接:https://blog.csdn/weixin_44424340/article/details/107782631

更多推荐

解决:numpy() is only available when eager execution is enabled