-
Notifications
You must be signed in to change notification settings - Fork 3
/
parameter2.json
107 lines (100 loc) · 4.17 KB
/
parameter2.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{
"import":
{
"include":
[
"#include <iostream>",
"#include <cstring>",
"#include <fstream>",
"#include <algorithm>",
"#include <cstring>",
"#include <sstream>",
"#include <cstdlib>",
"#include <time.h>",
"#include <malloc.h>",
"#include \"inference_net/config.h\"",
"#include \"inference_net/construct_net.h\"",
"#include \"inference_net/image_converter.h\"",
"#include \"inference_net/weight_bias_one_dim.h\"",
"#include \"inference_net/softmax_one_dim.h\"",
"#include \"inference_net/predict_one_dim.h\"",
"#include \"inference_net/accuracy_one_dim.h\"",
"#include \"inference_net/pow_function.h\"",
"#include \"inference_net/resize_image.h\""
],
"namespace":
[
"using namespace std;"
]
},
"function":
{
"main":
[
{
"return_type":"int",
"function_name":"main",
"parameters":""
}
],
"loadfile":
[
{
"return_type":"const unsigned char *",
"function_name":"loadfile",
"parameters":
[
{"name":"file", "type":"const std::string &"},
{"name":"size", "type":"int &"}
]
}
]
},
"out":
[
"cout<< \"Calculating memory space ... ... ... ...\" << endl;",
"printf(\"False memory allocation of ",
"cout << \"FC mem init\\n\";",
"cout << \"net_inputs/net_weights.txt\" << endl;",
"cout << \"finished weight src !!!\" << endl;",
"cout << \"mean data file not found !\" << endl;",
"cout << \"val data file not found !\" << endl;",
"cout <<\"predicted time is: \" << totaltime << \" s\" << endl;",
"cout << \"At \" << i <<\", output1_tmp=\" << temp_out_0[i] << '\\n';",
"cout << \"At \" << i <<\", output2_tmp=\" << temp_out_1[i] << '\\n';",
"cout << \"Writing data to input data memory space ... ... ...\" << endl;",
"cout << endl;",
"cout << \"Finished writing data to input data memory space ... ...\" << endl;"
],
"body":
{
"var_init":
[
{"type" : "unsigned int", "name" : "conv_weight_size", "size" : "data_type_w", "memory" : "conv_weight_mem_port", "location" : "conv weight memory location"},
{"type" : "unsigned int", "name" : "conv_bias_size", "size" : "data_type_w", "memory" : "conv_bias_mem_port", "location" : "conv bias memory location"},
{"type" : "unsigned int", "name" : "fc_weight_size", "size" : "data_type_w", "memory" : "fc_weight_mem_port", "location" : "fc_weight_mem_port memory location"},
{"type" : "unsigned int", "name" : "fc_bias_size", "size" : "data_type_w", "memory" : "fc_bias_mem_port", "location" : "fc_bias_mem_port memory location"},
{"type" : "unsigned int", "name" : "fc_out_size", "size" : "data_type_o", "memory" : "fc_out_mem_int", "location" : "fc_out_mem_int memory location"},
{"type" : "unsigned int", "name" : "out_size", "size" : "data_type_o", "memory" : "out_mem_int", "location" : "out_mem_int memory location"},
{"type" : "unsigned int", "name" : "nn_batch_norm_size", "size" : "data_type_o", "memory" : "batch_norm_mem_port_param1", "location" : "batch_norm_mem_port_param1 memory location"},
{"type" : "unsigned int", "name" : "nn_batch_norm_size", "size" : "data_type_o", "memory" : "batch_norm_mem_port_param2", "location" : "batch_norm_mem_port_param2 memory location"},
{"type" : "unsigned int", "name" : "nn_scale_size", "size" : "data_type_o", "memory" : "scale_mem_port_param1", "location" : "scale_mem_port_param1 memory location"},
{"type" : "unsigned int", "name" : "nn_scale_size", "size" : "data_type_o", "memory" : "scale_mem_port_param2", "location" : "scale_mem_port_param2 memory location"}
]
},
"comments":
[
"//net weight src *****************************",
"//load mean file *****************************",
"//load val (image_name,image_class) set file *****************************",
"//load val image file *****************************",
"//Inference network process",
"//activation function",
"//input pic data",
"//layer weights and bias inputs",
"//output fc data",
"//resize_image(in_data_3D_channel_swap, h, w, in_data_3D);//in_data after crop",
"// data size calculation",
"// assign memory space to different ports"
]
}