I\'m using the following custom training code in TensorFlow 2:
def parse_function(filename, filename2): image = read_image(fn) def ret1(): return ima
I fixed it by enabling eager execution after importing tensorflow:
import tensorflow as tf tf.enable_eager_execution()
Reference: Tensorflow