I have an attention decoder whose forward function is as follows.
def forward(self, input, hidden, encoder_outputs):
    embedded = self.embedding(input).view(1, 1, -1)
    embedded = self.drop(embedded)
    attn_weights = F.softmax(self.attn(torch.cat((embedded[0], hidden[0]), 1)))

How can I print the shape of embedded tensor inside the forward function? I checked, simple print() statement doesn’t work.
Any suggestion?