Class ClassifyResponse
The response message containing the classification results. Sent back to clients for each processed batch, containing either a global error or individual results for each image in the batch.
public sealed class ClassifyResponse : IMessage<ClassifyResponse>, IEquatable<ClassifyResponse>, IDeepCloneable<ClassifyResponse>, IBufferMessage, IMessage
- Inheritance
-
ClassifyResponse
- Implements
-
IMessage<ClassifyResponse>IDeepCloneable<ClassifyResponse>IBufferMessageIMessage
- Inherited Members
Constructors
ClassifyResponse()
public ClassifyResponse()
ClassifyResponse(ClassifyResponse)
public ClassifyResponse(ClassifyResponse other)
Parameters
otherClassifyResponse
Fields
GlobalErrorFieldNumber
Field number for the "global_error" field.
public const int GlobalErrorFieldNumber = 1
Field Value
OutputsFieldNumber
Field number for the "outputs" field.
public const int OutputsFieldNumber = 2
Field Value
Properties
Descriptor
public static MessageDescriptor Descriptor { get; }
Property Value
- MessageDescriptor
GlobalError
Global error affecting the entire batch/request If present, indicates that the entire request failed and no individual image results will be provided
public ClassificationError GlobalError { get; set; }
Property Value
Outputs
Array of classification results, one for each input image Will be empty if global_error is present
public RepeatedField<ClassificationOutput> Outputs { get; }
Property Value
- RepeatedField<ClassificationOutput>
Parser
public static MessageParser<ClassifyResponse> Parser { get; }
Property Value
- MessageParser<ClassifyResponse>
Methods
CalculateSize()
Calculates the size of this message in Protocol Buffer wire format, in bytes.
public int CalculateSize()
Returns
- int
The number of bytes required to write this message to a coded output stream.
Clone()
Creates a deep clone of this object.
public ClassifyResponse Clone()
Returns
- ClassifyResponse
A deep clone of this object.
Equals(ClassifyResponse)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ClassifyResponse other)
Parameters
otherClassifyResponseAn object to compare with this object.
Returns
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MergeFrom(CodedInputStream)
Merges the data from the specified coded input stream with the current message.
public void MergeFrom(CodedInputStream input)
Parameters
inputCodedInputStream
Remarks
See the user guide for precise merge semantics.
MergeFrom(ClassifyResponse)
Merges the given message into this one.
public void MergeFrom(ClassifyResponse other)
Parameters
otherClassifyResponse
Remarks
See the user guide for precise merge semantics.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteTo(CodedOutputStream)
Writes the data to the given coded output stream.
public void WriteTo(CodedOutputStream output)
Parameters
outputCodedOutputStreamCoded output stream to write the data to. Must not be null.