일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 도커
- aiffel exploration
- Decision Boundary
- HookNet
- docker attach
- 티스토리챌린지
- vscode
- AIFFEL
- docker
- GIT
- numpy
- CellPin
- airflow
- cocre
- logistic regression
- 히비스서커스
- 기초확률론
- 사회조사분석사2급
- 오블완
- cs231n
- Multi-Resolution Networks for Semantic Segmentation in Whole Slide Images
- ssh
- docker exec
- 코크리
- Jupyter notebook
- 백신후원
- IVI
- 프로그래머스
- WSSS
- Pull Request
Archives
- Today
- Total
목록torch.state_dict (1)
히비스서커스의 블로그

torch framework로 model을 train 후 저장 및 불러오는 방법은 크게 두 가지가 있다. 1) torch.save(model.state_dict(), model_path) 이 방법은 모델의 가중치만 저장하는 방법이다. 모델 train 후 evaluation 모드 전환 후 가중치만 저장 import torch.nn as nn import torchvision import torch # 예시 모델 model = torchvision.models.resnet18() # GPU 2대를 사용한다고 가정 후 dataparallel을 통한 병렬처리 device = "cuda" if torch.cuda.is_available() else "cpu" model.to(device) model = nn.Da..
Programming/Python
2022. 10. 28. 10:50