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

Function _Stack

express/NeuralNetWorkOp.cpp:810–817  ·  view source on GitHub ↗

Stacks a list of rank-R variables into one rank-(R+1) variable. Packs the list of variables in `values` into a ariable with rank one higher than each variable in values, by packing them along the axis dimension. Given a list of length N of variables of shape (A, B, C); if axis == 0 then the output variable will have the shape (N, A, B, C). if axis == 1 then the output variable will have the shape

Source from the content-addressed store, hash-verified

808output: A stacked variable with the same type as `values`.
809*/
810VARP _Stack(VARPS values, int axis) {
811 std::unique_ptr<OpT> pack(new OpT);
812 pack->type = OpType_Pack;
813 pack->main.type = OpParameter_PackParam;
814 pack->main.value = new PackParamT;
815 pack->main.AsPackParam()->axis = axis;
816 return (Variable::create(Expr::create(std::move(pack), values)));
817}
818/*Extracts crops from the input image variable and resizes them using bilinear sampling or nearest neighbor sampling (possibly with aspect ratio change)
819to a common output size specified by crop_size.
820Returns a variable with crops from the input image at positions defined at the bounding box locations in boxes.

Callers 11

remapFunction · 0.85
onExecuteMethod · 0.85
transformBatchFunction · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
_runMethod · 0.85
PyMNNExpr_stackFunction · 0.85
onForwardMethod · 0.85

Calls 2

AsPackParamMethod · 0.80
createFunction · 0.50

Tested by 4

runMethod · 0.68
runMethod · 0.68
runMethod · 0.68
_runMethod · 0.68