Function TRITONSERVER_InferenceResponseOutputClassificationLabel

Function Documentation

TRITONSERVER_Error *TRITONSERVER_InferenceResponseOutputClassificationLabel(TRITONSERVER_InferenceResponse *inference_response, const uint32_t index, const size_t class_index, const char **label)

Get a classification label associated with an output for a given index.

The caller does not own the returned label and must not modify or delete ot. The lifetime of all returned label extends until ‘inference_response’ is deleted.

Return

a TRITONSERVER_Error indicating success or failure.

Parameters
  • inference_response: The response object.

  • index: The index of the output tensor, must be 0 <= index < count, where ‘count’ is the value returned by TRITONSERVER_InferenceResponseOutputCount.

  • class_index: The index of the class.

  • name: Returns the label corresponding to ‘class_index’ or nullptr if no label.