From 777e10f0ef087cf8cda761f966e94cad083480bf Mon Sep 17 00:00:00 2001 From: Maciej Czajka Date: Wed, 11 May 2022 15:23:22 +0200 Subject: [PATCH] update dllib-mlflow.py --- Biblioteka_DL/dllib-mlflow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Biblioteka_DL/dllib-mlflow.py b/Biblioteka_DL/dllib-mlflow.py index a00049e..407ab5f 100644 --- a/Biblioteka_DL/dllib-mlflow.py +++ b/Biblioteka_DL/dllib-mlflow.py @@ -305,13 +305,13 @@ def my_main(epochs): loss = loss_fn(y_pred, y_train.squeeze(-1)) print_(loss.item()) - mlflow.log_param("loss", loss.item) - # Zero gradients optimizer.zero_grad() loss.backward() # Gradients optimizer.step() # Update + mlflow.log_param("loss", loss.item) + # Prediction x_test = Variable(torch.from_numpy(features_test_g)).float() pred = model(x_test)