Template Function marian::inits::range

Function Documentation

template<typename T>
Ptr<NodeInitializer> marian::inits::range(T begin, T end, T step = (T)1)

Computes the equivalent of Python’s range().

Computes a range from begin to end-1, like Python’s range(). The constant being initialized must have one dimension that matches the number of elements being generated, while any other dimension must be 1.