From 3bb3ada72043064b6dabd82bfc2409917a146eae Mon Sep 17 00:00:00 2001 From: Juhyeon Lee <81895590+gogori6565@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:08:50 +0900 Subject: [PATCH] =?UTF-8?q?PyTorch=20v2.4.0=EB=B0=98=EC=98=81,=20pytorch/t?= =?UTF-8?q?utorials@afcd66=20(PyTorchKorea/pytorch.kr#54)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Taegeun Kwack --- beginner_source/basics/quickstart_tutorial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beginner_source/basics/quickstart_tutorial.py b/beginner_source/basics/quickstart_tutorial.py index 2f19ac676..a286f061f 100644 --- a/beginner_source/basics/quickstart_tutorial.py +++ b/beginner_source/basics/quickstart_tutorial.py @@ -212,7 +212,7 @@ def test(dataloader, model, loss_fn): # 모델을 불러오는 과정에는 모델 구조를 다시 만들고 상태 사전을 모델에 불러오는 과정이 포함됩니다. model = NeuralNetwork().to(device) -model.load_state_dict(torch.load("model.pth")) +model.load_state_dict(torch.load("model.pth", weights_only=True)) ############################################################# # 이제 이 모델을 사용해서 예측을 할 수 있습니다.