Changing training criteria of Seq2Seq model

I am planning to change training criteria for Seq2Seq model.
For example, GAN would be one example. In this scenario, Seq2Seq (=Generator) model is trained towards maximizing Discriminator’s output.

Is there any example tutorial/recipes related to changing model’s training criteria?
If not, could you tell me which files are related source files?

I really appreciate any comments :slight_smile:

The current training criterion is defined in this file:

and used in the Seq2Seq model here:

1 Like