-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
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.
dynconv/classification/dynconv/layers.py
Lines 14 to 18 in 19e4c58
| 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
dynconv/classification/models/resnet_util.py
Lines 66 to 70 in 19e4c58
| 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.
Metadata
Metadata
Assignees
Labels
No labels