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

Function create_input_node_1

internal/bin/test_eltwise_op.cpp:55–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55int create_input_node_1(graph_t graph, const char* node_name, int c, int h, int w, int data_type)
56{
57 node_t node = create_graph_node(graph, node_name, "InputOp");
58 tensor_t tensor = create_graph_tensor(graph, node_name, data_type);
59
60 if(tensor == nullptr)
61 {
62 release_graph_node(node);
63 return -1;
64 }
65
66 set_node_output_tensor(node, 0, tensor, TENSOR_TYPE_INPUT);
67
68 int dims[4] = {1, h, w, c};
69
70 set_tensor_shape(tensor, dims, 4);
71
72 release_graph_tensor(tensor);
73 release_graph_node(node);
74
75 return 0;
76}
77
78int create_input_node_Case1(graph_t graph, const char* node_name, int c, int h, int w, int data_type)
79{

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