oneHot function

VARP oneHot(
  1. VARP indices,
  2. VARP depth, {
  3. VARP? onValue,
  4. VARP? offValue,
  5. int axis = -1,
})

Implementation

VARP oneHot(VARP indices, VARP depth, {VARP? onValue, VARP? offValue, int axis = -1}) => VARP.fromPointer(
  C.mnn_expr_OneHot(
    indices.ptr,
    depth.ptr,
    (onValue ?? scalar<float32>(1.0)).ptr,
    (offValue ?? scalar<float32>(0.0)).ptr,
    axis,
  ),
);