ONE - On-device Neural Engine
Loading...
Searching...
No Matches
AnalysisTemplate.AnalysisTemplate Class Reference
Collaboration diagram for AnalysisTemplate.AnalysisTemplate:

Public Member Functions

 StartAnalysis (self, str args)
 
 EndAnalysis (self)
 
 StartNetworkExecution (self, list inputs)
 
 EndNetworkExecution (self, list outputs)
 
 DefaultOpPre (self, str name, str opcode, list inputs)
 
 DefaultOpPost (self, str name, str opcode, list inputs, dict output)
 
 Conv2DPre (self, str name, dict input, dict filter, dict bias, str padding, dict stride, dict dilation, str fused_act)
 
 Conv2DPost (self, str name, dict input, dict filter, dict bias, str padding, dict stride, dict dilation, dict output, str fused_act)
 

Detailed Description

Definition at line 25 of file AnalysisTemplate.py.

Member Function Documentation

◆ Conv2DPost()

AnalysisTemplate.AnalysisTemplate.Conv2DPost (   self,
str  name,
dict  input,
dict  filter,
dict  bias,
str  padding,
dict  stride,
dict  dilation,
dict  output,
str  fused_act 
)
Called after Conv2D layer execution
name: output tensor name (string)
opcode: opcode name (string)
input: Tensor
filter: Tensor
bias: Tensor
padding: Padding (string)
stride: Stride
dilation: Dilation
output: Tensor
fused_act: Fused activation functions (string)

Definition at line 101 of file AnalysisTemplate.py.

102 stride: dict, dilation: dict, output: dict, fused_act: str):
103 """
104 Called after Conv2D layer execution
105 name: output tensor name (string)
106 opcode: opcode name (string)
107 input: Tensor
108 filter: Tensor
109 bias: Tensor
110 padding: Padding (string)
111 stride: Stride
112 dilation: Dilation
113 output: Tensor
114 fused_act: Fused activation functions (string)
115 """
116 print("name", name)
117 print("input", input)
118 print("filter", filter)
119 print("bias", bias)
120 print("padding", padding)
121 print("stride", stride)
122 print("dilation", dilation)
123 print("output shape", output['data'].shape)
124 print("output type", output['data'].dtype)
125 print("fused activation", fused_act)

◆ Conv2DPre()

AnalysisTemplate.AnalysisTemplate.Conv2DPre (   self,
str  name,
dict  input,
dict  filter,
dict  bias,
str  padding,
dict  stride,
dict  dilation,
str  fused_act 
)
Called before Conv2D layer execution
name: output tensor name (string)
opcode: opcode name (string)
input: Tensor
filter: Tensor
bias: Tensor
padding: Padding (string)
stride: Stride
dilation: Dilation
fused_act: Fused activation functions (string)

Definition at line 78 of file AnalysisTemplate.py.

79 stride: dict, dilation: dict, fused_act: str):
80 """
81 Called before Conv2D layer execution
82 name: output tensor name (string)
83 opcode: opcode name (string)
84 input: Tensor
85 filter: Tensor
86 bias: Tensor
87 padding: Padding (string)
88 stride: Stride
89 dilation: Dilation
90 fused_act: Fused activation functions (string)
91 """
92 print("name", name)
93 print("input", input)
94 print("filter", filter)
95 print("bias", bias)
96 print("padding", padding)
97 print("stride", stride)
98 print("dilation", dilation)
99 print("fused activation", fused_act)
100

◆ DefaultOpPost()

AnalysisTemplate.AnalysisTemplate.DefaultOpPost (   self,
str  name,
str  opcode,
list  inputs,
dict  output 
)
Default hook called after an operator is executed
name: output tensor name (string)
opcode: opcode name (string)
inputs: list of Tensor
output: Tensor

Definition at line 65 of file AnalysisTemplate.py.

65 def DefaultOpPost(self, name: str, opcode: str, inputs: list, output: dict):
66 """
67 Default hook called after an operator is executed
68 name: output tensor name (string)
69 opcode: opcode name (string)
70 inputs: list of Tensor
71 output: Tensor
72 """
73 print("name", name)
74 print("opcode", opcode)
75 print("inputs", inputs)
76 print("output", output)
77

◆ DefaultOpPre()

AnalysisTemplate.AnalysisTemplate.DefaultOpPre (   self,
str  name,
str  opcode,
list  inputs 
)
Default hook called before an operator is executed
name: output tensor name (string)
opcode: opcode name (string)
inputs: list of Tensor

Definition at line 54 of file AnalysisTemplate.py.

54 def DefaultOpPre(self, name: str, opcode: str, inputs: list):
55 """
56 Default hook called before an operator is executed
57 name: output tensor name (string)
58 opcode: opcode name (string)
59 inputs: list of Tensor
60 """
61 print("name", name)
62 print("opcode", opcode)
63 print("inputs", inputs)
64

◆ EndAnalysis()

AnalysisTemplate.AnalysisTemplate.EndAnalysis (   self)
Called when the analysis ends

Definition at line 34 of file AnalysisTemplate.py.

34 def EndAnalysis(self):
35 """
36 Called when the analysis ends
37 """
38 print("Analysis ended.")
39

◆ EndNetworkExecution()

AnalysisTemplate.AnalysisTemplate.EndNetworkExecution (   self,
list  outputs 
)
Called when the execution of a network ends
outputs: list of Tensor

Definition at line 47 of file AnalysisTemplate.py.

47 def EndNetworkExecution(self, outputs: list):
48 """
49 Called when the execution of a network ends
50 outputs: list of Tensor
51 """
52 print("Network execution ended.")
53

◆ StartAnalysis()

AnalysisTemplate.AnalysisTemplate.StartAnalysis (   self,
str  args 
)
Called when the analysis starts
args: string given by --analysis_args option

Definition at line 26 of file AnalysisTemplate.py.

26 def StartAnalysis(self, args: str):
27 """
28 Called when the analysis starts
29 args: string given by --analysis_args option
30 """
31 print("Analysis started.")
32 print("args", args)
33

◆ StartNetworkExecution()

AnalysisTemplate.AnalysisTemplate.StartNetworkExecution (   self,
list  inputs 
)
Called when the execution of a network starts
inputs: list of Tensor

Definition at line 40 of file AnalysisTemplate.py.

40 def StartNetworkExecution(self, inputs: list):
41 """
42 Called when the execution of a network starts
43 inputs: list of Tensor
44 """
45 print("Network execution started.")
46

The documentation for this class was generated from the following file: