본문 바로가기

기계는 거짓말하지 않는다

검색하기
기계는 거짓말하지 않는다
프로필사진 KillinTime

  • 분류 전체보기 (328)
    • C (15)
    • C++ (4)
    • C# (13)
    • Java (1)
    • Git (6)
    • Python (107)
    • Web (12)
      • Spring Boot (6)
      • JS (4)
      • HTML (0)
    • AI (35)
    • Linux (65)
    • Container Tools (10)
      • Docker (9)
      • Kubernetes (1)
    • DB (12)
      • MySQL (12)
    • IDE (14)
      • STS (1)
      • Visual Studio (6)
      • VS Code (7)
    • SDK (1)
      • NVIDIA DeepStream (1)
    • Development Related (2)
    • Program (5)
    • Programming Test (13)
    • Tech Tips (1)
    • Others (12)
      • 잡담 (3)
      • Guitar (9)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
일 월 화 수 목 금 토
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 31
Tags
  • 프로그래머스
  • Linux
  • pip
  • pandas
  • paramiko
  • 핑거스타일
  • 채보
  • VS Code
  • JSON
  • pytorch
  • 기타 연주
  • SSH
  • ubuntu
  • mysql
  • OpenCV
  • Docker
  • C#
  • YOLO
  • windows forms
  • Selenium
  • error
  • label
  • Numpy
  • C++
  • 오류
  • Visual Studio
  • C
  • Python
  • nvidia-smi
  • 컨테이너
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록model (1)

기계는 거짓말하지 않는다

PyTorch model save and load

import torchmodel = # 모델 생성# 모델 저장save_name = "model_final"torch.save(model.state_dict(), f"Directory/{save_name}.pth")# 모델 불러오기load_name = "model_final"model.load_state_dict(torch.load(f"Directory/{load_name}.pth")) # 경로, 저장 모델 이름# 설정 값 세부 저장checkpoint = { 'model': model.state_dict(), 'optimizer': optimizer.state_dict(), 'lr_scheduler': lr_scheduler.state_dict(), 'epoch': epoch}torch.save(c..

AI 2021. 8. 8. 16:32
Prev 1 Next

티스토리툴바