R for Keras: how to debug user loss function?

I use the keras package in R and would like to define a custom loss function.

While I managed to find a few examples ( one of them ), there was nothing about how to debug my own loss function. That is, even if I earned, I can verify that it is functioning properly (for example, take some y_trueand y_predand go computing)?

I tried to add an instruction printinside the function, but nothing worked.

+4
source share

Source: https://habr.com/ru/post/1685936/


All Articles