def s(name, val):
    print(name + "'s size is {}".format(val))

def forward(self, word_input, last_context, last_hidden, encoder_outputs):
#         s("word_input_de", word_input.view(-1, 1).size())
        word_embedded = self.embedding(word_input.view(-1, 1))
#         s("word_embedded_de", word_embedded.size())
        
#         s("last_context", last_context.size())
        rnn_input = torch.cat((word_embedded, last_context), 2)
#         s("rnn_input", rnn_input.size())
#         s("last_hidden", last_hidden.size())
        rnn_output, hidden = self.gru(rnn_input, last_hidden)
#         s("rnn_output", rnn_output.size())
#         print(rnn_output)
        attn_weights = self.attn(rnn_output, encoder_outputs)
        print()
#         s("encoder_outputs", encoder_outputs.transpose(0, 1).size())
#         s("attn_weights", attn_weights.unsqueeze(0).unsqueeze(1).size())
        context = attn_weights.unsqueeze(0).unsqueeze(1).bmm(encoder_outputs.transpose(0, 1)) 
#         s("context", context.size())
        
        output = F.log_softmax(self.out(torch.cat((rnn_output, context), 2)))
        print(output)

        return output, context, hidden, attn_weights

I need use many print function to test my pytorch model. Is there any easy way to test it?