Skip to content
fn

throw_negative_dim

void throw_negative_dim(const int & shape)

Refuses a shape with a negative extent.

Raises InvalidArgument naming the innermost op on the error-context stack and the first negative extent, in the reference framework's words: zeros: Trying to create tensor with negative dimension -3: [2, -3]. Defined out of line, in ErrorBuilder.cpp: the op name lives on ErrorContext, whose header includes this one. Not exported: only the engine itself calls it.