public abstract class
Classifications
Represents the list of classification for a given classifier head. Typically used as a result for classification tasks.
Public Constructors
Public Methods
| abstract List<Category> |
categories()
A list of
Category objects. |
| static Classifications | |
| static Classifications |
createFromProto(ClassificationsProto.Classifications proto)
Creates a
Classifications object from a ERROR(/ClassificationsProto.Classifications)
protobuf message. |
| abstract int |
headIndex()
The index of the classifier head these entries refer to.
|
| abstract Optional<String> |
headName()
The optional name of the classifier head, which is the corresponding tensor metadata name.
|
Inherited Methods
Public Constructors
public Classifications ()
Public Methods
public static Classifications create (List<Category> categories, int headIndex, Optional<String> headName)
Creates a Classifications instance.
Parameters
| categories | the list of Category objects containing the predicted categories. |
|---|---|
| headIndex | the index of the classifier head. |
| headName | the optional name of the classifier head. |
public static Classifications createFromProto (ClassificationsProto.Classifications proto)
Creates a Classifications object from a ERROR(/ClassificationsProto.Classifications)
protobuf message.
Parameters
| proto | the ERROR(/ClassificationsProto.Classifications) protobuf message to convert.
|
|---|
public abstract int headIndex ()
The index of the classifier head these entries refer to. This is useful for multi-head models.