practical-pytorch
practical-pytorch copied to clipboard
Go to https://github.com/pytorch/tutorials - this repo is deprecated and no longer maintained
In the batch translation example, encoder is: ``` class EncoderRNN(nn.Module): def __init__(self, input_size, hidden_size, n_layers=1, dropout=0.1): super(EncoderRNN, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.n_layers = n_layers self.dropout = dropout...
Hi, Thank you for your tutorial! I tried to change the embedding with pre-trained word embeddings such as word2vec, here is my code: ``` class Lang: def __init__(self, name): self.name...
the detail of how and what I fixed is in the commits
In the RNN classification [example](https://github.com/spro/practical-pytorch/blob/master/char-rnn-classification/char-rnn-classification.ipynb), using characters of names to predict the names language, the train function re-zeros the hidden state (and gradient) every epoch. I was wondering why this...
Jieba didn't solve my issue. I have run the model for English-Bengali translation.
Changed the train() -function so that they work on PyTorch 1.3.1 Changed target[c] --> target[c].view(1) (because of dimensionality problems) Changed loss.data[0] --> loss.data.item()
Hi @spro, i've read your implementation of luong attention in pytorch seq2seq translation tutorial and in the context calculation step, you're using rnn_output as input when calculating attn_weights but i...
Use tensor.item() to convert a 0-dim tensor to a Python number