Skip to content

Commit d79a62d

Browse files
author
innerNULL
committed
chore: Clean
1 parent 4c231c6 commit d79a62d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

train.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def eval(
109109
prob50_metrics: Dict[str, float] = metrics_func(
110110
output_one_hot.int(), label_one_hot.int()
111111
)
112-
top5_metrics: Dict[str, float] = topk_metrics_func(logits, label_one_hot, top_k=5)
113-
top8_metrics: Dict[str, float] = topk_metrics_func(logits, label_one_hot, top_k=8)
114-
top15_metrics: Dict[str, float] = topk_metrics_func(logits, label_one_hot, top_k=15)
112+
#top5_metrics: Dict[str, float] = topk_metrics_func(logits, label_one_hot, top_k=5)
113+
#top8_metrics: Dict[str, float] = topk_metrics_func(logits, label_one_hot, top_k=8)
114+
#top15_metrics: Dict[str, float] = topk_metrics_func(logits, label_one_hot, top_k=15)
115115

116116
out = {
117117
"loss": round(loss, 8),
@@ -244,7 +244,6 @@ def train_func(configs: Dict) -> None:
244244
torch.save(model.module.state_dict(), os.path.join(ckpt_dir, "model.pt"))
245245
except:
246246
torch.save(model.state_dict(), os.path.join(ckpt_dir, "model.pt"))
247-
248247
global_step_id += 1
249248

250249
final_ckpt_dir: str = os.path.join(configs["ckpt_dir"], "final")

0 commit comments

Comments
 (0)