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

Function create_input_node_Case1

internal/bin/test_eltwise_op.cpp:78–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78int create_input_node_Case1(graph_t graph, const char* node_name, int c, int h, int w, int data_type)
79{
80 node_t node = create_graph_node(graph, node_name, "InputOp");
81 tensor_t tensor = create_graph_tensor(graph, node_name, data_type);
82
83 if(tensor == nullptr)
84 {
85 release_graph_node(node);
86 return -1;
87 }
88
89 set_node_output_tensor(node, 0, tensor, TENSOR_TYPE_INPUT);
90
91 int dims[4] = {1, c, h, w};
92
93 set_tensor_shape(tensor, dims, 4);
94
95 release_graph_tensor(tensor);
96 release_graph_node(node);
97
98 return 0;
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{

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