Closed xiaoachen98 closed 2 years ago
You can get a WeightNet-like depthwise filter by fixing all values in the spatial filter to 1 for 'mul' combination or 0 for 'add' combination.
spatial_filter = torch.ones(filter_size) output = ddf(input, channel_filter, spatial_filter, kernel_size, dilation, stride, 'mul')
or
spatial_filter = torch.zeros(filter_size) output = ddf(input, channel_filter, spatial_filter, kernel_size, dilation, stride, 'add')
I want to make a 3x3 depthwise convolution dynamic, what should I change?