glenn-jocher
commited on
Commit
•
ce3872f
1
Parent(s):
f6b3c96
W&B evolution bug fix (#1373)
Browse files
train.py
CHANGED
@@ -323,7 +323,7 @@ def train(hyp, opt, device, tb_writer=None, wandb=None):
|
|
323 |
dataloader=testloader,
|
324 |
save_dir=log_dir,
|
325 |
plots=epoch == 0 or final_epoch, # plot first and last
|
326 |
-
log_imgs=opt.log_imgs)
|
327 |
|
328 |
# Write
|
329 |
with open(results_file, 'a') as f:
|
@@ -475,7 +475,6 @@ if __name__ == '__main__':
|
|
475 |
|
476 |
assert os.environ.get('WANDB_DISABLED') != 'true'
|
477 |
except (ImportError, AssertionError):
|
478 |
-
opt.log_imgs = 0
|
479 |
logger.info("Install Weights & Biases for experiment logging via 'pip install wandb' (recommended)")
|
480 |
|
481 |
train(hyp, opt, device, tb_writer, wandb)
|
|
|
323 |
dataloader=testloader,
|
324 |
save_dir=log_dir,
|
325 |
plots=epoch == 0 or final_epoch, # plot first and last
|
326 |
+
log_imgs=opt.log_imgs if wandb else 0)
|
327 |
|
328 |
# Write
|
329 |
with open(results_file, 'a') as f:
|
|
|
475 |
|
476 |
assert os.environ.get('WANDB_DISABLED') != 'true'
|
477 |
except (ImportError, AssertionError):
|
|
|
478 |
logger.info("Install Weights & Biases for experiment logging via 'pip install wandb' (recommended)")
|
479 |
|
480 |
train(hyp, opt, device, tb_writer, wandb)
|