| 105 | } |
| 106 | |
| 107 | int LITE_tensor_reshape(LiteTensor tensor, const int* shape, int size) { |
| 108 | LITE_CAPI_BEGIN(); |
| 109 | LITE_ASSERT(tensor && shape, "The tensor pass to LITE c_api is null"); |
| 110 | std::vector<int> shapes; |
| 111 | for (int i = 0; i < size; i++) { |
| 112 | shapes.push_back(shape[i]); |
| 113 | } |
| 114 | static_cast<lite::Tensor*>(tensor)->reshape(shapes); |
| 115 | LITE_CAPI_END(); |
| 116 | } |
| 117 | |
| 118 | int LITE_tensor_slice( |
| 119 | const LiteTensor tensor, const size_t* start, const size_t* end, |