SuhyeonHa / CDTNet-PyTorch

About Unofficial implementation of "High-Resolution Image Harmonization via Collaborative Dual Transformations (CVPR 2022)" in PyTorch
10 stars 0 forks source link

AttributeError: module 'trilinear' has no attribute 'forward' #4

Open guanguanboy opened 1 year ago

guanguanboy commented 1 year ago

--- c8023573615734765932396b5a584d76636d567a5a5746795932686663484a.sub.deliverycontent.online ping statistics --- 2553 packets transmitted, 2553 received, 0% packet loss, time 2612787ms rtt min/avg/max/mdev = 0.012/0.061/0.575/0.057 ms PING c80376616d566a64484d7651305255546d56304c564235564739795932673d.sub.deliverycontent.online (127.0.0.1) 56(84) bytes of data.

64 bytes from localhost (127.0.0.1): icmp_seq=2491 ttl=64 time=0.039 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2492 ttl=64 time=0.048 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2493 ttl=64 time=0.146 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2494 ttl=64 time=0.052 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2495 ttl=64 time=0.124 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2496 ttl=64 time=0.051 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2497 ttl=64 time=0.050 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2498 ttl=64 time=0.050 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2499 ttl=64 time=0.058 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2500 ttl=64 time=0.063 ms

create web directory checkpoints/iih_base_allidh_test/web... Traceback (most recent call last): File "/data1/liguanlin/codes/research_projects/CDTNet-PyTorch/train.py", line 18, in main() File "/data1/liguanlin/codes/research_projects/CDTNet-PyTorch/train.py", line 14, in main launch_job(cfg=cfg, init_method=cfg.init_method, func=train) File "/data1/liguanlin/codes/research_projects/CDTNet-PyTorch/util/misc.py", line 298, in launch_job func(cfg=cfg) File "/data1/liguanlin/codes/research_projects/CDTNet-PyTorch/train_net.py", line 78, in train model.optimize_parameters() # calculate loss functions, get gradients, update network weights File "/data1/liguanlin/codes/research_projects/CDTNet-PyTorch/models/iih_base_model.py", line 92, in optimize_parameters self.forward() # compute fake images: G(A) File "/data1/liguanlin/codes/research_projects/CDTNet-PyTorch/models/iih_base_model.py", line 73, in forward self.out_hr_rgb, self.out_hr = self.netG(self.out_lr_pix, F_map, B_map, F_dec, self.comp_hr, self.mask_hr, self.opt.train_data) File "/home/liguanlin/anaconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, kwargs) File "/data1/liguanlin/codes/research_projects/CDTNet-PyTorch/models/harmony_networks.py", line 90, in forward gen_A0 = self.LUT0(new_img) File "/home/liguanlin/anaconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, *kwargs) File "/data1/liguanlin/codes/research_projects/CDTNet-PyTorch/models/models3DLUT.py", line 33, in forward , output = self.TrilinearInterpolation(self.LUT, x) File "/home/liguanlin/anaconda3/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "/data1/liguanlin/codes/research_projects/CDTNet-PyTorch/models/models_3DLUT.py", line 105, in forward return TrilinearInterpolationFunction.apply(lut, x) File "/data1/liguanlin/codes/research_projects/CDTNet-PyTorch/models/models_3DLUT.py", line 62, in forward assert 1 == trilinear.forward(lut, AttributeError: module 'trilinear' has no attribute 'forward' 能否帮忙解决一下这个问题。

SuhyeonHa commented 1 year ago

I modified a few lines of code by referring to the following link. Please try to check it out https://github.com/HuiZeng/Image-Adaptive-3DLUT/issues/5