Skip to content

Commit

Permalink
PyTorch v2.4.0반영, pytorch/tutorials@afcd66 (PyTorchKorea/pytorch.kr#54)
Browse files Browse the repository at this point in the history
Co-authored-by: Taegeun Kwack <[email protected]>
  • Loading branch information
gogori6565 and rhkr8521 committed Sep 4, 2024
1 parent 71feff4 commit 3bb3ada
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion beginner_source/basics/quickstart_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

#############################################################
# 이제 이 λͺ¨λΈμ„ μ‚¬μš©ν•΄μ„œ μ˜ˆμΈ‘μ„ ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
Expand Down

0 comments on commit 3bb3ada

Please sign in to comment.