asyml / texar

Toolkit for Machine Learning, Natural Language Processing, and Text Generation, in TensorFlow. This is part of the CASL project: http://casl-project.ai/
https://asyml.io
Apache License 2.0
2.39k stars 373 forks source link

Optimal Transport based Loss Function in Texar #122

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hello,

Recently people have used optimal transport for sequence to sequence models like in this work : https://openreview.net/pdf?id=S1xtAjR5tX

How can I implement an optimal transport loss function in texar?

Any way to integrate sequence level loss (not just the word level cross entropy loss) in texar?

Any code I can start with which is close to optimal transport like implementation?

Thank you for your kind help.

ZhitingHu commented 5 years ago

Yes. Contributions are very welcome! You may refer to Texar's other loss functions to see how an optimal transport loss can be implemented.

Pls checkout the seq2seq_exposure_bias example for implementations of several sequence-level training algorithms