diff --git a/main.py b/main.py index a78f21b..0161274 100644 --- a/main.py +++ b/main.py @@ -1,10 +1,10 @@ import argparse import pytorch_lightning as pl +from pytorch_lightning.callbacks import EarlyStopping from dataloader import create_named_dataloader from model import ColorTransformerModel -from pytorch_lightning.callbacks import EarlyStopping def parse_args(): @@ -44,10 +44,10 @@ def parse_args(): if __name__ == "__main__": args = parse_args() early_stop_callback = EarlyStopping( - monitor='hp_metric', # Metric to monitor - min_delta=0, # Minimum change in the monitored quantity to qualify as an improvement - patience=50, # Number of epochs with no improvement after which training will be stopped - mode='min', # Mode can be either 'min' for minimizing the monitored quantity or 'max' for maximizing it. + monitor="hp_metric", # Metric to monitor + min_delta=0, # Minimum change in the monitored quantity to qualify as an improvement + patience=50, # Number of epochs with no improvement after which training will be stopped + mode="min", # Mode can be either 'min' for minimizing the monitored quantity or 'max' for maximizing it. verbose=True, )