Function marian::narrow

Function Documentation

static Expr marian::narrow(Expr a, int axis, size_t start, size_t length)

Returns the slice of the expression a along axis. Convenience wrapper for slice() that returns the slice along axis from index to index + length

Note

this is named after an equivalent function in PyTorch