How to use two different loss function in ULMFiT?

WX20190129-215100 ]

above graph is what I want to implement :slight_smile:

i want to build a autoencoder structure top on LM, then use the hidden for training classifier.
so two loss function, pytorch mean square error (MSE) and normal cross-entropy, and there plus are needed to defined.

  1. i could not find definition of loss function in get_rnn_classifier and PoolingLinearClassifier , anyone can told me where should i write the loss_mse + loss_cros ?