Tensorflow 2.3 - AttributeError: 'Tensor' object has no ...
www.reddit.com › r › tensorflowOne way to get around this is to wrap your function in tf.numpy_function (https://www.tensorflow.org/api_docs/python/tf/numpy_function) which will create a new tensor, but in the function the tensor is treated as an array (which you can then convert to list etc as well). Be careful tho, because those operations are likely not differentiable, and you won't be able to use it as a custom loss.