Class EncoderPoolerBase

Inheritance Relationships

Base Type

  • public IModel

Derived Type

Class Documentation

class EncoderPoolerBase : public IModel

Combines sequence encoders with generic poolers Can be used to train sequence poolers like language detection, BERT-next-sentence-prediction etc.

Already has support for multi-objective training.

@TODO: this should probably be unified somehow with EncoderDecoder which could allow for deocder/pooler multi-objective training.

Subclassed by marian::EncoderPooler

Public Functions

virtual ~EncoderPoolerBase()
virtual void load(Ptr<ExpressionGraph> graph, const std::string &name, bool markedReloaded = true) = 0
virtual void mmap(Ptr<ExpressionGraph> graph, const void *ptr, bool markedReloaded = true) = 0
virtual void save(Ptr<ExpressionGraph> graph, const std::string &name, bool saveTranslatorConfig = false) = 0
virtual void clear(Ptr<ExpressionGraph> graph) = 0
virtual std::vector<Expr> apply(Ptr<ExpressionGraph>, Ptr<data::CorpusBatch>, bool) = 0
virtual Logits build(Ptr<ExpressionGraph> graph, Ptr<data::Batch> batch, bool clearGraph = true)
virtual Logits build(Ptr<ExpressionGraph> graph, Ptr<data::CorpusBatch> batch, bool clearGraph = true)
virtual Ptr<Options> getOptions() = 0