Classifications
class Classifications : NSObjectRepresents the list of classification for a given classifier head. Typically used as a result for classification tasks.
-
The index of the classifier head these entries refer to. This is useful for multi-head models.
Declaration
Swift
var headIndex: Int { get } -
The optional name of the classifier head, which is the corresponding tensor metadata name.
Declaration
Swift
var headName: String? { get } -
An array of
Categoryobjects containing the predicted categories.Declaration
Swift
var categories: [ResultCategory] { get } -
Initializes a new
Classificationsobject with the given head index and array of categories. Head name is initialized tonil.Declaration
Swift
convenience init(head headIndex: Int, categories: [ResultCategory])Parameters
headIndexThe index of the classifier head.
categoriesAn array of
Categoryobjects containing the predicted categories.Return Value
An instance of
Classificationsinitialized with the given head index and array of categories. -
Initializes a new
Classificationswith the given head index, head name and array of categories.Declaration
Swift
init(head headIndex: Int, headName: String?, categories: [ResultCategory])Parameters
headIndexThe index of the classifier head.
headNameThe name of the classifier head, which is the corresponding tensor metadata name.
categoriesAn array of
Categoryobjects containing the predicted categories.Return Value
An object of
Classificationsinitialized with the given head index, head name and array of categories. -
Undocumented
-
Undocumented