JingyunLiang / SwinIR

SwinIR: Image Restoration Using Swin Transformer (official repository)

Home Page:https://arxiv.org/abs/2108.10257

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSONDecodeError when training swinir

susan-sun1999 opened this issue · comments

Hi @JingyunLiang I use the training code main_train_psnr.py in KAIR and I only change the dataroot and other necessary stuff. The training command is python main_train_psnr.py --opt options/swinir/train_swinir_sr_classical.json. And my environment is CUDA10.1+Pytorch1.7.1+Python3.7. When training the swinir model, I got this error:

So I search it and change the json_path='options/train_msrresnet_psnr.json' to json_path="options/train_msrresnet_psnr.json" in main_train_psnr.py. As you can see, the line 34 is the json_path.

But I still got the error over and over again. Could you please provide some suggestions? Thanks a lot.

According to the error, it's like there is something wrong in decoding the json file. Please check Line 34 in options/swinir/train_swinir_sr_classical.json.

Thanks a lot. I re-check the json file and I found an extra space in line34. Even though I didn't understand why this space would make such a difference but I'm still glad that it could work. Again, thanks a lot for your kind help.

ezoic increase your site revenue