FAILED tests/keras/test_factorized_top_k.py::TestFactorizedTopK::test_factorized_topk_metrics0 - TypeError: To be compatible with tf.function, Python functions must return zero or more Tensors or ExtensionTypes or None values; in compilation of <function FactorizedTopK.update_state at 0x7508542b2830>, found return value of type Operation, which is not a Tensor or ExtensionType.
https://www.tensorflow.org/guide/extension_type
tf.function
has certain restrictions on what types of values Python functions can return.tf.function
decorated functions can only return:Tensor
objects (the core data structure in TensorFlow).ExtensionType
objects (certain custom TensorFlow types).https://g.co/gemini/share/69dac2e125e9