Official implementation of the paper 'High-Resolution Photorealistic Image Translation in Real-Time: A Laplacian Pyramid Translation Network' in CVPR 2021
Apache License 2.0
413
stars
47
forks
source link
recompute_scale_factor is not meaningful with an explicit size #30
When I use dataroot_gt: datasets/FiveK/FiveK_480p/test/B
dataroot_lq: datasets/FiveK/FiveK_480p/test/A to evaluation, I meet the problem:
Traceback (most recent call last):
File "/data/likengpeng/LPTN/codes/test.py", line 56, in
main()
File "/data/likengpeng/LPTN/codes/test.py", line 48, in main
model.validation(
File "/data/likengpeng/LPTN/codes/models/base_model.py", line 47, in validation
self.nondist_validation(dataloader, current_iter, tb_logger,
File "/data/likengpeng/LPTN/codes/models/lptn_test_model.py", line 75, in nondist_validation
self.test()
File "/data/likengpeng/LPTN/codes/models/lptn_test_model.py", line 41, in test
self.output = self.net_g(self.lq)
File "/home/amax/anaconda3/envs/deoldify/lib/python3.9/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/data/likengpeng/LPTN/codes/models/archs/LPTN_arch.py", line 186, in forward
real_A_up = nn.functional.interpolate(pyr_A[-1], size=(pyr_A[-2].shape[2], pyr_A[-2].shape[3]))
File "/home/amax/anaconda3/envs/deoldify/lib/python3.9/site-packages/torch/nn/functional.py", line 3110, in interpolate
raise ValueError("recompute_scale_factor is not meaningful with an explicit size.")
ValueError: recompute_scale_factor is not meaningful with an explicit size.
When I use dataroot_gt: datasets/FiveK/FiveK_480p/test/B dataroot_lq: datasets/FiveK/FiveK_480p/test/A to evaluation, I meet the problem:
Traceback (most recent call last): File "/data/likengpeng/LPTN/codes/test.py", line 56, in
main()
File "/data/likengpeng/LPTN/codes/test.py", line 48, in main
model.validation(
File "/data/likengpeng/LPTN/codes/models/base_model.py", line 47, in validation
self.nondist_validation(dataloader, current_iter, tb_logger,
File "/data/likengpeng/LPTN/codes/models/lptn_test_model.py", line 75, in nondist_validation
self.test()
File "/data/likengpeng/LPTN/codes/models/lptn_test_model.py", line 41, in test
self.output = self.net_g(self.lq)
File "/home/amax/anaconda3/envs/deoldify/lib/python3.9/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/data/likengpeng/LPTN/codes/models/archs/LPTN_arch.py", line 186, in forward
real_A_up = nn.functional.interpolate(pyr_A[-1], size=(pyr_A[-2].shape[2], pyr_A[-2].shape[3]))
File "/home/amax/anaconda3/envs/deoldify/lib/python3.9/site-packages/torch/nn/functional.py", line 3110, in interpolate
raise ValueError("recompute_scale_factor is not meaningful with an explicit size.")
ValueError: recompute_scale_factor is not meaningful with an explicit size.
How can I solve it? Thank you!