if (FALSE) {
library(neuralGAM)
L <- neuralGAM:::validate_loss("huber") # ok (Huber with default delta)
L <- neuralGAM:::validate_loss(function(y,t) tensorflow::tf$reduce_mean((y-t)^2)) # custom
}
Run the code above in your browser using DataLab