theFoxofSky / ddfnet

The official implementation of the CVPR2021 paper: Decoupled Dynamic Filter Networks
MIT License
214 stars 34 forks source link

Something wrong with the grad_check.py #12

Closed Reply1999 closed 3 years ago

Reply1999 commented 3 years ago

After installing the ddfnet, I run the code grad_check.py, and get the output as follows:

True
True
True
True
True
True
All forward pass
True
True
True
True
Traceback (most recent call last):
  File "grad_check.py", line 137, in <module>
    test = gradcheck(ddf, (feat, channel_att, spatial_att, 3, 1, 2, 1, 'mul'), atol=1e-5, eps=1e-3)
  File "/home/user/miniconda3/envs/ddfnet/lib/python3.7/site-packages/torch/autograd/gradcheck.py", line 323, in gradcheck
    func_out = func(*tupled_inputs)
  File "/home/user/ddfnet/ddf/ddf.py", line 65, in forward
    'only support mul or add combination, instead of {}'.format(kernel_combine)
AssertionError: only support mul or add combination, instead of 1

Could you please help us find what is happening? Thx.

theFoxofSky commented 3 years ago

It is caused by one bug in my code. I have solved it, thanks for reply

theFoxofSky commented 3 years ago

you can pull it agian