MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / output_info

Function output_info

lite/example/cpp_example/mge/basic.cpp:12–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11namespace {
12void output_info(std::shared_ptr<Network> network, size_t output_size) {
13 for (size_t index = 0; index < output_size; index++) {
14 printf("output[%zu] names %s \n", index,
15 network->get_all_output_name()[index].c_str());
16 std::shared_ptr<Tensor> output_tensor = network->get_output_tensor(index);
17 size_t ndim = output_tensor->get_layout().ndim;
18 for (size_t i = 0; i < ndim; i++) {
19 printf("output[%zu] tensor.shape[%zu] %zu \n", index, i,
20 output_tensor->get_layout().shapes[i]);
21 }
22 }
23}
24
25void output_data_info(std::shared_ptr<Network> network, size_t output_size) {
26 for (size_t index = 0; index < output_size; index++) {

Callers 7

basic_load_from_pathFunction · 0.85
load_from_path_run_cudaFunction · 0.85
infer_output_shapeMethod · 0.85
infer_output_dtypeMethod · 0.85
infer_output_formatMethod · 0.85
CustomOpNodeMethod · 0.85

Calls 3

get_all_output_nameMethod · 0.45
get_output_tensorMethod · 0.45
get_layoutMethod · 0.45

Tested by

no test coverage detected