Skip to main content

M_getDimAt

Function M_getDimAt 

Source
pub unsafe extern "C" fn M_getDimAt(
    spec: *const M_TensorSpec,
    axis: usize,
) -> i64
Expand description

Gets the element at a particular axis.

@param spec The tensor spec. @param axis The requested axis @return The dimension at requested axis if the spec and axis are valid and has static rank. Otherwise, 0. A dimension equaling kDynamicDimensionValue indicates dynamic dimension e.g. batch-size of a model expecting a batched tensor.