DeepNLP-models-Pytorch icon indicating copy to clipboard operation
DeepNLP-models-Pytorch copied to clipboard

about padding sequence

Open ShellingFord221 opened this issue 6 years ago • 0 comments

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!

ShellingFord221 avatar Feb 25 '19 11:02 ShellingFord221