NVlabs/few-shot-vid2vid

error running train.py, resample2d_cuda.forward() has incompatible function arguments.

Closed this issue · 1 comments

/home/daniel/.local/lib/python3.6/site-packages/torch/nn/functional.py:2494: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  "See the documentation of nn.Upsample for details.".format(mode))
Traceback (most recent call last):
  File "train.py", line 74, in <module>
    train()
  File "train.py", line 46, in train
    flow_gt, conf_gt = flowNet(data_list, epoch)
  File "/home/daniel/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/daniel/project/010_GAN/201_vid2vid/few-shot-vid2vid/models/models.py", line 90, in forward
    outputs = self.model(*inputs, **kwargs, dummy_bs=self.pad_bs)
  File "/home/daniel/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/daniel/.local/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/home/daniel/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/daniel/project/010_GAN/201_vid2vid/few-shot-vid2vid/models/flownet.py", line 48, in forward
    flow_gt_ref, conf_gt_ref = self.flowNet_forward(image_now, image_ref.expand_as(image_now))              
  File "/home/daniel/project/010_GAN/201_vid2vid/few-shot-vid2vid/models/flownet.py", line 60, in flowNet_forward
    flow, conf = self.compute_flow_and_conf(input_A, input_B)
  File "/home/daniel/project/010_GAN/201_vid2vid/few-shot-vid2vid/models/flownet.py", line 75, in compute_flow_and_conf
    flow1 = self.flowNet(data1)
  File "/home/daniel/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/daniel/project/010_GAN/201_vid2vid/few-shot-vid2vid/models/networks/flownet2_pytorch/models.py", line 130, in forward
    resampled_img1 = self.resample1(x[:,3:,:,:], flownetc_flow)
  File "/home/daniel/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/daniel/project/010_GAN/201_vid2vid/few-shot-vid2vid/models/networks/flownet2_pytorch/networks/resample2d_package/resample2d.py", line 46, in forward
    return Resample2dFunction.apply(input1_c, input2, self.kernel_size)
  File "/home/daniel/project/010_GAN/201_vid2vid/few-shot-vid2vid/models/networks/flownet2_pytorch/networks/resample2d_package/resample2d.py", line 19, in forward
    resample2d_cuda.forward(input1, input2, output, kernel_size)
TypeError: forward(): incompatible function arguments. The following argument types are supported:
    1. (arg0: at::Tensor, arg1: at::Tensor, arg2: at::Tensor, arg3: int, arg4: bool) -> int

it seems there is a missing argument in arg4: bool.
I add arg4 in resample2d_cuda.forward(input1, input2, output, kernel_size, True), and it works.
I am very confused since there isn't arg4 defined.