ONE - On-device Neural Engine
Loading...
Searching...
No Matches
validate_onnx2circle.py File Reference

Go to the source code of this file.

Data Structures

class  validate_onnx2circle.OnnxRunner
 

Namespaces

namespace  validate_onnx2circle
 

Functions

 validate_onnx2circle.to_numpy (tensor)
 
 validate_onnx2circle.to_nhwc (tensor)
 

Variables

 validate_onnx2circle.parser = argparse.ArgumentParser()
 
 validate_onnx2circle.type
 
 validate_onnx2circle.str
 
 validate_onnx2circle.required
 
 validate_onnx2circle.args = parser.parse_args()
 
 validate_onnx2circle.driver = args.driver
 
 validate_onnx2circle.onnx_filepath = args.onnx
 
 validate_onnx2circle.circle_filepath = args.circle
 
 validate_onnx2circle.onnx_runner = OnnxRunner(onnx_filepath)
 
 validate_onnx2circle.process
 
int validate_onnx2circle.rtolerance = 1e-03
 
int validate_onnx2circle.atolerance = 1e-04
 
bool validate_onnx2circle.result_compare = True
 
 validate_onnx2circle.output_shape = onnx_runner.outputs[idx].shape
 
 validate_onnx2circle.output_type = onnx_runner.outputs[idx].type
 
 validate_onnx2circle.output_np_type = np.float32
 
 validate_onnx2circle.output_data = np.fromfile(circle_filepath + ".output" + str(idx), output_np_type)
 
 validate_onnx2circle.shape_file = open(circle_filepath + ".output" + str(idx) + ".shape", 'r')
 
 validate_onnx2circle.luci_output_data = np.reshape(output_data, output_shape)
 
 validate_onnx2circle.output_nchw = onnx_runner.outs[idx]
 
 validate_onnx2circle.output_nhwc = to_nhwc(output_nchw)
 
 validate_onnx2circle.diff = np.isclose(output_nhwc, luci_output_data, rtol=rtolerance, atol=atolerance)
 
 validate_onnx2circle.result_compare_one = np.all(diff)
 
 validate_onnx2circle.diff_val = np.subtract(output_nhwc, luci_output_data)