From cf9a570c75b0014084617b4cbf2a15a4b131225c Mon Sep 17 00:00:00 2001 From: k0nakona Date: Sat, 21 Sep 2024 15:36:49 +0300 Subject: [PATCH] fix-of-shape --- sem8/main.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sem8/main.ipynb b/sem8/main.ipynb index 15761d4..8d40c60 100644 --- a/sem8/main.ipynb +++ b/sem8/main.ipynb @@ -264,8 +264,8 @@ "X_train_pt = torch.from_numpy(X_train).float()\n", "X_test_pt = torch.from_numpy(X_test).float()\n", "\n", - "y_train_pt = torch.from_numpy(y_train).float()\n", - "y_test_pt = torch.from_numpy(y_test).float()\n", + "y_train_pt = torch.from_numpy(y_train).float().view(-1,1)\n", + "y_test_pt = torch.from_numpy(y_test).float().view(-1,1)\n", "\n", "train_dataset = torch.utils.data.TensorDataset(X_train_pt, y_train_pt)\n", "test_dataset = torch.utils.data.TensorDataset(X_test_pt, y_test_pt)"