All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.tensorflow.metadata.v0.DynamicClassSpec Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: tensorflow_metadata/proto/v0/problem_statement.proto

// Protobuf Java Version: 3.25.4
package org.tensorflow.metadata.v0;

/**
 * 
 * Specifies a dynamic multiclass/multi-label problem where the number of label
 *  classes is inferred from the data.
 * 
* * Protobuf type {@code tensorflow.metadata.v0.DynamicClassSpec} */ public final class DynamicClassSpec extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.DynamicClassSpec) DynamicClassSpecOrBuilder { private static final long serialVersionUID = 0L; // Use DynamicClassSpec.newBuilder() to construct. private DynamicClassSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private DynamicClassSpec() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new DynamicClassSpec(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_DynamicClassSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_DynamicClassSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.DynamicClassSpec.class, org.tensorflow.metadata.v0.DynamicClassSpec.Builder.class); } public interface OovClassSpecOrBuilder extends // @@protoc_insertion_point(interface_extends:tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec) com.google.protobuf.MessageOrBuilder { /** *
     * If set, labels are grouped into the "OOV" class if they occur less than
     * frequency_threshold times in the training dataset. If 0, labels
     * that appear in test / validation splits but not in training would be
     * still classified as the "OOV" class.
     * 
* * int64 frequency_threshold = 1; * @return The frequencyThreshold. */ long getFrequencyThreshold(); /** *
     * If set, only the top_k labels in the training set are used and all others
     * are grouped into an "OOV" class.
     * 
* * int64 top_k = 2; * @return The topK. */ long getTopK(); } /** *
   * Note: it is up to a solution provider to implement support for OOV labels.
   * Note: both a frequency_threshold and a top_k may be set. A class is grouped
   * into the OOV class if it fails to meet either of the criteria below.
   * 
* * Protobuf type {@code tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec} */ public static final class OovClassSpec extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec) OovClassSpecOrBuilder { private static final long serialVersionUID = 0L; // Use OovClassSpec.newBuilder() to construct. private OovClassSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private OovClassSpec() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new OovClassSpec(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_DynamicClassSpec_OovClassSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_DynamicClassSpec_OovClassSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.class, org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.Builder.class); } public static final int FREQUENCY_THRESHOLD_FIELD_NUMBER = 1; private long frequencyThreshold_ = 0L; /** *
     * If set, labels are grouped into the "OOV" class if they occur less than
     * frequency_threshold times in the training dataset. If 0, labels
     * that appear in test / validation splits but not in training would be
     * still classified as the "OOV" class.
     * 
* * int64 frequency_threshold = 1; * @return The frequencyThreshold. */ @java.lang.Override public long getFrequencyThreshold() { return frequencyThreshold_; } public static final int TOP_K_FIELD_NUMBER = 2; private long topK_ = 0L; /** *
     * If set, only the top_k labels in the training set are used and all others
     * are grouped into an "OOV" class.
     * 
* * int64 top_k = 2; * @return The topK. */ @java.lang.Override public long getTopK() { return topK_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (frequencyThreshold_ != 0L) { output.writeInt64(1, frequencyThreshold_); } if (topK_ != 0L) { output.writeInt64(2, topK_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (frequencyThreshold_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, frequencyThreshold_); } if (topK_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, topK_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec)) { return super.equals(obj); } org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec other = (org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec) obj; if (getFrequencyThreshold() != other.getFrequencyThreshold()) return false; if (getTopK() != other.getTopK()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FREQUENCY_THRESHOLD_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getFrequencyThreshold()); hash = (37 * hash) + TOP_K_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTopK()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * Note: it is up to a solution provider to implement support for OOV labels.
     * Note: both a frequency_threshold and a top_k may be set. A class is grouped
     * into the OOV class if it fails to meet either of the criteria below.
     * 
* * Protobuf type {@code tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec) org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_DynamicClassSpec_OovClassSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_DynamicClassSpec_OovClassSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.class, org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.Builder.class); } // Construct using org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; frequencyThreshold_ = 0L; topK_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_DynamicClassSpec_OovClassSpec_descriptor; } @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec getDefaultInstanceForType() { return org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.getDefaultInstance(); } @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec build() { org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec buildPartial() { org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec result = new org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.frequencyThreshold_ = frequencyThreshold_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.topK_ = topK_; } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec) { return mergeFrom((org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec other) { if (other == org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.getDefaultInstance()) return this; if (other.getFrequencyThreshold() != 0L) { setFrequencyThreshold(other.getFrequencyThreshold()); } if (other.getTopK() != 0L) { setTopK(other.getTopK()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { frequencyThreshold_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { topK_ = input.readInt64(); bitField0_ |= 0x00000002; break; } // case 16 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long frequencyThreshold_ ; /** *
       * If set, labels are grouped into the "OOV" class if they occur less than
       * frequency_threshold times in the training dataset. If 0, labels
       * that appear in test / validation splits but not in training would be
       * still classified as the "OOV" class.
       * 
* * int64 frequency_threshold = 1; * @return The frequencyThreshold. */ @java.lang.Override public long getFrequencyThreshold() { return frequencyThreshold_; } /** *
       * If set, labels are grouped into the "OOV" class if they occur less than
       * frequency_threshold times in the training dataset. If 0, labels
       * that appear in test / validation splits but not in training would be
       * still classified as the "OOV" class.
       * 
* * int64 frequency_threshold = 1; * @param value The frequencyThreshold to set. * @return This builder for chaining. */ public Builder setFrequencyThreshold(long value) { frequencyThreshold_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
       * If set, labels are grouped into the "OOV" class if they occur less than
       * frequency_threshold times in the training dataset. If 0, labels
       * that appear in test / validation splits but not in training would be
       * still classified as the "OOV" class.
       * 
* * int64 frequency_threshold = 1; * @return This builder for chaining. */ public Builder clearFrequencyThreshold() { bitField0_ = (bitField0_ & ~0x00000001); frequencyThreshold_ = 0L; onChanged(); return this; } private long topK_ ; /** *
       * If set, only the top_k labels in the training set are used and all others
       * are grouped into an "OOV" class.
       * 
* * int64 top_k = 2; * @return The topK. */ @java.lang.Override public long getTopK() { return topK_; } /** *
       * If set, only the top_k labels in the training set are used and all others
       * are grouped into an "OOV" class.
       * 
* * int64 top_k = 2; * @param value The topK to set. * @return This builder for chaining. */ public Builder setTopK(long value) { topK_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
       * If set, only the top_k labels in the training set are used and all others
       * are grouped into an "OOV" class.
       * 
* * int64 top_k = 2; * @return This builder for chaining. */ public Builder clearTopK() { bitField0_ = (bitField0_ & ~0x00000002); topK_ = 0L; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec) } // @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec) private static final org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec(); } public static org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public OovClassSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int OOV_CLASS_SPEC_FIELD_NUMBER = 1; private org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oovClassSpec_; /** *
   * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
   * populated based on frequencies in the training set. If no OOV class is
   * specified, the model's label vocabulary should consist of all labels that
   * appear in the training set.
   * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; * @return Whether the oovClassSpec field is set. */ @java.lang.Override public boolean hasOovClassSpec() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
   * populated based on frequencies in the training set. If no OOV class is
   * specified, the model's label vocabulary should consist of all labels that
   * appear in the training set.
   * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; * @return The oovClassSpec. */ @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec getOovClassSpec() { return oovClassSpec_ == null ? org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.getDefaultInstance() : oovClassSpec_; } /** *
   * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
   * populated based on frequencies in the training set. If no OOV class is
   * specified, the model's label vocabulary should consist of all labels that
   * appear in the training set.
   * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; */ @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpecOrBuilder getOovClassSpecOrBuilder() { return oovClassSpec_ == null ? org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.getDefaultInstance() : oovClassSpec_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getOovClassSpec()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getOovClassSpec()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.tensorflow.metadata.v0.DynamicClassSpec)) { return super.equals(obj); } org.tensorflow.metadata.v0.DynamicClassSpec other = (org.tensorflow.metadata.v0.DynamicClassSpec) obj; if (hasOovClassSpec() != other.hasOovClassSpec()) return false; if (hasOovClassSpec()) { if (!getOovClassSpec() .equals(other.getOovClassSpec())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasOovClassSpec()) { hash = (37 * hash) + OOV_CLASS_SPEC_FIELD_NUMBER; hash = (53 * hash) + getOovClassSpec().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static org.tensorflow.metadata.v0.DynamicClassSpec parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.tensorflow.metadata.v0.DynamicClassSpec parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.tensorflow.metadata.v0.DynamicClassSpec prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Specifies a dynamic multiclass/multi-label problem where the number of label
   *  classes is inferred from the data.
   * 
* * Protobuf type {@code tensorflow.metadata.v0.DynamicClassSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.DynamicClassSpec) org.tensorflow.metadata.v0.DynamicClassSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_DynamicClassSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_DynamicClassSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( org.tensorflow.metadata.v0.DynamicClassSpec.class, org.tensorflow.metadata.v0.DynamicClassSpec.Builder.class); } // Construct using org.tensorflow.metadata.v0.DynamicClassSpec.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getOovClassSpecFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; oovClassSpec_ = null; if (oovClassSpecBuilder_ != null) { oovClassSpecBuilder_.dispose(); oovClassSpecBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.tensorflow.metadata.v0.ProblemStatementOuterClass.internal_static_tensorflow_metadata_v0_DynamicClassSpec_descriptor; } @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec getDefaultInstanceForType() { return org.tensorflow.metadata.v0.DynamicClassSpec.getDefaultInstance(); } @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec build() { org.tensorflow.metadata.v0.DynamicClassSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec buildPartial() { org.tensorflow.metadata.v0.DynamicClassSpec result = new org.tensorflow.metadata.v0.DynamicClassSpec(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(org.tensorflow.metadata.v0.DynamicClassSpec result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.oovClassSpec_ = oovClassSpecBuilder_ == null ? oovClassSpec_ : oovClassSpecBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.tensorflow.metadata.v0.DynamicClassSpec) { return mergeFrom((org.tensorflow.metadata.v0.DynamicClassSpec)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.tensorflow.metadata.v0.DynamicClassSpec other) { if (other == org.tensorflow.metadata.v0.DynamicClassSpec.getDefaultInstance()) return this; if (other.hasOovClassSpec()) { mergeOovClassSpec(other.getOovClassSpec()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage( getOovClassSpecFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oovClassSpec_; private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec, org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.Builder, org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpecOrBuilder> oovClassSpecBuilder_; /** *
     * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
     * populated based on frequencies in the training set. If no OOV class is
     * specified, the model's label vocabulary should consist of all labels that
     * appear in the training set.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; * @return Whether the oovClassSpec field is set. */ public boolean hasOovClassSpec() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
     * populated based on frequencies in the training set. If no OOV class is
     * specified, the model's label vocabulary should consist of all labels that
     * appear in the training set.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; * @return The oovClassSpec. */ public org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec getOovClassSpec() { if (oovClassSpecBuilder_ == null) { return oovClassSpec_ == null ? org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.getDefaultInstance() : oovClassSpec_; } else { return oovClassSpecBuilder_.getMessage(); } } /** *
     * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
     * populated based on frequencies in the training set. If no OOV class is
     * specified, the model's label vocabulary should consist of all labels that
     * appear in the training set.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; */ public Builder setOovClassSpec(org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec value) { if (oovClassSpecBuilder_ == null) { if (value == null) { throw new NullPointerException(); } oovClassSpec_ = value; } else { oovClassSpecBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
     * populated based on frequencies in the training set. If no OOV class is
     * specified, the model's label vocabulary should consist of all labels that
     * appear in the training set.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; */ public Builder setOovClassSpec( org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.Builder builderForValue) { if (oovClassSpecBuilder_ == null) { oovClassSpec_ = builderForValue.build(); } else { oovClassSpecBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
     * populated based on frequencies in the training set. If no OOV class is
     * specified, the model's label vocabulary should consist of all labels that
     * appear in the training set.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; */ public Builder mergeOovClassSpec(org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec value) { if (oovClassSpecBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && oovClassSpec_ != null && oovClassSpec_ != org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.getDefaultInstance()) { getOovClassSpecBuilder().mergeFrom(value); } else { oovClassSpec_ = value; } } else { oovClassSpecBuilder_.mergeFrom(value); } if (oovClassSpec_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** *
     * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
     * populated based on frequencies in the training set. If no OOV class is
     * specified, the model's label vocabulary should consist of all labels that
     * appear in the training set.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; */ public Builder clearOovClassSpec() { bitField0_ = (bitField0_ & ~0x00000001); oovClassSpec_ = null; if (oovClassSpecBuilder_ != null) { oovClassSpecBuilder_.dispose(); oovClassSpecBuilder_ = null; } onChanged(); return this; } /** *
     * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
     * populated based on frequencies in the training set. If no OOV class is
     * specified, the model's label vocabulary should consist of all labels that
     * appear in the training set.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; */ public org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.Builder getOovClassSpecBuilder() { bitField0_ |= 0x00000001; onChanged(); return getOovClassSpecFieldBuilder().getBuilder(); } /** *
     * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
     * populated based on frequencies in the training set. If no OOV class is
     * specified, the model's label vocabulary should consist of all labels that
     * appear in the training set.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; */ public org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpecOrBuilder getOovClassSpecOrBuilder() { if (oovClassSpecBuilder_ != null) { return oovClassSpecBuilder_.getMessageOrBuilder(); } else { return oovClassSpec_ == null ? org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.getDefaultInstance() : oovClassSpec_; } } /** *
     * Optional. If specified, an Out-Of-Vocabulary (OOV) class is created and
     * populated based on frequencies in the training set. If no OOV class is
     * specified, the model's label vocabulary should consist of all labels that
     * appear in the training set.
     * 
* * .tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec oov_class_spec = 1; */ private com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec, org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.Builder, org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpecOrBuilder> getOovClassSpecFieldBuilder() { if (oovClassSpecBuilder_ == null) { oovClassSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec, org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpec.Builder, org.tensorflow.metadata.v0.DynamicClassSpec.OovClassSpecOrBuilder>( getOovClassSpec(), getParentForChildren(), isClean()); oovClassSpec_ = null; } return oovClassSpecBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:tensorflow.metadata.v0.DynamicClassSpec) } // @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.DynamicClassSpec) private static final org.tensorflow.metadata.v0.DynamicClassSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.DynamicClassSpec(); } public static org.tensorflow.metadata.v0.DynamicClassSpec getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public DynamicClassSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public org.tensorflow.metadata.v0.DynamicClassSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy