MCPcopy Create free account
hub / github.com/alibaba/MNN / _Rank

Function _Rank

express/NeuralNetWorkOp.cpp:1305–1311  ·  view source on GitHub ↗

Returns the rank of a variable. Returns a 0-D int32 variable representing the rank of input. Note: The rank of a variable is not the same as the rank of a matrix. It's the number of indices required to uniquely select each element of the variable. It's also known as "order", "degree", or "ndims." Args: input: A variable. Returns: A 0-D variable of type Halide_Type_Int */

Source from the content-addressed store, hash-verified

1303A 0-D variable of type Halide_Type_Int
1304*/
1305VARP _Rank(VARP input) {
1306 std::unique_ptr<OpT> op(new OpT);
1307 op->type = OpType_Rank;
1308 op->main.type = OpParameter_NONE;
1309 op->main.value = nullptr;
1310 return Variable::create(Expr::create(std::move(op), {input}));
1311}
1312/*Creates a sequence of numbers.
1313Args:
1314start: A 0-D variable (scalar).

Callers 15

onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
buildInputForMatmulInt8Function · 0.85
ConvertMatMulToConv2DMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85
onExecuteMethod · 0.85

Calls 1

createFunction · 0.50

Tested by 1

runMethod · 0.68