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

Function create_input_node_Case1_NHWC

internal/bin/test_eltwise_op.cpp:101–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101int create_input_node_Case1_NHWC(graph_t graph, const char* node_name, int c, int h, int w, int data_type)
102{
103 node_t node = create_graph_node(graph, node_name, "InputOp");
104 tensor_t tensor = create_graph_tensor(graph, node_name, data_type);
105
106 if(tensor == nullptr)
107 {
108 release_graph_node(node);
109 return -1;
110 }
111
112 set_node_output_tensor(node, 0, tensor, TENSOR_TYPE_INPUT);
113
114 int dims[4] = {1, h, w, c};
115
116 set_tensor_shape(tensor, dims, 4);
117
118 release_graph_tensor(tensor);
119 release_graph_node(node);
120
121 return 0;
122}
123int create_input_node_Case2(graph_t graph, const char* node_name, int c, int h, int w, int data_type)
124{
125 node_t node = create_graph_node(graph, node_name, "InputOp");

Callers 1

create_test_graphFunction · 0.85

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