get_dl_classifier_resultT_get_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result (算子)
名称
get_dl_classifier_resultT_get_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result — 检索基于深度学习的分类器推理的分类结果。
警告
get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result 已过时,仅出于向后兼容性考虑而保留。
签名
def get_dl_classifier_result(dlclassifier_result_handle: HHandle, index: Union[int, str], gen_result_name: MaybeSequence[str]) -> Sequence[Union[str, float, int]]
def get_dl_classifier_result_s(dlclassifier_result_handle: HHandle, index: Union[int, str], gen_result_name: MaybeSequence[str]) -> Union[str, float, int]
描述
get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result allows the user to return
classification results. These results are stored in the handle
DLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandledlclassifier_result_handle and have been obtained from
the operator apply_dl_classifierapply_dl_classifierApplyDlClassifierApplyDlClassifierApplyDlClassifierapply_dl_classifier。
The input parameter GenResultNameGenResultNameGenResultNameGenResultNamegenResultNamegen_result_name names the sort of result asked
and IndexIndexIndexIndexindexindex identifies for which image the result is to be returned.
The respective value is given in GenResultValueGenResultValueGenResultValueGenResultValuegenResultValuegen_result_value。
Concretely, GenResultNameGenResultNameGenResultNameGenResultNamegenResultNamegen_result_name can attain the following values:
- 'confidences'"confidences""confidences""confidences""confidences""confidences":
-
return the confidences values for the
selected image IndexIndexIndexIndexindexindex。
- 'predicted_classes'"predicted_classes""predicted_classes""predicted_classes""predicted_classes""predicted_classes":
-
return the names of the inferred
classes for the selected image IndexIndexIndexIndexindexindex。
- 'predicted_class_indices'"predicted_class_indices""predicted_class_indices""predicted_class_indices""predicted_class_indices""predicted_class_indices":
return the indices of
the inferred classes for the selected image IndexIndexIndexIndexindexindex.
The class indices correspond to the positions within the array of
classes (counting from 0).
The input parameter IndexIndexIndexIndexindexindex can attain the value 'all'"all""all""all""all""all", in
which case get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result returns the confidence value,
respectively class, for the best candidate (prediction with the
highest confidence value) for each image of the input batch.
Otherwise, IndexIndexIndexIndexindexindex must be an integer selecting one of the input
images in the batch, in which case get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result returns
all output classes, respectively, confidences sorted by decreasing
confidence value. This is useful in order to retrieve the best K candidates
for a given input. As we start indexing at 0, IndexIndexIndexIndexindexindex must
have a value between 0 and the size of the batch of input images
minus one.
有关基于深度学习的分类概念的说明,请参阅 深度学习 / 分类 一章的引言。涉及此遗留算子的工作流在
遗留 / 深度学习分类 一章中有详细说明。
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
DLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandleDLClassifierResultHandledlclassifier_result_handle (输入控制) dl_classifier_result → HDlClassifierResult, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
深度学习分类结果的句柄。
IndexIndexIndexIndexindexindex (输入控制) number → HTupleUnion[int, str]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)
Index of the image in the batch.
默认值:
'all'
"all"
"all"
"all"
"all"
"all"
GenResultNameGenResultNameGenResultNameGenResultNamegenResultNamegen_result_name (输入控制) attribute.name(-array) → HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Name of the generic parameter.
默认值:
'predicted_classes'
"predicted_classes"
"predicted_classes"
"predicted_classes"
"predicted_classes"
"predicted_classes"
值列表:
'confidences'"confidences""confidences""confidences""confidences""confidences", 'predicted_class_indices'"predicted_class_indices""predicted_class_indices""predicted_class_indices""predicted_class_indices""predicted_class_indices", 'predicted_classes'"predicted_classes""predicted_classes""predicted_classes""predicted_classes""predicted_classes"
GenResultValueGenResultValueGenResultValueGenResultValuegenResultValuegen_result_value (输出控制) attribute.value(-array) → HTupleSequence[Union[str, float, int]]HTupleHtuple (real / string / integer) (double / string / int / long) (double / HString / Hlong) (double / char* / Hlong)
Value of the generic parameter, either the confidence
values, the class names or class indices.
结果
如果参数有效,算子
get_dl_classifier_resultget_dl_classifier_resultGetDlClassifierResultGetDlClassifierResultGetDlClassifierResultget_dl_classifier_result 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
apply_dl_classifierapply_dl_classifierApplyDlClassifierApplyDlClassifierApplyDlClassifierapply_dl_classifier
可能的后继
clear_dl_classifier_resultclear_dl_classifier_resultClearDlClassifierResultClearDlClassifierResultClearDlClassifierResultclear_dl_classifier_result
模块
深度学习推理