| 396 | } |
| 397 | |
| 398 | StaticTensor* CreateStaticTensor(StaticGraph* graph, const std::string& name) |
| 399 | { |
| 400 | int tensor_idx = graph->tensor_list.size(); |
| 401 | |
| 402 | StaticTensorPtr tensor_ptr(new StaticTensor()); |
| 403 | |
| 404 | tensor_ptr->index = tensor_idx; |
| 405 | tensor_ptr->name = name; |
| 406 | tensor_ptr->type = kVarTensor; |
| 407 | graph->tensor_list.push_back(tensor_ptr); |
| 408 | |
| 409 | return tensor_ptr.get(); |
| 410 | } |
| 411 | |
| 412 | void SetTensorDim(StaticTensor* tensor, const std::vector<int>& dims) |
| 413 | { |
no test coverage detected