Hi! I’m following this tutorial on generating adversarial images using TensorFlow and reaching the point where we use GradientTape() to generate the gradient of the loss with respect to the image.
I’d really love to experiment with using a TFLite model here, but when I replace this line:
prediction = pretrained_model(input_image)
with a TFLite interpreter performing inference to get a prediction, the following statement returns None:
tape.gradient(loss, input_image)
Can anyone here help me understand why a TFLite interpreter performing inference wouldn’t record to the tape? Could anyone share an example of invoking a TFLite model from within a gradient tape?