diff --git a/training_with_luz.qmd b/training_with_luz.qmd index 9f076e9..231f35d 100644 --- a/training_with_luz.qmd +++ b/training_with_luz.qmd @@ -480,7 +480,7 @@ train_batch <- function(b) { output <- model(b[[1]]$to(device = device)) target <- b[[2]]$to(device = device) - loss <- nn_mse_loss(output, target) + loss <- nnf_mse_loss(output, target) loss$backward() optimizer$step() @@ -491,7 +491,7 @@ valid_batch <- function(b) { output <- model(b[[1]]$to(device = device)) target <- b[[2]]$to(device = device) - loss <- nn_mse_loss(output, target) + loss <- nnf_mse_loss(output, target) loss$item() }