cure-lab / SCINet

The GitHub repository for the paper: “Time Series is a Special Sequence: Forecasting with Sample Convolution and Interaction“. (NeurIPS 2022)
Apache License 2.0
617 stars 127 forks source link

learning rate seems not properly be set when training with "self.args.resume == True" #70

Open DSonDH opened 1 year ago

DSonDH commented 1 year ago

for example of SCINet/experiments/exp_ETTh.py,

I think

        if self.args.resume:
            self.model, lr, epoch_start = load_model(self.model, path, model_name=self.args.data, horizon=self.args.horizon)
        else:
            epoch_start = 0

should be above line 227,

model_optim = self._select_optimizer()

and

self.args.lr = lr 

should be added above line 227.

The load_model() function brings last learning rate from loaded model successfully. But optimizer cannot set that learning rate for optimization because optimizer is called first. It seems optimizer only takes self.args.lr and it is not the value from the loaded model.

Best Regards,