-
Updated
Jun 12, 2020 - Jupyter Notebook
pytorch-nlp
Here are 62 public repositories matching this topic...
I add a function(according the code in the tutorial4) to calculate the bleu score, but i get the vey low score(0.09), could you tell me why?
This is code to calculate bleu:
def translate_sentence(sentence, src_field, trg_field, model, device, max_len = 50):
model.eval()
if isinstance(sentence, str):
nlp = spacy.load('de')
tokens = [token.te
I'm studying 5_3_Document_Classification_with_CNN.
The make_embedding_matrix helper docs say that it should be fed in a list of words in the dataset. However, for the embedding matrix to return the correct embedding of a word from pretrained embeddings, the word list should be fed in the same order as in the vocabulary. Furthermore, there should be no gaps in the word indices in the vocabulary
-
Updated
Jan 15, 2020 - Python
-
Updated
Jul 23, 2019 - Python
-
Updated
Dec 13, 2019 - Python
-
Updated
Nov 18, 2019 - Jupyter Notebook
-
Updated
May 4, 2020 - Jupyter Notebook
-
Updated
May 30, 2020 - Python
-
Updated
Mar 17, 2020 - Python
-
Updated
Jun 9, 2019 - Jupyter Notebook
-
Updated
Jul 12, 2019 - Python
-
Updated
Apr 1, 2020 - Jupyter Notebook
-
Updated
May 29, 2019 - Python
-
Updated
Jan 30, 2018 - Python
-
Updated
Aug 23, 2019 - Python
-
Updated
Jan 31, 2019 - Jupyter Notebook
-
Updated
Feb 19, 2020 - Python
-
Updated
May 13, 2020 - Python
-
Updated
May 20, 2020 - Jupyter Notebook
-
Updated
Dec 19, 2019 - Python
-
Updated
Jul 12, 2018 - Python
-
Updated
Apr 5, 2020 - Python
-
Updated
Jun 18, 2018 - JavaScript
-
Updated
May 18, 2019 - Python
-
Updated
Jun 2, 2020 - Jupyter Notebook
-
Updated
Apr 4, 2019
Improve this page
Add a description, image, and links to the pytorch-nlp topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the pytorch-nlp topic, visit your repo's landing page and select "manage topics."
Expected Behavior
I want to convert torch.nn.Linear modules to weight drop linear modules in my model (possibly big), and I want to train my model with multi-GPUs. However, I have RuntimeError in my sample code. First, I have _weight_drop() which drops some part of weights in torch.nn.Linear (see the code below).
Actual Behavior
RuntimeError: arguments are located on different GPUs at /