Skip to content

Commit

Permalink
Create memo.md
Browse files Browse the repository at this point in the history
init
  • Loading branch information
sakasa authored Mar 24, 2020
1 parent 98db04b commit f2d866a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions MachineLearning/DeepLearning/PyTorch/memo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## モデルの保存
```python
torch.save(model.state_dict(), save_path) # 学習済みモデルパラメータ, 保存先パス
```

## モデルの読み込み
```python
model = ModelClass(*args, **kwargs)
model.load_state_dict(torch.load(save_path))
```

0 comments on commit f2d866a

Please sign in to comment.