I want to train a model with a custom loss function, in order to do that, I need to convert the tensor to numpy array inside the method below:
def median_loss_estimation(y_true, y_predicted):
a = y_predicted.numpy()
but I have this error:
AttributeError: 'Tensor' object has no attribute 'numpy'
Why? How can I convert the tensor to a numpy array?