Hi everyone,
Assume, I have representation x = torch.rand(4,8) for my input sentence. (without batch dimension, it is just a single sentence containing 4 words). I want to get 1x8 dimensional tensor as output. I can obtain this with a maxpooling operation. However, since all of my sentences have different number of words, the first dimension of the x tensor will always be different and I have to therefore pad the input matrix. Instead, I wonder can I basically do torch.max(x,1)