Closed cherrysherryplus closed 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?
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:
Thank you for sharing!
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'
}
}
}
This may be caused by the updated version. This is indeed a good solution. Thank you.
Hello, I have the same problem, and when I change the logger, I have another problem, can you please see it? thanks!
你好,我也有同样的问题,当我更换记录器时,我又遇到了另一个问题,你能看看吗?谢谢!
你好,请问你解决了这个问题了吗?
没有~
没有~
我也是这个问题,我打算降一下pytorch版本了
可以试试~
可以试试~
Hello, I have the same problem, and when I change the logger, I have another problem, can you please see it? thanks!
感觉2.x版本的lightning的话,可以试试用jsonargparse里的lazyinstance类包裹一下TensorBoardLogger
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)