deep-learning-with-R-2nd-edition-code
deep-learning-with-R-2nd-edition-code copied to clipboard
Wrong order of arguments in sqare_loss?
https://github.com/t-kalinowski/deep-learning-with-R-2nd-edition-code/blob/5d666f93d52446511a8a8e4eb739eba1c0ffd199/ch03.R#L266C1-L270C5
Can it be that the order of arguments in the function is wrong?
loss <- square_loss(predictions, targets)
We defined square previously as:
square_loss <- function(targets, predictions) {
per_sample_losses <- (targets - predictions)^2
mean(per_sample_losses)
}
In text they say "the training loss .... stabilized around 0.025" which I only get once I change the order of arguments: loss <- square_loss( targets, predictions)