Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support more model outputs for BERT/ERNIE/RoBERTa (#2665)
* Support more model outputs for BERT. * Make more task classed support more outputs. * Convert list to tuple automatically in ModelOutput. * Support more model outputs for ERNIE. * Support more model outputs for Roberta. * Add embedding output to all hidden states. * Clean import in model_output.py * Make output of BERT/ERNIE/RoBerta be tensor instead of tuple when the size of tuple is one. * Make monkey patches for forward of PretrainedModel compatible with the latest forward. * Add compatibility for patches of paddle.nn.Transformer * Fix dygraph to static graph with more outputs. * Fix setattr for subclass of TransformerEncoder such as Electra.
- Loading branch information