Skip to content
Snippets Groups Projects
Commit e80eae38 authored by Bobholamovic's avatar Bobholamovic
Browse files

Change unclear statement: trace_freq to track_intvl

parent 3c41cc4c
Branches
No related tags found
1 merge request!2Update outdated code
...@@ -24,7 +24,7 @@ resume: '' ...@@ -24,7 +24,7 @@ resume: ''
load_optim: True load_optim: True
save_optim: True save_optim: True
anew: False anew: False
trace_freq: 1 track_intvl: 1
device: cuda device: cuda
metrics: 'F1Score+Accuracy+Recall+Precision' metrics: 'F1Score+Accuracy+Recall+Precision'
......
...@@ -24,7 +24,7 @@ resume: '' ...@@ -24,7 +24,7 @@ resume: ''
load_optim: True load_optim: True
save_optim: True save_optim: True
anew: False anew: False
trace_freq: 1 track_intvl: 1
device: cuda device: cuda
metrics: 'F1Score+Accuracy+Recall+Precision' metrics: 'F1Score+Accuracy+Recall+Precision'
......
...@@ -24,7 +24,7 @@ resume: '' ...@@ -24,7 +24,7 @@ resume: ''
load_optim: True load_optim: True
save_optim: True save_optim: True
anew: False anew: False
trace_freq: 1 track_intvl: 1
device: cuda device: cuda
metrics: 'F1Score+Accuracy+Recall+Precision' metrics: 'F1Score+Accuracy+Recall+Precision'
......
...@@ -24,7 +24,7 @@ resume: '' ...@@ -24,7 +24,7 @@ resume: ''
load_optim: True load_optim: True
save_optim: True save_optim: True
anew: False anew: False
trace_freq: 1 track_intvl: 1
device: cuda device: cuda
metrics: 'F1Score+Accuracy+Recall+Precision' metrics: 'F1Score+Accuracy+Recall+Precision'
......
...@@ -24,7 +24,7 @@ resume: '' ...@@ -24,7 +24,7 @@ resume: ''
load_optim: True load_optim: True
save_optim: True save_optim: True
anew: False anew: False
trace_freq: 1 track_intvl: 1
device: cuda device: cuda
metrics: 'F1Score+Accuracy+Recall+Precision' metrics: 'F1Score+Accuracy+Recall+Precision'
......
...@@ -24,7 +24,7 @@ resume: '' ...@@ -24,7 +24,7 @@ resume: ''
load_optim: True load_optim: True
save_optim: True save_optim: True
anew: False anew: False
trace_freq: 1 track_intvl: 1
device: cuda device: cuda
metrics: 'F1Score+Accuracy+Recall+Precision' metrics: 'F1Score+Accuracy+Recall+Precision'
......
...@@ -24,7 +24,7 @@ resume: '' ...@@ -24,7 +24,7 @@ resume: ''
load_optim: True load_optim: True
save_optim: True save_optim: True
anew: False anew: False
trace_freq: 1 track_intvl: 1
device: cuda device: cuda
metrics: 'F1Score+Accuracy+Recall+Precision' metrics: 'F1Score+Accuracy+Recall+Precision'
......
...@@ -24,7 +24,7 @@ resume: '' ...@@ -24,7 +24,7 @@ resume: ''
load_optim: True load_optim: True
save_optim: True save_optim: True
anew: False anew: False
trace_freq: 1 track_intvl: 1
device: cuda device: cuda
metrics: 'F1Score+Accuracy+Recall+Precision' metrics: 'F1Score+Accuracy+Recall+Precision'
......
...@@ -24,7 +24,7 @@ resume: '' ...@@ -24,7 +24,7 @@ resume: ''
load_optim: True load_optim: True
save_optim: True save_optim: True
anew: False anew: False
trace_freq: 1 track_intvl: 1
device: cuda device: cuda
metrics: 'F1Score+Accuracy+Recall+Precision' metrics: 'F1Score+Accuracy+Recall+Precision'
......
...@@ -24,7 +24,7 @@ resume: '' ...@@ -24,7 +24,7 @@ resume: ''
load_optim: True load_optim: True
save_optim: True save_optim: True
anew: False anew: False
trace_freq: 1 track_intvl: 1
device: cuda device: cuda
metrics: 'F1Score+Accuracy+Recall+Precision' metrics: 'F1Score+Accuracy+Recall+Precision'
......
...@@ -33,7 +33,7 @@ class Trainer: ...@@ -33,7 +33,7 @@ class Trainer:
self.lr = float(context.lr) self.lr = float(context.lr)
self.save = context.save_on or context.out_dir self.save = context.save_on or context.out_dir
self.out_dir = context.out_dir self.out_dir = context.out_dir
self.trace_freq = int(context.trace_freq) self.track_intvl = int(context.track_intvl)
self.device = torch.device(context.device) self.device = torch.device(context.device)
self.suffix_off = context.suffix_off self.suffix_off = context.suffix_off
...@@ -188,7 +188,7 @@ class Trainer: ...@@ -188,7 +188,7 @@ class Trainer:
} }
# Save history # Save history
history_path = self.path('weight', constants.CKP_COUNTED.format(e=epoch), underline=True) history_path = self.path('weight', constants.CKP_COUNTED.format(e=epoch), underline=True)
if epoch % self.trace_freq == 0: if epoch % self.track_intvl == 0:
torch.save(state, history_path) torch.save(state, history_path)
# Save latest # Save latest
latest_path = self.path( latest_path = self.path(
......
...@@ -67,7 +67,7 @@ def parse_args(): ...@@ -67,7 +67,7 @@ def parse_args():
help='path to latest checkpoint') help='path to latest checkpoint')
group_train.add_argument('--anew', action='store_true', group_train.add_argument('--anew', action='store_true',
help='clear history and start from epoch 0 with the checkpoint loaded') help='clear history and start from epoch 0 with the checkpoint loaded')
group_train.add_argument('--trace-freq', type=int, default=50) group_train.add_argument('--track_intvl', type=int, default=50)
group_train.add_argument('--device', type=str, default='cpu') group_train.add_argument('--device', type=str, default='cpu')
group_train.add_argument('--metrics', type=str, default='F1Score+Accuracy+Recall+Precision') group_train.add_argument('--metrics', type=str, default='F1Score+Accuracy+Recall+Precision')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment