Class BertClassifier

Inheritance Relationships

Base Type

Class Documentation

class BertClassifier : public marian::ClassifierBase

BERT-specific classifier Can be used for next sentence prediction task or other fine-tuned down-stream tasks Does not actually need a BertBatch, works with CorpusBatch.

@TODO: This is in fact so generic that we might move it out of here as the typical classifier implementation

Public Functions

Ptr<ClassifierState> apply(Ptr<ExpressionGraph> graph, Ptr<data::CorpusBatch> batch, const std::vector<Ptr<EncoderState>> &encoderStates)
virtual void clear()