DeepNLP-models-Pytorch
DeepNLP-models-Pytorch copied to clipboard
about padding sequence
Hi, In file 08.CNN-for-Text-Classification.ipynb, where do you pad the input? Is it in [110], line 7: x_p.append(torch.cat([x[i], Variable(LongTensor([word2index['<PAD>']] * (max_x - x[i].size(1)))).view(1, -1)], 1))? Thanks!