I am writing just a simple loss function in which I have to convert the tensor to numpy array(it's essential). I am just trying to print value of the tensor but I am getting this error:-
Tensor("loss/activation_4_loss/Print:0", shape=(?, 224, 224, 2), dtype=float32)
def Lc(y_true, y_pred):
x=K.print_tensor(y_pred)
print(x)
return K.mean(y_pred)
Kindly tell me that how can I get the value(numerics) from the tensor? I also tried "eval" but it also threw a big fat error about no session is there and it is a placeholder etc. The whole program is executing fine, just "print_tensor" line is causing problem.