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
| 808 | output: A stacked variable with the same type as `values`. |
| 809 | */ |
| 810 | VARP _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) |
| 819 | to a common output size specified by crop_size. |
| 820 | Returns a variable with crops from the input image at positions defined at the bounding box locations in boxes. |