theFoxofSky / ddfnet

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

Issue about output_channel and the multiple process #11

Open Wangbk-dl opened 3 years ago

Wangbk-dl commented 3 years ago

Thanks for your excellent work. I just read your paper and your code. I notice that in your code there is nothing about output_channel. So how should I change the channel dimension of the input tensor? What's more, after getting the input_tensor, spatial_filter, and the channel_filter, how should I multiple them together? I would be really appreciated it if you could offer me some help.

theFoxofSky commented 3 years ago
  1. DDF cannot change the channel number, as it essentially operates a depthwise operation. You can append a 1x1 convolution after DDFPack to change the channel number.
  2. There is no python implementation to multiply them together, I implement it in CUDA. you can just call the 'ddf' function with 'mul' combination to multiply and apply them. BTW, the 'ddf' function also supports the 'add' combination to add and apply filters.
Wangbk-dl commented 3 years ago
  1. DDF cannot change the channel number, as it essentially operates a depthwise operation. You can append a 1x1 convolution after DDFPack to change the channel number.
  2. There is no python implementation to multiply them together, I implement it in CUDA. you can just call the 'ddf' function with 'mul' combination to multiply and apply them. BTW, the 'ddf' function also supports the 'add' combination to add and apply filters.

Thanks so much for reply!

Wangbk-dl commented 3 years ago
  1. DDF cannot change the channel number, as it essentially operates a depthwise operation. You can append a 1x1 convolution after DDFPack to change the channel number.
  2. There is no python implementation to multiply them together, I implement it in CUDA. you can just call the 'ddf' function with 'mul' combination to multiply and apply them. BTW, the 'ddf' function also supports the 'add' combination to add and apply filters.

Sorry for bothering you. But I just wonder after getting spatial_filter and channel_filter, should I first multiply them together first to get the final filter, and then apply the final filter on the input or should I apply both of them separately on the input_feature?

theFoxofSky commented 3 years ago
  1. DDF cannot change the channel number, as it essentially operates a depthwise operation. You can append a 1x1 convolution after DDFPack to change the channel number.
  2. There is no python implementation to multiply them together, I implement it in CUDA. you can just call the 'ddf' function with 'mul' combination to multiply and apply them. BTW, the 'ddf' function also supports the 'add' combination to add and apply filters.

Sorry for bothering you. But I just wonder after getting spatial_filter and channel_filter, should I first multiply them together first to get the final filter, and then apply the final filter on the input or should I apply both of them separately on the input_feature?

Multiply first.