用户自定义的比对算法Python文件只能用来进行精度比对,文件安全性和传入参数的安全性由用户保证。
用户自定义算法,需要在.py格式文件内写好自定义算法脚本,按以下要求准备:
1 2 3 4 5 6 7 8 9 10 11 12 | def compare(my_output_dump_data, ground_true_dump_data, args): #算法固定头格式
#以下为算法示例
"""
Function Description:
compare the my output dump data and the ground true dump data by algorithm
Parameter:
my_output_dump_data: the my output dump data
ground_true_dump_data: the ground true dump data
args: the algorithm arguments
Return Value:
the compare algorithm value, string; error_msg, string
"""
|
参数 |
说明 |
---|---|
my_output_dump_data |
my output dump数据,一维数组。 |
ground_true_dump_data |
ground true dump数据,一维数组。 |
args |
算法参数,用户自行解析。 |
Return Value |
返回值,包括:
|