File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/engine/training.py", line 1051, in train_function *
return step_function(self, iterator)
File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/engine/training.py", line 1040, in step_function **
outputs = model.distribute_strategy.run(run_step, args=(data,))
File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/engine/training.py", line 1030, in run_step **
outputs = model.train_step(data)
File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/engine/training.py", line 890, in train_step
loss = self.compute_loss(x, y, y_pred, sample_weight)
File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/engine/training.py", line 948, in compute_loss
return self.compiled_loss(
File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/engine/compile_utils.py", line 239, in __call__
self._loss_metric.update_state(
File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/utils/metrics_utils.py", line 70, in decorated
update_op = update_state_fn(*args, **kwargs)
File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/metrics/base_metric.py", line 140, in update_state_fn
return ag_update_state(*args, **kwargs)
File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/metrics/base_metric.py", line 449, in update_state **
sample_weight = tf.__internal__.ops.broadcast_weights(
File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/engine/keras_tensor.py", line 254, in __array__
raise TypeError(
TypeError: You are passing KerasTensor(type_spec=TensorSpec(shape=(), dtype=tf.float32, name=None), name='Placeholder:0', description="created by layer 'tf.cast_2'"), 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.
I dont know how to debug this. Look forward to you answer. :)
Traceback (most recent call last):
File "/Users/mayuxing/Downloads/FTCP-master 2/main.py", line 55, in
VAE.fit([X_train, y_train],
File "/Users/mayuxing/opt/anaconda3/lib/python3.9/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "/var/folders/pr/t7phtfp9055f_v4lkb49g73c0000gn/T/autograph_generated_file32azsqjs.py", line 15, in tf__train_function
retval = ag_.converted_call(ag__.ld(step_function), (ag__.ld(self), ag__.ld(iterator)), None, fscope)
TypeError: in user code:
I dont know how to debug this. Look forward to you answer. :)