Hi,
Thanks for your great work!
I have some questions about the mask usage in your convolution operation. I'm wondering what is the meaning to assign conv_module.__mask__ with mask. I checked that the conv_module(x) function does not consider the conv_module.__mask__ property when operating.
|
def conv1x1(conv_module, x, mask, fast=False): |
|
w = conv_module.weight.data |
|
mask.flops_per_position += w.shape[0]*w.shape[1] |
|
conv_module.__mask__ = mask |
|
return conv_module(x) |
Therefore, I can't get how the masks are applied in network forward propagation, such as the basicblock in
|
x = dynconv.conv3x3(self.conv1, x, None, mask_dilate) |
|
x = dynconv.bn_relu(self.bn1, self.relu, x, mask_dilate) |
|
x = dynconv.conv3x3(self.conv2, x, mask_dilate, mask) |
|
x = dynconv.bn_relu(self.bn2, None, x, mask) |
|
out = identity + dynconv.apply_mask(x, mask) |
It seems that only the mask in dynconv.apply_mask(x, mask) works.
Hi,
Thanks for your great work!
I have some questions about the mask usage in your convolution operation. I'm wondering what is the meaning to assign
conv_module.__mask__withmask. I checked that theconv_module(x)function does not consider theconv_module.__mask__property when operating.dynconv/classification/dynconv/layers.py
Lines 14 to 18 in 19e4c58
Therefore, I can't get how the masks are applied in network forward propagation, such as the basicblock in
dynconv/classification/models/resnet_util.py
Lines 66 to 70 in 19e4c58
It seems that only the mask in
dynconv.apply_mask(x, mask)works.