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

Function create_input_node

internal/bin/test_graph.cpp:8–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "tengine_c_api.h"
7
8int create_input_node(graph_t graph, const char* node_name, int c, int h, int w)
9{
10 node_t node = create_graph_node(graph, node_name, "InputOp");
11 tensor_t tensor = create_graph_tensor(graph, node_name, TENGINE_DT_FP32);
12 set_node_output_tensor(node, 0, tensor, TENSOR_TYPE_INPUT);
13
14 int dims[4] = {1, h, w, c};
15
16 set_tensor_shape(tensor, dims, 4);
17
18 release_graph_tensor(tensor);
19 release_graph_node(node);
20
21 return 0;
22}
23
24int create_conv_node(graph_t graph, const char* node_name, const char* input_name, int k_size, int stride, int pad,
25 int in_c, int out_c, int group)

Callers 1

create_conv_graphFunction · 0.70

Calls 6

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

Tested by

no test coverage detected