Class Factory

Inheritance Relationships

Base Type

  • public std::enable_shared_from_this< Factory >

Derived Types

Class Documentation

class Factory : public std::enable_shared_from_this<Factory>

Base class for constructing models or layers.

Its main attribute is options which hold the basic characteristics of the model or the layer.

Subclassed by marian::ConstructingFactory< Class >, marian::mlp::LayerFactory, marian::mlp::LogitLayerFactory, marian::mlp::MLPFactory, marian::models::ClassifierFactory, marian::models::DecoderFactory, marian::models::EncoderClassifierFactory, marian::models::EncoderDecoderFactory, marian::models::EncoderFactory, marian::models::EncoderPoolerFactory, marian::models::PoolerFactory, marian::rnn::CellFactory, marian::rnn::InputFactory, marian::rnn::RNNFactory

Public Functions

Factory()
Factory(Ptr<Options> options)
template<typename T, typename ...Args>
Factory(const std::string &key, T value, Args&&... moreArgs)
template<typename ...Args>
Factory(Ptr<Options> options, Args&&... args)
Factory(const Factory &factory)
virtual ~Factory()
std::string asYamlString()
template<typename T>
T opt(const char *const key)
template<typename T>
T opt(const char *const key, T defaultValue)
template<typename T>
T opt(const std::string &key)
template<typename T>
T opt(const std::string &key, T defaultValue)
template<typename T>
void setOpt(const std::string &key, T value)
template<typename T, typename ...Args>
void setOpts(const std::string &key, T value, Args&&... moreArgs)
void mergeOpts(Ptr<Options> options)
template<class Cast>
Ptr<Cast> as()
template<class Cast>
bool is()

Protected Attributes

Ptr<Options> options_