feat: update pl version supports
### What does this PR do?
Update for compatibility with pytorch-lightning 2.0.3 as well as backward compatibility with previous version (>1.6.4)
Changes:
- add `on_validation_epoch_end()` and remove `validation_epoch_end()` in `LightningModule`
- `set_seed()` in `train()`
- add `TQDMProgressBar` in `callbacks` argument in `Trainer()`, and remove `get_progress_bar_dict()` in `LightningModule`
- add `ckpt_path` argument in `Trainer.fit()`, and remove `resume_from_checkpoint` argument in `Trainer()`
Minor changes:
- remove `self.model.norm` in `SwinEncoder` to free the unused parameters
- add `self.validation_step_outputs` variable in `LightningModule` for `on_validation_epoch_end()`
- change the `gpus` argument to `devices` argument in `Trainer()`
合并状态:已合并 合并于 2023-07-31 关闭于 2023-07-31 0 条评论