MCG-NJU / EMA-VFI

[CVPR 2023] Extracting Motion and Appearance via Inter-Frame Attention for Efficient Video Frame Interpolatio
Apache License 2.0
399 stars 42 forks source link

question on torch.clamp() function blocking gradient propagation #27

Closed yingc1309 closed 3 months ago

yingc1309 commented 3 months ago

we tried to train the EMA model on DAVIS dataset, and found the grad of Unet(RefineNet) is None.

    tmp = self.unet(img0, img1, warped_img0, warped_img1, mask, flow, c0, c1)
    res = tmp[:, :3] * 2 - 1
    pred = torch.clamp(merged[-1] + res, 0, 1)
    import pdb
    pdb.set_trace()

Input: print(self.unet.down3.conv2[0].weight.grad) Output: None