expandDims function
Returns a variable with an additional dimension inserted at index axis.
Args:
- input: A variable.
- axis: A int, specifying the dimension index at which to expand the shape of input.
Given an input of D dimensions, axis must be in range
-(D+1), D(inclusive).
Returns:
- A variable with the same data as input, with an additional dimension inserted at the index specified by axis.
Implementation
VARP expandDims(VARP x, int axis) => VARP.fromPointer(C.mnn_expr_ExpandDims(x.ptr, axis));