TypeError: You are passing KerasTensor(type_spec=TensorSpec(shape=(1, 20, 20, 576), dtype=tf.float32, name=None), name='tf.math.multiply_179/Mul:0', description="created by layer 'tf.math.multiply_179'"), an intermediate Keras symbolic input/output, to a TF API that does not allow registering custom dispatchers, such as `tf.cond`, `tf.function`, gradient tapes, or `tf.map_fn`. Keras Functional model construction only supports TF API calls that *do* support dispatching, such as `tf.math.add` or `tf.reshape`. Other APIs cannot be called directly on symbolic Kerasinputs/outputs. You can work around this limitation by putting the operation in a custom Keras layer `call` and calling that layer on this symbolic input/output.