• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Model
2
3
4## 概述
5
6模型结构体。
7
8该结构体中存储了模型推理时所有的信息,每一个Model的第0个子图都是主子图,一般情况下一个Model仅有一个subGraph(其他情况目前暂不支持)。
9
10**Since:**
113.2
12**Version:**
131.0
14**相关模块:**
15
16[NNRt](_n_n_rt.md)
17
18
19## 汇总
20
21
22### Public 属性
23
24  | 名称 | 描述 |
25| -------- | -------- |
26| [name](#name) | String<br/>模型名称。&nbsp; |
27| [inputIndex](#inputindex) | unsigned&nbsp;int[]<br/>模型的输入张量在allTensors数组中的下标。&nbsp; |
28| [outputIndex](#outputindex) | unsigned&nbsp;int[]<br/>模型的输出张量在allTensors数组中的下标。&nbsp; |
29| [nodes](#nodes) | struct&nbsp;[Node](_node.md)[]<br/>模型中所有的算子节点组成的数组,详情请参考:[Node](_node.md)。&nbsp; |
30| [allTensors](#alltensors) | struct&nbsp;[Tensor](_tensor.md)[]<br/>模型中所有的张量组成的数组,该数组中包括输入张量,输出张量和常量张量,详情请参考:[Tensor](_tensor.md)。&nbsp; |
31| [subGraph](#subgraph) | struct&nbsp;[SubGraph](_sub_graph.md)[]<br/>模型中所有的子图组成的数组,详情请参考:[SubGraph](_sub_graph.md)。&nbsp; |
32
33
34## 类成员变量说明
35
36
37### allTensors
38
39
40```
41struct Tensor [] Model::allTensors
42```
43**描述:**
44模型中所有的张量组成的数组,该数组中包括输入张量,输出张量和常量张量,详情请参考:[Tensor](_tensor.md)。
45
46
47### inputIndex
48
49
50```
51unsigned int [] Model::inputIndex
52```
53**描述:**
54模型的输入张量在allTensors数组中的下标。
55
56
57### name
58
59
60```
61String Model::name
62```
63**描述:**
64模型名称。
65
66
67### nodes
68
69
70```
71struct Node [] Model::nodes
72```
73**描述:**
74模型中所有的算子节点组成的数组,详情请参考:[Node](_node.md)。
75
76
77### outputIndex
78
79
80```
81unsigned int [] Model::outputIndex
82```
83**描述:**
84模型的输出张量在allTensors数组中的下标。
85
86
87### subGraph
88
89
90```
91struct SubGraph [] Model::subGraph
92```
93**描述:**
94模型中所有的子图组成的数组,详情请参考:[SubGraph](_sub_graph.md)。
95