Hi all,
I’d like to implement a function like the squeeze-excitation attention, for example, we have a matrix BxCxHxW, and we also have an C-dim vector (both are in the form of tensor). I’d like to channel-wise multiply the matrix and vector. How can I implement it?
Previously, in senet, we just do it by: mat*camap, but I have tested it on pytorch 1.2, it shows
where mat: 3x16x16, camat: 3-dim vector



mat*camap



Traceback (most recent call last):
File “”, line 1, in 
RuntimeError: The size of tensor a (16) must match the size of tensor b (3) at non-singleton dimension 2