I'm using keras package in R, and would like to define a custom loss function.
While I was able to find a few examples (one of them), there was nothing on how to debug your own loss function. That is, even if I make it work, how could I verify that it works correctly (e.g. take some y_true and y_pred, and go through the calculations)?
I tried adding a print statement inside the function, but nothing came out.