Purpose
이 Code Snippet은 'Model의 학습을 상황을 모니터링'하고자 사용합니다.
Dependency Packages
tqdm
Code Example
Ex) Epoch 단위로 Train 하는 경우 Progress Bar를 활용하는 Code입니다.
with tqdm(train_loader,
total=train_loader.__len__(),
unit='batch') as train_bar :
for sample in train_bar :
train_bar.set_postfix(loss=, metric=)
PS
Epoch 단위로 Train 할 경우 유용한 모니터링용 Code입니다.
'Python Code Snippet' 카테고리의 다른 글
[Python Code Snippet] OOF 시 병렬 학습을 위한 Code (0) | 2021.05.21 |
---|---|
[Python Code Snippet] Pickle File 저장하고 불러오는 함수 (0) | 2021.05.21 |
[Python Code Snippet] Average Meter (0) | 2021.05.21 |
[Python Code Snippet] 파이토치 기본설정 (0) | 2021.03.24 |
[Python Code Snippet] 코랩에 구글 드라이브 연결 (0) | 2021.03.24 |