Giter Site home page Giter Site logo

Comments (5)

glample avatar glample commented on July 19, 2024 1

Because the target is just used to evaluate the BLEU score. But if you are just interested in inference, this is enough to do this. It's clearly not very efficient, but it's hacky workaround that should work until I add a translate.py file for inference.

Yes, best-bleu_xxx.pth only contains the model, this is what you need to use. checkpoint.pth contains the last model in the training experiment (not necessarily the best), along with the optimizer, the training parameters, etc.

from unsupervisedmt.

glample avatar glample commented on July 19, 2024

Hi,

Yes, the above way seems correct. If you don't have parallel data, you can simply run the same thing and use an arbitrary random text file with the same number of lines for the target file to create a fake parallel data.
Also, note that the checkpoint.pth is to restart the experiment, it contains a lot of things like training epoch, best scores, etc. In your case you want to reload a file like best-bleu_en_fr_valid.pth

from unsupervisedmt.

shawnzaru avatar shawnzaru commented on July 19, 2024

Thanks for reply. I have been a bit hesitant to use fake target data as the training is done using back-translation (A -> B -> A and B -> A -> B). Could you explain to me why using fake target data for inference doesn't matter? Thanks.

from unsupervisedmt.

shawnzaru avatar shawnzaru commented on July 19, 2024

Also, I am trying to understand the difference between checkpoint.pth and best-bleu_xxx.pth. Do you mean checkpoint.pth is more redundant than best-bleu_xxx.pth or is it that in the inference case I have to reload best-bleu_xxx.pth instead of checkpoint.pth, because loading checkpoint.pth will make the program do things differently? Thanks.

from unsupervisedmt.

shawnzaru avatar shawnzaru commented on July 19, 2024

Thanks 👍

from unsupervisedmt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.