Closed simdjeff closed 2 years ago
This error is caused by PerceptualLoss. If PerceptualLoss is removed, the error will disappear. However it's not easy to handle PerceptualLoss. The downloaded “vgg19-dcbb9e9d.pth” file is put into the .cache/torch/hub/checkpoints, but the build_model function didn't work either.
Hi @simdjeff, since we currently support test only, PerceptualLoss should not be used. What command did you use?
The training code will be released next week.
Hi @ckkelvinchan. I used the command "python inference_realbasicvsr.py configs/realbasicvsr_x4.py checkpoints/RealBasicVSR_x4.pth data/demo_000 results/demo_000". Yes, PerceptualLoss can not be used for all test files with PerceptualLoss in mmediting/tests. I suppose the error doesn't occur only in ReadBasicVSR. The error occurs in the function "build_from_cfg". The PerceptualLoss is used in eq.(8) in the paper "Investigating Tradeoffs in Real-World Video Super-Resolution". I wonder how to make RealBasicVSR work when building a model with PerceptualLoss? Thank you. I am looking forward to the new training code.
Are you using Windows?
Exception has occurred: RuntimeError RealBasicVSR: PerceptualLoss: storage has wrong size: expected 0 got 1728
During handling of the above exception, another exception occurred:
File "D:\Users......\RealBasicVSR-master\realbasicvsr\models\restorers\real_basicvsr.py", line 65, in init super().init(generator, discriminator, gan_loss, pixel_loss,
During handling of the above exception, another exception occurred:
File "D:\Users......\RealBasicVSR-master\realbasicvsr\models\builder.py", line 20, in build return build_from_cfg(cfg, registry, default_args) File "D:\Users......\RealBasicVSR-master\realbasicvsr\models\builder.py", line 58, in build_model return build(cfg, MODELS, dict(train_cfg=train_cfg, test_cfg=test_cfg)) File "D:\Users......\RealBasicVSR-master\inference_realbasicvsr.py", line 67, in init_model model = build_model(config.model, test_cfg=config.test_cfg) File "D:\Users......\RealBasicVSR-master\inference_realbasicvsr.py", line 81, in main model = init_model(args.config, args.checkpoint) File "D:\Users......\RealBasicVSR-master\inference_realbasicvsr.py", line 149, in
main()