Skip to content
Snippets Groups Projects
Commit f1369e13 authored by Yandi's avatar Yandi
Browse files

refactoring code

parent 26f84e32
Branches
No related tags found
No related merge requests found
...@@ -121,6 +121,7 @@ def train(args, cfg): ...@@ -121,6 +121,7 @@ def train(args, cfg):
if best_val_loss != None: if best_val_loss != None:
if val_loss < best_val_loss : if val_loss < best_val_loss :
network_checkpoint.update(val_loss) network_checkpoint.update(val_loss)
best_val_loss = val_loss
scheduler.step(val_loss) scheduler.step(val_loss)
...@@ -207,6 +208,6 @@ if __name__ == "__main__": ...@@ -207,6 +208,6 @@ if __name__ == "__main__":
config_file = open("config.yml") config_file = open("config.yml")
cfg = yaml.load(config_file, Loader=yaml.FullLoader) cfg = yaml.load(config_file, Loader=yaml.FullLoader)
eval(f"{args.command}(args)") eval(f"{args.command}(args)")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment