tensorflow和keras学习CNN,我试图运行cnn模型来训练mnist数据集,但在我用tnesorflow 2.0升级到2.1之后,我收到了这个错误消息: raise RuntimeError("tf.placeholder() is not compatible with "
RuntimeError: tf.placeholder() is not compatible with eagerexecution.我尝试了下面的代码 tf.compa
, <tensorflow.python.keras.optimizer_v1.SGD object at 0x000002DD585C6680>, ') is not supported when eagerUse a `tf.keras` Optimizer instead, or disable eagerexecution.')
有什么想法吗?我做错什么了?
keras.models.load_model("/content/gdrive/My Drive/ColabNotebooks/ckpt4/my_model.h5")RuntimeError: tf.placeholder() is not compatible with eagerexecution.