Ephemeral182 / UDR-S2Former_deraining

[ICCV'23] Sparse Sampling Transformer with Uncertainty-Driven Ranking for Unified Removal of Raindrops and Rain Streaks
https://ephemeral182.github.io/UDR_S2Former_deraining/
129 stars 7 forks source link

Version of pytorch-lightning #4

Closed cherrysherryplus closed 9 months ago

cherrysherryplus commented 9 months ago

Hi! It is a great and intersting work. But I am wondering the version of pytorch-lightning you used because I met some problem with the latest version (v2.x)

Ephemeral182 commented 9 months ago

Hi, we train our model by PyTorch-lightning 1.8.0 previously, but I tested my model in latest version of PyTorch-lightning (v2.x) before I release my code. I think it's ok to use this code. Could you share your problems encountered?

cherrysherryplus commented 9 months ago

Thanks for your reply! I have run the code successfully after I commented the 'logger': logger in https://github.com/Ephemeral182/UDR-S2Former_deraining/blob/main/train.py#L226.


Before that, the problem is shown as the following screenshot: image

Ephemeral182 commented 9 months ago

Thank you for sharing!

cherrysherryplus commented 9 months ago

Hi! I have found one possible solution. The problem may come from the configuration of using TensorBoardLogger in main.py.

The original version (L31-L32, L226) is:

from pytorch_lightning.loggers import WandbLogger,TensorBoardLogger
logger = TensorBoardLogger(r'tb_logs', name='udrs2former')
trainer_defaults = {'devices':[1,2,3],'callbacks':[checkpoint_callback,lr_monitor],'logger':logger}

The first block may be removed and the second can be altered as follows:

train_defaults = {
  # configs of device and callbacks goes here...
  'logger': {
      'class_path': 'lightning.pytorch.loggers.TensorBoardLogger',
      'init_args': {
          'save_dir': 'tb_logs',
          'name': 'udrs2former'
      }
  }
}
Ephemeral182 commented 9 months ago

This may be caused by the updated version. This is indeed a good solution. Thank you.

Madeline-hyh commented 9 months ago

Hello, I have the same problem, and when I change the logger, I have another problem, can you please see it? thanks! image

Feecuin commented 6 months ago

你好,我也有同样的问题,当我更换记录器时,我又遇到了另一个问题,你能看看吗?谢谢! 图像

你好,请问你解决了这个问题了吗?

Madeline-hyh commented 6 months ago

没有~

Feecuin commented 6 months ago

没有~

我也是这个问题,我打算降一下pytorch版本了

Madeline-hyh commented 6 months ago

可以试试~

cherrysherryplus commented 6 months ago

可以试试~

Hello, I have the same problem, and when I change the logger, I have another problem, can you please see it? thanks! image

感觉2.x版本的lightning的话,可以试试用jsonargparse里的lazyinstance类包裹一下TensorBoardLogger