Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -12,7 +12,7 @@ import random
|
|
12 |
import argparse # 명령행 인자를 파싱해주는 모듈
|
13 |
import numpy as np
|
14 |
from tqdm import tqdm # 작업진행률 표시하는 라이브러리
|
15 |
-
|
16 |
import torch # 파이토치
|
17 |
import torch.nn as nn # 클래스 # attribute 를 활용해 state 를 저장하고 활용
|
18 |
import torch.nn.functional as F # 함수 # 인스턴스화시킬 필요없이 사용 가능
|
@@ -154,8 +154,8 @@ def evaluate(model, dset_loader, criterion, is_print=False):
|
|
154 |
# 'prediction': prediction,
|
155 |
# 'confidence': confidence
|
156 |
# })
|
157 |
-
|
158 |
-
|
159 |
|
160 |
if is_print:
|
161 |
print()
|
|
|
12 |
import argparse # 명령행 인자를 파싱해주는 모듈
|
13 |
import numpy as np
|
14 |
from tqdm import tqdm # 작업진행률 표시하는 라이브러리
|
15 |
+
import csv
|
16 |
import torch # 파이토치
|
17 |
import torch.nn as nn # 클래스 # attribute 를 활용해 state 를 저장하고 활용
|
18 |
import torch.nn.functional as F # 함수 # 인스턴스화시킬 필요없이 사용 가능
|
|
|
154 |
# 'prediction': prediction,
|
155 |
# 'confidence': confidence
|
156 |
# })
|
157 |
+
open("/home/user/app/result/ho.txt", 'a') as f
|
158 |
+
f.writelines(prediction+'\n')
|
159 |
|
160 |
if is_print:
|
161 |
print()
|