glenn-jocher
commited on
Commit
•
3edc38f
1
Parent(s):
7765557
update train.py gsutil bucket fix (#463)
Browse files
train.py
CHANGED
@@ -51,7 +51,8 @@ def train(hyp, tb_writer, opt, device):
|
|
51 |
last = wdir + 'last.pt'
|
52 |
best = wdir + 'best.pt'
|
53 |
results_file = log_dir + os.sep + 'results.txt'
|
54 |
-
epochs, batch_size, total_batch_size, weights, rank =
|
|
|
55 |
# TODO: Init DDP logging. Only the first process is allowed to log.
|
56 |
# Since I see lots of print here, the logging configuration is skipped here. We may see repeated outputs.
|
57 |
|
@@ -421,7 +422,7 @@ if __name__ == '__main__':
|
|
421 |
parser.add_argument('--device', default='', help='cuda device, i.e. 0 or 0,1,2,3 or cpu')
|
422 |
parser.add_argument('--multi-scale', action='store_true', help='vary img-size +/- 50%%')
|
423 |
parser.add_argument('--single-cls', action='store_true', help='train as single-class dataset')
|
424 |
-
parser.add_argument('--sync-bn', action=
|
425 |
parser.add_argument('--local_rank', type=int, default=-1, help='DDP parameter, do not modify')
|
426 |
opt = parser.parse_args()
|
427 |
|
|
|
51 |
last = wdir + 'last.pt'
|
52 |
best = wdir + 'best.pt'
|
53 |
results_file = log_dir + os.sep + 'results.txt'
|
54 |
+
epochs, batch_size, total_batch_size, weights, rank = \
|
55 |
+
opt.epochs, opt.batch_size, opt.total_batch_size, opt.weights, opt.local_rank
|
56 |
# TODO: Init DDP logging. Only the first process is allowed to log.
|
57 |
# Since I see lots of print here, the logging configuration is skipped here. We may see repeated outputs.
|
58 |
|
|
|
422 |
parser.add_argument('--device', default='', help='cuda device, i.e. 0 or 0,1,2,3 or cpu')
|
423 |
parser.add_argument('--multi-scale', action='store_true', help='vary img-size +/- 50%%')
|
424 |
parser.add_argument('--single-cls', action='store_true', help='train as single-class dataset')
|
425 |
+
parser.add_argument('--sync-bn', action='store_true', help='use SyncBatchNorm, only available in DDP mode')
|
426 |
parser.add_argument('--local_rank', type=int, default=-1, help='DDP parameter, do not modify')
|
427 |
opt = parser.parse_args()
|
428 |
|