Is there any alternative to tensor.numpy() inside of a tf.function in TensorFlow 2.0? The problem is that when I try to use it in the decorated function, I get the error message 'Tensor' object has no attribute 'numpy' while outside it runs without any problem.
Normally, I would go for something like tensor.eval() but it can be used only in a TF session and there are no sessions anymore in TF 2.0.