Skip to content
#

pytorch-tutorials

Here are 67 public repositories matching this topic...

TomasAndersonFang
TomasAndersonFang commented Mar 24, 2020

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

Improve this page

Add a description, image, and links to the pytorch-tutorials topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the pytorch-tutorials topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.