Open vainaixr opened 4 years ago
You should change the padding
to 1, so the dimension w and h of the feature maps would keep the same after 1x1 convolusion.
class AttentionConv(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=1, groups=1, bias=False):
after
it gives error,
this is because of use of unfold on k_out before this, so height, width is not consistent.