Class LayerBase

Inheritance Relationships

Derived Types

Class Documentation

class LayerBase

Base class for a layer.

Each layer consists of LayerBase and IXXXLayer which defines one or more apply() functions for the respective layer type (different layers may require different signatures). This base class contains configuration info for creating parameters and executing apply().

Subclassed by marian::ClassifierBase, marian::Embedding, marian::EncoderDecoder, marian::EncoderDecoderLayerBase, marian::mlp::Dense, marian::mlp::Output, marian::PoolerBase, marian::ULREmbedding

Public Functions

LayerBase(Ptr<ExpressionGraph> graph, Ptr<Options> options)
template<typename T>
T opt(const std::string key) const
template<typename T>
T opt(const std::string key, const T &defaultValue) const

Protected Attributes

Ptr<ExpressionGraph> graph_
Ptr<Options> options_