Class NodeInitializer

Inheritance Relationships

Derived Types

Class Documentation

class NodeInitializer

Base class for specialized NodeInitializers.

A NodeInitializer is a functor that is associated with parameters and constants, and is invoked on a tensor during node initialization. You need to override NodeInitializer::apply(Tensor) with your own functionality or use a fromLambda initializer. See node_initializers.cpp for examples.

Subclassed by marian::inits::DummyInit, marian::inits::LambdaInit, marian::inits::LambdaInitConvert, marian::lsh::RandomRotation

Public Functions

virtual void apply(Tensor t) = 0
void setAllocator(Ptr<Allocator> allocator)
virtual ~NodeInitializer()

Protected Attributes

Weak<Allocator> allocator_