使用“旧的”Keras库,我使用keras.backend.gradients()函数为我的CNN创建了热图,如下所示: # load model and image, then predict the现在我切换到TF2.0,它是内置的Keras实现。但是,使用该代码时,我在调用K.gradients()时会得到以下错误 tf.gradients is not supported when eager execution is enabled.我做了一些研究,并试图了解如何使用GradientTape,但不幸的</