asyml / texar-pytorch

Integrating the Best of TF into PyTorch, for Machine Learning, Natural Language Processing, and Text Generation. This is part of the CASL project: http://casl-project.ai/
https://asyml.io
Apache License 2.0
744 stars 118 forks source link

Re-factor Examples to use the Executor API? #307

Closed ankitvad closed 4 years ago

ankitvad commented 4 years ago

Why don't the simpler examples:

utilize the Executor API for training instead of the main() function and for-loops? There exists executor calls for the transformers.

Does the executor not work for these applications?

huzecong commented 4 years ago

Thank you for your interest in Texar-PyTorch! The vae_text, seq2seq_attn, and sentence_classifier examples are definitely possible to implement with the Executor APIs. However, since Texar aims to be versatile and general purpose framework, we believe that it's also beneficial to demonstrate how to implement models using the usual training loops. This is also why we have several different versions of training scripts for examples like bert.

That said, if you're willing to contribute, you're more than welcome to create a pull request add your implementation of examples using the Executor API!