How do I get the gradient of a keras model with respect to its inputs?
问题 I just asked a question on the same topic but for custom models (How do I find the derivative of a custom model in Keras?) but realised quickly that this was trying to run before I could walk so that question has been marked as a duplicate of this one. I've tried to simplify my scenario and now have a (not custom) keras model consisting of 2 Dense layers: inputs = tf.keras.Input((cols,), name='input') layer_1 = tf.keras.layers.Dense( 10, name='layer_1', input_dim=cols, use_bias=True, kernel