MCPcopy Create free account
hub / github.com/OAID/Tengine / create_input_node

Function create_input_node

internal/bin/test_split.cpp:36–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#include "compiler_fp16.h"
35
36int create_input_node(graph_t graph, const char* node_name, int c, int h, int w, int data_type)
37{
38 node_t node = create_graph_node(graph, node_name, "InputOp");
39 tensor_t tensor = create_graph_tensor(graph, node_name, data_type);
40
41 if(tensor == nullptr)
42 {
43 release_graph_node(node);
44 return -1;
45 }
46
47 set_node_output_tensor(node, 0, tensor, TENSOR_TYPE_INPUT);
48
49 int dims[4] = {1, c, h, w};
50
51 set_tensor_shape(tensor, dims, 4);
52
53 release_graph_tensor(tensor);
54 release_graph_node(node);
55
56 return 0;
57}
58int create_test_node(graph_t graph, const char* node_name, int axis, int numbe_split, int dim0, int dim1, int dim2,
59 const char* input_name)
60{

Callers 1

create_test_graphFunction · 0.70

Calls 6

create_graph_nodeFunction · 0.85
create_graph_tensorFunction · 0.85
release_graph_nodeFunction · 0.85
set_node_output_tensorFunction · 0.85
set_tensor_shapeFunction · 0.85
release_graph_tensorFunction · 0.85

Tested by

no test coverage detected