GraphEvaluator
Function Usage
Provides a Python instance based on the input data of the bin type for a model to calibrate and infer the model.
Prototype
class GraphEvaluator(AutoCalibrationEvaluatorBase):
def __init__(self, data_dir, input_shape, data_types):
Parameters
Option |
Input/Return |
Description |
Restriction |
|---|---|---|---|
data_dir |
Input |
Sets the path of the .bin dataset that matches the model. |
A string Value format: data/input1/;data/input2/ Constraints:
|
input_shape |
Input |
Input shape. |
A string Format: "input_name1:n1,c1,h1,w1;input_name2:n2,c2,h2,w2". Restrictions: The specified nodes must be enclosed in double quotation marks ("") and separated by semicolons (;). |
data_types |
Input |
Sets the input data type. |
A string Format: "float32;float64". Remarks: If a model has multiple inputs of different data types, you need to specify all the involved data types. All the data types must be enclosed in double quotation marks ("") and separated with semicolons (;) in the input node sequence. |
Returns
A Python instance.
Outputs
None
Examples
1 2 3 4 5 6 | import amct_tensorflow as amct evaluator = amct.GraphEvaluator( data_dir="./data/input_bin/", input_shape="input:32,3,224,224", data_types="float32") |