cruft left from experiment

This commit is contained in:
Victor Hall 2023-03-15 11:23:47 -04:00
parent 605716a646
commit d1bc94fe3e
1 changed files with 7 additions and 1 deletions

View File

@ -216,7 +216,7 @@ def setup_args(args):
"""
if args.disable_amp:
logging.warning(f"{Fore.LIGHTYELLOW_EX} Disabling AMP, not recommended.{Style.RESET_ALL}")
args.amp= False
args.amp = False
else:
args.amp = True
@ -811,6 +811,12 @@ def main(args):
model_pred, target = get_model_prediction_and_target(batch["image"], batch["tokens"], args.zero_frequency_noise_ratio)
# with torch.no_grad():
# loss_l1 = F.l1_loss(model_pred.float(), target.float(), reduction="mean")
# log_writer.add_scalar(tag="loss/l1", scalar_value=loss_l1, global_step=global_step)
# loss_hinge = F.hinge_embedding_loss(model_pred.float(), target.float(), reduction="mean")
# log_writer.add_scalar(tag="loss/hinge", scalar_value=loss_hinge, global_step=global_step)
loss = F.mse_loss(model_pred.float(), target.float(), reduction="mean")
del target, model_pred