I am implementing own Keras loss function. How can I access tensor values?
What I\'ve tried
def loss_fn(y_true, y_pred):
print y_true
You can't get the values from the tensor symbolic variable directly. Yo need to write a theano function to extract the value. Don't forget to choose theano as backend of Keras.
Check the notebook link to get some basic of theano variables and functions : get tensor value in call function of own layers