/*
 * Copyright (c) 2020. Kin-Hong Wong. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: object_detection/protos/losses.proto

package object_detection.protos;

public final class Losses {
  private Losses() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface LossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.Loss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Localization loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
     * @return Whether the localizationLoss field is set.
     */
    boolean hasLocalizationLoss();
    /**
     * <pre>
     * Localization loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
     * @return The localizationLoss.
     */
    object_detection.protos.Losses.LocalizationLoss getLocalizationLoss();
    /**
     * <pre>
     * Localization loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
     */
    object_detection.protos.Losses.LocalizationLossOrBuilder getLocalizationLossOrBuilder();

    /**
     * <pre>
     * Classification loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
     * @return Whether the classificationLoss field is set.
     */
    boolean hasClassificationLoss();
    /**
     * <pre>
     * Classification loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
     * @return The classificationLoss.
     */
    object_detection.protos.Losses.ClassificationLoss getClassificationLoss();
    /**
     * <pre>
     * Classification loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
     */
    object_detection.protos.Losses.ClassificationLossOrBuilder getClassificationLossOrBuilder();

    /**
     * <pre>
     * If not left to default, applies hard example mining.
     * </pre>
     *
     * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
     * @return Whether the hardExampleMiner field is set.
     */
    boolean hasHardExampleMiner();
    /**
     * <pre>
     * If not left to default, applies hard example mining.
     * </pre>
     *
     * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
     * @return The hardExampleMiner.
     */
    object_detection.protos.Losses.HardExampleMiner getHardExampleMiner();
    /**
     * <pre>
     * If not left to default, applies hard example mining.
     * </pre>
     *
     * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
     */
    object_detection.protos.Losses.HardExampleMinerOrBuilder getHardExampleMinerOrBuilder();

    /**
     * <pre>
     * Classification loss weight.
     * </pre>
     *
     * <code>optional float classification_weight = 4 [default = 1];</code>
     * @return Whether the classificationWeight field is set.
     */
    boolean hasClassificationWeight();
    /**
     * <pre>
     * Classification loss weight.
     * </pre>
     *
     * <code>optional float classification_weight = 4 [default = 1];</code>
     * @return The classificationWeight.
     */
    float getClassificationWeight();

    /**
     * <pre>
     * Localization loss weight.
     * </pre>
     *
     * <code>optional float localization_weight = 5 [default = 1];</code>
     * @return Whether the localizationWeight field is set.
     */
    boolean hasLocalizationWeight();
    /**
     * <pre>
     * Localization loss weight.
     * </pre>
     *
     * <code>optional float localization_weight = 5 [default = 1];</code>
     * @return The localizationWeight.
     */
    float getLocalizationWeight();

    /**
     * <pre>
     * If not left to default, applies random example sampling.
     * </pre>
     *
     * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
     * @return Whether the randomExampleSampler field is set.
     */
    boolean hasRandomExampleSampler();
    /**
     * <pre>
     * If not left to default, applies random example sampling.
     * </pre>
     *
     * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
     * @return The randomExampleSampler.
     */
    object_detection.protos.Losses.RandomExampleSampler getRandomExampleSampler();
    /**
     * <pre>
     * If not left to default, applies random example sampling.
     * </pre>
     *
     * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
     */
    object_detection.protos.Losses.RandomExampleSamplerOrBuilder getRandomExampleSamplerOrBuilder();

    /**
     * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
     * @return Whether the equalizationLoss field is set.
     */
    boolean hasEqualizationLoss();
    /**
     * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
     * @return The equalizationLoss.
     */
    object_detection.protos.Losses.Loss.EqualizationLoss getEqualizationLoss();
    /**
     * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
     */
    object_detection.protos.Losses.Loss.EqualizationLossOrBuilder getEqualizationLossOrBuilder();

    /**
     * <pre>
     * Method to compute expected loss weights with respect to balanced
     * positive/negative sampling scheme. If NONE, use explicit sampling.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];</code>
     * @return Whether the expectedLossWeights field is set.
     */
    boolean hasExpectedLossWeights();
    /**
     * <pre>
     * Method to compute expected loss weights with respect to balanced
     * positive/negative sampling scheme. If NONE, use explicit sampling.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];</code>
     * @return The expectedLossWeights.
     */
    object_detection.protos.Losses.Loss.ExpectedLossWeights getExpectedLossWeights();

    /**
     * <pre>
     * Minimum number of effective negative samples.
     * Only applies if expected_loss_weights is not NONE.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional float min_num_negative_samples = 19 [default = 0];</code>
     * @return Whether the minNumNegativeSamples field is set.
     */
    boolean hasMinNumNegativeSamples();
    /**
     * <pre>
     * Minimum number of effective negative samples.
     * Only applies if expected_loss_weights is not NONE.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional float min_num_negative_samples = 19 [default = 0];</code>
     * @return The minNumNegativeSamples.
     */
    float getMinNumNegativeSamples();

    /**
     * <pre>
     * Desired number of effective negative samples per positive sample.
     * Only applies if expected_loss_weights is not NONE.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional float desired_negative_sampling_ratio = 20 [default = 3];</code>
     * @return Whether the desiredNegativeSamplingRatio field is set.
     */
    boolean hasDesiredNegativeSamplingRatio();
    /**
     * <pre>
     * Desired number of effective negative samples per positive sample.
     * Only applies if expected_loss_weights is not NONE.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional float desired_negative_sampling_ratio = 20 [default = 3];</code>
     * @return The desiredNegativeSamplingRatio.
     */
    float getDesiredNegativeSamplingRatio();
  }
  /**
   * <pre>
   * Message for configuring the localization loss, classification loss and hard
   * example miner used for training object detection models. See core/losses.py
   * for details
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.Loss}
   */
  public static final class Loss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.Loss)
      LossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Loss.newBuilder() to construct.
    private Loss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Loss() {
      classificationWeight_ = 1F;
      localizationWeight_ = 1F;
      expectedLossWeights_ = 0;
      desiredNegativeSamplingRatio_ = 3F;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new Loss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Loss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              object_detection.protos.Losses.LocalizationLoss.Builder subBuilder = null;
              if (((bitField0_ & 0x00000001) != 0)) {
                subBuilder = localizationLoss_.toBuilder();
              }
              localizationLoss_ = input.readMessage(object_detection.protos.Losses.LocalizationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(localizationLoss_);
                localizationLoss_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000001;
              break;
            }
            case 18: {
              object_detection.protos.Losses.ClassificationLoss.Builder subBuilder = null;
              if (((bitField0_ & 0x00000002) != 0)) {
                subBuilder = classificationLoss_.toBuilder();
              }
              classificationLoss_ = input.readMessage(object_detection.protos.Losses.ClassificationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(classificationLoss_);
                classificationLoss_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000002;
              break;
            }
            case 26: {
              object_detection.protos.Losses.HardExampleMiner.Builder subBuilder = null;
              if (((bitField0_ & 0x00000004) != 0)) {
                subBuilder = hardExampleMiner_.toBuilder();
              }
              hardExampleMiner_ = input.readMessage(object_detection.protos.Losses.HardExampleMiner.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(hardExampleMiner_);
                hardExampleMiner_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000004;
              break;
            }
            case 37: {
              bitField0_ |= 0x00000008;
              classificationWeight_ = input.readFloat();
              break;
            }
            case 45: {
              bitField0_ |= 0x00000010;
              localizationWeight_ = input.readFloat();
              break;
            }
            case 50: {
              object_detection.protos.Losses.RandomExampleSampler.Builder subBuilder = null;
              if (((bitField0_ & 0x00000020) != 0)) {
                subBuilder = randomExampleSampler_.toBuilder();
              }
              randomExampleSampler_ = input.readMessage(object_detection.protos.Losses.RandomExampleSampler.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(randomExampleSampler_);
                randomExampleSampler_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000020;
              break;
            }
            case 58: {
              object_detection.protos.Losses.Loss.EqualizationLoss.Builder subBuilder = null;
              if (((bitField0_ & 0x00000040) != 0)) {
                subBuilder = equalizationLoss_.toBuilder();
              }
              equalizationLoss_ = input.readMessage(object_detection.protos.Losses.Loss.EqualizationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(equalizationLoss_);
                equalizationLoss_ = subBuilder.buildPartial();
              }
              bitField0_ |= 0x00000040;
              break;
            }
            case 144: {
              int rawValue = input.readEnum();
                @SuppressWarnings("deprecation")
              object_detection.protos.Losses.Loss.ExpectedLossWeights value = object_detection.protos.Losses.Loss.ExpectedLossWeights.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(18, rawValue);
              } else {
                bitField0_ |= 0x00000080;
                expectedLossWeights_ = rawValue;
              }
              break;
            }
            case 157: {
              bitField0_ |= 0x00000100;
              minNumNegativeSamples_ = input.readFloat();
              break;
            }
            case 165: {
              bitField0_ |= 0x00000200;
              desiredNegativeSamplingRatio_ = input.readFloat();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_Loss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_Loss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.Loss.class, object_detection.protos.Losses.Loss.Builder.class);
    }

    /**
     * Protobuf enum {@code object_detection.protos.Loss.ExpectedLossWeights}
     */
    public enum ExpectedLossWeights
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <code>NONE = 0;</code>
       */
      NONE(0),
      /**
       * <pre>
       * Use expected_classification_loss_by_expected_sampling
       * from third_party/tensorflow_models/object_detection/utils/ops.py
       * </pre>
       *
       * <code>EXPECTED_SAMPLING = 1;</code>
       */
      EXPECTED_SAMPLING(1),
      /**
       * <pre>
       * Use expected_classification_loss_by_reweighting_unmatched_anchors
       * from third_party/tensorflow_models/object_detection/utils/ops.py
       * </pre>
       *
       * <code>REWEIGHTING_UNMATCHED_ANCHORS = 2;</code>
       */
      REWEIGHTING_UNMATCHED_ANCHORS(2),
      ;

      /**
       * <code>NONE = 0;</code>
       */
      public static final int NONE_VALUE = 0;
      /**
       * <pre>
       * Use expected_classification_loss_by_expected_sampling
       * from third_party/tensorflow_models/object_detection/utils/ops.py
       * </pre>
       *
       * <code>EXPECTED_SAMPLING = 1;</code>
       */
      public static final int EXPECTED_SAMPLING_VALUE = 1;
      /**
       * <pre>
       * Use expected_classification_loss_by_reweighting_unmatched_anchors
       * from third_party/tensorflow_models/object_detection/utils/ops.py
       * </pre>
       *
       * <code>REWEIGHTING_UNMATCHED_ANCHORS = 2;</code>
       */
      public static final int REWEIGHTING_UNMATCHED_ANCHORS_VALUE = 2;


      public final int getNumber() {
        return value;
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static ExpectedLossWeights valueOf(int value) {
        return forNumber(value);
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       */
      public static ExpectedLossWeights forNumber(int value) {
        switch (value) {
          case 0: return NONE;
          case 1: return EXPECTED_SAMPLING;
          case 2: return REWEIGHTING_UNMATCHED_ANCHORS;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<ExpectedLossWeights>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          ExpectedLossWeights> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<ExpectedLossWeights>() {
              public ExpectedLossWeights findValueByNumber(int number) {
                return ExpectedLossWeights.forNumber(number);
              }
            };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        return getDescriptor().getValues().get(ordinal());
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return object_detection.protos.Losses.Loss.getDescriptor().getEnumTypes().get(0);
      }

      private static final ExpectedLossWeights[] VALUES = values();

      public static ExpectedLossWeights valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");
        }
        return VALUES[desc.getIndex()];
      }

      private final int value;

      private ExpectedLossWeights(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:object_detection.protos.Loss.ExpectedLossWeights)
    }

    public interface EqualizationLossOrBuilder extends
        // @@protoc_insertion_point(interface_extends:object_detection.protos.Loss.EqualizationLoss)
        com.google.protobuf.MessageOrBuilder {

      /**
       * <pre>
       * Weight equalization loss strength.
       * </pre>
       *
       * <code>optional float weight = 1 [default = 0];</code>
       * @return Whether the weight field is set.
       */
      boolean hasWeight();
      /**
       * <pre>
       * Weight equalization loss strength.
       * </pre>
       *
       * <code>optional float weight = 1 [default = 0];</code>
       * @return The weight.
       */
      float getWeight();

      /**
       * <pre>
       * When computing equalization loss, ops that start with
       * equalization_exclude_prefixes will be ignored. Only used when
       * equalization_weight &gt; 0.
       * </pre>
       *
       * <code>repeated string exclude_prefixes = 2;</code>
       * @return A list containing the excludePrefixes.
       */
      java.util.List<java.lang.String>
          getExcludePrefixesList();
      /**
       * <pre>
       * When computing equalization loss, ops that start with
       * equalization_exclude_prefixes will be ignored. Only used when
       * equalization_weight &gt; 0.
       * </pre>
       *
       * <code>repeated string exclude_prefixes = 2;</code>
       * @return The count of excludePrefixes.
       */
      int getExcludePrefixesCount();
      /**
       * <pre>
       * When computing equalization loss, ops that start with
       * equalization_exclude_prefixes will be ignored. Only used when
       * equalization_weight &gt; 0.
       * </pre>
       *
       * <code>repeated string exclude_prefixes = 2;</code>
       * @param index The index of the element to return.
       * @return The excludePrefixes at the given index.
       */
      java.lang.String getExcludePrefixes(int index);
      /**
       * <pre>
       * When computing equalization loss, ops that start with
       * equalization_exclude_prefixes will be ignored. Only used when
       * equalization_weight &gt; 0.
       * </pre>
       *
       * <code>repeated string exclude_prefixes = 2;</code>
       * @param index The index of the value to return.
       * @return The bytes of the excludePrefixes at the given index.
       */
      com.google.protobuf.ByteString
          getExcludePrefixesBytes(int index);
    }
    /**
     * <pre>
     * Equalization loss.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.Loss.EqualizationLoss}
     */
    public static final class EqualizationLoss extends
        com.google.protobuf.GeneratedMessageV3 implements
        // @@protoc_insertion_point(message_implements:object_detection.protos.Loss.EqualizationLoss)
        EqualizationLossOrBuilder {
    private static final long serialVersionUID = 0L;
      // Use EqualizationLoss.newBuilder() to construct.
      private EqualizationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
        super(builder);
      }
      private EqualizationLoss() {
        excludePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      }

      @java.lang.Override
      @SuppressWarnings({"unused"})
      protected java.lang.Object newInstance(
          UnusedPrivateParameter unused) {
        return new EqualizationLoss();
      }

      @java.lang.Override
      public final com.google.protobuf.UnknownFieldSet
      getUnknownFields() {
        return this.unknownFields;
      }
      private EqualizationLoss(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        this();
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder();
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 13: {
                bitField0_ |= 0x00000001;
                weight_ = input.readFloat();
                break;
              }
              case 18: {
                com.google.protobuf.ByteString bs = input.readBytes();
                if (!((mutable_bitField0_ & 0x00000002) != 0)) {
                  excludePrefixes_ = new com.google.protobuf.LazyStringArrayList();
                  mutable_bitField0_ |= 0x00000002;
                }
                excludePrefixes_.add(bs);
                break;
              }
              default: {
                if (!parseUnknownField(
                    input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
            }
          }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(
              e).setUnfinishedMessage(this);
        } finally {
          if (((mutable_bitField0_ & 0x00000002) != 0)) {
            excludePrefixes_ = excludePrefixes_.getUnmodifiableView();
          }
          this.unknownFields = unknownFields.build();
          makeExtensionsImmutable();
        }
      }
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_Loss_EqualizationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_Loss_EqualizationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.Loss.EqualizationLoss.class, object_detection.protos.Losses.Loss.EqualizationLoss.Builder.class);
      }

      private int bitField0_;
      public static final int WEIGHT_FIELD_NUMBER = 1;
      private float weight_;
      /**
       * <pre>
       * Weight equalization loss strength.
       * </pre>
       *
       * <code>optional float weight = 1 [default = 0];</code>
       * @return Whether the weight field is set.
       */
      @java.lang.Override
      public boolean hasWeight() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * Weight equalization loss strength.
       * </pre>
       *
       * <code>optional float weight = 1 [default = 0];</code>
       * @return The weight.
       */
      @java.lang.Override
      public float getWeight() {
        return weight_;
      }

      public static final int EXCLUDE_PREFIXES_FIELD_NUMBER = 2;
      private com.google.protobuf.LazyStringList excludePrefixes_;
      /**
       * <pre>
       * When computing equalization loss, ops that start with
       * equalization_exclude_prefixes will be ignored. Only used when
       * equalization_weight &gt; 0.
       * </pre>
       *
       * <code>repeated string exclude_prefixes = 2;</code>
       * @return A list containing the excludePrefixes.
       */
      public com.google.protobuf.ProtocolStringList
          getExcludePrefixesList() {
        return excludePrefixes_;
      }
      /**
       * <pre>
       * When computing equalization loss, ops that start with
       * equalization_exclude_prefixes will be ignored. Only used when
       * equalization_weight &gt; 0.
       * </pre>
       *
       * <code>repeated string exclude_prefixes = 2;</code>
       * @return The count of excludePrefixes.
       */
      public int getExcludePrefixesCount() {
        return excludePrefixes_.size();
      }
      /**
       * <pre>
       * When computing equalization loss, ops that start with
       * equalization_exclude_prefixes will be ignored. Only used when
       * equalization_weight &gt; 0.
       * </pre>
       *
       * <code>repeated string exclude_prefixes = 2;</code>
       * @param index The index of the element to return.
       * @return The excludePrefixes at the given index.
       */
      public java.lang.String getExcludePrefixes(int index) {
        return excludePrefixes_.get(index);
      }
      /**
       * <pre>
       * When computing equalization loss, ops that start with
       * equalization_exclude_prefixes will be ignored. Only used when
       * equalization_weight &gt; 0.
       * </pre>
       *
       * <code>repeated string exclude_prefixes = 2;</code>
       * @param index The index of the value to return.
       * @return The bytes of the excludePrefixes at the given index.
       */
      public com.google.protobuf.ByteString
          getExcludePrefixesBytes(int index) {
        return excludePrefixes_.getByteString(index);
      }

      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.writeFloat(1, weight_);
        }
        for (int i = 0; i < excludePrefixes_.size(); i++) {
          com.google.protobuf.GeneratedMessageV3.writeString(output, 2, excludePrefixes_.getRaw(i));
        }
        unknownFields.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
            .computeFloatSize(1, weight_);
        }
        {
          int dataSize = 0;
          for (int i = 0; i < excludePrefixes_.size(); i++) {
            dataSize += computeStringSizeNoTag(excludePrefixes_.getRaw(i));
          }
          size += dataSize;
          size += 1 * getExcludePrefixesList().size();
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
      }

      @java.lang.Override
      public boolean equals(final java.lang.Object obj) {
        if (obj == this) {
         return true;
        }
        if (!(obj instanceof object_detection.protos.Losses.Loss.EqualizationLoss)) {
          return super.equals(obj);
        }
        object_detection.protos.Losses.Loss.EqualizationLoss other = (object_detection.protos.Losses.Loss.EqualizationLoss) obj;

        if (hasWeight() != other.hasWeight()) return false;
        if (hasWeight()) {
          if (java.lang.Float.floatToIntBits(getWeight())
              != java.lang.Float.floatToIntBits(
                  other.getWeight())) return false;
        }
        if (!getExcludePrefixesList()
            .equals(other.getExcludePrefixesList())) return false;
        if (!unknownFields.equals(other.unknownFields)) return false;
        return true;
      }

      @java.lang.Override
      public int hashCode() {
        if (memoizedHashCode != 0) {
          return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        if (hasWeight()) {
          hash = (37 * hash) + WEIGHT_FIELD_NUMBER;
          hash = (53 * hash) + java.lang.Float.floatToIntBits(
              getWeight());
        }
        if (getExcludePrefixesCount() > 0) {
          hash = (37 * hash) + EXCLUDE_PREFIXES_FIELD_NUMBER;
          hash = (53 * hash) + getExcludePrefixesList().hashCode();
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
      }

      public static object_detection.protos.Losses.Loss.EqualizationLoss parseFrom(
          java.nio.ByteBuffer data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static object_detection.protos.Losses.Loss.EqualizationLoss parseFrom(
          java.nio.ByteBuffer data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static object_detection.protos.Losses.Loss.EqualizationLoss parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static object_detection.protos.Losses.Loss.EqualizationLoss parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static object_detection.protos.Losses.Loss.EqualizationLoss parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data);
      }
      public static object_detection.protos.Losses.Loss.EqualizationLoss parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return PARSER.parseFrom(data, extensionRegistry);
      }
      public static object_detection.protos.Losses.Loss.EqualizationLoss parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static object_detection.protos.Losses.Loss.EqualizationLoss 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 object_detection.protos.Losses.Loss.EqualizationLoss parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseDelimitedWithIOException(PARSER, input);
      }
      public static object_detection.protos.Losses.Loss.EqualizationLoss 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 object_detection.protos.Losses.Loss.EqualizationLoss parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return com.google.protobuf.GeneratedMessageV3
            .parseWithIOException(PARSER, input);
      }
      public static object_detection.protos.Losses.Loss.EqualizationLoss 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(object_detection.protos.Losses.Loss.EqualizationLoss 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;
      }
      /**
       * <pre>
       * Equalization loss.
       * </pre>
       *
       * Protobuf type {@code object_detection.protos.Loss.EqualizationLoss}
       */
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
          // @@protoc_insertion_point(builder_implements:object_detection.protos.Loss.EqualizationLoss)
          object_detection.protos.Losses.Loss.EqualizationLossOrBuilder {
        public static final com.google.protobuf.Descriptors.Descriptor
            getDescriptor() {
          return object_detection.protos.Losses.internal_static_object_detection_protos_Loss_EqualizationLoss_descriptor;
        }

        @java.lang.Override
        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
            internalGetFieldAccessorTable() {
          return object_detection.protos.Losses.internal_static_object_detection_protos_Loss_EqualizationLoss_fieldAccessorTable
              .ensureFieldAccessorsInitialized(
                  object_detection.protos.Losses.Loss.EqualizationLoss.class, object_detection.protos.Losses.Loss.EqualizationLoss.Builder.class);
        }

        // Construct using object_detection.protos.Losses.Loss.EqualizationLoss.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }

        private Builder(
            com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
          super(parent);
          maybeForceBuilderInitialization();
        }
        private void maybeForceBuilderInitialization() {
          if (com.google.protobuf.GeneratedMessageV3
                  .alwaysUseFieldBuilders) {
          }
        }
        @java.lang.Override
        public Builder clear() {
          super.clear();
          weight_ = 0F;
          bitField0_ = (bitField0_ & ~0x00000001);
          excludePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000002);
          return this;
        }

        @java.lang.Override
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return object_detection.protos.Losses.internal_static_object_detection_protos_Loss_EqualizationLoss_descriptor;
        }

        @java.lang.Override
        public object_detection.protos.Losses.Loss.EqualizationLoss getDefaultInstanceForType() {
          return object_detection.protos.Losses.Loss.EqualizationLoss.getDefaultInstance();
        }

        @java.lang.Override
        public object_detection.protos.Losses.Loss.EqualizationLoss build() {
          object_detection.protos.Losses.Loss.EqualizationLoss result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }

        @java.lang.Override
        public object_detection.protos.Losses.Loss.EqualizationLoss buildPartial() {
          object_detection.protos.Losses.Loss.EqualizationLoss result = new object_detection.protos.Losses.Loss.EqualizationLoss(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) != 0)) {
            result.weight_ = weight_;
            to_bitField0_ |= 0x00000001;
          }
          if (((bitField0_ & 0x00000002) != 0)) {
            excludePrefixes_ = excludePrefixes_.getUnmodifiableView();
            bitField0_ = (bitField0_ & ~0x00000002);
          }
          result.excludePrefixes_ = excludePrefixes_;
          result.bitField0_ = to_bitField0_;
          onBuilt();
          return result;
        }

        @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 object_detection.protos.Losses.Loss.EqualizationLoss) {
            return mergeFrom((object_detection.protos.Losses.Loss.EqualizationLoss)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }

        public Builder mergeFrom(object_detection.protos.Losses.Loss.EqualizationLoss other) {
          if (other == object_detection.protos.Losses.Loss.EqualizationLoss.getDefaultInstance()) return this;
          if (other.hasWeight()) {
            setWeight(other.getWeight());
          }
          if (!other.excludePrefixes_.isEmpty()) {
            if (excludePrefixes_.isEmpty()) {
              excludePrefixes_ = other.excludePrefixes_;
              bitField0_ = (bitField0_ & ~0x00000002);
            } else {
              ensureExcludePrefixesIsMutable();
              excludePrefixes_.addAll(other.excludePrefixes_);
            }
            onChanged();
          }
          this.mergeUnknownFields(other.unknownFields);
          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 {
          object_detection.protos.Losses.Loss.EqualizationLoss parsedMessage = null;
          try {
            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            parsedMessage = (object_detection.protos.Losses.Loss.EqualizationLoss) e.getUnfinishedMessage();
            throw e.unwrapIOException();
          } finally {
            if (parsedMessage != null) {
              mergeFrom(parsedMessage);
            }
          }
          return this;
        }
        private int bitField0_;

        private float weight_ ;
        /**
         * <pre>
         * Weight equalization loss strength.
         * </pre>
         *
         * <code>optional float weight = 1 [default = 0];</code>
         * @return Whether the weight field is set.
         */
        @java.lang.Override
        public boolean hasWeight() {
          return ((bitField0_ & 0x00000001) != 0);
        }
        /**
         * <pre>
         * Weight equalization loss strength.
         * </pre>
         *
         * <code>optional float weight = 1 [default = 0];</code>
         * @return The weight.
         */
        @java.lang.Override
        public float getWeight() {
          return weight_;
        }
        /**
         * <pre>
         * Weight equalization loss strength.
         * </pre>
         *
         * <code>optional float weight = 1 [default = 0];</code>
         * @param value The weight to set.
         * @return This builder for chaining.
         */
        public Builder setWeight(float value) {
          bitField0_ |= 0x00000001;
          weight_ = value;
          onChanged();
          return this;
        }
        /**
         * <pre>
         * Weight equalization loss strength.
         * </pre>
         *
         * <code>optional float weight = 1 [default = 0];</code>
         * @return This builder for chaining.
         */
        public Builder clearWeight() {
          bitField0_ = (bitField0_ & ~0x00000001);
          weight_ = 0F;
          onChanged();
          return this;
        }

        private com.google.protobuf.LazyStringList excludePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        private void ensureExcludePrefixesIsMutable() {
          if (!((bitField0_ & 0x00000002) != 0)) {
            excludePrefixes_ = new com.google.protobuf.LazyStringArrayList(excludePrefixes_);
            bitField0_ |= 0x00000002;
           }
        }
        /**
         * <pre>
         * When computing equalization loss, ops that start with
         * equalization_exclude_prefixes will be ignored. Only used when
         * equalization_weight &gt; 0.
         * </pre>
         *
         * <code>repeated string exclude_prefixes = 2;</code>
         * @return A list containing the excludePrefixes.
         */
        public com.google.protobuf.ProtocolStringList
            getExcludePrefixesList() {
          return excludePrefixes_.getUnmodifiableView();
        }
        /**
         * <pre>
         * When computing equalization loss, ops that start with
         * equalization_exclude_prefixes will be ignored. Only used when
         * equalization_weight &gt; 0.
         * </pre>
         *
         * <code>repeated string exclude_prefixes = 2;</code>
         * @return The count of excludePrefixes.
         */
        public int getExcludePrefixesCount() {
          return excludePrefixes_.size();
        }
        /**
         * <pre>
         * When computing equalization loss, ops that start with
         * equalization_exclude_prefixes will be ignored. Only used when
         * equalization_weight &gt; 0.
         * </pre>
         *
         * <code>repeated string exclude_prefixes = 2;</code>
         * @param index The index of the element to return.
         * @return The excludePrefixes at the given index.
         */
        public java.lang.String getExcludePrefixes(int index) {
          return excludePrefixes_.get(index);
        }
        /**
         * <pre>
         * When computing equalization loss, ops that start with
         * equalization_exclude_prefixes will be ignored. Only used when
         * equalization_weight &gt; 0.
         * </pre>
         *
         * <code>repeated string exclude_prefixes = 2;</code>
         * @param index The index of the value to return.
         * @return The bytes of the excludePrefixes at the given index.
         */
        public com.google.protobuf.ByteString
            getExcludePrefixesBytes(int index) {
          return excludePrefixes_.getByteString(index);
        }
        /**
         * <pre>
         * When computing equalization loss, ops that start with
         * equalization_exclude_prefixes will be ignored. Only used when
         * equalization_weight &gt; 0.
         * </pre>
         *
         * <code>repeated string exclude_prefixes = 2;</code>
         * @param index The index to set the value at.
         * @param value The excludePrefixes to set.
         * @return This builder for chaining.
         */
        public Builder setExcludePrefixes(
            int index, java.lang.String value) {
          if (value == null) {
    throw new NullPointerException();
  }
  ensureExcludePrefixesIsMutable();
          excludePrefixes_.set(index, value);
          onChanged();
          return this;
        }
        /**
         * <pre>
         * When computing equalization loss, ops that start with
         * equalization_exclude_prefixes will be ignored. Only used when
         * equalization_weight &gt; 0.
         * </pre>
         *
         * <code>repeated string exclude_prefixes = 2;</code>
         * @param value The excludePrefixes to add.
         * @return This builder for chaining.
         */
        public Builder addExcludePrefixes(
            java.lang.String value) {
          if (value == null) {
    throw new NullPointerException();
  }
  ensureExcludePrefixesIsMutable();
          excludePrefixes_.add(value);
          onChanged();
          return this;
        }
        /**
         * <pre>
         * When computing equalization loss, ops that start with
         * equalization_exclude_prefixes will be ignored. Only used when
         * equalization_weight &gt; 0.
         * </pre>
         *
         * <code>repeated string exclude_prefixes = 2;</code>
         * @param values The excludePrefixes to add.
         * @return This builder for chaining.
         */
        public Builder addAllExcludePrefixes(
            java.lang.Iterable<java.lang.String> values) {
          ensureExcludePrefixesIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, excludePrefixes_);
          onChanged();
          return this;
        }
        /**
         * <pre>
         * When computing equalization loss, ops that start with
         * equalization_exclude_prefixes will be ignored. Only used when
         * equalization_weight &gt; 0.
         * </pre>
         *
         * <code>repeated string exclude_prefixes = 2;</code>
         * @return This builder for chaining.
         */
        public Builder clearExcludePrefixes() {
          excludePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
          bitField0_ = (bitField0_ & ~0x00000002);
          onChanged();
          return this;
        }
        /**
         * <pre>
         * When computing equalization loss, ops that start with
         * equalization_exclude_prefixes will be ignored. Only used when
         * equalization_weight &gt; 0.
         * </pre>
         *
         * <code>repeated string exclude_prefixes = 2;</code>
         * @param value The bytes of the excludePrefixes to add.
         * @return This builder for chaining.
         */
        public Builder addExcludePrefixesBytes(
            com.google.protobuf.ByteString value) {
          if (value == null) {
    throw new NullPointerException();
  }
  ensureExcludePrefixesIsMutable();
          excludePrefixes_.add(value);
          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:object_detection.protos.Loss.EqualizationLoss)
      }

      // @@protoc_insertion_point(class_scope:object_detection.protos.Loss.EqualizationLoss)
      private static final object_detection.protos.Losses.Loss.EqualizationLoss DEFAULT_INSTANCE;
      static {
        DEFAULT_INSTANCE = new object_detection.protos.Losses.Loss.EqualizationLoss();
      }

      public static object_detection.protos.Losses.Loss.EqualizationLoss getDefaultInstance() {
        return DEFAULT_INSTANCE;
      }

      @java.lang.Deprecated public static final com.google.protobuf.Parser<EqualizationLoss>
          PARSER = new com.google.protobuf.AbstractParser<EqualizationLoss>() {
        @java.lang.Override
        public EqualizationLoss parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          return new EqualizationLoss(input, extensionRegistry);
        }
      };

      public static com.google.protobuf.Parser<EqualizationLoss> parser() {
        return PARSER;
      }

      @java.lang.Override
      public com.google.protobuf.Parser<EqualizationLoss> getParserForType() {
        return PARSER;
      }

      @java.lang.Override
      public object_detection.protos.Losses.Loss.EqualizationLoss getDefaultInstanceForType() {
        return DEFAULT_INSTANCE;
      }

    }

    private int bitField0_;
    public static final int LOCALIZATION_LOSS_FIELD_NUMBER = 1;
    private object_detection.protos.Losses.LocalizationLoss localizationLoss_;
    /**
     * <pre>
     * Localization loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
     * @return Whether the localizationLoss field is set.
     */
    @java.lang.Override
    public boolean hasLocalizationLoss() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * Localization loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
     * @return The localizationLoss.
     */
    @java.lang.Override
    public object_detection.protos.Losses.LocalizationLoss getLocalizationLoss() {
      return localizationLoss_ == null ? object_detection.protos.Losses.LocalizationLoss.getDefaultInstance() : localizationLoss_;
    }
    /**
     * <pre>
     * Localization loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.LocalizationLossOrBuilder getLocalizationLossOrBuilder() {
      return localizationLoss_ == null ? object_detection.protos.Losses.LocalizationLoss.getDefaultInstance() : localizationLoss_;
    }

    public static final int CLASSIFICATION_LOSS_FIELD_NUMBER = 2;
    private object_detection.protos.Losses.ClassificationLoss classificationLoss_;
    /**
     * <pre>
     * Classification loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
     * @return Whether the classificationLoss field is set.
     */
    @java.lang.Override
    public boolean hasClassificationLoss() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * Classification loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
     * @return The classificationLoss.
     */
    @java.lang.Override
    public object_detection.protos.Losses.ClassificationLoss getClassificationLoss() {
      return classificationLoss_ == null ? object_detection.protos.Losses.ClassificationLoss.getDefaultInstance() : classificationLoss_;
    }
    /**
     * <pre>
     * Classification loss to use.
     * </pre>
     *
     * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.ClassificationLossOrBuilder getClassificationLossOrBuilder() {
      return classificationLoss_ == null ? object_detection.protos.Losses.ClassificationLoss.getDefaultInstance() : classificationLoss_;
    }

    public static final int HARD_EXAMPLE_MINER_FIELD_NUMBER = 3;
    private object_detection.protos.Losses.HardExampleMiner hardExampleMiner_;
    /**
     * <pre>
     * If not left to default, applies hard example mining.
     * </pre>
     *
     * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
     * @return Whether the hardExampleMiner field is set.
     */
    @java.lang.Override
    public boolean hasHardExampleMiner() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <pre>
     * If not left to default, applies hard example mining.
     * </pre>
     *
     * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
     * @return The hardExampleMiner.
     */
    @java.lang.Override
    public object_detection.protos.Losses.HardExampleMiner getHardExampleMiner() {
      return hardExampleMiner_ == null ? object_detection.protos.Losses.HardExampleMiner.getDefaultInstance() : hardExampleMiner_;
    }
    /**
     * <pre>
     * If not left to default, applies hard example mining.
     * </pre>
     *
     * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.HardExampleMinerOrBuilder getHardExampleMinerOrBuilder() {
      return hardExampleMiner_ == null ? object_detection.protos.Losses.HardExampleMiner.getDefaultInstance() : hardExampleMiner_;
    }

    public static final int CLASSIFICATION_WEIGHT_FIELD_NUMBER = 4;
    private float classificationWeight_;
    /**
     * <pre>
     * Classification loss weight.
     * </pre>
     *
     * <code>optional float classification_weight = 4 [default = 1];</code>
     * @return Whether the classificationWeight field is set.
     */
    @java.lang.Override
    public boolean hasClassificationWeight() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     * <pre>
     * Classification loss weight.
     * </pre>
     *
     * <code>optional float classification_weight = 4 [default = 1];</code>
     * @return The classificationWeight.
     */
    @java.lang.Override
    public float getClassificationWeight() {
      return classificationWeight_;
    }

    public static final int LOCALIZATION_WEIGHT_FIELD_NUMBER = 5;
    private float localizationWeight_;
    /**
     * <pre>
     * Localization loss weight.
     * </pre>
     *
     * <code>optional float localization_weight = 5 [default = 1];</code>
     * @return Whether the localizationWeight field is set.
     */
    @java.lang.Override
    public boolean hasLocalizationWeight() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     * <pre>
     * Localization loss weight.
     * </pre>
     *
     * <code>optional float localization_weight = 5 [default = 1];</code>
     * @return The localizationWeight.
     */
    @java.lang.Override
    public float getLocalizationWeight() {
      return localizationWeight_;
    }

    public static final int RANDOM_EXAMPLE_SAMPLER_FIELD_NUMBER = 6;
    private object_detection.protos.Losses.RandomExampleSampler randomExampleSampler_;
    /**
     * <pre>
     * If not left to default, applies random example sampling.
     * </pre>
     *
     * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
     * @return Whether the randomExampleSampler field is set.
     */
    @java.lang.Override
    public boolean hasRandomExampleSampler() {
      return ((bitField0_ & 0x00000020) != 0);
    }
    /**
     * <pre>
     * If not left to default, applies random example sampling.
     * </pre>
     *
     * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
     * @return The randomExampleSampler.
     */
    @java.lang.Override
    public object_detection.protos.Losses.RandomExampleSampler getRandomExampleSampler() {
      return randomExampleSampler_ == null ? object_detection.protos.Losses.RandomExampleSampler.getDefaultInstance() : randomExampleSampler_;
    }
    /**
     * <pre>
     * If not left to default, applies random example sampling.
     * </pre>
     *
     * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.RandomExampleSamplerOrBuilder getRandomExampleSamplerOrBuilder() {
      return randomExampleSampler_ == null ? object_detection.protos.Losses.RandomExampleSampler.getDefaultInstance() : randomExampleSampler_;
    }

    public static final int EQUALIZATION_LOSS_FIELD_NUMBER = 7;
    private object_detection.protos.Losses.Loss.EqualizationLoss equalizationLoss_;
    /**
     * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
     * @return Whether the equalizationLoss field is set.
     */
    @java.lang.Override
    public boolean hasEqualizationLoss() {
      return ((bitField0_ & 0x00000040) != 0);
    }
    /**
     * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
     * @return The equalizationLoss.
     */
    @java.lang.Override
    public object_detection.protos.Losses.Loss.EqualizationLoss getEqualizationLoss() {
      return equalizationLoss_ == null ? object_detection.protos.Losses.Loss.EqualizationLoss.getDefaultInstance() : equalizationLoss_;
    }
    /**
     * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.Loss.EqualizationLossOrBuilder getEqualizationLossOrBuilder() {
      return equalizationLoss_ == null ? object_detection.protos.Losses.Loss.EqualizationLoss.getDefaultInstance() : equalizationLoss_;
    }

    public static final int EXPECTED_LOSS_WEIGHTS_FIELD_NUMBER = 18;
    private int expectedLossWeights_;
    /**
     * <pre>
     * Method to compute expected loss weights with respect to balanced
     * positive/negative sampling scheme. If NONE, use explicit sampling.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];</code>
     * @return Whether the expectedLossWeights field is set.
     */
    @java.lang.Override public boolean hasExpectedLossWeights() {
      return ((bitField0_ & 0x00000080) != 0);
    }
    /**
     * <pre>
     * Method to compute expected loss weights with respect to balanced
     * positive/negative sampling scheme. If NONE, use explicit sampling.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];</code>
     * @return The expectedLossWeights.
     */
    @java.lang.Override public object_detection.protos.Losses.Loss.ExpectedLossWeights getExpectedLossWeights() {
      @SuppressWarnings("deprecation")
      object_detection.protos.Losses.Loss.ExpectedLossWeights result = object_detection.protos.Losses.Loss.ExpectedLossWeights.valueOf(expectedLossWeights_);
      return result == null ? object_detection.protos.Losses.Loss.ExpectedLossWeights.NONE : result;
    }

    public static final int MIN_NUM_NEGATIVE_SAMPLES_FIELD_NUMBER = 19;
    private float minNumNegativeSamples_;
    /**
     * <pre>
     * Minimum number of effective negative samples.
     * Only applies if expected_loss_weights is not NONE.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional float min_num_negative_samples = 19 [default = 0];</code>
     * @return Whether the minNumNegativeSamples field is set.
     */
    @java.lang.Override
    public boolean hasMinNumNegativeSamples() {
      return ((bitField0_ & 0x00000100) != 0);
    }
    /**
     * <pre>
     * Minimum number of effective negative samples.
     * Only applies if expected_loss_weights is not NONE.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional float min_num_negative_samples = 19 [default = 0];</code>
     * @return The minNumNegativeSamples.
     */
    @java.lang.Override
    public float getMinNumNegativeSamples() {
      return minNumNegativeSamples_;
    }

    public static final int DESIRED_NEGATIVE_SAMPLING_RATIO_FIELD_NUMBER = 20;
    private float desiredNegativeSamplingRatio_;
    /**
     * <pre>
     * Desired number of effective negative samples per positive sample.
     * Only applies if expected_loss_weights is not NONE.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional float desired_negative_sampling_ratio = 20 [default = 3];</code>
     * @return Whether the desiredNegativeSamplingRatio field is set.
     */
    @java.lang.Override
    public boolean hasDesiredNegativeSamplingRatio() {
      return ((bitField0_ & 0x00000200) != 0);
    }
    /**
     * <pre>
     * Desired number of effective negative samples per positive sample.
     * Only applies if expected_loss_weights is not NONE.
     * TODO(birdbrain): Move under ExpectedLossWeights.
     * </pre>
     *
     * <code>optional float desired_negative_sampling_ratio = 20 [default = 3];</code>
     * @return The desiredNegativeSamplingRatio.
     */
    @java.lang.Override
    public float getDesiredNegativeSamplingRatio() {
      return desiredNegativeSamplingRatio_;
    }

    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, getLocalizationLoss());
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeMessage(2, getClassificationLoss());
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        output.writeMessage(3, getHardExampleMiner());
      }
      if (((bitField0_ & 0x00000008) != 0)) {
        output.writeFloat(4, classificationWeight_);
      }
      if (((bitField0_ & 0x00000010) != 0)) {
        output.writeFloat(5, localizationWeight_);
      }
      if (((bitField0_ & 0x00000020) != 0)) {
        output.writeMessage(6, getRandomExampleSampler());
      }
      if (((bitField0_ & 0x00000040) != 0)) {
        output.writeMessage(7, getEqualizationLoss());
      }
      if (((bitField0_ & 0x00000080) != 0)) {
        output.writeEnum(18, expectedLossWeights_);
      }
      if (((bitField0_ & 0x00000100) != 0)) {
        output.writeFloat(19, minNumNegativeSamples_);
      }
      if (((bitField0_ & 0x00000200) != 0)) {
        output.writeFloat(20, desiredNegativeSamplingRatio_);
      }
      unknownFields.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, getLocalizationLoss());
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getClassificationLoss());
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, getHardExampleMiner());
      }
      if (((bitField0_ & 0x00000008) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(4, classificationWeight_);
      }
      if (((bitField0_ & 0x00000010) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(5, localizationWeight_);
      }
      if (((bitField0_ & 0x00000020) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(6, getRandomExampleSampler());
      }
      if (((bitField0_ & 0x00000040) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(7, getEqualizationLoss());
      }
      if (((bitField0_ & 0x00000080) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(18, expectedLossWeights_);
      }
      if (((bitField0_ & 0x00000100) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(19, minNumNegativeSamples_);
      }
      if (((bitField0_ & 0x00000200) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(20, desiredNegativeSamplingRatio_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.Loss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.Loss other = (object_detection.protos.Losses.Loss) obj;

      if (hasLocalizationLoss() != other.hasLocalizationLoss()) return false;
      if (hasLocalizationLoss()) {
        if (!getLocalizationLoss()
            .equals(other.getLocalizationLoss())) return false;
      }
      if (hasClassificationLoss() != other.hasClassificationLoss()) return false;
      if (hasClassificationLoss()) {
        if (!getClassificationLoss()
            .equals(other.getClassificationLoss())) return false;
      }
      if (hasHardExampleMiner() != other.hasHardExampleMiner()) return false;
      if (hasHardExampleMiner()) {
        if (!getHardExampleMiner()
            .equals(other.getHardExampleMiner())) return false;
      }
      if (hasClassificationWeight() != other.hasClassificationWeight()) return false;
      if (hasClassificationWeight()) {
        if (java.lang.Float.floatToIntBits(getClassificationWeight())
            != java.lang.Float.floatToIntBits(
                other.getClassificationWeight())) return false;
      }
      if (hasLocalizationWeight() != other.hasLocalizationWeight()) return false;
      if (hasLocalizationWeight()) {
        if (java.lang.Float.floatToIntBits(getLocalizationWeight())
            != java.lang.Float.floatToIntBits(
                other.getLocalizationWeight())) return false;
      }
      if (hasRandomExampleSampler() != other.hasRandomExampleSampler()) return false;
      if (hasRandomExampleSampler()) {
        if (!getRandomExampleSampler()
            .equals(other.getRandomExampleSampler())) return false;
      }
      if (hasEqualizationLoss() != other.hasEqualizationLoss()) return false;
      if (hasEqualizationLoss()) {
        if (!getEqualizationLoss()
            .equals(other.getEqualizationLoss())) return false;
      }
      if (hasExpectedLossWeights() != other.hasExpectedLossWeights()) return false;
      if (hasExpectedLossWeights()) {
        if (expectedLossWeights_ != other.expectedLossWeights_) return false;
      }
      if (hasMinNumNegativeSamples() != other.hasMinNumNegativeSamples()) return false;
      if (hasMinNumNegativeSamples()) {
        if (java.lang.Float.floatToIntBits(getMinNumNegativeSamples())
            != java.lang.Float.floatToIntBits(
                other.getMinNumNegativeSamples())) return false;
      }
      if (hasDesiredNegativeSamplingRatio() != other.hasDesiredNegativeSamplingRatio()) return false;
      if (hasDesiredNegativeSamplingRatio()) {
        if (java.lang.Float.floatToIntBits(getDesiredNegativeSamplingRatio())
            != java.lang.Float.floatToIntBits(
                other.getDesiredNegativeSamplingRatio())) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasLocalizationLoss()) {
        hash = (37 * hash) + LOCALIZATION_LOSS_FIELD_NUMBER;
        hash = (53 * hash) + getLocalizationLoss().hashCode();
      }
      if (hasClassificationLoss()) {
        hash = (37 * hash) + CLASSIFICATION_LOSS_FIELD_NUMBER;
        hash = (53 * hash) + getClassificationLoss().hashCode();
      }
      if (hasHardExampleMiner()) {
        hash = (37 * hash) + HARD_EXAMPLE_MINER_FIELD_NUMBER;
        hash = (53 * hash) + getHardExampleMiner().hashCode();
      }
      if (hasClassificationWeight()) {
        hash = (37 * hash) + CLASSIFICATION_WEIGHT_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getClassificationWeight());
      }
      if (hasLocalizationWeight()) {
        hash = (37 * hash) + LOCALIZATION_WEIGHT_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getLocalizationWeight());
      }
      if (hasRandomExampleSampler()) {
        hash = (37 * hash) + RANDOM_EXAMPLE_SAMPLER_FIELD_NUMBER;
        hash = (53 * hash) + getRandomExampleSampler().hashCode();
      }
      if (hasEqualizationLoss()) {
        hash = (37 * hash) + EQUALIZATION_LOSS_FIELD_NUMBER;
        hash = (53 * hash) + getEqualizationLoss().hashCode();
      }
      if (hasExpectedLossWeights()) {
        hash = (37 * hash) + EXPECTED_LOSS_WEIGHTS_FIELD_NUMBER;
        hash = (53 * hash) + expectedLossWeights_;
      }
      if (hasMinNumNegativeSamples()) {
        hash = (37 * hash) + MIN_NUM_NEGATIVE_SAMPLES_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getMinNumNegativeSamples());
      }
      if (hasDesiredNegativeSamplingRatio()) {
        hash = (37 * hash) + DESIRED_NEGATIVE_SAMPLING_RATIO_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getDesiredNegativeSamplingRatio());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.Loss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.Loss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.Loss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.Loss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.Loss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.Loss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.Loss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.Loss 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 object_detection.protos.Losses.Loss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.Loss 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 object_detection.protos.Losses.Loss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.Loss 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(object_detection.protos.Losses.Loss 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;
    }
    /**
     * <pre>
     * Message for configuring the localization loss, classification loss and hard
     * example miner used for training object detection models. See core/losses.py
     * for details
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.Loss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.Loss)
        object_detection.protos.Losses.LossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_Loss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_Loss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.Loss.class, object_detection.protos.Losses.Loss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.Loss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
          getLocalizationLossFieldBuilder();
          getClassificationLossFieldBuilder();
          getHardExampleMinerFieldBuilder();
          getRandomExampleSamplerFieldBuilder();
          getEqualizationLossFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        if (localizationLossBuilder_ == null) {
          localizationLoss_ = null;
        } else {
          localizationLossBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        if (classificationLossBuilder_ == null) {
          classificationLoss_ = null;
        } else {
          classificationLossBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        if (hardExampleMinerBuilder_ == null) {
          hardExampleMiner_ = null;
        } else {
          hardExampleMinerBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        classificationWeight_ = 1F;
        bitField0_ = (bitField0_ & ~0x00000008);
        localizationWeight_ = 1F;
        bitField0_ = (bitField0_ & ~0x00000010);
        if (randomExampleSamplerBuilder_ == null) {
          randomExampleSampler_ = null;
        } else {
          randomExampleSamplerBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000020);
        if (equalizationLossBuilder_ == null) {
          equalizationLoss_ = null;
        } else {
          equalizationLossBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000040);
        expectedLossWeights_ = 0;
        bitField0_ = (bitField0_ & ~0x00000080);
        minNumNegativeSamples_ = 0F;
        bitField0_ = (bitField0_ & ~0x00000100);
        desiredNegativeSamplingRatio_ = 3F;
        bitField0_ = (bitField0_ & ~0x00000200);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_Loss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.Loss getDefaultInstanceForType() {
        return object_detection.protos.Losses.Loss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.Loss build() {
        object_detection.protos.Losses.Loss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.Loss buildPartial() {
        object_detection.protos.Losses.Loss result = new object_detection.protos.Losses.Loss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          if (localizationLossBuilder_ == null) {
            result.localizationLoss_ = localizationLoss_;
          } else {
            result.localizationLoss_ = localizationLossBuilder_.build();
          }
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          if (classificationLossBuilder_ == null) {
            result.classificationLoss_ = classificationLoss_;
          } else {
            result.classificationLoss_ = classificationLossBuilder_.build();
          }
          to_bitField0_ |= 0x00000002;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          if (hardExampleMinerBuilder_ == null) {
            result.hardExampleMiner_ = hardExampleMiner_;
          } else {
            result.hardExampleMiner_ = hardExampleMinerBuilder_.build();
          }
          to_bitField0_ |= 0x00000004;
        }
        if (((from_bitField0_ & 0x00000008) != 0)) {
          to_bitField0_ |= 0x00000008;
        }
        result.classificationWeight_ = classificationWeight_;
        if (((from_bitField0_ & 0x00000010) != 0)) {
          to_bitField0_ |= 0x00000010;
        }
        result.localizationWeight_ = localizationWeight_;
        if (((from_bitField0_ & 0x00000020) != 0)) {
          if (randomExampleSamplerBuilder_ == null) {
            result.randomExampleSampler_ = randomExampleSampler_;
          } else {
            result.randomExampleSampler_ = randomExampleSamplerBuilder_.build();
          }
          to_bitField0_ |= 0x00000020;
        }
        if (((from_bitField0_ & 0x00000040) != 0)) {
          if (equalizationLossBuilder_ == null) {
            result.equalizationLoss_ = equalizationLoss_;
          } else {
            result.equalizationLoss_ = equalizationLossBuilder_.build();
          }
          to_bitField0_ |= 0x00000040;
        }
        if (((from_bitField0_ & 0x00000080) != 0)) {
          to_bitField0_ |= 0x00000080;
        }
        result.expectedLossWeights_ = expectedLossWeights_;
        if (((from_bitField0_ & 0x00000100) != 0)) {
          result.minNumNegativeSamples_ = minNumNegativeSamples_;
          to_bitField0_ |= 0x00000100;
        }
        if (((from_bitField0_ & 0x00000200) != 0)) {
          to_bitField0_ |= 0x00000200;
        }
        result.desiredNegativeSamplingRatio_ = desiredNegativeSamplingRatio_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.Loss) {
          return mergeFrom((object_detection.protos.Losses.Loss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.Loss other) {
        if (other == object_detection.protos.Losses.Loss.getDefaultInstance()) return this;
        if (other.hasLocalizationLoss()) {
          mergeLocalizationLoss(other.getLocalizationLoss());
        }
        if (other.hasClassificationLoss()) {
          mergeClassificationLoss(other.getClassificationLoss());
        }
        if (other.hasHardExampleMiner()) {
          mergeHardExampleMiner(other.getHardExampleMiner());
        }
        if (other.hasClassificationWeight()) {
          setClassificationWeight(other.getClassificationWeight());
        }
        if (other.hasLocalizationWeight()) {
          setLocalizationWeight(other.getLocalizationWeight());
        }
        if (other.hasRandomExampleSampler()) {
          mergeRandomExampleSampler(other.getRandomExampleSampler());
        }
        if (other.hasEqualizationLoss()) {
          mergeEqualizationLoss(other.getEqualizationLoss());
        }
        if (other.hasExpectedLossWeights()) {
          setExpectedLossWeights(other.getExpectedLossWeights());
        }
        if (other.hasMinNumNegativeSamples()) {
          setMinNumNegativeSamples(other.getMinNumNegativeSamples());
        }
        if (other.hasDesiredNegativeSamplingRatio()) {
          setDesiredNegativeSamplingRatio(other.getDesiredNegativeSamplingRatio());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.Loss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.Loss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private object_detection.protos.Losses.LocalizationLoss localizationLoss_;
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.LocalizationLoss, object_detection.protos.Losses.LocalizationLoss.Builder, object_detection.protos.Losses.LocalizationLossOrBuilder> localizationLossBuilder_;
      /**
       * <pre>
       * Localization loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
       * @return Whether the localizationLoss field is set.
       */
      public boolean hasLocalizationLoss() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * Localization loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
       * @return The localizationLoss.
       */
      public object_detection.protos.Losses.LocalizationLoss getLocalizationLoss() {
        if (localizationLossBuilder_ == null) {
          return localizationLoss_ == null ? object_detection.protos.Losses.LocalizationLoss.getDefaultInstance() : localizationLoss_;
        } else {
          return localizationLossBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Localization loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
       */
      public Builder setLocalizationLoss(object_detection.protos.Losses.LocalizationLoss value) {
        if (localizationLossBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          localizationLoss_ = value;
          onChanged();
        } else {
          localizationLossBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * <pre>
       * Localization loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
       */
      public Builder setLocalizationLoss(
          object_detection.protos.Losses.LocalizationLoss.Builder builderForValue) {
        if (localizationLossBuilder_ == null) {
          localizationLoss_ = builderForValue.build();
          onChanged();
        } else {
          localizationLossBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * <pre>
       * Localization loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
       */
      public Builder mergeLocalizationLoss(object_detection.protos.Losses.LocalizationLoss value) {
        if (localizationLossBuilder_ == null) {
          if (((bitField0_ & 0x00000001) != 0) &&
              localizationLoss_ != null &&
              localizationLoss_ != object_detection.protos.Losses.LocalizationLoss.getDefaultInstance()) {
            localizationLoss_ =
              object_detection.protos.Losses.LocalizationLoss.newBuilder(localizationLoss_).mergeFrom(value).buildPartial();
          } else {
            localizationLoss_ = value;
          }
          onChanged();
        } else {
          localizationLossBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000001;
        return this;
      }
      /**
       * <pre>
       * Localization loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
       */
      public Builder clearLocalizationLoss() {
        if (localizationLossBuilder_ == null) {
          localizationLoss_ = null;
          onChanged();
        } else {
          localizationLossBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      /**
       * <pre>
       * Localization loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
       */
      public object_detection.protos.Losses.LocalizationLoss.Builder getLocalizationLossBuilder() {
        bitField0_ |= 0x00000001;
        onChanged();
        return getLocalizationLossFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Localization loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
       */
      public object_detection.protos.Losses.LocalizationLossOrBuilder getLocalizationLossOrBuilder() {
        if (localizationLossBuilder_ != null) {
          return localizationLossBuilder_.getMessageOrBuilder();
        } else {
          return localizationLoss_ == null ?
              object_detection.protos.Losses.LocalizationLoss.getDefaultInstance() : localizationLoss_;
        }
      }
      /**
       * <pre>
       * Localization loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.LocalizationLoss localization_loss = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.LocalizationLoss, object_detection.protos.Losses.LocalizationLoss.Builder, object_detection.protos.Losses.LocalizationLossOrBuilder>
          getLocalizationLossFieldBuilder() {
        if (localizationLossBuilder_ == null) {
          localizationLossBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.LocalizationLoss, object_detection.protos.Losses.LocalizationLoss.Builder, object_detection.protos.Losses.LocalizationLossOrBuilder>(
                  getLocalizationLoss(),
                  getParentForChildren(),
                  isClean());
          localizationLoss_ = null;
        }
        return localizationLossBuilder_;
      }

      private object_detection.protos.Losses.ClassificationLoss classificationLoss_;
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.ClassificationLoss, object_detection.protos.Losses.ClassificationLoss.Builder, object_detection.protos.Losses.ClassificationLossOrBuilder> classificationLossBuilder_;
      /**
       * <pre>
       * Classification loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
       * @return Whether the classificationLoss field is set.
       */
      public boolean hasClassificationLoss() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <pre>
       * Classification loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
       * @return The classificationLoss.
       */
      public object_detection.protos.Losses.ClassificationLoss getClassificationLoss() {
        if (classificationLossBuilder_ == null) {
          return classificationLoss_ == null ? object_detection.protos.Losses.ClassificationLoss.getDefaultInstance() : classificationLoss_;
        } else {
          return classificationLossBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Classification loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
       */
      public Builder setClassificationLoss(object_detection.protos.Losses.ClassificationLoss value) {
        if (classificationLossBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          classificationLoss_ = value;
          onChanged();
        } else {
          classificationLossBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <pre>
       * Classification loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
       */
      public Builder setClassificationLoss(
          object_detection.protos.Losses.ClassificationLoss.Builder builderForValue) {
        if (classificationLossBuilder_ == null) {
          classificationLoss_ = builderForValue.build();
          onChanged();
        } else {
          classificationLossBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <pre>
       * Classification loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
       */
      public Builder mergeClassificationLoss(object_detection.protos.Losses.ClassificationLoss value) {
        if (classificationLossBuilder_ == null) {
          if (((bitField0_ & 0x00000002) != 0) &&
              classificationLoss_ != null &&
              classificationLoss_ != object_detection.protos.Losses.ClassificationLoss.getDefaultInstance()) {
            classificationLoss_ =
              object_detection.protos.Losses.ClassificationLoss.newBuilder(classificationLoss_).mergeFrom(value).buildPartial();
          } else {
            classificationLoss_ = value;
          }
          onChanged();
        } else {
          classificationLossBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000002;
        return this;
      }
      /**
       * <pre>
       * Classification loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
       */
      public Builder clearClassificationLoss() {
        if (classificationLossBuilder_ == null) {
          classificationLoss_ = null;
          onChanged();
        } else {
          classificationLossBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }
      /**
       * <pre>
       * Classification loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
       */
      public object_detection.protos.Losses.ClassificationLoss.Builder getClassificationLossBuilder() {
        bitField0_ |= 0x00000002;
        onChanged();
        return getClassificationLossFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Classification loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
       */
      public object_detection.protos.Losses.ClassificationLossOrBuilder getClassificationLossOrBuilder() {
        if (classificationLossBuilder_ != null) {
          return classificationLossBuilder_.getMessageOrBuilder();
        } else {
          return classificationLoss_ == null ?
              object_detection.protos.Losses.ClassificationLoss.getDefaultInstance() : classificationLoss_;
        }
      }
      /**
       * <pre>
       * Classification loss to use.
       * </pre>
       *
       * <code>optional .object_detection.protos.ClassificationLoss classification_loss = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.ClassificationLoss, object_detection.protos.Losses.ClassificationLoss.Builder, object_detection.protos.Losses.ClassificationLossOrBuilder>
          getClassificationLossFieldBuilder() {
        if (classificationLossBuilder_ == null) {
          classificationLossBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.ClassificationLoss, object_detection.protos.Losses.ClassificationLoss.Builder, object_detection.protos.Losses.ClassificationLossOrBuilder>(
                  getClassificationLoss(),
                  getParentForChildren(),
                  isClean());
          classificationLoss_ = null;
        }
        return classificationLossBuilder_;
      }

      private object_detection.protos.Losses.HardExampleMiner hardExampleMiner_;
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.HardExampleMiner, object_detection.protos.Losses.HardExampleMiner.Builder, object_detection.protos.Losses.HardExampleMinerOrBuilder> hardExampleMinerBuilder_;
      /**
       * <pre>
       * If not left to default, applies hard example mining.
       * </pre>
       *
       * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
       * @return Whether the hardExampleMiner field is set.
       */
      public boolean hasHardExampleMiner() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <pre>
       * If not left to default, applies hard example mining.
       * </pre>
       *
       * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
       * @return The hardExampleMiner.
       */
      public object_detection.protos.Losses.HardExampleMiner getHardExampleMiner() {
        if (hardExampleMinerBuilder_ == null) {
          return hardExampleMiner_ == null ? object_detection.protos.Losses.HardExampleMiner.getDefaultInstance() : hardExampleMiner_;
        } else {
          return hardExampleMinerBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * If not left to default, applies hard example mining.
       * </pre>
       *
       * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
       */
      public Builder setHardExampleMiner(object_detection.protos.Losses.HardExampleMiner value) {
        if (hardExampleMinerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          hardExampleMiner_ = value;
          onChanged();
        } else {
          hardExampleMinerBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * <pre>
       * If not left to default, applies hard example mining.
       * </pre>
       *
       * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
       */
      public Builder setHardExampleMiner(
          object_detection.protos.Losses.HardExampleMiner.Builder builderForValue) {
        if (hardExampleMinerBuilder_ == null) {
          hardExampleMiner_ = builderForValue.build();
          onChanged();
        } else {
          hardExampleMinerBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * <pre>
       * If not left to default, applies hard example mining.
       * </pre>
       *
       * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
       */
      public Builder mergeHardExampleMiner(object_detection.protos.Losses.HardExampleMiner value) {
        if (hardExampleMinerBuilder_ == null) {
          if (((bitField0_ & 0x00000004) != 0) &&
              hardExampleMiner_ != null &&
              hardExampleMiner_ != object_detection.protos.Losses.HardExampleMiner.getDefaultInstance()) {
            hardExampleMiner_ =
              object_detection.protos.Losses.HardExampleMiner.newBuilder(hardExampleMiner_).mergeFrom(value).buildPartial();
          } else {
            hardExampleMiner_ = value;
          }
          onChanged();
        } else {
          hardExampleMinerBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000004;
        return this;
      }
      /**
       * <pre>
       * If not left to default, applies hard example mining.
       * </pre>
       *
       * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
       */
      public Builder clearHardExampleMiner() {
        if (hardExampleMinerBuilder_ == null) {
          hardExampleMiner_ = null;
          onChanged();
        } else {
          hardExampleMinerBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }
      /**
       * <pre>
       * If not left to default, applies hard example mining.
       * </pre>
       *
       * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
       */
      public object_detection.protos.Losses.HardExampleMiner.Builder getHardExampleMinerBuilder() {
        bitField0_ |= 0x00000004;
        onChanged();
        return getHardExampleMinerFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * If not left to default, applies hard example mining.
       * </pre>
       *
       * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
       */
      public object_detection.protos.Losses.HardExampleMinerOrBuilder getHardExampleMinerOrBuilder() {
        if (hardExampleMinerBuilder_ != null) {
          return hardExampleMinerBuilder_.getMessageOrBuilder();
        } else {
          return hardExampleMiner_ == null ?
              object_detection.protos.Losses.HardExampleMiner.getDefaultInstance() : hardExampleMiner_;
        }
      }
      /**
       * <pre>
       * If not left to default, applies hard example mining.
       * </pre>
       *
       * <code>optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.HardExampleMiner, object_detection.protos.Losses.HardExampleMiner.Builder, object_detection.protos.Losses.HardExampleMinerOrBuilder>
          getHardExampleMinerFieldBuilder() {
        if (hardExampleMinerBuilder_ == null) {
          hardExampleMinerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.HardExampleMiner, object_detection.protos.Losses.HardExampleMiner.Builder, object_detection.protos.Losses.HardExampleMinerOrBuilder>(
                  getHardExampleMiner(),
                  getParentForChildren(),
                  isClean());
          hardExampleMiner_ = null;
        }
        return hardExampleMinerBuilder_;
      }

      private float classificationWeight_ = 1F;
      /**
       * <pre>
       * Classification loss weight.
       * </pre>
       *
       * <code>optional float classification_weight = 4 [default = 1];</code>
       * @return Whether the classificationWeight field is set.
       */
      @java.lang.Override
      public boolean hasClassificationWeight() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       * <pre>
       * Classification loss weight.
       * </pre>
       *
       * <code>optional float classification_weight = 4 [default = 1];</code>
       * @return The classificationWeight.
       */
      @java.lang.Override
      public float getClassificationWeight() {
        return classificationWeight_;
      }
      /**
       * <pre>
       * Classification loss weight.
       * </pre>
       *
       * <code>optional float classification_weight = 4 [default = 1];</code>
       * @param value The classificationWeight to set.
       * @return This builder for chaining.
       */
      public Builder setClassificationWeight(float value) {
        bitField0_ |= 0x00000008;
        classificationWeight_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Classification loss weight.
       * </pre>
       *
       * <code>optional float classification_weight = 4 [default = 1];</code>
       * @return This builder for chaining.
       */
      public Builder clearClassificationWeight() {
        bitField0_ = (bitField0_ & ~0x00000008);
        classificationWeight_ = 1F;
        onChanged();
        return this;
      }

      private float localizationWeight_ = 1F;
      /**
       * <pre>
       * Localization loss weight.
       * </pre>
       *
       * <code>optional float localization_weight = 5 [default = 1];</code>
       * @return Whether the localizationWeight field is set.
       */
      @java.lang.Override
      public boolean hasLocalizationWeight() {
        return ((bitField0_ & 0x00000010) != 0);
      }
      /**
       * <pre>
       * Localization loss weight.
       * </pre>
       *
       * <code>optional float localization_weight = 5 [default = 1];</code>
       * @return The localizationWeight.
       */
      @java.lang.Override
      public float getLocalizationWeight() {
        return localizationWeight_;
      }
      /**
       * <pre>
       * Localization loss weight.
       * </pre>
       *
       * <code>optional float localization_weight = 5 [default = 1];</code>
       * @param value The localizationWeight to set.
       * @return This builder for chaining.
       */
      public Builder setLocalizationWeight(float value) {
        bitField0_ |= 0x00000010;
        localizationWeight_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Localization loss weight.
       * </pre>
       *
       * <code>optional float localization_weight = 5 [default = 1];</code>
       * @return This builder for chaining.
       */
      public Builder clearLocalizationWeight() {
        bitField0_ = (bitField0_ & ~0x00000010);
        localizationWeight_ = 1F;
        onChanged();
        return this;
      }

      private object_detection.protos.Losses.RandomExampleSampler randomExampleSampler_;
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.RandomExampleSampler, object_detection.protos.Losses.RandomExampleSampler.Builder, object_detection.protos.Losses.RandomExampleSamplerOrBuilder> randomExampleSamplerBuilder_;
      /**
       * <pre>
       * If not left to default, applies random example sampling.
       * </pre>
       *
       * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
       * @return Whether the randomExampleSampler field is set.
       */
      public boolean hasRandomExampleSampler() {
        return ((bitField0_ & 0x00000020) != 0);
      }
      /**
       * <pre>
       * If not left to default, applies random example sampling.
       * </pre>
       *
       * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
       * @return The randomExampleSampler.
       */
      public object_detection.protos.Losses.RandomExampleSampler getRandomExampleSampler() {
        if (randomExampleSamplerBuilder_ == null) {
          return randomExampleSampler_ == null ? object_detection.protos.Losses.RandomExampleSampler.getDefaultInstance() : randomExampleSampler_;
        } else {
          return randomExampleSamplerBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * If not left to default, applies random example sampling.
       * </pre>
       *
       * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
       */
      public Builder setRandomExampleSampler(object_detection.protos.Losses.RandomExampleSampler value) {
        if (randomExampleSamplerBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          randomExampleSampler_ = value;
          onChanged();
        } else {
          randomExampleSamplerBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000020;
        return this;
      }
      /**
       * <pre>
       * If not left to default, applies random example sampling.
       * </pre>
       *
       * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
       */
      public Builder setRandomExampleSampler(
          object_detection.protos.Losses.RandomExampleSampler.Builder builderForValue) {
        if (randomExampleSamplerBuilder_ == null) {
          randomExampleSampler_ = builderForValue.build();
          onChanged();
        } else {
          randomExampleSamplerBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000020;
        return this;
      }
      /**
       * <pre>
       * If not left to default, applies random example sampling.
       * </pre>
       *
       * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
       */
      public Builder mergeRandomExampleSampler(object_detection.protos.Losses.RandomExampleSampler value) {
        if (randomExampleSamplerBuilder_ == null) {
          if (((bitField0_ & 0x00000020) != 0) &&
              randomExampleSampler_ != null &&
              randomExampleSampler_ != object_detection.protos.Losses.RandomExampleSampler.getDefaultInstance()) {
            randomExampleSampler_ =
              object_detection.protos.Losses.RandomExampleSampler.newBuilder(randomExampleSampler_).mergeFrom(value).buildPartial();
          } else {
            randomExampleSampler_ = value;
          }
          onChanged();
        } else {
          randomExampleSamplerBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000020;
        return this;
      }
      /**
       * <pre>
       * If not left to default, applies random example sampling.
       * </pre>
       *
       * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
       */
      public Builder clearRandomExampleSampler() {
        if (randomExampleSamplerBuilder_ == null) {
          randomExampleSampler_ = null;
          onChanged();
        } else {
          randomExampleSamplerBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000020);
        return this;
      }
      /**
       * <pre>
       * If not left to default, applies random example sampling.
       * </pre>
       *
       * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
       */
      public object_detection.protos.Losses.RandomExampleSampler.Builder getRandomExampleSamplerBuilder() {
        bitField0_ |= 0x00000020;
        onChanged();
        return getRandomExampleSamplerFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * If not left to default, applies random example sampling.
       * </pre>
       *
       * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
       */
      public object_detection.protos.Losses.RandomExampleSamplerOrBuilder getRandomExampleSamplerOrBuilder() {
        if (randomExampleSamplerBuilder_ != null) {
          return randomExampleSamplerBuilder_.getMessageOrBuilder();
        } else {
          return randomExampleSampler_ == null ?
              object_detection.protos.Losses.RandomExampleSampler.getDefaultInstance() : randomExampleSampler_;
        }
      }
      /**
       * <pre>
       * If not left to default, applies random example sampling.
       * </pre>
       *
       * <code>optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.RandomExampleSampler, object_detection.protos.Losses.RandomExampleSampler.Builder, object_detection.protos.Losses.RandomExampleSamplerOrBuilder>
          getRandomExampleSamplerFieldBuilder() {
        if (randomExampleSamplerBuilder_ == null) {
          randomExampleSamplerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.RandomExampleSampler, object_detection.protos.Losses.RandomExampleSampler.Builder, object_detection.protos.Losses.RandomExampleSamplerOrBuilder>(
                  getRandomExampleSampler(),
                  getParentForChildren(),
                  isClean());
          randomExampleSampler_ = null;
        }
        return randomExampleSamplerBuilder_;
      }

      private object_detection.protos.Losses.Loss.EqualizationLoss equalizationLoss_;
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.Loss.EqualizationLoss, object_detection.protos.Losses.Loss.EqualizationLoss.Builder, object_detection.protos.Losses.Loss.EqualizationLossOrBuilder> equalizationLossBuilder_;
      /**
       * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
       * @return Whether the equalizationLoss field is set.
       */
      public boolean hasEqualizationLoss() {
        return ((bitField0_ & 0x00000040) != 0);
      }
      /**
       * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
       * @return The equalizationLoss.
       */
      public object_detection.protos.Losses.Loss.EqualizationLoss getEqualizationLoss() {
        if (equalizationLossBuilder_ == null) {
          return equalizationLoss_ == null ? object_detection.protos.Losses.Loss.EqualizationLoss.getDefaultInstance() : equalizationLoss_;
        } else {
          return equalizationLossBuilder_.getMessage();
        }
      }
      /**
       * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
       */
      public Builder setEqualizationLoss(object_detection.protos.Losses.Loss.EqualizationLoss value) {
        if (equalizationLossBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          equalizationLoss_ = value;
          onChanged();
        } else {
          equalizationLossBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000040;
        return this;
      }
      /**
       * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
       */
      public Builder setEqualizationLoss(
          object_detection.protos.Losses.Loss.EqualizationLoss.Builder builderForValue) {
        if (equalizationLossBuilder_ == null) {
          equalizationLoss_ = builderForValue.build();
          onChanged();
        } else {
          equalizationLossBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000040;
        return this;
      }
      /**
       * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
       */
      public Builder mergeEqualizationLoss(object_detection.protos.Losses.Loss.EqualizationLoss value) {
        if (equalizationLossBuilder_ == null) {
          if (((bitField0_ & 0x00000040) != 0) &&
              equalizationLoss_ != null &&
              equalizationLoss_ != object_detection.protos.Losses.Loss.EqualizationLoss.getDefaultInstance()) {
            equalizationLoss_ =
              object_detection.protos.Losses.Loss.EqualizationLoss.newBuilder(equalizationLoss_).mergeFrom(value).buildPartial();
          } else {
            equalizationLoss_ = value;
          }
          onChanged();
        } else {
          equalizationLossBuilder_.mergeFrom(value);
        }
        bitField0_ |= 0x00000040;
        return this;
      }
      /**
       * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
       */
      public Builder clearEqualizationLoss() {
        if (equalizationLossBuilder_ == null) {
          equalizationLoss_ = null;
          onChanged();
        } else {
          equalizationLossBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000040);
        return this;
      }
      /**
       * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
       */
      public object_detection.protos.Losses.Loss.EqualizationLoss.Builder getEqualizationLossBuilder() {
        bitField0_ |= 0x00000040;
        onChanged();
        return getEqualizationLossFieldBuilder().getBuilder();
      }
      /**
       * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
       */
      public object_detection.protos.Losses.Loss.EqualizationLossOrBuilder getEqualizationLossOrBuilder() {
        if (equalizationLossBuilder_ != null) {
          return equalizationLossBuilder_.getMessageOrBuilder();
        } else {
          return equalizationLoss_ == null ?
              object_detection.protos.Losses.Loss.EqualizationLoss.getDefaultInstance() : equalizationLoss_;
        }
      }
      /**
       * <code>optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.Loss.EqualizationLoss, object_detection.protos.Losses.Loss.EqualizationLoss.Builder, object_detection.protos.Losses.Loss.EqualizationLossOrBuilder>
          getEqualizationLossFieldBuilder() {
        if (equalizationLossBuilder_ == null) {
          equalizationLossBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.Loss.EqualizationLoss, object_detection.protos.Losses.Loss.EqualizationLoss.Builder, object_detection.protos.Losses.Loss.EqualizationLossOrBuilder>(
                  getEqualizationLoss(),
                  getParentForChildren(),
                  isClean());
          equalizationLoss_ = null;
        }
        return equalizationLossBuilder_;
      }

      private int expectedLossWeights_ = 0;
      /**
       * <pre>
       * Method to compute expected loss weights with respect to balanced
       * positive/negative sampling scheme. If NONE, use explicit sampling.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];</code>
       * @return Whether the expectedLossWeights field is set.
       */
      @java.lang.Override public boolean hasExpectedLossWeights() {
        return ((bitField0_ & 0x00000080) != 0);
      }
      /**
       * <pre>
       * Method to compute expected loss weights with respect to balanced
       * positive/negative sampling scheme. If NONE, use explicit sampling.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];</code>
       * @return The expectedLossWeights.
       */
      @java.lang.Override
      public object_detection.protos.Losses.Loss.ExpectedLossWeights getExpectedLossWeights() {
        @SuppressWarnings("deprecation")
        object_detection.protos.Losses.Loss.ExpectedLossWeights result = object_detection.protos.Losses.Loss.ExpectedLossWeights.valueOf(expectedLossWeights_);
        return result == null ? object_detection.protos.Losses.Loss.ExpectedLossWeights.NONE : result;
      }
      /**
       * <pre>
       * Method to compute expected loss weights with respect to balanced
       * positive/negative sampling scheme. If NONE, use explicit sampling.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];</code>
       * @param value The expectedLossWeights to set.
       * @return This builder for chaining.
       */
      public Builder setExpectedLossWeights(object_detection.protos.Losses.Loss.ExpectedLossWeights value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000080;
        expectedLossWeights_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Method to compute expected loss weights with respect to balanced
       * positive/negative sampling scheme. If NONE, use explicit sampling.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];</code>
       * @return This builder for chaining.
       */
      public Builder clearExpectedLossWeights() {
        bitField0_ = (bitField0_ & ~0x00000080);
        expectedLossWeights_ = 0;
        onChanged();
        return this;
      }

      private float minNumNegativeSamples_ ;
      /**
       * <pre>
       * Minimum number of effective negative samples.
       * Only applies if expected_loss_weights is not NONE.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional float min_num_negative_samples = 19 [default = 0];</code>
       * @return Whether the minNumNegativeSamples field is set.
       */
      @java.lang.Override
      public boolean hasMinNumNegativeSamples() {
        return ((bitField0_ & 0x00000100) != 0);
      }
      /**
       * <pre>
       * Minimum number of effective negative samples.
       * Only applies if expected_loss_weights is not NONE.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional float min_num_negative_samples = 19 [default = 0];</code>
       * @return The minNumNegativeSamples.
       */
      @java.lang.Override
      public float getMinNumNegativeSamples() {
        return minNumNegativeSamples_;
      }
      /**
       * <pre>
       * Minimum number of effective negative samples.
       * Only applies if expected_loss_weights is not NONE.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional float min_num_negative_samples = 19 [default = 0];</code>
       * @param value The minNumNegativeSamples to set.
       * @return This builder for chaining.
       */
      public Builder setMinNumNegativeSamples(float value) {
        bitField0_ |= 0x00000100;
        minNumNegativeSamples_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Minimum number of effective negative samples.
       * Only applies if expected_loss_weights is not NONE.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional float min_num_negative_samples = 19 [default = 0];</code>
       * @return This builder for chaining.
       */
      public Builder clearMinNumNegativeSamples() {
        bitField0_ = (bitField0_ & ~0x00000100);
        minNumNegativeSamples_ = 0F;
        onChanged();
        return this;
      }

      private float desiredNegativeSamplingRatio_ = 3F;
      /**
       * <pre>
       * Desired number of effective negative samples per positive sample.
       * Only applies if expected_loss_weights is not NONE.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional float desired_negative_sampling_ratio = 20 [default = 3];</code>
       * @return Whether the desiredNegativeSamplingRatio field is set.
       */
      @java.lang.Override
      public boolean hasDesiredNegativeSamplingRatio() {
        return ((bitField0_ & 0x00000200) != 0);
      }
      /**
       * <pre>
       * Desired number of effective negative samples per positive sample.
       * Only applies if expected_loss_weights is not NONE.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional float desired_negative_sampling_ratio = 20 [default = 3];</code>
       * @return The desiredNegativeSamplingRatio.
       */
      @java.lang.Override
      public float getDesiredNegativeSamplingRatio() {
        return desiredNegativeSamplingRatio_;
      }
      /**
       * <pre>
       * Desired number of effective negative samples per positive sample.
       * Only applies if expected_loss_weights is not NONE.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional float desired_negative_sampling_ratio = 20 [default = 3];</code>
       * @param value The desiredNegativeSamplingRatio to set.
       * @return This builder for chaining.
       */
      public Builder setDesiredNegativeSamplingRatio(float value) {
        bitField0_ |= 0x00000200;
        desiredNegativeSamplingRatio_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Desired number of effective negative samples per positive sample.
       * Only applies if expected_loss_weights is not NONE.
       * TODO(birdbrain): Move under ExpectedLossWeights.
       * </pre>
       *
       * <code>optional float desired_negative_sampling_ratio = 20 [default = 3];</code>
       * @return This builder for chaining.
       */
      public Builder clearDesiredNegativeSamplingRatio() {
        bitField0_ = (bitField0_ & ~0x00000200);
        desiredNegativeSamplingRatio_ = 3F;
        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:object_detection.protos.Loss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.Loss)
    private static final object_detection.protos.Losses.Loss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.Loss();
    }

    public static object_detection.protos.Losses.Loss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<Loss>
        PARSER = new com.google.protobuf.AbstractParser<Loss>() {
      @java.lang.Override
      public Loss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new Loss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<Loss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<Loss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.Loss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface LocalizationLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.LocalizationLoss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
     * @return Whether the weightedL2 field is set.
     */
    boolean hasWeightedL2();
    /**
     * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
     * @return The weightedL2.
     */
    object_detection.protos.Losses.WeightedL2LocalizationLoss getWeightedL2();
    /**
     * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
     */
    object_detection.protos.Losses.WeightedL2LocalizationLossOrBuilder getWeightedL2OrBuilder();

    /**
     * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
     * @return Whether the weightedSmoothL1 field is set.
     */
    boolean hasWeightedSmoothL1();
    /**
     * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
     * @return The weightedSmoothL1.
     */
    object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss getWeightedSmoothL1();
    /**
     * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
     */
    object_detection.protos.Losses.WeightedSmoothL1LocalizationLossOrBuilder getWeightedSmoothL1OrBuilder();

    /**
     * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
     * @return Whether the weightedIou field is set.
     */
    boolean hasWeightedIou();
    /**
     * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
     * @return The weightedIou.
     */
    object_detection.protos.Losses.WeightedIOULocalizationLoss getWeightedIou();
    /**
     * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
     */
    object_detection.protos.Losses.WeightedIOULocalizationLossOrBuilder getWeightedIouOrBuilder();

    /**
     * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
     * @return Whether the l1LocalizationLoss field is set.
     */
    boolean hasL1LocalizationLoss();
    /**
     * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
     * @return The l1LocalizationLoss.
     */
    object_detection.protos.Losses.L1LocalizationLoss getL1LocalizationLoss();
    /**
     * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
     */
    object_detection.protos.Losses.L1LocalizationLossOrBuilder getL1LocalizationLossOrBuilder();

    public object_detection.protos.Losses.LocalizationLoss.LocalizationLossCase getLocalizationLossCase();
  }
  /**
   * <pre>
   * Configuration for bounding box localization loss function.
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.LocalizationLoss}
   */
  public static final class LocalizationLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.LocalizationLoss)
      LocalizationLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use LocalizationLoss.newBuilder() to construct.
    private LocalizationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private LocalizationLoss() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new LocalizationLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private LocalizationLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              object_detection.protos.Losses.WeightedL2LocalizationLoss.Builder subBuilder = null;
              if (localizationLossCase_ == 1) {
                subBuilder = ((object_detection.protos.Losses.WeightedL2LocalizationLoss) localizationLoss_).toBuilder();
              }
              localizationLoss_ =
                  input.readMessage(object_detection.protos.Losses.WeightedL2LocalizationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((object_detection.protos.Losses.WeightedL2LocalizationLoss) localizationLoss_);
                localizationLoss_ = subBuilder.buildPartial();
              }
              localizationLossCase_ = 1;
              break;
            }
            case 18: {
              object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.Builder subBuilder = null;
              if (localizationLossCase_ == 2) {
                subBuilder = ((object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) localizationLoss_).toBuilder();
              }
              localizationLoss_ =
                  input.readMessage(object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) localizationLoss_);
                localizationLoss_ = subBuilder.buildPartial();
              }
              localizationLossCase_ = 2;
              break;
            }
            case 26: {
              object_detection.protos.Losses.WeightedIOULocalizationLoss.Builder subBuilder = null;
              if (localizationLossCase_ == 3) {
                subBuilder = ((object_detection.protos.Losses.WeightedIOULocalizationLoss) localizationLoss_).toBuilder();
              }
              localizationLoss_ =
                  input.readMessage(object_detection.protos.Losses.WeightedIOULocalizationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((object_detection.protos.Losses.WeightedIOULocalizationLoss) localizationLoss_);
                localizationLoss_ = subBuilder.buildPartial();
              }
              localizationLossCase_ = 3;
              break;
            }
            case 34: {
              object_detection.protos.Losses.L1LocalizationLoss.Builder subBuilder = null;
              if (localizationLossCase_ == 4) {
                subBuilder = ((object_detection.protos.Losses.L1LocalizationLoss) localizationLoss_).toBuilder();
              }
              localizationLoss_ =
                  input.readMessage(object_detection.protos.Losses.L1LocalizationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((object_detection.protos.Losses.L1LocalizationLoss) localizationLoss_);
                localizationLoss_ = subBuilder.buildPartial();
              }
              localizationLossCase_ = 4;
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_LocalizationLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_LocalizationLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.LocalizationLoss.class, object_detection.protos.Losses.LocalizationLoss.Builder.class);
    }

    private int bitField0_;
    private int localizationLossCase_ = 0;
    private java.lang.Object localizationLoss_;
    public enum LocalizationLossCase
        implements com.google.protobuf.Internal.EnumLite,
            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
      WEIGHTED_L2(1),
      WEIGHTED_SMOOTH_L1(2),
      WEIGHTED_IOU(3),
      L1_LOCALIZATION_LOSS(4),
      LOCALIZATIONLOSS_NOT_SET(0);
      private final int value;
      private LocalizationLossCase(int value) {
        this.value = value;
      }
      /**
       * @param value The number of the enum to look for.
       * @return The enum associated with the given number.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static LocalizationLossCase valueOf(int value) {
        return forNumber(value);
      }

      public static LocalizationLossCase forNumber(int value) {
        switch (value) {
          case 1: return WEIGHTED_L2;
          case 2: return WEIGHTED_SMOOTH_L1;
          case 3: return WEIGHTED_IOU;
          case 4: return L1_LOCALIZATION_LOSS;
          case 0: return LOCALIZATIONLOSS_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public LocalizationLossCase
    getLocalizationLossCase() {
      return LocalizationLossCase.forNumber(
          localizationLossCase_);
    }

    public static final int WEIGHTED_L2_FIELD_NUMBER = 1;
    /**
     * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
     * @return Whether the weightedL2 field is set.
     */
    @java.lang.Override
    public boolean hasWeightedL2() {
      return localizationLossCase_ == 1;
    }
    /**
     * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
     * @return The weightedL2.
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedL2LocalizationLoss getWeightedL2() {
      if (localizationLossCase_ == 1) {
         return (object_detection.protos.Losses.WeightedL2LocalizationLoss) localizationLoss_;
      }
      return object_detection.protos.Losses.WeightedL2LocalizationLoss.getDefaultInstance();
    }
    /**
     * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedL2LocalizationLossOrBuilder getWeightedL2OrBuilder() {
      if (localizationLossCase_ == 1) {
         return (object_detection.protos.Losses.WeightedL2LocalizationLoss) localizationLoss_;
      }
      return object_detection.protos.Losses.WeightedL2LocalizationLoss.getDefaultInstance();
    }

    public static final int WEIGHTED_SMOOTH_L1_FIELD_NUMBER = 2;
    /**
     * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
     * @return Whether the weightedSmoothL1 field is set.
     */
    @java.lang.Override
    public boolean hasWeightedSmoothL1() {
      return localizationLossCase_ == 2;
    }
    /**
     * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
     * @return The weightedSmoothL1.
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss getWeightedSmoothL1() {
      if (localizationLossCase_ == 2) {
         return (object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) localizationLoss_;
      }
      return object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.getDefaultInstance();
    }
    /**
     * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedSmoothL1LocalizationLossOrBuilder getWeightedSmoothL1OrBuilder() {
      if (localizationLossCase_ == 2) {
         return (object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) localizationLoss_;
      }
      return object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.getDefaultInstance();
    }

    public static final int WEIGHTED_IOU_FIELD_NUMBER = 3;
    /**
     * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
     * @return Whether the weightedIou field is set.
     */
    @java.lang.Override
    public boolean hasWeightedIou() {
      return localizationLossCase_ == 3;
    }
    /**
     * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
     * @return The weightedIou.
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedIOULocalizationLoss getWeightedIou() {
      if (localizationLossCase_ == 3) {
         return (object_detection.protos.Losses.WeightedIOULocalizationLoss) localizationLoss_;
      }
      return object_detection.protos.Losses.WeightedIOULocalizationLoss.getDefaultInstance();
    }
    /**
     * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedIOULocalizationLossOrBuilder getWeightedIouOrBuilder() {
      if (localizationLossCase_ == 3) {
         return (object_detection.protos.Losses.WeightedIOULocalizationLoss) localizationLoss_;
      }
      return object_detection.protos.Losses.WeightedIOULocalizationLoss.getDefaultInstance();
    }

    public static final int L1_LOCALIZATION_LOSS_FIELD_NUMBER = 4;
    /**
     * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
     * @return Whether the l1LocalizationLoss field is set.
     */
    @java.lang.Override
    public boolean hasL1LocalizationLoss() {
      return localizationLossCase_ == 4;
    }
    /**
     * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
     * @return The l1LocalizationLoss.
     */
    @java.lang.Override
    public object_detection.protos.Losses.L1LocalizationLoss getL1LocalizationLoss() {
      if (localizationLossCase_ == 4) {
         return (object_detection.protos.Losses.L1LocalizationLoss) localizationLoss_;
      }
      return object_detection.protos.Losses.L1LocalizationLoss.getDefaultInstance();
    }
    /**
     * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.L1LocalizationLossOrBuilder getL1LocalizationLossOrBuilder() {
      if (localizationLossCase_ == 4) {
         return (object_detection.protos.Losses.L1LocalizationLoss) localizationLoss_;
      }
      return object_detection.protos.Losses.L1LocalizationLoss.getDefaultInstance();
    }

    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 (localizationLossCase_ == 1) {
        output.writeMessage(1, (object_detection.protos.Losses.WeightedL2LocalizationLoss) localizationLoss_);
      }
      if (localizationLossCase_ == 2) {
        output.writeMessage(2, (object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) localizationLoss_);
      }
      if (localizationLossCase_ == 3) {
        output.writeMessage(3, (object_detection.protos.Losses.WeightedIOULocalizationLoss) localizationLoss_);
      }
      if (localizationLossCase_ == 4) {
        output.writeMessage(4, (object_detection.protos.Losses.L1LocalizationLoss) localizationLoss_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (localizationLossCase_ == 1) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, (object_detection.protos.Losses.WeightedL2LocalizationLoss) localizationLoss_);
      }
      if (localizationLossCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, (object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) localizationLoss_);
      }
      if (localizationLossCase_ == 3) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, (object_detection.protos.Losses.WeightedIOULocalizationLoss) localizationLoss_);
      }
      if (localizationLossCase_ == 4) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, (object_detection.protos.Losses.L1LocalizationLoss) localizationLoss_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.LocalizationLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.LocalizationLoss other = (object_detection.protos.Losses.LocalizationLoss) obj;

      if (!getLocalizationLossCase().equals(other.getLocalizationLossCase())) return false;
      switch (localizationLossCase_) {
        case 1:
          if (!getWeightedL2()
              .equals(other.getWeightedL2())) return false;
          break;
        case 2:
          if (!getWeightedSmoothL1()
              .equals(other.getWeightedSmoothL1())) return false;
          break;
        case 3:
          if (!getWeightedIou()
              .equals(other.getWeightedIou())) return false;
          break;
        case 4:
          if (!getL1LocalizationLoss()
              .equals(other.getL1LocalizationLoss())) return false;
          break;
        case 0:
        default:
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      switch (localizationLossCase_) {
        case 1:
          hash = (37 * hash) + WEIGHTED_L2_FIELD_NUMBER;
          hash = (53 * hash) + getWeightedL2().hashCode();
          break;
        case 2:
          hash = (37 * hash) + WEIGHTED_SMOOTH_L1_FIELD_NUMBER;
          hash = (53 * hash) + getWeightedSmoothL1().hashCode();
          break;
        case 3:
          hash = (37 * hash) + WEIGHTED_IOU_FIELD_NUMBER;
          hash = (53 * hash) + getWeightedIou().hashCode();
          break;
        case 4:
          hash = (37 * hash) + L1_LOCALIZATION_LOSS_FIELD_NUMBER;
          hash = (53 * hash) + getL1LocalizationLoss().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.LocalizationLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.LocalizationLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.LocalizationLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.LocalizationLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.LocalizationLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.LocalizationLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.LocalizationLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.LocalizationLoss 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 object_detection.protos.Losses.LocalizationLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.LocalizationLoss 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 object_detection.protos.Losses.LocalizationLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.LocalizationLoss 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(object_detection.protos.Losses.LocalizationLoss 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;
    }
    /**
     * <pre>
     * Configuration for bounding box localization loss function.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.LocalizationLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.LocalizationLoss)
        object_detection.protos.Losses.LocalizationLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_LocalizationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_LocalizationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.LocalizationLoss.class, object_detection.protos.Losses.LocalizationLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.LocalizationLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        localizationLossCase_ = 0;
        localizationLoss_ = null;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_LocalizationLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.LocalizationLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.LocalizationLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.LocalizationLoss build() {
        object_detection.protos.Losses.LocalizationLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.LocalizationLoss buildPartial() {
        object_detection.protos.Losses.LocalizationLoss result = new object_detection.protos.Losses.LocalizationLoss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (localizationLossCase_ == 1) {
          if (weightedL2Builder_ == null) {
            result.localizationLoss_ = localizationLoss_;
          } else {
            result.localizationLoss_ = weightedL2Builder_.build();
          }
        }
        if (localizationLossCase_ == 2) {
          if (weightedSmoothL1Builder_ == null) {
            result.localizationLoss_ = localizationLoss_;
          } else {
            result.localizationLoss_ = weightedSmoothL1Builder_.build();
          }
        }
        if (localizationLossCase_ == 3) {
          if (weightedIouBuilder_ == null) {
            result.localizationLoss_ = localizationLoss_;
          } else {
            result.localizationLoss_ = weightedIouBuilder_.build();
          }
        }
        if (localizationLossCase_ == 4) {
          if (l1LocalizationLossBuilder_ == null) {
            result.localizationLoss_ = localizationLoss_;
          } else {
            result.localizationLoss_ = l1LocalizationLossBuilder_.build();
          }
        }
        result.bitField0_ = to_bitField0_;
        result.localizationLossCase_ = localizationLossCase_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.LocalizationLoss) {
          return mergeFrom((object_detection.protos.Losses.LocalizationLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.LocalizationLoss other) {
        if (other == object_detection.protos.Losses.LocalizationLoss.getDefaultInstance()) return this;
        switch (other.getLocalizationLossCase()) {
          case WEIGHTED_L2: {
            mergeWeightedL2(other.getWeightedL2());
            break;
          }
          case WEIGHTED_SMOOTH_L1: {
            mergeWeightedSmoothL1(other.getWeightedSmoothL1());
            break;
          }
          case WEIGHTED_IOU: {
            mergeWeightedIou(other.getWeightedIou());
            break;
          }
          case L1_LOCALIZATION_LOSS: {
            mergeL1LocalizationLoss(other.getL1LocalizationLoss());
            break;
          }
          case LOCALIZATIONLOSS_NOT_SET: {
            break;
          }
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.LocalizationLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.LocalizationLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int localizationLossCase_ = 0;
      private java.lang.Object localizationLoss_;
      public LocalizationLossCase
          getLocalizationLossCase() {
        return LocalizationLossCase.forNumber(
            localizationLossCase_);
      }

      public Builder clearLocalizationLoss() {
        localizationLossCase_ = 0;
        localizationLoss_ = null;
        onChanged();
        return this;
      }

      private int bitField0_;

      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedL2LocalizationLoss, object_detection.protos.Losses.WeightedL2LocalizationLoss.Builder, object_detection.protos.Losses.WeightedL2LocalizationLossOrBuilder> weightedL2Builder_;
      /**
       * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
       * @return Whether the weightedL2 field is set.
       */
      @java.lang.Override
      public boolean hasWeightedL2() {
        return localizationLossCase_ == 1;
      }
      /**
       * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
       * @return The weightedL2.
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedL2LocalizationLoss getWeightedL2() {
        if (weightedL2Builder_ == null) {
          if (localizationLossCase_ == 1) {
            return (object_detection.protos.Losses.WeightedL2LocalizationLoss) localizationLoss_;
          }
          return object_detection.protos.Losses.WeightedL2LocalizationLoss.getDefaultInstance();
        } else {
          if (localizationLossCase_ == 1) {
            return weightedL2Builder_.getMessage();
          }
          return object_detection.protos.Losses.WeightedL2LocalizationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
       */
      public Builder setWeightedL2(object_detection.protos.Losses.WeightedL2LocalizationLoss value) {
        if (weightedL2Builder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          localizationLoss_ = value;
          onChanged();
        } else {
          weightedL2Builder_.setMessage(value);
        }
        localizationLossCase_ = 1;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
       */
      public Builder setWeightedL2(
          object_detection.protos.Losses.WeightedL2LocalizationLoss.Builder builderForValue) {
        if (weightedL2Builder_ == null) {
          localizationLoss_ = builderForValue.build();
          onChanged();
        } else {
          weightedL2Builder_.setMessage(builderForValue.build());
        }
        localizationLossCase_ = 1;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
       */
      public Builder mergeWeightedL2(object_detection.protos.Losses.WeightedL2LocalizationLoss value) {
        if (weightedL2Builder_ == null) {
          if (localizationLossCase_ == 1 &&
              localizationLoss_ != object_detection.protos.Losses.WeightedL2LocalizationLoss.getDefaultInstance()) {
            localizationLoss_ = object_detection.protos.Losses.WeightedL2LocalizationLoss.newBuilder((object_detection.protos.Losses.WeightedL2LocalizationLoss) localizationLoss_)
                .mergeFrom(value).buildPartial();
          } else {
            localizationLoss_ = value;
          }
          onChanged();
        } else {
          if (localizationLossCase_ == 1) {
            weightedL2Builder_.mergeFrom(value);
          }
          weightedL2Builder_.setMessage(value);
        }
        localizationLossCase_ = 1;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
       */
      public Builder clearWeightedL2() {
        if (weightedL2Builder_ == null) {
          if (localizationLossCase_ == 1) {
            localizationLossCase_ = 0;
            localizationLoss_ = null;
            onChanged();
          }
        } else {
          if (localizationLossCase_ == 1) {
            localizationLossCase_ = 0;
            localizationLoss_ = null;
          }
          weightedL2Builder_.clear();
        }
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
       */
      public object_detection.protos.Losses.WeightedL2LocalizationLoss.Builder getWeightedL2Builder() {
        return getWeightedL2FieldBuilder().getBuilder();
      }
      /**
       * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedL2LocalizationLossOrBuilder getWeightedL2OrBuilder() {
        if ((localizationLossCase_ == 1) && (weightedL2Builder_ != null)) {
          return weightedL2Builder_.getMessageOrBuilder();
        } else {
          if (localizationLossCase_ == 1) {
            return (object_detection.protos.Losses.WeightedL2LocalizationLoss) localizationLoss_;
          }
          return object_detection.protos.Losses.WeightedL2LocalizationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedL2LocalizationLoss, object_detection.protos.Losses.WeightedL2LocalizationLoss.Builder, object_detection.protos.Losses.WeightedL2LocalizationLossOrBuilder>
          getWeightedL2FieldBuilder() {
        if (weightedL2Builder_ == null) {
          if (!(localizationLossCase_ == 1)) {
            localizationLoss_ = object_detection.protos.Losses.WeightedL2LocalizationLoss.getDefaultInstance();
          }
          weightedL2Builder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.WeightedL2LocalizationLoss, object_detection.protos.Losses.WeightedL2LocalizationLoss.Builder, object_detection.protos.Losses.WeightedL2LocalizationLossOrBuilder>(
                  (object_detection.protos.Losses.WeightedL2LocalizationLoss) localizationLoss_,
                  getParentForChildren(),
                  isClean());
          localizationLoss_ = null;
        }
        localizationLossCase_ = 1;
        onChanged();;
        return weightedL2Builder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss, object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.Builder, object_detection.protos.Losses.WeightedSmoothL1LocalizationLossOrBuilder> weightedSmoothL1Builder_;
      /**
       * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
       * @return Whether the weightedSmoothL1 field is set.
       */
      @java.lang.Override
      public boolean hasWeightedSmoothL1() {
        return localizationLossCase_ == 2;
      }
      /**
       * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
       * @return The weightedSmoothL1.
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss getWeightedSmoothL1() {
        if (weightedSmoothL1Builder_ == null) {
          if (localizationLossCase_ == 2) {
            return (object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) localizationLoss_;
          }
          return object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.getDefaultInstance();
        } else {
          if (localizationLossCase_ == 2) {
            return weightedSmoothL1Builder_.getMessage();
          }
          return object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
       */
      public Builder setWeightedSmoothL1(object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss value) {
        if (weightedSmoothL1Builder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          localizationLoss_ = value;
          onChanged();
        } else {
          weightedSmoothL1Builder_.setMessage(value);
        }
        localizationLossCase_ = 2;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
       */
      public Builder setWeightedSmoothL1(
          object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.Builder builderForValue) {
        if (weightedSmoothL1Builder_ == null) {
          localizationLoss_ = builderForValue.build();
          onChanged();
        } else {
          weightedSmoothL1Builder_.setMessage(builderForValue.build());
        }
        localizationLossCase_ = 2;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
       */
      public Builder mergeWeightedSmoothL1(object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss value) {
        if (weightedSmoothL1Builder_ == null) {
          if (localizationLossCase_ == 2 &&
              localizationLoss_ != object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.getDefaultInstance()) {
            localizationLoss_ = object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.newBuilder((object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) localizationLoss_)
                .mergeFrom(value).buildPartial();
          } else {
            localizationLoss_ = value;
          }
          onChanged();
        } else {
          if (localizationLossCase_ == 2) {
            weightedSmoothL1Builder_.mergeFrom(value);
          }
          weightedSmoothL1Builder_.setMessage(value);
        }
        localizationLossCase_ = 2;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
       */
      public Builder clearWeightedSmoothL1() {
        if (weightedSmoothL1Builder_ == null) {
          if (localizationLossCase_ == 2) {
            localizationLossCase_ = 0;
            localizationLoss_ = null;
            onChanged();
          }
        } else {
          if (localizationLossCase_ == 2) {
            localizationLossCase_ = 0;
            localizationLoss_ = null;
          }
          weightedSmoothL1Builder_.clear();
        }
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
       */
      public object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.Builder getWeightedSmoothL1Builder() {
        return getWeightedSmoothL1FieldBuilder().getBuilder();
      }
      /**
       * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedSmoothL1LocalizationLossOrBuilder getWeightedSmoothL1OrBuilder() {
        if ((localizationLossCase_ == 2) && (weightedSmoothL1Builder_ != null)) {
          return weightedSmoothL1Builder_.getMessageOrBuilder();
        } else {
          if (localizationLossCase_ == 2) {
            return (object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) localizationLoss_;
          }
          return object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss, object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.Builder, object_detection.protos.Losses.WeightedSmoothL1LocalizationLossOrBuilder>
          getWeightedSmoothL1FieldBuilder() {
        if (weightedSmoothL1Builder_ == null) {
          if (!(localizationLossCase_ == 2)) {
            localizationLoss_ = object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.getDefaultInstance();
          }
          weightedSmoothL1Builder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss, object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.Builder, object_detection.protos.Losses.WeightedSmoothL1LocalizationLossOrBuilder>(
                  (object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) localizationLoss_,
                  getParentForChildren(),
                  isClean());
          localizationLoss_ = null;
        }
        localizationLossCase_ = 2;
        onChanged();;
        return weightedSmoothL1Builder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedIOULocalizationLoss, object_detection.protos.Losses.WeightedIOULocalizationLoss.Builder, object_detection.protos.Losses.WeightedIOULocalizationLossOrBuilder> weightedIouBuilder_;
      /**
       * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
       * @return Whether the weightedIou field is set.
       */
      @java.lang.Override
      public boolean hasWeightedIou() {
        return localizationLossCase_ == 3;
      }
      /**
       * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
       * @return The weightedIou.
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedIOULocalizationLoss getWeightedIou() {
        if (weightedIouBuilder_ == null) {
          if (localizationLossCase_ == 3) {
            return (object_detection.protos.Losses.WeightedIOULocalizationLoss) localizationLoss_;
          }
          return object_detection.protos.Losses.WeightedIOULocalizationLoss.getDefaultInstance();
        } else {
          if (localizationLossCase_ == 3) {
            return weightedIouBuilder_.getMessage();
          }
          return object_detection.protos.Losses.WeightedIOULocalizationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
       */
      public Builder setWeightedIou(object_detection.protos.Losses.WeightedIOULocalizationLoss value) {
        if (weightedIouBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          localizationLoss_ = value;
          onChanged();
        } else {
          weightedIouBuilder_.setMessage(value);
        }
        localizationLossCase_ = 3;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
       */
      public Builder setWeightedIou(
          object_detection.protos.Losses.WeightedIOULocalizationLoss.Builder builderForValue) {
        if (weightedIouBuilder_ == null) {
          localizationLoss_ = builderForValue.build();
          onChanged();
        } else {
          weightedIouBuilder_.setMessage(builderForValue.build());
        }
        localizationLossCase_ = 3;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
       */
      public Builder mergeWeightedIou(object_detection.protos.Losses.WeightedIOULocalizationLoss value) {
        if (weightedIouBuilder_ == null) {
          if (localizationLossCase_ == 3 &&
              localizationLoss_ != object_detection.protos.Losses.WeightedIOULocalizationLoss.getDefaultInstance()) {
            localizationLoss_ = object_detection.protos.Losses.WeightedIOULocalizationLoss.newBuilder((object_detection.protos.Losses.WeightedIOULocalizationLoss) localizationLoss_)
                .mergeFrom(value).buildPartial();
          } else {
            localizationLoss_ = value;
          }
          onChanged();
        } else {
          if (localizationLossCase_ == 3) {
            weightedIouBuilder_.mergeFrom(value);
          }
          weightedIouBuilder_.setMessage(value);
        }
        localizationLossCase_ = 3;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
       */
      public Builder clearWeightedIou() {
        if (weightedIouBuilder_ == null) {
          if (localizationLossCase_ == 3) {
            localizationLossCase_ = 0;
            localizationLoss_ = null;
            onChanged();
          }
        } else {
          if (localizationLossCase_ == 3) {
            localizationLossCase_ = 0;
            localizationLoss_ = null;
          }
          weightedIouBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
       */
      public object_detection.protos.Losses.WeightedIOULocalizationLoss.Builder getWeightedIouBuilder() {
        return getWeightedIouFieldBuilder().getBuilder();
      }
      /**
       * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedIOULocalizationLossOrBuilder getWeightedIouOrBuilder() {
        if ((localizationLossCase_ == 3) && (weightedIouBuilder_ != null)) {
          return weightedIouBuilder_.getMessageOrBuilder();
        } else {
          if (localizationLossCase_ == 3) {
            return (object_detection.protos.Losses.WeightedIOULocalizationLoss) localizationLoss_;
          }
          return object_detection.protos.Losses.WeightedIOULocalizationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedIOULocalizationLoss, object_detection.protos.Losses.WeightedIOULocalizationLoss.Builder, object_detection.protos.Losses.WeightedIOULocalizationLossOrBuilder>
          getWeightedIouFieldBuilder() {
        if (weightedIouBuilder_ == null) {
          if (!(localizationLossCase_ == 3)) {
            localizationLoss_ = object_detection.protos.Losses.WeightedIOULocalizationLoss.getDefaultInstance();
          }
          weightedIouBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.WeightedIOULocalizationLoss, object_detection.protos.Losses.WeightedIOULocalizationLoss.Builder, object_detection.protos.Losses.WeightedIOULocalizationLossOrBuilder>(
                  (object_detection.protos.Losses.WeightedIOULocalizationLoss) localizationLoss_,
                  getParentForChildren(),
                  isClean());
          localizationLoss_ = null;
        }
        localizationLossCase_ = 3;
        onChanged();;
        return weightedIouBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.L1LocalizationLoss, object_detection.protos.Losses.L1LocalizationLoss.Builder, object_detection.protos.Losses.L1LocalizationLossOrBuilder> l1LocalizationLossBuilder_;
      /**
       * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
       * @return Whether the l1LocalizationLoss field is set.
       */
      @java.lang.Override
      public boolean hasL1LocalizationLoss() {
        return localizationLossCase_ == 4;
      }
      /**
       * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
       * @return The l1LocalizationLoss.
       */
      @java.lang.Override
      public object_detection.protos.Losses.L1LocalizationLoss getL1LocalizationLoss() {
        if (l1LocalizationLossBuilder_ == null) {
          if (localizationLossCase_ == 4) {
            return (object_detection.protos.Losses.L1LocalizationLoss) localizationLoss_;
          }
          return object_detection.protos.Losses.L1LocalizationLoss.getDefaultInstance();
        } else {
          if (localizationLossCase_ == 4) {
            return l1LocalizationLossBuilder_.getMessage();
          }
          return object_detection.protos.Losses.L1LocalizationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
       */
      public Builder setL1LocalizationLoss(object_detection.protos.Losses.L1LocalizationLoss value) {
        if (l1LocalizationLossBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          localizationLoss_ = value;
          onChanged();
        } else {
          l1LocalizationLossBuilder_.setMessage(value);
        }
        localizationLossCase_ = 4;
        return this;
      }
      /**
       * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
       */
      public Builder setL1LocalizationLoss(
          object_detection.protos.Losses.L1LocalizationLoss.Builder builderForValue) {
        if (l1LocalizationLossBuilder_ == null) {
          localizationLoss_ = builderForValue.build();
          onChanged();
        } else {
          l1LocalizationLossBuilder_.setMessage(builderForValue.build());
        }
        localizationLossCase_ = 4;
        return this;
      }
      /**
       * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
       */
      public Builder mergeL1LocalizationLoss(object_detection.protos.Losses.L1LocalizationLoss value) {
        if (l1LocalizationLossBuilder_ == null) {
          if (localizationLossCase_ == 4 &&
              localizationLoss_ != object_detection.protos.Losses.L1LocalizationLoss.getDefaultInstance()) {
            localizationLoss_ = object_detection.protos.Losses.L1LocalizationLoss.newBuilder((object_detection.protos.Losses.L1LocalizationLoss) localizationLoss_)
                .mergeFrom(value).buildPartial();
          } else {
            localizationLoss_ = value;
          }
          onChanged();
        } else {
          if (localizationLossCase_ == 4) {
            l1LocalizationLossBuilder_.mergeFrom(value);
          }
          l1LocalizationLossBuilder_.setMessage(value);
        }
        localizationLossCase_ = 4;
        return this;
      }
      /**
       * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
       */
      public Builder clearL1LocalizationLoss() {
        if (l1LocalizationLossBuilder_ == null) {
          if (localizationLossCase_ == 4) {
            localizationLossCase_ = 0;
            localizationLoss_ = null;
            onChanged();
          }
        } else {
          if (localizationLossCase_ == 4) {
            localizationLossCase_ = 0;
            localizationLoss_ = null;
          }
          l1LocalizationLossBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
       */
      public object_detection.protos.Losses.L1LocalizationLoss.Builder getL1LocalizationLossBuilder() {
        return getL1LocalizationLossFieldBuilder().getBuilder();
      }
      /**
       * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
       */
      @java.lang.Override
      public object_detection.protos.Losses.L1LocalizationLossOrBuilder getL1LocalizationLossOrBuilder() {
        if ((localizationLossCase_ == 4) && (l1LocalizationLossBuilder_ != null)) {
          return l1LocalizationLossBuilder_.getMessageOrBuilder();
        } else {
          if (localizationLossCase_ == 4) {
            return (object_detection.protos.Losses.L1LocalizationLoss) localizationLoss_;
          }
          return object_detection.protos.Losses.L1LocalizationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.L1LocalizationLoss l1_localization_loss = 4;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.L1LocalizationLoss, object_detection.protos.Losses.L1LocalizationLoss.Builder, object_detection.protos.Losses.L1LocalizationLossOrBuilder>
          getL1LocalizationLossFieldBuilder() {
        if (l1LocalizationLossBuilder_ == null) {
          if (!(localizationLossCase_ == 4)) {
            localizationLoss_ = object_detection.protos.Losses.L1LocalizationLoss.getDefaultInstance();
          }
          l1LocalizationLossBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.L1LocalizationLoss, object_detection.protos.Losses.L1LocalizationLoss.Builder, object_detection.protos.Losses.L1LocalizationLossOrBuilder>(
                  (object_detection.protos.Losses.L1LocalizationLoss) localizationLoss_,
                  getParentForChildren(),
                  isClean());
          localizationLoss_ = null;
        }
        localizationLossCase_ = 4;
        onChanged();;
        return l1LocalizationLossBuilder_;
      }
      @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:object_detection.protos.LocalizationLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.LocalizationLoss)
    private static final object_detection.protos.Losses.LocalizationLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.LocalizationLoss();
    }

    public static object_detection.protos.Losses.LocalizationLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<LocalizationLoss>
        PARSER = new com.google.protobuf.AbstractParser<LocalizationLoss>() {
      @java.lang.Override
      public LocalizationLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new LocalizationLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<LocalizationLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<LocalizationLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.LocalizationLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface WeightedL2LocalizationLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.WeightedL2LocalizationLoss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    boolean hasAnchorwiseOutput();
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    boolean getAnchorwiseOutput();
  }
  /**
   * <pre>
   * L2 location loss: 0.5 * ||weight * (a - b)|| ^ 2
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.WeightedL2LocalizationLoss}
   */
  public static final class WeightedL2LocalizationLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.WeightedL2LocalizationLoss)
      WeightedL2LocalizationLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use WeightedL2LocalizationLoss.newBuilder() to construct.
    private WeightedL2LocalizationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private WeightedL2LocalizationLoss() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new WeightedL2LocalizationLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private WeightedL2LocalizationLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              bitField0_ |= 0x00000001;
              anchorwiseOutput_ = input.readBool();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedL2LocalizationLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedL2LocalizationLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.WeightedL2LocalizationLoss.class, object_detection.protos.Losses.WeightedL2LocalizationLoss.Builder.class);
    }

    private int bitField0_;
    public static final int ANCHORWISE_OUTPUT_FIELD_NUMBER = 1;
    private boolean anchorwiseOutput_;
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    @java.lang.Override
    public boolean hasAnchorwiseOutput() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    @java.lang.Override
    public boolean getAnchorwiseOutput() {
      return anchorwiseOutput_;
    }

    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.writeBool(1, anchorwiseOutput_);
      }
      unknownFields.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
          .computeBoolSize(1, anchorwiseOutput_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.WeightedL2LocalizationLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.WeightedL2LocalizationLoss other = (object_detection.protos.Losses.WeightedL2LocalizationLoss) obj;

      if (hasAnchorwiseOutput() != other.hasAnchorwiseOutput()) return false;
      if (hasAnchorwiseOutput()) {
        if (getAnchorwiseOutput()
            != other.getAnchorwiseOutput()) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasAnchorwiseOutput()) {
        hash = (37 * hash) + ANCHORWISE_OUTPUT_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getAnchorwiseOutput());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.WeightedL2LocalizationLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedL2LocalizationLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedL2LocalizationLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedL2LocalizationLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedL2LocalizationLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedL2LocalizationLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedL2LocalizationLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedL2LocalizationLoss 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 object_detection.protos.Losses.WeightedL2LocalizationLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedL2LocalizationLoss 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 object_detection.protos.Losses.WeightedL2LocalizationLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedL2LocalizationLoss 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(object_detection.protos.Losses.WeightedL2LocalizationLoss 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;
    }
    /**
     * <pre>
     * L2 location loss: 0.5 * ||weight * (a - b)|| ^ 2
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.WeightedL2LocalizationLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.WeightedL2LocalizationLoss)
        object_detection.protos.Losses.WeightedL2LocalizationLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedL2LocalizationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedL2LocalizationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.WeightedL2LocalizationLoss.class, object_detection.protos.Losses.WeightedL2LocalizationLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.WeightedL2LocalizationLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        anchorwiseOutput_ = false;
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedL2LocalizationLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedL2LocalizationLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.WeightedL2LocalizationLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedL2LocalizationLoss build() {
        object_detection.protos.Losses.WeightedL2LocalizationLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedL2LocalizationLoss buildPartial() {
        object_detection.protos.Losses.WeightedL2LocalizationLoss result = new object_detection.protos.Losses.WeightedL2LocalizationLoss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.anchorwiseOutput_ = anchorwiseOutput_;
          to_bitField0_ |= 0x00000001;
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.WeightedL2LocalizationLoss) {
          return mergeFrom((object_detection.protos.Losses.WeightedL2LocalizationLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.WeightedL2LocalizationLoss other) {
        if (other == object_detection.protos.Losses.WeightedL2LocalizationLoss.getDefaultInstance()) return this;
        if (other.hasAnchorwiseOutput()) {
          setAnchorwiseOutput(other.getAnchorwiseOutput());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.WeightedL2LocalizationLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.WeightedL2LocalizationLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private boolean anchorwiseOutput_ ;
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return Whether the anchorwiseOutput field is set.
       */
      @java.lang.Override
      public boolean hasAnchorwiseOutput() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return The anchorwiseOutput.
       */
      @java.lang.Override
      public boolean getAnchorwiseOutput() {
        return anchorwiseOutput_;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @param value The anchorwiseOutput to set.
       * @return This builder for chaining.
       */
      public Builder setAnchorwiseOutput(boolean value) {
        bitField0_ |= 0x00000001;
        anchorwiseOutput_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return This builder for chaining.
       */
      public Builder clearAnchorwiseOutput() {
        bitField0_ = (bitField0_ & ~0x00000001);
        anchorwiseOutput_ = false;
        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:object_detection.protos.WeightedL2LocalizationLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.WeightedL2LocalizationLoss)
    private static final object_detection.protos.Losses.WeightedL2LocalizationLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.WeightedL2LocalizationLoss();
    }

    public static object_detection.protos.Losses.WeightedL2LocalizationLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<WeightedL2LocalizationLoss>
        PARSER = new com.google.protobuf.AbstractParser<WeightedL2LocalizationLoss>() {
      @java.lang.Override
      public WeightedL2LocalizationLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new WeightedL2LocalizationLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<WeightedL2LocalizationLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<WeightedL2LocalizationLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.WeightedL2LocalizationLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface WeightedSmoothL1LocalizationLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.WeightedSmoothL1LocalizationLoss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    boolean hasAnchorwiseOutput();
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    boolean getAnchorwiseOutput();

    /**
     * <pre>
     * Delta value for huber loss.
     * </pre>
     *
     * <code>optional float delta = 2 [default = 1];</code>
     * @return Whether the delta field is set.
     */
    boolean hasDelta();
    /**
     * <pre>
     * Delta value for huber loss.
     * </pre>
     *
     * <code>optional float delta = 2 [default = 1];</code>
     * @return The delta.
     */
    float getDelta();
  }
  /**
   * <pre>
   * SmoothL1 (Huber) location loss.
   * The smooth L1_loss is defined elementwise as .5 x^2 if |x| &lt;= delta and
   * delta * (|x|-0.5*delta) otherwise, where x is the difference between
   * predictions and target.
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.WeightedSmoothL1LocalizationLoss}
   */
  public static final class WeightedSmoothL1LocalizationLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.WeightedSmoothL1LocalizationLoss)
      WeightedSmoothL1LocalizationLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use WeightedSmoothL1LocalizationLoss.newBuilder() to construct.
    private WeightedSmoothL1LocalizationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private WeightedSmoothL1LocalizationLoss() {
      delta_ = 1F;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new WeightedSmoothL1LocalizationLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private WeightedSmoothL1LocalizationLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              bitField0_ |= 0x00000001;
              anchorwiseOutput_ = input.readBool();
              break;
            }
            case 21: {
              bitField0_ |= 0x00000002;
              delta_ = input.readFloat();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSmoothL1LocalizationLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSmoothL1LocalizationLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.class, object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.Builder.class);
    }

    private int bitField0_;
    public static final int ANCHORWISE_OUTPUT_FIELD_NUMBER = 1;
    private boolean anchorwiseOutput_;
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    @java.lang.Override
    public boolean hasAnchorwiseOutput() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    @java.lang.Override
    public boolean getAnchorwiseOutput() {
      return anchorwiseOutput_;
    }

    public static final int DELTA_FIELD_NUMBER = 2;
    private float delta_;
    /**
     * <pre>
     * Delta value for huber loss.
     * </pre>
     *
     * <code>optional float delta = 2 [default = 1];</code>
     * @return Whether the delta field is set.
     */
    @java.lang.Override
    public boolean hasDelta() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * Delta value for huber loss.
     * </pre>
     *
     * <code>optional float delta = 2 [default = 1];</code>
     * @return The delta.
     */
    @java.lang.Override
    public float getDelta() {
      return delta_;
    }

    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.writeBool(1, anchorwiseOutput_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeFloat(2, delta_);
      }
      unknownFields.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
          .computeBoolSize(1, anchorwiseOutput_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(2, delta_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss other = (object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) obj;

      if (hasAnchorwiseOutput() != other.hasAnchorwiseOutput()) return false;
      if (hasAnchorwiseOutput()) {
        if (getAnchorwiseOutput()
            != other.getAnchorwiseOutput()) return false;
      }
      if (hasDelta() != other.hasDelta()) return false;
      if (hasDelta()) {
        if (java.lang.Float.floatToIntBits(getDelta())
            != java.lang.Float.floatToIntBits(
                other.getDelta())) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasAnchorwiseOutput()) {
        hash = (37 * hash) + ANCHORWISE_OUTPUT_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getAnchorwiseOutput());
      }
      if (hasDelta()) {
        hash = (37 * hash) + DELTA_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getDelta());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss 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 object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss 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 object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss 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(object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss 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;
    }
    /**
     * <pre>
     * SmoothL1 (Huber) location loss.
     * The smooth L1_loss is defined elementwise as .5 x^2 if |x| &lt;= delta and
     * delta * (|x|-0.5*delta) otherwise, where x is the difference between
     * predictions and target.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.WeightedSmoothL1LocalizationLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.WeightedSmoothL1LocalizationLoss)
        object_detection.protos.Losses.WeightedSmoothL1LocalizationLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSmoothL1LocalizationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSmoothL1LocalizationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.class, object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        anchorwiseOutput_ = false;
        bitField0_ = (bitField0_ & ~0x00000001);
        delta_ = 1F;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSmoothL1LocalizationLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss build() {
        object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss buildPartial() {
        object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss result = new object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.anchorwiseOutput_ = anchorwiseOutput_;
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          to_bitField0_ |= 0x00000002;
        }
        result.delta_ = delta_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) {
          return mergeFrom((object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss other) {
        if (other == object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss.getDefaultInstance()) return this;
        if (other.hasAnchorwiseOutput()) {
          setAnchorwiseOutput(other.getAnchorwiseOutput());
        }
        if (other.hasDelta()) {
          setDelta(other.getDelta());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private boolean anchorwiseOutput_ ;
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return Whether the anchorwiseOutput field is set.
       */
      @java.lang.Override
      public boolean hasAnchorwiseOutput() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return The anchorwiseOutput.
       */
      @java.lang.Override
      public boolean getAnchorwiseOutput() {
        return anchorwiseOutput_;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @param value The anchorwiseOutput to set.
       * @return This builder for chaining.
       */
      public Builder setAnchorwiseOutput(boolean value) {
        bitField0_ |= 0x00000001;
        anchorwiseOutput_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return This builder for chaining.
       */
      public Builder clearAnchorwiseOutput() {
        bitField0_ = (bitField0_ & ~0x00000001);
        anchorwiseOutput_ = false;
        onChanged();
        return this;
      }

      private float delta_ = 1F;
      /**
       * <pre>
       * Delta value for huber loss.
       * </pre>
       *
       * <code>optional float delta = 2 [default = 1];</code>
       * @return Whether the delta field is set.
       */
      @java.lang.Override
      public boolean hasDelta() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <pre>
       * Delta value for huber loss.
       * </pre>
       *
       * <code>optional float delta = 2 [default = 1];</code>
       * @return The delta.
       */
      @java.lang.Override
      public float getDelta() {
        return delta_;
      }
      /**
       * <pre>
       * Delta value for huber loss.
       * </pre>
       *
       * <code>optional float delta = 2 [default = 1];</code>
       * @param value The delta to set.
       * @return This builder for chaining.
       */
      public Builder setDelta(float value) {
        bitField0_ |= 0x00000002;
        delta_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Delta value for huber loss.
       * </pre>
       *
       * <code>optional float delta = 2 [default = 1];</code>
       * @return This builder for chaining.
       */
      public Builder clearDelta() {
        bitField0_ = (bitField0_ & ~0x00000002);
        delta_ = 1F;
        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:object_detection.protos.WeightedSmoothL1LocalizationLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.WeightedSmoothL1LocalizationLoss)
    private static final object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss();
    }

    public static object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<WeightedSmoothL1LocalizationLoss>
        PARSER = new com.google.protobuf.AbstractParser<WeightedSmoothL1LocalizationLoss>() {
      @java.lang.Override
      public WeightedSmoothL1LocalizationLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new WeightedSmoothL1LocalizationLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<WeightedSmoothL1LocalizationLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<WeightedSmoothL1LocalizationLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.WeightedSmoothL1LocalizationLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface WeightedIOULocalizationLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.WeightedIOULocalizationLoss)
      com.google.protobuf.MessageOrBuilder {
  }
  /**
   * <pre>
   * Intersection over union location loss: 1 - IOU
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.WeightedIOULocalizationLoss}
   */
  public static final class WeightedIOULocalizationLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.WeightedIOULocalizationLoss)
      WeightedIOULocalizationLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use WeightedIOULocalizationLoss.newBuilder() to construct.
    private WeightedIOULocalizationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private WeightedIOULocalizationLoss() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new WeightedIOULocalizationLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private WeightedIOULocalizationLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedIOULocalizationLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedIOULocalizationLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.WeightedIOULocalizationLoss.class, object_detection.protos.Losses.WeightedIOULocalizationLoss.Builder.class);
    }

    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 {
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.WeightedIOULocalizationLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.WeightedIOULocalizationLoss other = (object_detection.protos.Losses.WeightedIOULocalizationLoss) obj;

      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.WeightedIOULocalizationLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedIOULocalizationLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedIOULocalizationLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedIOULocalizationLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedIOULocalizationLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedIOULocalizationLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedIOULocalizationLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedIOULocalizationLoss 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 object_detection.protos.Losses.WeightedIOULocalizationLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedIOULocalizationLoss 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 object_detection.protos.Losses.WeightedIOULocalizationLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedIOULocalizationLoss 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(object_detection.protos.Losses.WeightedIOULocalizationLoss 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;
    }
    /**
     * <pre>
     * Intersection over union location loss: 1 - IOU
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.WeightedIOULocalizationLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.WeightedIOULocalizationLoss)
        object_detection.protos.Losses.WeightedIOULocalizationLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedIOULocalizationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedIOULocalizationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.WeightedIOULocalizationLoss.class, object_detection.protos.Losses.WeightedIOULocalizationLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.WeightedIOULocalizationLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedIOULocalizationLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedIOULocalizationLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.WeightedIOULocalizationLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedIOULocalizationLoss build() {
        object_detection.protos.Losses.WeightedIOULocalizationLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedIOULocalizationLoss buildPartial() {
        object_detection.protos.Losses.WeightedIOULocalizationLoss result = new object_detection.protos.Losses.WeightedIOULocalizationLoss(this);
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.WeightedIOULocalizationLoss) {
          return mergeFrom((object_detection.protos.Losses.WeightedIOULocalizationLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.WeightedIOULocalizationLoss other) {
        if (other == object_detection.protos.Losses.WeightedIOULocalizationLoss.getDefaultInstance()) return this;
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.WeightedIOULocalizationLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.WeightedIOULocalizationLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        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:object_detection.protos.WeightedIOULocalizationLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.WeightedIOULocalizationLoss)
    private static final object_detection.protos.Losses.WeightedIOULocalizationLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.WeightedIOULocalizationLoss();
    }

    public static object_detection.protos.Losses.WeightedIOULocalizationLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<WeightedIOULocalizationLoss>
        PARSER = new com.google.protobuf.AbstractParser<WeightedIOULocalizationLoss>() {
      @java.lang.Override
      public WeightedIOULocalizationLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new WeightedIOULocalizationLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<WeightedIOULocalizationLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<WeightedIOULocalizationLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.WeightedIOULocalizationLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface L1LocalizationLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.L1LocalizationLoss)
      com.google.protobuf.MessageOrBuilder {
  }
  /**
   * <pre>
   * L1 Localization Loss.
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.L1LocalizationLoss}
   */
  public static final class L1LocalizationLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.L1LocalizationLoss)
      L1LocalizationLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use L1LocalizationLoss.newBuilder() to construct.
    private L1LocalizationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private L1LocalizationLoss() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new L1LocalizationLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private L1LocalizationLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_L1LocalizationLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_L1LocalizationLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.L1LocalizationLoss.class, object_detection.protos.Losses.L1LocalizationLoss.Builder.class);
    }

    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 {
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.L1LocalizationLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.L1LocalizationLoss other = (object_detection.protos.Losses.L1LocalizationLoss) obj;

      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.L1LocalizationLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.L1LocalizationLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.L1LocalizationLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.L1LocalizationLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.L1LocalizationLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.L1LocalizationLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.L1LocalizationLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.L1LocalizationLoss 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 object_detection.protos.Losses.L1LocalizationLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.L1LocalizationLoss 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 object_detection.protos.Losses.L1LocalizationLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.L1LocalizationLoss 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(object_detection.protos.Losses.L1LocalizationLoss 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;
    }
    /**
     * <pre>
     * L1 Localization Loss.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.L1LocalizationLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.L1LocalizationLoss)
        object_detection.protos.Losses.L1LocalizationLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_L1LocalizationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_L1LocalizationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.L1LocalizationLoss.class, object_detection.protos.Losses.L1LocalizationLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.L1LocalizationLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_L1LocalizationLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.L1LocalizationLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.L1LocalizationLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.L1LocalizationLoss build() {
        object_detection.protos.Losses.L1LocalizationLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.L1LocalizationLoss buildPartial() {
        object_detection.protos.Losses.L1LocalizationLoss result = new object_detection.protos.Losses.L1LocalizationLoss(this);
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.L1LocalizationLoss) {
          return mergeFrom((object_detection.protos.Losses.L1LocalizationLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.L1LocalizationLoss other) {
        if (other == object_detection.protos.Losses.L1LocalizationLoss.getDefaultInstance()) return this;
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.L1LocalizationLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.L1LocalizationLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        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:object_detection.protos.L1LocalizationLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.L1LocalizationLoss)
    private static final object_detection.protos.Losses.L1LocalizationLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.L1LocalizationLoss();
    }

    public static object_detection.protos.Losses.L1LocalizationLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<L1LocalizationLoss>
        PARSER = new com.google.protobuf.AbstractParser<L1LocalizationLoss>() {
      @java.lang.Override
      public L1LocalizationLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new L1LocalizationLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<L1LocalizationLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<L1LocalizationLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.L1LocalizationLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface ClassificationLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.ClassificationLoss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
     * @return Whether the weightedSigmoid field is set.
     */
    boolean hasWeightedSigmoid();
    /**
     * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
     * @return The weightedSigmoid.
     */
    object_detection.protos.Losses.WeightedSigmoidClassificationLoss getWeightedSigmoid();
    /**
     * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
     */
    object_detection.protos.Losses.WeightedSigmoidClassificationLossOrBuilder getWeightedSigmoidOrBuilder();

    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
     * @return Whether the weightedSoftmax field is set.
     */
    boolean hasWeightedSoftmax();
    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
     * @return The weightedSoftmax.
     */
    object_detection.protos.Losses.WeightedSoftmaxClassificationLoss getWeightedSoftmax();
    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
     */
    object_detection.protos.Losses.WeightedSoftmaxClassificationLossOrBuilder getWeightedSoftmaxOrBuilder();

    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
     * @return Whether the weightedLogitsSoftmax field is set.
     */
    boolean hasWeightedLogitsSoftmax();
    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
     * @return The weightedLogitsSoftmax.
     */
    object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss getWeightedLogitsSoftmax();
    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
     */
    object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLossOrBuilder getWeightedLogitsSoftmaxOrBuilder();

    /**
     * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
     * @return Whether the bootstrappedSigmoid field is set.
     */
    boolean hasBootstrappedSigmoid();
    /**
     * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
     * @return The bootstrappedSigmoid.
     */
    object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss getBootstrappedSigmoid();
    /**
     * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
     */
    object_detection.protos.Losses.BootstrappedSigmoidClassificationLossOrBuilder getBootstrappedSigmoidOrBuilder();

    /**
     * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
     * @return Whether the weightedSigmoidFocal field is set.
     */
    boolean hasWeightedSigmoidFocal();
    /**
     * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
     * @return The weightedSigmoidFocal.
     */
    object_detection.protos.Losses.SigmoidFocalClassificationLoss getWeightedSigmoidFocal();
    /**
     * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
     */
    object_detection.protos.Losses.SigmoidFocalClassificationLossOrBuilder getWeightedSigmoidFocalOrBuilder();

    /**
     * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
     * @return Whether the penaltyReducedLogisticFocalLoss field is set.
     */
    boolean hasPenaltyReducedLogisticFocalLoss();
    /**
     * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
     * @return The penaltyReducedLogisticFocalLoss.
     */
    object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss getPenaltyReducedLogisticFocalLoss();
    /**
     * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
     */
    object_detection.protos.Losses.PenaltyReducedLogisticFocalLossOrBuilder getPenaltyReducedLogisticFocalLossOrBuilder();

    public object_detection.protos.Losses.ClassificationLoss.ClassificationLossCase getClassificationLossCase();
  }
  /**
   * <pre>
   * Configuration for class prediction loss function.
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.ClassificationLoss}
   */
  public static final class ClassificationLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.ClassificationLoss)
      ClassificationLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use ClassificationLoss.newBuilder() to construct.
    private ClassificationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ClassificationLoss() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new ClassificationLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private ClassificationLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              object_detection.protos.Losses.WeightedSigmoidClassificationLoss.Builder subBuilder = null;
              if (classificationLossCase_ == 1) {
                subBuilder = ((object_detection.protos.Losses.WeightedSigmoidClassificationLoss) classificationLoss_).toBuilder();
              }
              classificationLoss_ =
                  input.readMessage(object_detection.protos.Losses.WeightedSigmoidClassificationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((object_detection.protos.Losses.WeightedSigmoidClassificationLoss) classificationLoss_);
                classificationLoss_ = subBuilder.buildPartial();
              }
              classificationLossCase_ = 1;
              break;
            }
            case 18: {
              object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.Builder subBuilder = null;
              if (classificationLossCase_ == 2) {
                subBuilder = ((object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) classificationLoss_).toBuilder();
              }
              classificationLoss_ =
                  input.readMessage(object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) classificationLoss_);
                classificationLoss_ = subBuilder.buildPartial();
              }
              classificationLossCase_ = 2;
              break;
            }
            case 26: {
              object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.Builder subBuilder = null;
              if (classificationLossCase_ == 3) {
                subBuilder = ((object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) classificationLoss_).toBuilder();
              }
              classificationLoss_ =
                  input.readMessage(object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) classificationLoss_);
                classificationLoss_ = subBuilder.buildPartial();
              }
              classificationLossCase_ = 3;
              break;
            }
            case 34: {
              object_detection.protos.Losses.SigmoidFocalClassificationLoss.Builder subBuilder = null;
              if (classificationLossCase_ == 4) {
                subBuilder = ((object_detection.protos.Losses.SigmoidFocalClassificationLoss) classificationLoss_).toBuilder();
              }
              classificationLoss_ =
                  input.readMessage(object_detection.protos.Losses.SigmoidFocalClassificationLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((object_detection.protos.Losses.SigmoidFocalClassificationLoss) classificationLoss_);
                classificationLoss_ = subBuilder.buildPartial();
              }
              classificationLossCase_ = 4;
              break;
            }
            case 42: {
              object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.Builder subBuilder = null;
              if (classificationLossCase_ == 5) {
                subBuilder = ((object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_).toBuilder();
              }
              classificationLoss_ =
                  input.readMessage(object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_);
                classificationLoss_ = subBuilder.buildPartial();
              }
              classificationLossCase_ = 5;
              break;
            }
            case 50: {
              object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.Builder subBuilder = null;
              if (classificationLossCase_ == 6) {
                subBuilder = ((object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) classificationLoss_).toBuilder();
              }
              classificationLoss_ =
                  input.readMessage(object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.PARSER, extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom((object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) classificationLoss_);
                classificationLoss_ = subBuilder.buildPartial();
              }
              classificationLossCase_ = 6;
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_ClassificationLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_ClassificationLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.ClassificationLoss.class, object_detection.protos.Losses.ClassificationLoss.Builder.class);
    }

    private int bitField0_;
    private int classificationLossCase_ = 0;
    private java.lang.Object classificationLoss_;
    public enum ClassificationLossCase
        implements com.google.protobuf.Internal.EnumLite,
            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
      WEIGHTED_SIGMOID(1),
      WEIGHTED_SOFTMAX(2),
      WEIGHTED_LOGITS_SOFTMAX(5),
      BOOTSTRAPPED_SIGMOID(3),
      WEIGHTED_SIGMOID_FOCAL(4),
      PENALTY_REDUCED_LOGISTIC_FOCAL_LOSS(6),
      CLASSIFICATIONLOSS_NOT_SET(0);
      private final int value;
      private ClassificationLossCase(int value) {
        this.value = value;
      }
      /**
       * @param value The number of the enum to look for.
       * @return The enum associated with the given number.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static ClassificationLossCase valueOf(int value) {
        return forNumber(value);
      }

      public static ClassificationLossCase forNumber(int value) {
        switch (value) {
          case 1: return WEIGHTED_SIGMOID;
          case 2: return WEIGHTED_SOFTMAX;
          case 5: return WEIGHTED_LOGITS_SOFTMAX;
          case 3: return BOOTSTRAPPED_SIGMOID;
          case 4: return WEIGHTED_SIGMOID_FOCAL;
          case 6: return PENALTY_REDUCED_LOGISTIC_FOCAL_LOSS;
          case 0: return CLASSIFICATIONLOSS_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public ClassificationLossCase
    getClassificationLossCase() {
      return ClassificationLossCase.forNumber(
          classificationLossCase_);
    }

    public static final int WEIGHTED_SIGMOID_FIELD_NUMBER = 1;
    /**
     * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
     * @return Whether the weightedSigmoid field is set.
     */
    @java.lang.Override
    public boolean hasWeightedSigmoid() {
      return classificationLossCase_ == 1;
    }
    /**
     * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
     * @return The weightedSigmoid.
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedSigmoidClassificationLoss getWeightedSigmoid() {
      if (classificationLossCase_ == 1) {
         return (object_detection.protos.Losses.WeightedSigmoidClassificationLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.WeightedSigmoidClassificationLoss.getDefaultInstance();
    }
    /**
     * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedSigmoidClassificationLossOrBuilder getWeightedSigmoidOrBuilder() {
      if (classificationLossCase_ == 1) {
         return (object_detection.protos.Losses.WeightedSigmoidClassificationLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.WeightedSigmoidClassificationLoss.getDefaultInstance();
    }

    public static final int WEIGHTED_SOFTMAX_FIELD_NUMBER = 2;
    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
     * @return Whether the weightedSoftmax field is set.
     */
    @java.lang.Override
    public boolean hasWeightedSoftmax() {
      return classificationLossCase_ == 2;
    }
    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
     * @return The weightedSoftmax.
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedSoftmaxClassificationLoss getWeightedSoftmax() {
      if (classificationLossCase_ == 2) {
         return (object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.getDefaultInstance();
    }
    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedSoftmaxClassificationLossOrBuilder getWeightedSoftmaxOrBuilder() {
      if (classificationLossCase_ == 2) {
         return (object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.getDefaultInstance();
    }

    public static final int WEIGHTED_LOGITS_SOFTMAX_FIELD_NUMBER = 5;
    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
     * @return Whether the weightedLogitsSoftmax field is set.
     */
    @java.lang.Override
    public boolean hasWeightedLogitsSoftmax() {
      return classificationLossCase_ == 5;
    }
    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
     * @return The weightedLogitsSoftmax.
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss getWeightedLogitsSoftmax() {
      if (classificationLossCase_ == 5) {
         return (object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.getDefaultInstance();
    }
    /**
     * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLossOrBuilder getWeightedLogitsSoftmaxOrBuilder() {
      if (classificationLossCase_ == 5) {
         return (object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.getDefaultInstance();
    }

    public static final int BOOTSTRAPPED_SIGMOID_FIELD_NUMBER = 3;
    /**
     * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
     * @return Whether the bootstrappedSigmoid field is set.
     */
    @java.lang.Override
    public boolean hasBootstrappedSigmoid() {
      return classificationLossCase_ == 3;
    }
    /**
     * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
     * @return The bootstrappedSigmoid.
     */
    @java.lang.Override
    public object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss getBootstrappedSigmoid() {
      if (classificationLossCase_ == 3) {
         return (object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.getDefaultInstance();
    }
    /**
     * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.BootstrappedSigmoidClassificationLossOrBuilder getBootstrappedSigmoidOrBuilder() {
      if (classificationLossCase_ == 3) {
         return (object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.getDefaultInstance();
    }

    public static final int WEIGHTED_SIGMOID_FOCAL_FIELD_NUMBER = 4;
    /**
     * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
     * @return Whether the weightedSigmoidFocal field is set.
     */
    @java.lang.Override
    public boolean hasWeightedSigmoidFocal() {
      return classificationLossCase_ == 4;
    }
    /**
     * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
     * @return The weightedSigmoidFocal.
     */
    @java.lang.Override
    public object_detection.protos.Losses.SigmoidFocalClassificationLoss getWeightedSigmoidFocal() {
      if (classificationLossCase_ == 4) {
         return (object_detection.protos.Losses.SigmoidFocalClassificationLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.SigmoidFocalClassificationLoss.getDefaultInstance();
    }
    /**
     * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.SigmoidFocalClassificationLossOrBuilder getWeightedSigmoidFocalOrBuilder() {
      if (classificationLossCase_ == 4) {
         return (object_detection.protos.Losses.SigmoidFocalClassificationLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.SigmoidFocalClassificationLoss.getDefaultInstance();
    }

    public static final int PENALTY_REDUCED_LOGISTIC_FOCAL_LOSS_FIELD_NUMBER = 6;
    /**
     * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
     * @return Whether the penaltyReducedLogisticFocalLoss field is set.
     */
    @java.lang.Override
    public boolean hasPenaltyReducedLogisticFocalLoss() {
      return classificationLossCase_ == 6;
    }
    /**
     * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
     * @return The penaltyReducedLogisticFocalLoss.
     */
    @java.lang.Override
    public object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss getPenaltyReducedLogisticFocalLoss() {
      if (classificationLossCase_ == 6) {
         return (object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.getDefaultInstance();
    }
    /**
     * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
     */
    @java.lang.Override
    public object_detection.protos.Losses.PenaltyReducedLogisticFocalLossOrBuilder getPenaltyReducedLogisticFocalLossOrBuilder() {
      if (classificationLossCase_ == 6) {
         return (object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) classificationLoss_;
      }
      return object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.getDefaultInstance();
    }

    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 (classificationLossCase_ == 1) {
        output.writeMessage(1, (object_detection.protos.Losses.WeightedSigmoidClassificationLoss) classificationLoss_);
      }
      if (classificationLossCase_ == 2) {
        output.writeMessage(2, (object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) classificationLoss_);
      }
      if (classificationLossCase_ == 3) {
        output.writeMessage(3, (object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) classificationLoss_);
      }
      if (classificationLossCase_ == 4) {
        output.writeMessage(4, (object_detection.protos.Losses.SigmoidFocalClassificationLoss) classificationLoss_);
      }
      if (classificationLossCase_ == 5) {
        output.writeMessage(5, (object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_);
      }
      if (classificationLossCase_ == 6) {
        output.writeMessage(6, (object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) classificationLoss_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (classificationLossCase_ == 1) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, (object_detection.protos.Losses.WeightedSigmoidClassificationLoss) classificationLoss_);
      }
      if (classificationLossCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, (object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) classificationLoss_);
      }
      if (classificationLossCase_ == 3) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, (object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) classificationLoss_);
      }
      if (classificationLossCase_ == 4) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, (object_detection.protos.Losses.SigmoidFocalClassificationLoss) classificationLoss_);
      }
      if (classificationLossCase_ == 5) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, (object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_);
      }
      if (classificationLossCase_ == 6) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(6, (object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) classificationLoss_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.ClassificationLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.ClassificationLoss other = (object_detection.protos.Losses.ClassificationLoss) obj;

      if (!getClassificationLossCase().equals(other.getClassificationLossCase())) return false;
      switch (classificationLossCase_) {
        case 1:
          if (!getWeightedSigmoid()
              .equals(other.getWeightedSigmoid())) return false;
          break;
        case 2:
          if (!getWeightedSoftmax()
              .equals(other.getWeightedSoftmax())) return false;
          break;
        case 5:
          if (!getWeightedLogitsSoftmax()
              .equals(other.getWeightedLogitsSoftmax())) return false;
          break;
        case 3:
          if (!getBootstrappedSigmoid()
              .equals(other.getBootstrappedSigmoid())) return false;
          break;
        case 4:
          if (!getWeightedSigmoidFocal()
              .equals(other.getWeightedSigmoidFocal())) return false;
          break;
        case 6:
          if (!getPenaltyReducedLogisticFocalLoss()
              .equals(other.getPenaltyReducedLogisticFocalLoss())) return false;
          break;
        case 0:
        default:
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      switch (classificationLossCase_) {
        case 1:
          hash = (37 * hash) + WEIGHTED_SIGMOID_FIELD_NUMBER;
          hash = (53 * hash) + getWeightedSigmoid().hashCode();
          break;
        case 2:
          hash = (37 * hash) + WEIGHTED_SOFTMAX_FIELD_NUMBER;
          hash = (53 * hash) + getWeightedSoftmax().hashCode();
          break;
        case 5:
          hash = (37 * hash) + WEIGHTED_LOGITS_SOFTMAX_FIELD_NUMBER;
          hash = (53 * hash) + getWeightedLogitsSoftmax().hashCode();
          break;
        case 3:
          hash = (37 * hash) + BOOTSTRAPPED_SIGMOID_FIELD_NUMBER;
          hash = (53 * hash) + getBootstrappedSigmoid().hashCode();
          break;
        case 4:
          hash = (37 * hash) + WEIGHTED_SIGMOID_FOCAL_FIELD_NUMBER;
          hash = (53 * hash) + getWeightedSigmoidFocal().hashCode();
          break;
        case 6:
          hash = (37 * hash) + PENALTY_REDUCED_LOGISTIC_FOCAL_LOSS_FIELD_NUMBER;
          hash = (53 * hash) + getPenaltyReducedLogisticFocalLoss().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.ClassificationLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.ClassificationLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.ClassificationLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.ClassificationLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.ClassificationLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.ClassificationLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.ClassificationLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.ClassificationLoss 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 object_detection.protos.Losses.ClassificationLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.ClassificationLoss 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 object_detection.protos.Losses.ClassificationLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.ClassificationLoss 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(object_detection.protos.Losses.ClassificationLoss 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;
    }
    /**
     * <pre>
     * Configuration for class prediction loss function.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.ClassificationLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.ClassificationLoss)
        object_detection.protos.Losses.ClassificationLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_ClassificationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_ClassificationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.ClassificationLoss.class, object_detection.protos.Losses.ClassificationLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.ClassificationLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        classificationLossCase_ = 0;
        classificationLoss_ = null;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_ClassificationLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.ClassificationLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.ClassificationLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.ClassificationLoss build() {
        object_detection.protos.Losses.ClassificationLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.ClassificationLoss buildPartial() {
        object_detection.protos.Losses.ClassificationLoss result = new object_detection.protos.Losses.ClassificationLoss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (classificationLossCase_ == 1) {
          if (weightedSigmoidBuilder_ == null) {
            result.classificationLoss_ = classificationLoss_;
          } else {
            result.classificationLoss_ = weightedSigmoidBuilder_.build();
          }
        }
        if (classificationLossCase_ == 2) {
          if (weightedSoftmaxBuilder_ == null) {
            result.classificationLoss_ = classificationLoss_;
          } else {
            result.classificationLoss_ = weightedSoftmaxBuilder_.build();
          }
        }
        if (classificationLossCase_ == 5) {
          if (weightedLogitsSoftmaxBuilder_ == null) {
            result.classificationLoss_ = classificationLoss_;
          } else {
            result.classificationLoss_ = weightedLogitsSoftmaxBuilder_.build();
          }
        }
        if (classificationLossCase_ == 3) {
          if (bootstrappedSigmoidBuilder_ == null) {
            result.classificationLoss_ = classificationLoss_;
          } else {
            result.classificationLoss_ = bootstrappedSigmoidBuilder_.build();
          }
        }
        if (classificationLossCase_ == 4) {
          if (weightedSigmoidFocalBuilder_ == null) {
            result.classificationLoss_ = classificationLoss_;
          } else {
            result.classificationLoss_ = weightedSigmoidFocalBuilder_.build();
          }
        }
        if (classificationLossCase_ == 6) {
          if (penaltyReducedLogisticFocalLossBuilder_ == null) {
            result.classificationLoss_ = classificationLoss_;
          } else {
            result.classificationLoss_ = penaltyReducedLogisticFocalLossBuilder_.build();
          }
        }
        result.bitField0_ = to_bitField0_;
        result.classificationLossCase_ = classificationLossCase_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.ClassificationLoss) {
          return mergeFrom((object_detection.protos.Losses.ClassificationLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.ClassificationLoss other) {
        if (other == object_detection.protos.Losses.ClassificationLoss.getDefaultInstance()) return this;
        switch (other.getClassificationLossCase()) {
          case WEIGHTED_SIGMOID: {
            mergeWeightedSigmoid(other.getWeightedSigmoid());
            break;
          }
          case WEIGHTED_SOFTMAX: {
            mergeWeightedSoftmax(other.getWeightedSoftmax());
            break;
          }
          case WEIGHTED_LOGITS_SOFTMAX: {
            mergeWeightedLogitsSoftmax(other.getWeightedLogitsSoftmax());
            break;
          }
          case BOOTSTRAPPED_SIGMOID: {
            mergeBootstrappedSigmoid(other.getBootstrappedSigmoid());
            break;
          }
          case WEIGHTED_SIGMOID_FOCAL: {
            mergeWeightedSigmoidFocal(other.getWeightedSigmoidFocal());
            break;
          }
          case PENALTY_REDUCED_LOGISTIC_FOCAL_LOSS: {
            mergePenaltyReducedLogisticFocalLoss(other.getPenaltyReducedLogisticFocalLoss());
            break;
          }
          case CLASSIFICATIONLOSS_NOT_SET: {
            break;
          }
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.ClassificationLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.ClassificationLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int classificationLossCase_ = 0;
      private java.lang.Object classificationLoss_;
      public ClassificationLossCase
          getClassificationLossCase() {
        return ClassificationLossCase.forNumber(
            classificationLossCase_);
      }

      public Builder clearClassificationLoss() {
        classificationLossCase_ = 0;
        classificationLoss_ = null;
        onChanged();
        return this;
      }

      private int bitField0_;

      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedSigmoidClassificationLoss, object_detection.protos.Losses.WeightedSigmoidClassificationLoss.Builder, object_detection.protos.Losses.WeightedSigmoidClassificationLossOrBuilder> weightedSigmoidBuilder_;
      /**
       * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
       * @return Whether the weightedSigmoid field is set.
       */
      @java.lang.Override
      public boolean hasWeightedSigmoid() {
        return classificationLossCase_ == 1;
      }
      /**
       * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
       * @return The weightedSigmoid.
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedSigmoidClassificationLoss getWeightedSigmoid() {
        if (weightedSigmoidBuilder_ == null) {
          if (classificationLossCase_ == 1) {
            return (object_detection.protos.Losses.WeightedSigmoidClassificationLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.WeightedSigmoidClassificationLoss.getDefaultInstance();
        } else {
          if (classificationLossCase_ == 1) {
            return weightedSigmoidBuilder_.getMessage();
          }
          return object_detection.protos.Losses.WeightedSigmoidClassificationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
       */
      public Builder setWeightedSigmoid(object_detection.protos.Losses.WeightedSigmoidClassificationLoss value) {
        if (weightedSigmoidBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          classificationLoss_ = value;
          onChanged();
        } else {
          weightedSigmoidBuilder_.setMessage(value);
        }
        classificationLossCase_ = 1;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
       */
      public Builder setWeightedSigmoid(
          object_detection.protos.Losses.WeightedSigmoidClassificationLoss.Builder builderForValue) {
        if (weightedSigmoidBuilder_ == null) {
          classificationLoss_ = builderForValue.build();
          onChanged();
        } else {
          weightedSigmoidBuilder_.setMessage(builderForValue.build());
        }
        classificationLossCase_ = 1;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
       */
      public Builder mergeWeightedSigmoid(object_detection.protos.Losses.WeightedSigmoidClassificationLoss value) {
        if (weightedSigmoidBuilder_ == null) {
          if (classificationLossCase_ == 1 &&
              classificationLoss_ != object_detection.protos.Losses.WeightedSigmoidClassificationLoss.getDefaultInstance()) {
            classificationLoss_ = object_detection.protos.Losses.WeightedSigmoidClassificationLoss.newBuilder((object_detection.protos.Losses.WeightedSigmoidClassificationLoss) classificationLoss_)
                .mergeFrom(value).buildPartial();
          } else {
            classificationLoss_ = value;
          }
          onChanged();
        } else {
          if (classificationLossCase_ == 1) {
            weightedSigmoidBuilder_.mergeFrom(value);
          }
          weightedSigmoidBuilder_.setMessage(value);
        }
        classificationLossCase_ = 1;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
       */
      public Builder clearWeightedSigmoid() {
        if (weightedSigmoidBuilder_ == null) {
          if (classificationLossCase_ == 1) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
            onChanged();
          }
        } else {
          if (classificationLossCase_ == 1) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
          }
          weightedSigmoidBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
       */
      public object_detection.protos.Losses.WeightedSigmoidClassificationLoss.Builder getWeightedSigmoidBuilder() {
        return getWeightedSigmoidFieldBuilder().getBuilder();
      }
      /**
       * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedSigmoidClassificationLossOrBuilder getWeightedSigmoidOrBuilder() {
        if ((classificationLossCase_ == 1) && (weightedSigmoidBuilder_ != null)) {
          return weightedSigmoidBuilder_.getMessageOrBuilder();
        } else {
          if (classificationLossCase_ == 1) {
            return (object_detection.protos.Losses.WeightedSigmoidClassificationLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.WeightedSigmoidClassificationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedSigmoidClassificationLoss, object_detection.protos.Losses.WeightedSigmoidClassificationLoss.Builder, object_detection.protos.Losses.WeightedSigmoidClassificationLossOrBuilder>
          getWeightedSigmoidFieldBuilder() {
        if (weightedSigmoidBuilder_ == null) {
          if (!(classificationLossCase_ == 1)) {
            classificationLoss_ = object_detection.protos.Losses.WeightedSigmoidClassificationLoss.getDefaultInstance();
          }
          weightedSigmoidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.WeightedSigmoidClassificationLoss, object_detection.protos.Losses.WeightedSigmoidClassificationLoss.Builder, object_detection.protos.Losses.WeightedSigmoidClassificationLossOrBuilder>(
                  (object_detection.protos.Losses.WeightedSigmoidClassificationLoss) classificationLoss_,
                  getParentForChildren(),
                  isClean());
          classificationLoss_ = null;
        }
        classificationLossCase_ = 1;
        onChanged();;
        return weightedSigmoidBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedSoftmaxClassificationLoss, object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.Builder, object_detection.protos.Losses.WeightedSoftmaxClassificationLossOrBuilder> weightedSoftmaxBuilder_;
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
       * @return Whether the weightedSoftmax field is set.
       */
      @java.lang.Override
      public boolean hasWeightedSoftmax() {
        return classificationLossCase_ == 2;
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
       * @return The weightedSoftmax.
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedSoftmaxClassificationLoss getWeightedSoftmax() {
        if (weightedSoftmaxBuilder_ == null) {
          if (classificationLossCase_ == 2) {
            return (object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.getDefaultInstance();
        } else {
          if (classificationLossCase_ == 2) {
            return weightedSoftmaxBuilder_.getMessage();
          }
          return object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
       */
      public Builder setWeightedSoftmax(object_detection.protos.Losses.WeightedSoftmaxClassificationLoss value) {
        if (weightedSoftmaxBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          classificationLoss_ = value;
          onChanged();
        } else {
          weightedSoftmaxBuilder_.setMessage(value);
        }
        classificationLossCase_ = 2;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
       */
      public Builder setWeightedSoftmax(
          object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.Builder builderForValue) {
        if (weightedSoftmaxBuilder_ == null) {
          classificationLoss_ = builderForValue.build();
          onChanged();
        } else {
          weightedSoftmaxBuilder_.setMessage(builderForValue.build());
        }
        classificationLossCase_ = 2;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
       */
      public Builder mergeWeightedSoftmax(object_detection.protos.Losses.WeightedSoftmaxClassificationLoss value) {
        if (weightedSoftmaxBuilder_ == null) {
          if (classificationLossCase_ == 2 &&
              classificationLoss_ != object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.getDefaultInstance()) {
            classificationLoss_ = object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.newBuilder((object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) classificationLoss_)
                .mergeFrom(value).buildPartial();
          } else {
            classificationLoss_ = value;
          }
          onChanged();
        } else {
          if (classificationLossCase_ == 2) {
            weightedSoftmaxBuilder_.mergeFrom(value);
          }
          weightedSoftmaxBuilder_.setMessage(value);
        }
        classificationLossCase_ = 2;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
       */
      public Builder clearWeightedSoftmax() {
        if (weightedSoftmaxBuilder_ == null) {
          if (classificationLossCase_ == 2) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
            onChanged();
          }
        } else {
          if (classificationLossCase_ == 2) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
          }
          weightedSoftmaxBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
       */
      public object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.Builder getWeightedSoftmaxBuilder() {
        return getWeightedSoftmaxFieldBuilder().getBuilder();
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedSoftmaxClassificationLossOrBuilder getWeightedSoftmaxOrBuilder() {
        if ((classificationLossCase_ == 2) && (weightedSoftmaxBuilder_ != null)) {
          return weightedSoftmaxBuilder_.getMessageOrBuilder();
        } else {
          if (classificationLossCase_ == 2) {
            return (object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedSoftmaxClassificationLoss, object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.Builder, object_detection.protos.Losses.WeightedSoftmaxClassificationLossOrBuilder>
          getWeightedSoftmaxFieldBuilder() {
        if (weightedSoftmaxBuilder_ == null) {
          if (!(classificationLossCase_ == 2)) {
            classificationLoss_ = object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.getDefaultInstance();
          }
          weightedSoftmaxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.WeightedSoftmaxClassificationLoss, object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.Builder, object_detection.protos.Losses.WeightedSoftmaxClassificationLossOrBuilder>(
                  (object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) classificationLoss_,
                  getParentForChildren(),
                  isClean());
          classificationLoss_ = null;
        }
        classificationLossCase_ = 2;
        onChanged();;
        return weightedSoftmaxBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss, object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.Builder, object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLossOrBuilder> weightedLogitsSoftmaxBuilder_;
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
       * @return Whether the weightedLogitsSoftmax field is set.
       */
      @java.lang.Override
      public boolean hasWeightedLogitsSoftmax() {
        return classificationLossCase_ == 5;
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
       * @return The weightedLogitsSoftmax.
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss getWeightedLogitsSoftmax() {
        if (weightedLogitsSoftmaxBuilder_ == null) {
          if (classificationLossCase_ == 5) {
            return (object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.getDefaultInstance();
        } else {
          if (classificationLossCase_ == 5) {
            return weightedLogitsSoftmaxBuilder_.getMessage();
          }
          return object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
       */
      public Builder setWeightedLogitsSoftmax(object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss value) {
        if (weightedLogitsSoftmaxBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          classificationLoss_ = value;
          onChanged();
        } else {
          weightedLogitsSoftmaxBuilder_.setMessage(value);
        }
        classificationLossCase_ = 5;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
       */
      public Builder setWeightedLogitsSoftmax(
          object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.Builder builderForValue) {
        if (weightedLogitsSoftmaxBuilder_ == null) {
          classificationLoss_ = builderForValue.build();
          onChanged();
        } else {
          weightedLogitsSoftmaxBuilder_.setMessage(builderForValue.build());
        }
        classificationLossCase_ = 5;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
       */
      public Builder mergeWeightedLogitsSoftmax(object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss value) {
        if (weightedLogitsSoftmaxBuilder_ == null) {
          if (classificationLossCase_ == 5 &&
              classificationLoss_ != object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.getDefaultInstance()) {
            classificationLoss_ = object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.newBuilder((object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_)
                .mergeFrom(value).buildPartial();
          } else {
            classificationLoss_ = value;
          }
          onChanged();
        } else {
          if (classificationLossCase_ == 5) {
            weightedLogitsSoftmaxBuilder_.mergeFrom(value);
          }
          weightedLogitsSoftmaxBuilder_.setMessage(value);
        }
        classificationLossCase_ = 5;
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
       */
      public Builder clearWeightedLogitsSoftmax() {
        if (weightedLogitsSoftmaxBuilder_ == null) {
          if (classificationLossCase_ == 5) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
            onChanged();
          }
        } else {
          if (classificationLossCase_ == 5) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
          }
          weightedLogitsSoftmaxBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
       */
      public object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.Builder getWeightedLogitsSoftmaxBuilder() {
        return getWeightedLogitsSoftmaxFieldBuilder().getBuilder();
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
       */
      @java.lang.Override
      public object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLossOrBuilder getWeightedLogitsSoftmaxOrBuilder() {
        if ((classificationLossCase_ == 5) && (weightedLogitsSoftmaxBuilder_ != null)) {
          return weightedLogitsSoftmaxBuilder_.getMessageOrBuilder();
        } else {
          if (classificationLossCase_ == 5) {
            return (object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss, object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.Builder, object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLossOrBuilder>
          getWeightedLogitsSoftmaxFieldBuilder() {
        if (weightedLogitsSoftmaxBuilder_ == null) {
          if (!(classificationLossCase_ == 5)) {
            classificationLoss_ = object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.getDefaultInstance();
          }
          weightedLogitsSoftmaxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss, object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.Builder, object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLossOrBuilder>(
                  (object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_,
                  getParentForChildren(),
                  isClean());
          classificationLoss_ = null;
        }
        classificationLossCase_ = 5;
        onChanged();;
        return weightedLogitsSoftmaxBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss, object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.Builder, object_detection.protos.Losses.BootstrappedSigmoidClassificationLossOrBuilder> bootstrappedSigmoidBuilder_;
      /**
       * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
       * @return Whether the bootstrappedSigmoid field is set.
       */
      @java.lang.Override
      public boolean hasBootstrappedSigmoid() {
        return classificationLossCase_ == 3;
      }
      /**
       * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
       * @return The bootstrappedSigmoid.
       */
      @java.lang.Override
      public object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss getBootstrappedSigmoid() {
        if (bootstrappedSigmoidBuilder_ == null) {
          if (classificationLossCase_ == 3) {
            return (object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.getDefaultInstance();
        } else {
          if (classificationLossCase_ == 3) {
            return bootstrappedSigmoidBuilder_.getMessage();
          }
          return object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
       */
      public Builder setBootstrappedSigmoid(object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss value) {
        if (bootstrappedSigmoidBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          classificationLoss_ = value;
          onChanged();
        } else {
          bootstrappedSigmoidBuilder_.setMessage(value);
        }
        classificationLossCase_ = 3;
        return this;
      }
      /**
       * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
       */
      public Builder setBootstrappedSigmoid(
          object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.Builder builderForValue) {
        if (bootstrappedSigmoidBuilder_ == null) {
          classificationLoss_ = builderForValue.build();
          onChanged();
        } else {
          bootstrappedSigmoidBuilder_.setMessage(builderForValue.build());
        }
        classificationLossCase_ = 3;
        return this;
      }
      /**
       * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
       */
      public Builder mergeBootstrappedSigmoid(object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss value) {
        if (bootstrappedSigmoidBuilder_ == null) {
          if (classificationLossCase_ == 3 &&
              classificationLoss_ != object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.getDefaultInstance()) {
            classificationLoss_ = object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.newBuilder((object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) classificationLoss_)
                .mergeFrom(value).buildPartial();
          } else {
            classificationLoss_ = value;
          }
          onChanged();
        } else {
          if (classificationLossCase_ == 3) {
            bootstrappedSigmoidBuilder_.mergeFrom(value);
          }
          bootstrappedSigmoidBuilder_.setMessage(value);
        }
        classificationLossCase_ = 3;
        return this;
      }
      /**
       * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
       */
      public Builder clearBootstrappedSigmoid() {
        if (bootstrappedSigmoidBuilder_ == null) {
          if (classificationLossCase_ == 3) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
            onChanged();
          }
        } else {
          if (classificationLossCase_ == 3) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
          }
          bootstrappedSigmoidBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
       */
      public object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.Builder getBootstrappedSigmoidBuilder() {
        return getBootstrappedSigmoidFieldBuilder().getBuilder();
      }
      /**
       * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
       */
      @java.lang.Override
      public object_detection.protos.Losses.BootstrappedSigmoidClassificationLossOrBuilder getBootstrappedSigmoidOrBuilder() {
        if ((classificationLossCase_ == 3) && (bootstrappedSigmoidBuilder_ != null)) {
          return bootstrappedSigmoidBuilder_.getMessageOrBuilder();
        } else {
          if (classificationLossCase_ == 3) {
            return (object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss, object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.Builder, object_detection.protos.Losses.BootstrappedSigmoidClassificationLossOrBuilder>
          getBootstrappedSigmoidFieldBuilder() {
        if (bootstrappedSigmoidBuilder_ == null) {
          if (!(classificationLossCase_ == 3)) {
            classificationLoss_ = object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.getDefaultInstance();
          }
          bootstrappedSigmoidBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss, object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.Builder, object_detection.protos.Losses.BootstrappedSigmoidClassificationLossOrBuilder>(
                  (object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) classificationLoss_,
                  getParentForChildren(),
                  isClean());
          classificationLoss_ = null;
        }
        classificationLossCase_ = 3;
        onChanged();;
        return bootstrappedSigmoidBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.SigmoidFocalClassificationLoss, object_detection.protos.Losses.SigmoidFocalClassificationLoss.Builder, object_detection.protos.Losses.SigmoidFocalClassificationLossOrBuilder> weightedSigmoidFocalBuilder_;
      /**
       * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
       * @return Whether the weightedSigmoidFocal field is set.
       */
      @java.lang.Override
      public boolean hasWeightedSigmoidFocal() {
        return classificationLossCase_ == 4;
      }
      /**
       * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
       * @return The weightedSigmoidFocal.
       */
      @java.lang.Override
      public object_detection.protos.Losses.SigmoidFocalClassificationLoss getWeightedSigmoidFocal() {
        if (weightedSigmoidFocalBuilder_ == null) {
          if (classificationLossCase_ == 4) {
            return (object_detection.protos.Losses.SigmoidFocalClassificationLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.SigmoidFocalClassificationLoss.getDefaultInstance();
        } else {
          if (classificationLossCase_ == 4) {
            return weightedSigmoidFocalBuilder_.getMessage();
          }
          return object_detection.protos.Losses.SigmoidFocalClassificationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
       */
      public Builder setWeightedSigmoidFocal(object_detection.protos.Losses.SigmoidFocalClassificationLoss value) {
        if (weightedSigmoidFocalBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          classificationLoss_ = value;
          onChanged();
        } else {
          weightedSigmoidFocalBuilder_.setMessage(value);
        }
        classificationLossCase_ = 4;
        return this;
      }
      /**
       * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
       */
      public Builder setWeightedSigmoidFocal(
          object_detection.protos.Losses.SigmoidFocalClassificationLoss.Builder builderForValue) {
        if (weightedSigmoidFocalBuilder_ == null) {
          classificationLoss_ = builderForValue.build();
          onChanged();
        } else {
          weightedSigmoidFocalBuilder_.setMessage(builderForValue.build());
        }
        classificationLossCase_ = 4;
        return this;
      }
      /**
       * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
       */
      public Builder mergeWeightedSigmoidFocal(object_detection.protos.Losses.SigmoidFocalClassificationLoss value) {
        if (weightedSigmoidFocalBuilder_ == null) {
          if (classificationLossCase_ == 4 &&
              classificationLoss_ != object_detection.protos.Losses.SigmoidFocalClassificationLoss.getDefaultInstance()) {
            classificationLoss_ = object_detection.protos.Losses.SigmoidFocalClassificationLoss.newBuilder((object_detection.protos.Losses.SigmoidFocalClassificationLoss) classificationLoss_)
                .mergeFrom(value).buildPartial();
          } else {
            classificationLoss_ = value;
          }
          onChanged();
        } else {
          if (classificationLossCase_ == 4) {
            weightedSigmoidFocalBuilder_.mergeFrom(value);
          }
          weightedSigmoidFocalBuilder_.setMessage(value);
        }
        classificationLossCase_ = 4;
        return this;
      }
      /**
       * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
       */
      public Builder clearWeightedSigmoidFocal() {
        if (weightedSigmoidFocalBuilder_ == null) {
          if (classificationLossCase_ == 4) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
            onChanged();
          }
        } else {
          if (classificationLossCase_ == 4) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
          }
          weightedSigmoidFocalBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
       */
      public object_detection.protos.Losses.SigmoidFocalClassificationLoss.Builder getWeightedSigmoidFocalBuilder() {
        return getWeightedSigmoidFocalFieldBuilder().getBuilder();
      }
      /**
       * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
       */
      @java.lang.Override
      public object_detection.protos.Losses.SigmoidFocalClassificationLossOrBuilder getWeightedSigmoidFocalOrBuilder() {
        if ((classificationLossCase_ == 4) && (weightedSigmoidFocalBuilder_ != null)) {
          return weightedSigmoidFocalBuilder_.getMessageOrBuilder();
        } else {
          if (classificationLossCase_ == 4) {
            return (object_detection.protos.Losses.SigmoidFocalClassificationLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.SigmoidFocalClassificationLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.SigmoidFocalClassificationLoss, object_detection.protos.Losses.SigmoidFocalClassificationLoss.Builder, object_detection.protos.Losses.SigmoidFocalClassificationLossOrBuilder>
          getWeightedSigmoidFocalFieldBuilder() {
        if (weightedSigmoidFocalBuilder_ == null) {
          if (!(classificationLossCase_ == 4)) {
            classificationLoss_ = object_detection.protos.Losses.SigmoidFocalClassificationLoss.getDefaultInstance();
          }
          weightedSigmoidFocalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.SigmoidFocalClassificationLoss, object_detection.protos.Losses.SigmoidFocalClassificationLoss.Builder, object_detection.protos.Losses.SigmoidFocalClassificationLossOrBuilder>(
                  (object_detection.protos.Losses.SigmoidFocalClassificationLoss) classificationLoss_,
                  getParentForChildren(),
                  isClean());
          classificationLoss_ = null;
        }
        classificationLossCase_ = 4;
        onChanged();;
        return weightedSigmoidFocalBuilder_;
      }

      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss, object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.Builder, object_detection.protos.Losses.PenaltyReducedLogisticFocalLossOrBuilder> penaltyReducedLogisticFocalLossBuilder_;
      /**
       * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
       * @return Whether the penaltyReducedLogisticFocalLoss field is set.
       */
      @java.lang.Override
      public boolean hasPenaltyReducedLogisticFocalLoss() {
        return classificationLossCase_ == 6;
      }
      /**
       * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
       * @return The penaltyReducedLogisticFocalLoss.
       */
      @java.lang.Override
      public object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss getPenaltyReducedLogisticFocalLoss() {
        if (penaltyReducedLogisticFocalLossBuilder_ == null) {
          if (classificationLossCase_ == 6) {
            return (object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.getDefaultInstance();
        } else {
          if (classificationLossCase_ == 6) {
            return penaltyReducedLogisticFocalLossBuilder_.getMessage();
          }
          return object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
       */
      public Builder setPenaltyReducedLogisticFocalLoss(object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss value) {
        if (penaltyReducedLogisticFocalLossBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          classificationLoss_ = value;
          onChanged();
        } else {
          penaltyReducedLogisticFocalLossBuilder_.setMessage(value);
        }
        classificationLossCase_ = 6;
        return this;
      }
      /**
       * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
       */
      public Builder setPenaltyReducedLogisticFocalLoss(
          object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.Builder builderForValue) {
        if (penaltyReducedLogisticFocalLossBuilder_ == null) {
          classificationLoss_ = builderForValue.build();
          onChanged();
        } else {
          penaltyReducedLogisticFocalLossBuilder_.setMessage(builderForValue.build());
        }
        classificationLossCase_ = 6;
        return this;
      }
      /**
       * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
       */
      public Builder mergePenaltyReducedLogisticFocalLoss(object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss value) {
        if (penaltyReducedLogisticFocalLossBuilder_ == null) {
          if (classificationLossCase_ == 6 &&
              classificationLoss_ != object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.getDefaultInstance()) {
            classificationLoss_ = object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.newBuilder((object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) classificationLoss_)
                .mergeFrom(value).buildPartial();
          } else {
            classificationLoss_ = value;
          }
          onChanged();
        } else {
          if (classificationLossCase_ == 6) {
            penaltyReducedLogisticFocalLossBuilder_.mergeFrom(value);
          }
          penaltyReducedLogisticFocalLossBuilder_.setMessage(value);
        }
        classificationLossCase_ = 6;
        return this;
      }
      /**
       * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
       */
      public Builder clearPenaltyReducedLogisticFocalLoss() {
        if (penaltyReducedLogisticFocalLossBuilder_ == null) {
          if (classificationLossCase_ == 6) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
            onChanged();
          }
        } else {
          if (classificationLossCase_ == 6) {
            classificationLossCase_ = 0;
            classificationLoss_ = null;
          }
          penaltyReducedLogisticFocalLossBuilder_.clear();
        }
        return this;
      }
      /**
       * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
       */
      public object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.Builder getPenaltyReducedLogisticFocalLossBuilder() {
        return getPenaltyReducedLogisticFocalLossFieldBuilder().getBuilder();
      }
      /**
       * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
       */
      @java.lang.Override
      public object_detection.protos.Losses.PenaltyReducedLogisticFocalLossOrBuilder getPenaltyReducedLogisticFocalLossOrBuilder() {
        if ((classificationLossCase_ == 6) && (penaltyReducedLogisticFocalLossBuilder_ != null)) {
          return penaltyReducedLogisticFocalLossBuilder_.getMessageOrBuilder();
        } else {
          if (classificationLossCase_ == 6) {
            return (object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) classificationLoss_;
          }
          return object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.getDefaultInstance();
        }
      }
      /**
       * <code>.object_detection.protos.PenaltyReducedLogisticFocalLoss penalty_reduced_logistic_focal_loss = 6;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss, object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.Builder, object_detection.protos.Losses.PenaltyReducedLogisticFocalLossOrBuilder>
          getPenaltyReducedLogisticFocalLossFieldBuilder() {
        if (penaltyReducedLogisticFocalLossBuilder_ == null) {
          if (!(classificationLossCase_ == 6)) {
            classificationLoss_ = object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.getDefaultInstance();
          }
          penaltyReducedLogisticFocalLossBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss, object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.Builder, object_detection.protos.Losses.PenaltyReducedLogisticFocalLossOrBuilder>(
                  (object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) classificationLoss_,
                  getParentForChildren(),
                  isClean());
          classificationLoss_ = null;
        }
        classificationLossCase_ = 6;
        onChanged();;
        return penaltyReducedLogisticFocalLossBuilder_;
      }
      @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:object_detection.protos.ClassificationLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.ClassificationLoss)
    private static final object_detection.protos.Losses.ClassificationLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.ClassificationLoss();
    }

    public static object_detection.protos.Losses.ClassificationLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<ClassificationLoss>
        PARSER = new com.google.protobuf.AbstractParser<ClassificationLoss>() {
      @java.lang.Override
      public ClassificationLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new ClassificationLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<ClassificationLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<ClassificationLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.ClassificationLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface WeightedSigmoidClassificationLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.WeightedSigmoidClassificationLoss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    boolean hasAnchorwiseOutput();
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    boolean getAnchorwiseOutput();
  }
  /**
   * <pre>
   * Classification loss using a sigmoid function over class predictions.
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.WeightedSigmoidClassificationLoss}
   */
  public static final class WeightedSigmoidClassificationLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.WeightedSigmoidClassificationLoss)
      WeightedSigmoidClassificationLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use WeightedSigmoidClassificationLoss.newBuilder() to construct.
    private WeightedSigmoidClassificationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private WeightedSigmoidClassificationLoss() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new WeightedSigmoidClassificationLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private WeightedSigmoidClassificationLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              bitField0_ |= 0x00000001;
              anchorwiseOutput_ = input.readBool();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSigmoidClassificationLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSigmoidClassificationLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.WeightedSigmoidClassificationLoss.class, object_detection.protos.Losses.WeightedSigmoidClassificationLoss.Builder.class);
    }

    private int bitField0_;
    public static final int ANCHORWISE_OUTPUT_FIELD_NUMBER = 1;
    private boolean anchorwiseOutput_;
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    @java.lang.Override
    public boolean hasAnchorwiseOutput() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    @java.lang.Override
    public boolean getAnchorwiseOutput() {
      return anchorwiseOutput_;
    }

    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.writeBool(1, anchorwiseOutput_);
      }
      unknownFields.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
          .computeBoolSize(1, anchorwiseOutput_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.WeightedSigmoidClassificationLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.WeightedSigmoidClassificationLoss other = (object_detection.protos.Losses.WeightedSigmoidClassificationLoss) obj;

      if (hasAnchorwiseOutput() != other.hasAnchorwiseOutput()) return false;
      if (hasAnchorwiseOutput()) {
        if (getAnchorwiseOutput()
            != other.getAnchorwiseOutput()) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasAnchorwiseOutput()) {
        hash = (37 * hash) + ANCHORWISE_OUTPUT_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getAnchorwiseOutput());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss 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 object_detection.protos.Losses.WeightedSigmoidClassificationLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss 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 object_detection.protos.Losses.WeightedSigmoidClassificationLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss 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(object_detection.protos.Losses.WeightedSigmoidClassificationLoss 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;
    }
    /**
     * <pre>
     * Classification loss using a sigmoid function over class predictions.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.WeightedSigmoidClassificationLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.WeightedSigmoidClassificationLoss)
        object_detection.protos.Losses.WeightedSigmoidClassificationLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSigmoidClassificationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSigmoidClassificationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.WeightedSigmoidClassificationLoss.class, object_detection.protos.Losses.WeightedSigmoidClassificationLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.WeightedSigmoidClassificationLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        anchorwiseOutput_ = false;
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSigmoidClassificationLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSigmoidClassificationLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.WeightedSigmoidClassificationLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSigmoidClassificationLoss build() {
        object_detection.protos.Losses.WeightedSigmoidClassificationLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSigmoidClassificationLoss buildPartial() {
        object_detection.protos.Losses.WeightedSigmoidClassificationLoss result = new object_detection.protos.Losses.WeightedSigmoidClassificationLoss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.anchorwiseOutput_ = anchorwiseOutput_;
          to_bitField0_ |= 0x00000001;
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.WeightedSigmoidClassificationLoss) {
          return mergeFrom((object_detection.protos.Losses.WeightedSigmoidClassificationLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.WeightedSigmoidClassificationLoss other) {
        if (other == object_detection.protos.Losses.WeightedSigmoidClassificationLoss.getDefaultInstance()) return this;
        if (other.hasAnchorwiseOutput()) {
          setAnchorwiseOutput(other.getAnchorwiseOutput());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.WeightedSigmoidClassificationLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.WeightedSigmoidClassificationLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private boolean anchorwiseOutput_ ;
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return Whether the anchorwiseOutput field is set.
       */
      @java.lang.Override
      public boolean hasAnchorwiseOutput() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return The anchorwiseOutput.
       */
      @java.lang.Override
      public boolean getAnchorwiseOutput() {
        return anchorwiseOutput_;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @param value The anchorwiseOutput to set.
       * @return This builder for chaining.
       */
      public Builder setAnchorwiseOutput(boolean value) {
        bitField0_ |= 0x00000001;
        anchorwiseOutput_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return This builder for chaining.
       */
      public Builder clearAnchorwiseOutput() {
        bitField0_ = (bitField0_ & ~0x00000001);
        anchorwiseOutput_ = false;
        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:object_detection.protos.WeightedSigmoidClassificationLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.WeightedSigmoidClassificationLoss)
    private static final object_detection.protos.Losses.WeightedSigmoidClassificationLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.WeightedSigmoidClassificationLoss();
    }

    public static object_detection.protos.Losses.WeightedSigmoidClassificationLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<WeightedSigmoidClassificationLoss>
        PARSER = new com.google.protobuf.AbstractParser<WeightedSigmoidClassificationLoss>() {
      @java.lang.Override
      public WeightedSigmoidClassificationLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new WeightedSigmoidClassificationLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<WeightedSigmoidClassificationLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<WeightedSigmoidClassificationLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.WeightedSigmoidClassificationLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface SigmoidFocalClassificationLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.SigmoidFocalClassificationLoss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * DEPRECATED, do not use.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    boolean hasAnchorwiseOutput();
    /**
     * <pre>
     * DEPRECATED, do not use.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    boolean getAnchorwiseOutput();

    /**
     * <pre>
     * modulating factor for the loss.
     * </pre>
     *
     * <code>optional float gamma = 2 [default = 2];</code>
     * @return Whether the gamma field is set.
     */
    boolean hasGamma();
    /**
     * <pre>
     * modulating factor for the loss.
     * </pre>
     *
     * <code>optional float gamma = 2 [default = 2];</code>
     * @return The gamma.
     */
    float getGamma();

    /**
     * <pre>
     * alpha weighting factor for the loss.
     * </pre>
     *
     * <code>optional float alpha = 3;</code>
     * @return Whether the alpha field is set.
     */
    boolean hasAlpha();
    /**
     * <pre>
     * alpha weighting factor for the loss.
     * </pre>
     *
     * <code>optional float alpha = 3;</code>
     * @return The alpha.
     */
    float getAlpha();
  }
  /**
   * <pre>
   * Sigmoid Focal cross entropy loss as described in
   * https://arxiv.org/abs/1708.02002
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.SigmoidFocalClassificationLoss}
   */
  public static final class SigmoidFocalClassificationLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.SigmoidFocalClassificationLoss)
      SigmoidFocalClassificationLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use SigmoidFocalClassificationLoss.newBuilder() to construct.
    private SigmoidFocalClassificationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private SigmoidFocalClassificationLoss() {
      gamma_ = 2F;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new SigmoidFocalClassificationLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private SigmoidFocalClassificationLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              bitField0_ |= 0x00000001;
              anchorwiseOutput_ = input.readBool();
              break;
            }
            case 21: {
              bitField0_ |= 0x00000002;
              gamma_ = input.readFloat();
              break;
            }
            case 29: {
              bitField0_ |= 0x00000004;
              alpha_ = input.readFloat();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_SigmoidFocalClassificationLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_SigmoidFocalClassificationLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.SigmoidFocalClassificationLoss.class, object_detection.protos.Losses.SigmoidFocalClassificationLoss.Builder.class);
    }

    private int bitField0_;
    public static final int ANCHORWISE_OUTPUT_FIELD_NUMBER = 1;
    private boolean anchorwiseOutput_;
    /**
     * <pre>
     * DEPRECATED, do not use.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    @java.lang.Override
    public boolean hasAnchorwiseOutput() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * DEPRECATED, do not use.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    @java.lang.Override
    public boolean getAnchorwiseOutput() {
      return anchorwiseOutput_;
    }

    public static final int GAMMA_FIELD_NUMBER = 2;
    private float gamma_;
    /**
     * <pre>
     * modulating factor for the loss.
     * </pre>
     *
     * <code>optional float gamma = 2 [default = 2];</code>
     * @return Whether the gamma field is set.
     */
    @java.lang.Override
    public boolean hasGamma() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * modulating factor for the loss.
     * </pre>
     *
     * <code>optional float gamma = 2 [default = 2];</code>
     * @return The gamma.
     */
    @java.lang.Override
    public float getGamma() {
      return gamma_;
    }

    public static final int ALPHA_FIELD_NUMBER = 3;
    private float alpha_;
    /**
     * <pre>
     * alpha weighting factor for the loss.
     * </pre>
     *
     * <code>optional float alpha = 3;</code>
     * @return Whether the alpha field is set.
     */
    @java.lang.Override
    public boolean hasAlpha() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <pre>
     * alpha weighting factor for the loss.
     * </pre>
     *
     * <code>optional float alpha = 3;</code>
     * @return The alpha.
     */
    @java.lang.Override
    public float getAlpha() {
      return alpha_;
    }

    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.writeBool(1, anchorwiseOutput_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeFloat(2, gamma_);
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        output.writeFloat(3, alpha_);
      }
      unknownFields.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
          .computeBoolSize(1, anchorwiseOutput_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(2, gamma_);
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(3, alpha_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.SigmoidFocalClassificationLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.SigmoidFocalClassificationLoss other = (object_detection.protos.Losses.SigmoidFocalClassificationLoss) obj;

      if (hasAnchorwiseOutput() != other.hasAnchorwiseOutput()) return false;
      if (hasAnchorwiseOutput()) {
        if (getAnchorwiseOutput()
            != other.getAnchorwiseOutput()) return false;
      }
      if (hasGamma() != other.hasGamma()) return false;
      if (hasGamma()) {
        if (java.lang.Float.floatToIntBits(getGamma())
            != java.lang.Float.floatToIntBits(
                other.getGamma())) return false;
      }
      if (hasAlpha() != other.hasAlpha()) return false;
      if (hasAlpha()) {
        if (java.lang.Float.floatToIntBits(getAlpha())
            != java.lang.Float.floatToIntBits(
                other.getAlpha())) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasAnchorwiseOutput()) {
        hash = (37 * hash) + ANCHORWISE_OUTPUT_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getAnchorwiseOutput());
      }
      if (hasGamma()) {
        hash = (37 * hash) + GAMMA_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getGamma());
      }
      if (hasAlpha()) {
        hash = (37 * hash) + ALPHA_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getAlpha());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss 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 object_detection.protos.Losses.SigmoidFocalClassificationLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss 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 object_detection.protos.Losses.SigmoidFocalClassificationLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss 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(object_detection.protos.Losses.SigmoidFocalClassificationLoss 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;
    }
    /**
     * <pre>
     * Sigmoid Focal cross entropy loss as described in
     * https://arxiv.org/abs/1708.02002
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.SigmoidFocalClassificationLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.SigmoidFocalClassificationLoss)
        object_detection.protos.Losses.SigmoidFocalClassificationLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_SigmoidFocalClassificationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_SigmoidFocalClassificationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.SigmoidFocalClassificationLoss.class, object_detection.protos.Losses.SigmoidFocalClassificationLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.SigmoidFocalClassificationLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        anchorwiseOutput_ = false;
        bitField0_ = (bitField0_ & ~0x00000001);
        gamma_ = 2F;
        bitField0_ = (bitField0_ & ~0x00000002);
        alpha_ = 0F;
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_SigmoidFocalClassificationLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.SigmoidFocalClassificationLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.SigmoidFocalClassificationLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.SigmoidFocalClassificationLoss build() {
        object_detection.protos.Losses.SigmoidFocalClassificationLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.SigmoidFocalClassificationLoss buildPartial() {
        object_detection.protos.Losses.SigmoidFocalClassificationLoss result = new object_detection.protos.Losses.SigmoidFocalClassificationLoss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.anchorwiseOutput_ = anchorwiseOutput_;
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          to_bitField0_ |= 0x00000002;
        }
        result.gamma_ = gamma_;
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.alpha_ = alpha_;
          to_bitField0_ |= 0x00000004;
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.SigmoidFocalClassificationLoss) {
          return mergeFrom((object_detection.protos.Losses.SigmoidFocalClassificationLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.SigmoidFocalClassificationLoss other) {
        if (other == object_detection.protos.Losses.SigmoidFocalClassificationLoss.getDefaultInstance()) return this;
        if (other.hasAnchorwiseOutput()) {
          setAnchorwiseOutput(other.getAnchorwiseOutput());
        }
        if (other.hasGamma()) {
          setGamma(other.getGamma());
        }
        if (other.hasAlpha()) {
          setAlpha(other.getAlpha());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.SigmoidFocalClassificationLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.SigmoidFocalClassificationLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private boolean anchorwiseOutput_ ;
      /**
       * <pre>
       * DEPRECATED, do not use.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return Whether the anchorwiseOutput field is set.
       */
      @java.lang.Override
      public boolean hasAnchorwiseOutput() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return The anchorwiseOutput.
       */
      @java.lang.Override
      public boolean getAnchorwiseOutput() {
        return anchorwiseOutput_;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @param value The anchorwiseOutput to set.
       * @return This builder for chaining.
       */
      public Builder setAnchorwiseOutput(boolean value) {
        bitField0_ |= 0x00000001;
        anchorwiseOutput_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return This builder for chaining.
       */
      public Builder clearAnchorwiseOutput() {
        bitField0_ = (bitField0_ & ~0x00000001);
        anchorwiseOutput_ = false;
        onChanged();
        return this;
      }

      private float gamma_ = 2F;
      /**
       * <pre>
       * modulating factor for the loss.
       * </pre>
       *
       * <code>optional float gamma = 2 [default = 2];</code>
       * @return Whether the gamma field is set.
       */
      @java.lang.Override
      public boolean hasGamma() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <pre>
       * modulating factor for the loss.
       * </pre>
       *
       * <code>optional float gamma = 2 [default = 2];</code>
       * @return The gamma.
       */
      @java.lang.Override
      public float getGamma() {
        return gamma_;
      }
      /**
       * <pre>
       * modulating factor for the loss.
       * </pre>
       *
       * <code>optional float gamma = 2 [default = 2];</code>
       * @param value The gamma to set.
       * @return This builder for chaining.
       */
      public Builder setGamma(float value) {
        bitField0_ |= 0x00000002;
        gamma_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * modulating factor for the loss.
       * </pre>
       *
       * <code>optional float gamma = 2 [default = 2];</code>
       * @return This builder for chaining.
       */
      public Builder clearGamma() {
        bitField0_ = (bitField0_ & ~0x00000002);
        gamma_ = 2F;
        onChanged();
        return this;
      }

      private float alpha_ ;
      /**
       * <pre>
       * alpha weighting factor for the loss.
       * </pre>
       *
       * <code>optional float alpha = 3;</code>
       * @return Whether the alpha field is set.
       */
      @java.lang.Override
      public boolean hasAlpha() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <pre>
       * alpha weighting factor for the loss.
       * </pre>
       *
       * <code>optional float alpha = 3;</code>
       * @return The alpha.
       */
      @java.lang.Override
      public float getAlpha() {
        return alpha_;
      }
      /**
       * <pre>
       * alpha weighting factor for the loss.
       * </pre>
       *
       * <code>optional float alpha = 3;</code>
       * @param value The alpha to set.
       * @return This builder for chaining.
       */
      public Builder setAlpha(float value) {
        bitField0_ |= 0x00000004;
        alpha_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * alpha weighting factor for the loss.
       * </pre>
       *
       * <code>optional float alpha = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearAlpha() {
        bitField0_ = (bitField0_ & ~0x00000004);
        alpha_ = 0F;
        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:object_detection.protos.SigmoidFocalClassificationLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.SigmoidFocalClassificationLoss)
    private static final object_detection.protos.Losses.SigmoidFocalClassificationLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.SigmoidFocalClassificationLoss();
    }

    public static object_detection.protos.Losses.SigmoidFocalClassificationLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<SigmoidFocalClassificationLoss>
        PARSER = new com.google.protobuf.AbstractParser<SigmoidFocalClassificationLoss>() {
      @java.lang.Override
      public SigmoidFocalClassificationLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new SigmoidFocalClassificationLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<SigmoidFocalClassificationLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<SigmoidFocalClassificationLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.SigmoidFocalClassificationLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface WeightedSoftmaxClassificationLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.WeightedSoftmaxClassificationLoss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    boolean hasAnchorwiseOutput();
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    boolean getAnchorwiseOutput();

    /**
     * <pre>
     * Scale logit (input) value before calculating softmax classification loss.
     * Typically used for softmax distillation.
     * </pre>
     *
     * <code>optional float logit_scale = 2 [default = 1];</code>
     * @return Whether the logitScale field is set.
     */
    boolean hasLogitScale();
    /**
     * <pre>
     * Scale logit (input) value before calculating softmax classification loss.
     * Typically used for softmax distillation.
     * </pre>
     *
     * <code>optional float logit_scale = 2 [default = 1];</code>
     * @return The logitScale.
     */
    float getLogitScale();
  }
  /**
   * <pre>
   * Classification loss using a softmax function over class predictions.
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.WeightedSoftmaxClassificationLoss}
   */
  public static final class WeightedSoftmaxClassificationLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.WeightedSoftmaxClassificationLoss)
      WeightedSoftmaxClassificationLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use WeightedSoftmaxClassificationLoss.newBuilder() to construct.
    private WeightedSoftmaxClassificationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private WeightedSoftmaxClassificationLoss() {
      logitScale_ = 1F;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new WeightedSoftmaxClassificationLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private WeightedSoftmaxClassificationLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              bitField0_ |= 0x00000001;
              anchorwiseOutput_ = input.readBool();
              break;
            }
            case 21: {
              bitField0_ |= 0x00000002;
              logitScale_ = input.readFloat();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSoftmaxClassificationLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSoftmaxClassificationLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.class, object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.Builder.class);
    }

    private int bitField0_;
    public static final int ANCHORWISE_OUTPUT_FIELD_NUMBER = 1;
    private boolean anchorwiseOutput_;
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    @java.lang.Override
    public boolean hasAnchorwiseOutput() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    @java.lang.Override
    public boolean getAnchorwiseOutput() {
      return anchorwiseOutput_;
    }

    public static final int LOGIT_SCALE_FIELD_NUMBER = 2;
    private float logitScale_;
    /**
     * <pre>
     * Scale logit (input) value before calculating softmax classification loss.
     * Typically used for softmax distillation.
     * </pre>
     *
     * <code>optional float logit_scale = 2 [default = 1];</code>
     * @return Whether the logitScale field is set.
     */
    @java.lang.Override
    public boolean hasLogitScale() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * Scale logit (input) value before calculating softmax classification loss.
     * Typically used for softmax distillation.
     * </pre>
     *
     * <code>optional float logit_scale = 2 [default = 1];</code>
     * @return The logitScale.
     */
    @java.lang.Override
    public float getLogitScale() {
      return logitScale_;
    }

    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.writeBool(1, anchorwiseOutput_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeFloat(2, logitScale_);
      }
      unknownFields.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
          .computeBoolSize(1, anchorwiseOutput_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(2, logitScale_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.WeightedSoftmaxClassificationLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.WeightedSoftmaxClassificationLoss other = (object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) obj;

      if (hasAnchorwiseOutput() != other.hasAnchorwiseOutput()) return false;
      if (hasAnchorwiseOutput()) {
        if (getAnchorwiseOutput()
            != other.getAnchorwiseOutput()) return false;
      }
      if (hasLogitScale() != other.hasLogitScale()) return false;
      if (hasLogitScale()) {
        if (java.lang.Float.floatToIntBits(getLogitScale())
            != java.lang.Float.floatToIntBits(
                other.getLogitScale())) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasAnchorwiseOutput()) {
        hash = (37 * hash) + ANCHORWISE_OUTPUT_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getAnchorwiseOutput());
      }
      if (hasLogitScale()) {
        hash = (37 * hash) + LOGIT_SCALE_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getLogitScale());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss 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 object_detection.protos.Losses.WeightedSoftmaxClassificationLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss 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 object_detection.protos.Losses.WeightedSoftmaxClassificationLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss 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(object_detection.protos.Losses.WeightedSoftmaxClassificationLoss 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;
    }
    /**
     * <pre>
     * Classification loss using a softmax function over class predictions.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.WeightedSoftmaxClassificationLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.WeightedSoftmaxClassificationLoss)
        object_detection.protos.Losses.WeightedSoftmaxClassificationLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSoftmaxClassificationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSoftmaxClassificationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.class, object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        anchorwiseOutput_ = false;
        bitField0_ = (bitField0_ & ~0x00000001);
        logitScale_ = 1F;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSoftmaxClassificationLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSoftmaxClassificationLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSoftmaxClassificationLoss build() {
        object_detection.protos.Losses.WeightedSoftmaxClassificationLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSoftmaxClassificationLoss buildPartial() {
        object_detection.protos.Losses.WeightedSoftmaxClassificationLoss result = new object_detection.protos.Losses.WeightedSoftmaxClassificationLoss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.anchorwiseOutput_ = anchorwiseOutput_;
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          to_bitField0_ |= 0x00000002;
        }
        result.logitScale_ = logitScale_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) {
          return mergeFrom((object_detection.protos.Losses.WeightedSoftmaxClassificationLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.WeightedSoftmaxClassificationLoss other) {
        if (other == object_detection.protos.Losses.WeightedSoftmaxClassificationLoss.getDefaultInstance()) return this;
        if (other.hasAnchorwiseOutput()) {
          setAnchorwiseOutput(other.getAnchorwiseOutput());
        }
        if (other.hasLogitScale()) {
          setLogitScale(other.getLogitScale());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.WeightedSoftmaxClassificationLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.WeightedSoftmaxClassificationLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private boolean anchorwiseOutput_ ;
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return Whether the anchorwiseOutput field is set.
       */
      @java.lang.Override
      public boolean hasAnchorwiseOutput() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return The anchorwiseOutput.
       */
      @java.lang.Override
      public boolean getAnchorwiseOutput() {
        return anchorwiseOutput_;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @param value The anchorwiseOutput to set.
       * @return This builder for chaining.
       */
      public Builder setAnchorwiseOutput(boolean value) {
        bitField0_ |= 0x00000001;
        anchorwiseOutput_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return This builder for chaining.
       */
      public Builder clearAnchorwiseOutput() {
        bitField0_ = (bitField0_ & ~0x00000001);
        anchorwiseOutput_ = false;
        onChanged();
        return this;
      }

      private float logitScale_ = 1F;
      /**
       * <pre>
       * Scale logit (input) value before calculating softmax classification loss.
       * Typically used for softmax distillation.
       * </pre>
       *
       * <code>optional float logit_scale = 2 [default = 1];</code>
       * @return Whether the logitScale field is set.
       */
      @java.lang.Override
      public boolean hasLogitScale() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <pre>
       * Scale logit (input) value before calculating softmax classification loss.
       * Typically used for softmax distillation.
       * </pre>
       *
       * <code>optional float logit_scale = 2 [default = 1];</code>
       * @return The logitScale.
       */
      @java.lang.Override
      public float getLogitScale() {
        return logitScale_;
      }
      /**
       * <pre>
       * Scale logit (input) value before calculating softmax classification loss.
       * Typically used for softmax distillation.
       * </pre>
       *
       * <code>optional float logit_scale = 2 [default = 1];</code>
       * @param value The logitScale to set.
       * @return This builder for chaining.
       */
      public Builder setLogitScale(float value) {
        bitField0_ |= 0x00000002;
        logitScale_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Scale logit (input) value before calculating softmax classification loss.
       * Typically used for softmax distillation.
       * </pre>
       *
       * <code>optional float logit_scale = 2 [default = 1];</code>
       * @return This builder for chaining.
       */
      public Builder clearLogitScale() {
        bitField0_ = (bitField0_ & ~0x00000002);
        logitScale_ = 1F;
        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:object_detection.protos.WeightedSoftmaxClassificationLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.WeightedSoftmaxClassificationLoss)
    private static final object_detection.protos.Losses.WeightedSoftmaxClassificationLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.WeightedSoftmaxClassificationLoss();
    }

    public static object_detection.protos.Losses.WeightedSoftmaxClassificationLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<WeightedSoftmaxClassificationLoss>
        PARSER = new com.google.protobuf.AbstractParser<WeightedSoftmaxClassificationLoss>() {
      @java.lang.Override
      public WeightedSoftmaxClassificationLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new WeightedSoftmaxClassificationLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<WeightedSoftmaxClassificationLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<WeightedSoftmaxClassificationLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.WeightedSoftmaxClassificationLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface WeightedSoftmaxClassificationAgainstLogitsLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * DEPRECATED, do not use.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    boolean hasAnchorwiseOutput();
    /**
     * <pre>
     * DEPRECATED, do not use.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    boolean getAnchorwiseOutput();

    /**
     * <pre>
     * Scale and softmax groundtruth logits before calculating softmax
     * classification loss. Typically used for softmax distillation with teacher
     * annotations stored as logits.
     * </pre>
     *
     * <code>optional float logit_scale = 2 [default = 1];</code>
     * @return Whether the logitScale field is set.
     */
    boolean hasLogitScale();
    /**
     * <pre>
     * Scale and softmax groundtruth logits before calculating softmax
     * classification loss. Typically used for softmax distillation with teacher
     * annotations stored as logits.
     * </pre>
     *
     * <code>optional float logit_scale = 2 [default = 1];</code>
     * @return The logitScale.
     */
    float getLogitScale();
  }
  /**
   * <pre>
   * Classification loss using a softmax function over class predictions and
   * a softmax function over the groundtruth labels (assumed to be logits).
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss}
   */
  public static final class WeightedSoftmaxClassificationAgainstLogitsLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
      WeightedSoftmaxClassificationAgainstLogitsLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use WeightedSoftmaxClassificationAgainstLogitsLoss.newBuilder() to construct.
    private WeightedSoftmaxClassificationAgainstLogitsLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private WeightedSoftmaxClassificationAgainstLogitsLoss() {
      logitScale_ = 1F;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new WeightedSoftmaxClassificationAgainstLogitsLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private WeightedSoftmaxClassificationAgainstLogitsLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              bitField0_ |= 0x00000001;
              anchorwiseOutput_ = input.readBool();
              break;
            }
            case 21: {
              bitField0_ |= 0x00000002;
              logitScale_ = input.readFloat();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSoftmaxClassificationAgainstLogitsLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSoftmaxClassificationAgainstLogitsLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.class, object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.Builder.class);
    }

    private int bitField0_;
    public static final int ANCHORWISE_OUTPUT_FIELD_NUMBER = 1;
    private boolean anchorwiseOutput_;
    /**
     * <pre>
     * DEPRECATED, do not use.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    @java.lang.Override
    public boolean hasAnchorwiseOutput() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * DEPRECATED, do not use.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 1 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    @java.lang.Override
    public boolean getAnchorwiseOutput() {
      return anchorwiseOutput_;
    }

    public static final int LOGIT_SCALE_FIELD_NUMBER = 2;
    private float logitScale_;
    /**
     * <pre>
     * Scale and softmax groundtruth logits before calculating softmax
     * classification loss. Typically used for softmax distillation with teacher
     * annotations stored as logits.
     * </pre>
     *
     * <code>optional float logit_scale = 2 [default = 1];</code>
     * @return Whether the logitScale field is set.
     */
    @java.lang.Override
    public boolean hasLogitScale() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * Scale and softmax groundtruth logits before calculating softmax
     * classification loss. Typically used for softmax distillation with teacher
     * annotations stored as logits.
     * </pre>
     *
     * <code>optional float logit_scale = 2 [default = 1];</code>
     * @return The logitScale.
     */
    @java.lang.Override
    public float getLogitScale() {
      return logitScale_;
    }

    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.writeBool(1, anchorwiseOutput_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeFloat(2, logitScale_);
      }
      unknownFields.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
          .computeBoolSize(1, anchorwiseOutput_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(2, logitScale_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss other = (object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) obj;

      if (hasAnchorwiseOutput() != other.hasAnchorwiseOutput()) return false;
      if (hasAnchorwiseOutput()) {
        if (getAnchorwiseOutput()
            != other.getAnchorwiseOutput()) return false;
      }
      if (hasLogitScale() != other.hasLogitScale()) return false;
      if (hasLogitScale()) {
        if (java.lang.Float.floatToIntBits(getLogitScale())
            != java.lang.Float.floatToIntBits(
                other.getLogitScale())) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasAnchorwiseOutput()) {
        hash = (37 * hash) + ANCHORWISE_OUTPUT_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getAnchorwiseOutput());
      }
      if (hasLogitScale()) {
        hash = (37 * hash) + LOGIT_SCALE_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getLogitScale());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss 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 object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss 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 object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss 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(object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss 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;
    }
    /**
     * <pre>
     * Classification loss using a softmax function over class predictions and
     * a softmax function over the groundtruth labels (assumed to be logits).
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
        object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSoftmaxClassificationAgainstLogitsLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSoftmaxClassificationAgainstLogitsLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.class, object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        anchorwiseOutput_ = false;
        bitField0_ = (bitField0_ & ~0x00000001);
        logitScale_ = 1F;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_WeightedSoftmaxClassificationAgainstLogitsLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss build() {
        object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss buildPartial() {
        object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss result = new object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.anchorwiseOutput_ = anchorwiseOutput_;
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          to_bitField0_ |= 0x00000002;
        }
        result.logitScale_ = logitScale_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) {
          return mergeFrom((object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss other) {
        if (other == object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss.getDefaultInstance()) return this;
        if (other.hasAnchorwiseOutput()) {
          setAnchorwiseOutput(other.getAnchorwiseOutput());
        }
        if (other.hasLogitScale()) {
          setLogitScale(other.getLogitScale());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private boolean anchorwiseOutput_ ;
      /**
       * <pre>
       * DEPRECATED, do not use.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return Whether the anchorwiseOutput field is set.
       */
      @java.lang.Override
      public boolean hasAnchorwiseOutput() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return The anchorwiseOutput.
       */
      @java.lang.Override
      public boolean getAnchorwiseOutput() {
        return anchorwiseOutput_;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @param value The anchorwiseOutput to set.
       * @return This builder for chaining.
       */
      public Builder setAnchorwiseOutput(boolean value) {
        bitField0_ |= 0x00000001;
        anchorwiseOutput_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 1 [default = false];</code>
       * @return This builder for chaining.
       */
      public Builder clearAnchorwiseOutput() {
        bitField0_ = (bitField0_ & ~0x00000001);
        anchorwiseOutput_ = false;
        onChanged();
        return this;
      }

      private float logitScale_ = 1F;
      /**
       * <pre>
       * Scale and softmax groundtruth logits before calculating softmax
       * classification loss. Typically used for softmax distillation with teacher
       * annotations stored as logits.
       * </pre>
       *
       * <code>optional float logit_scale = 2 [default = 1];</code>
       * @return Whether the logitScale field is set.
       */
      @java.lang.Override
      public boolean hasLogitScale() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <pre>
       * Scale and softmax groundtruth logits before calculating softmax
       * classification loss. Typically used for softmax distillation with teacher
       * annotations stored as logits.
       * </pre>
       *
       * <code>optional float logit_scale = 2 [default = 1];</code>
       * @return The logitScale.
       */
      @java.lang.Override
      public float getLogitScale() {
        return logitScale_;
      }
      /**
       * <pre>
       * Scale and softmax groundtruth logits before calculating softmax
       * classification loss. Typically used for softmax distillation with teacher
       * annotations stored as logits.
       * </pre>
       *
       * <code>optional float logit_scale = 2 [default = 1];</code>
       * @param value The logitScale to set.
       * @return This builder for chaining.
       */
      public Builder setLogitScale(float value) {
        bitField0_ |= 0x00000002;
        logitScale_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Scale and softmax groundtruth logits before calculating softmax
       * classification loss. Typically used for softmax distillation with teacher
       * annotations stored as logits.
       * </pre>
       *
       * <code>optional float logit_scale = 2 [default = 1];</code>
       * @return This builder for chaining.
       */
      public Builder clearLogitScale() {
        bitField0_ = (bitField0_ & ~0x00000002);
        logitScale_ = 1F;
        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:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
    private static final object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss();
    }

    public static object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<WeightedSoftmaxClassificationAgainstLogitsLoss>
        PARSER = new com.google.protobuf.AbstractParser<WeightedSoftmaxClassificationAgainstLogitsLoss>() {
      @java.lang.Override
      public WeightedSoftmaxClassificationAgainstLogitsLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new WeightedSoftmaxClassificationAgainstLogitsLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<WeightedSoftmaxClassificationAgainstLogitsLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<WeightedSoftmaxClassificationAgainstLogitsLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.WeightedSoftmaxClassificationAgainstLogitsLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface BootstrappedSigmoidClassificationLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.BootstrappedSigmoidClassificationLoss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Interpolation weight between 0 and 1.
     * </pre>
     *
     * <code>optional float alpha = 1;</code>
     * @return Whether the alpha field is set.
     */
    boolean hasAlpha();
    /**
     * <pre>
     * Interpolation weight between 0 and 1.
     * </pre>
     *
     * <code>optional float alpha = 1;</code>
     * @return The alpha.
     */
    float getAlpha();

    /**
     * <pre>
     * Whether hard boot strapping should be used or not. If true, will only use
     * one class favored by model. Othewise, will use all predicted class
     * probabilities.
     * </pre>
     *
     * <code>optional bool hard_bootstrap = 2 [default = false];</code>
     * @return Whether the hardBootstrap field is set.
     */
    boolean hasHardBootstrap();
    /**
     * <pre>
     * Whether hard boot strapping should be used or not. If true, will only use
     * one class favored by model. Othewise, will use all predicted class
     * probabilities.
     * </pre>
     *
     * <code>optional bool hard_bootstrap = 2 [default = false];</code>
     * @return The hardBootstrap.
     */
    boolean getHardBootstrap();

    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 3 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    boolean hasAnchorwiseOutput();
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 3 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    boolean getAnchorwiseOutput();
  }
  /**
   * <pre>
   * Classification loss using a sigmoid function over the class prediction with
   * the highest prediction score.
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.BootstrappedSigmoidClassificationLoss}
   */
  public static final class BootstrappedSigmoidClassificationLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.BootstrappedSigmoidClassificationLoss)
      BootstrappedSigmoidClassificationLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use BootstrappedSigmoidClassificationLoss.newBuilder() to construct.
    private BootstrappedSigmoidClassificationLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private BootstrappedSigmoidClassificationLoss() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new BootstrappedSigmoidClassificationLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private BootstrappedSigmoidClassificationLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 13: {
              bitField0_ |= 0x00000001;
              alpha_ = input.readFloat();
              break;
            }
            case 16: {
              bitField0_ |= 0x00000002;
              hardBootstrap_ = input.readBool();
              break;
            }
            case 24: {
              bitField0_ |= 0x00000004;
              anchorwiseOutput_ = input.readBool();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_BootstrappedSigmoidClassificationLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_BootstrappedSigmoidClassificationLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.class, object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.Builder.class);
    }

    private int bitField0_;
    public static final int ALPHA_FIELD_NUMBER = 1;
    private float alpha_;
    /**
     * <pre>
     * Interpolation weight between 0 and 1.
     * </pre>
     *
     * <code>optional float alpha = 1;</code>
     * @return Whether the alpha field is set.
     */
    @java.lang.Override
    public boolean hasAlpha() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * Interpolation weight between 0 and 1.
     * </pre>
     *
     * <code>optional float alpha = 1;</code>
     * @return The alpha.
     */
    @java.lang.Override
    public float getAlpha() {
      return alpha_;
    }

    public static final int HARD_BOOTSTRAP_FIELD_NUMBER = 2;
    private boolean hardBootstrap_;
    /**
     * <pre>
     * Whether hard boot strapping should be used or not. If true, will only use
     * one class favored by model. Othewise, will use all predicted class
     * probabilities.
     * </pre>
     *
     * <code>optional bool hard_bootstrap = 2 [default = false];</code>
     * @return Whether the hardBootstrap field is set.
     */
    @java.lang.Override
    public boolean hasHardBootstrap() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * Whether hard boot strapping should be used or not. If true, will only use
     * one class favored by model. Othewise, will use all predicted class
     * probabilities.
     * </pre>
     *
     * <code>optional bool hard_bootstrap = 2 [default = false];</code>
     * @return The hardBootstrap.
     */
    @java.lang.Override
    public boolean getHardBootstrap() {
      return hardBootstrap_;
    }

    public static final int ANCHORWISE_OUTPUT_FIELD_NUMBER = 3;
    private boolean anchorwiseOutput_;
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 3 [default = false];</code>
     * @return Whether the anchorwiseOutput field is set.
     */
    @java.lang.Override
    public boolean hasAnchorwiseOutput() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <pre>
     * DEPRECATED, do not use.
     * Output loss per anchor.
     * </pre>
     *
     * <code>optional bool anchorwise_output = 3 [default = false];</code>
     * @return The anchorwiseOutput.
     */
    @java.lang.Override
    public boolean getAnchorwiseOutput() {
      return anchorwiseOutput_;
    }

    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.writeFloat(1, alpha_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeBool(2, hardBootstrap_);
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        output.writeBool(3, anchorwiseOutput_);
      }
      unknownFields.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
          .computeFloatSize(1, alpha_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(2, hardBootstrap_);
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBoolSize(3, anchorwiseOutput_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss other = (object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) obj;

      if (hasAlpha() != other.hasAlpha()) return false;
      if (hasAlpha()) {
        if (java.lang.Float.floatToIntBits(getAlpha())
            != java.lang.Float.floatToIntBits(
                other.getAlpha())) return false;
      }
      if (hasHardBootstrap() != other.hasHardBootstrap()) return false;
      if (hasHardBootstrap()) {
        if (getHardBootstrap()
            != other.getHardBootstrap()) return false;
      }
      if (hasAnchorwiseOutput() != other.hasAnchorwiseOutput()) return false;
      if (hasAnchorwiseOutput()) {
        if (getAnchorwiseOutput()
            != other.getAnchorwiseOutput()) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasAlpha()) {
        hash = (37 * hash) + ALPHA_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getAlpha());
      }
      if (hasHardBootstrap()) {
        hash = (37 * hash) + HARD_BOOTSTRAP_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getHardBootstrap());
      }
      if (hasAnchorwiseOutput()) {
        hash = (37 * hash) + ANCHORWISE_OUTPUT_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getAnchorwiseOutput());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss 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 object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss 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 object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss 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(object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss 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;
    }
    /**
     * <pre>
     * Classification loss using a sigmoid function over the class prediction with
     * the highest prediction score.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.BootstrappedSigmoidClassificationLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.BootstrappedSigmoidClassificationLoss)
        object_detection.protos.Losses.BootstrappedSigmoidClassificationLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_BootstrappedSigmoidClassificationLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_BootstrappedSigmoidClassificationLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.class, object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        alpha_ = 0F;
        bitField0_ = (bitField0_ & ~0x00000001);
        hardBootstrap_ = false;
        bitField0_ = (bitField0_ & ~0x00000002);
        anchorwiseOutput_ = false;
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_BootstrappedSigmoidClassificationLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss build() {
        object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss buildPartial() {
        object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss result = new object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.alpha_ = alpha_;
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.hardBootstrap_ = hardBootstrap_;
          to_bitField0_ |= 0x00000002;
        }
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.anchorwiseOutput_ = anchorwiseOutput_;
          to_bitField0_ |= 0x00000004;
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) {
          return mergeFrom((object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss other) {
        if (other == object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss.getDefaultInstance()) return this;
        if (other.hasAlpha()) {
          setAlpha(other.getAlpha());
        }
        if (other.hasHardBootstrap()) {
          setHardBootstrap(other.getHardBootstrap());
        }
        if (other.hasAnchorwiseOutput()) {
          setAnchorwiseOutput(other.getAnchorwiseOutput());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private float alpha_ ;
      /**
       * <pre>
       * Interpolation weight between 0 and 1.
       * </pre>
       *
       * <code>optional float alpha = 1;</code>
       * @return Whether the alpha field is set.
       */
      @java.lang.Override
      public boolean hasAlpha() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * Interpolation weight between 0 and 1.
       * </pre>
       *
       * <code>optional float alpha = 1;</code>
       * @return The alpha.
       */
      @java.lang.Override
      public float getAlpha() {
        return alpha_;
      }
      /**
       * <pre>
       * Interpolation weight between 0 and 1.
       * </pre>
       *
       * <code>optional float alpha = 1;</code>
       * @param value The alpha to set.
       * @return This builder for chaining.
       */
      public Builder setAlpha(float value) {
        bitField0_ |= 0x00000001;
        alpha_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Interpolation weight between 0 and 1.
       * </pre>
       *
       * <code>optional float alpha = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearAlpha() {
        bitField0_ = (bitField0_ & ~0x00000001);
        alpha_ = 0F;
        onChanged();
        return this;
      }

      private boolean hardBootstrap_ ;
      /**
       * <pre>
       * Whether hard boot strapping should be used or not. If true, will only use
       * one class favored by model. Othewise, will use all predicted class
       * probabilities.
       * </pre>
       *
       * <code>optional bool hard_bootstrap = 2 [default = false];</code>
       * @return Whether the hardBootstrap field is set.
       */
      @java.lang.Override
      public boolean hasHardBootstrap() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <pre>
       * Whether hard boot strapping should be used or not. If true, will only use
       * one class favored by model. Othewise, will use all predicted class
       * probabilities.
       * </pre>
       *
       * <code>optional bool hard_bootstrap = 2 [default = false];</code>
       * @return The hardBootstrap.
       */
      @java.lang.Override
      public boolean getHardBootstrap() {
        return hardBootstrap_;
      }
      /**
       * <pre>
       * Whether hard boot strapping should be used or not. If true, will only use
       * one class favored by model. Othewise, will use all predicted class
       * probabilities.
       * </pre>
       *
       * <code>optional bool hard_bootstrap = 2 [default = false];</code>
       * @param value The hardBootstrap to set.
       * @return This builder for chaining.
       */
      public Builder setHardBootstrap(boolean value) {
        bitField0_ |= 0x00000002;
        hardBootstrap_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Whether hard boot strapping should be used or not. If true, will only use
       * one class favored by model. Othewise, will use all predicted class
       * probabilities.
       * </pre>
       *
       * <code>optional bool hard_bootstrap = 2 [default = false];</code>
       * @return This builder for chaining.
       */
      public Builder clearHardBootstrap() {
        bitField0_ = (bitField0_ & ~0x00000002);
        hardBootstrap_ = false;
        onChanged();
        return this;
      }

      private boolean anchorwiseOutput_ ;
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 3 [default = false];</code>
       * @return Whether the anchorwiseOutput field is set.
       */
      @java.lang.Override
      public boolean hasAnchorwiseOutput() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 3 [default = false];</code>
       * @return The anchorwiseOutput.
       */
      @java.lang.Override
      public boolean getAnchorwiseOutput() {
        return anchorwiseOutput_;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 3 [default = false];</code>
       * @param value The anchorwiseOutput to set.
       * @return This builder for chaining.
       */
      public Builder setAnchorwiseOutput(boolean value) {
        bitField0_ |= 0x00000004;
        anchorwiseOutput_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * DEPRECATED, do not use.
       * Output loss per anchor.
       * </pre>
       *
       * <code>optional bool anchorwise_output = 3 [default = false];</code>
       * @return This builder for chaining.
       */
      public Builder clearAnchorwiseOutput() {
        bitField0_ = (bitField0_ & ~0x00000004);
        anchorwiseOutput_ = false;
        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:object_detection.protos.BootstrappedSigmoidClassificationLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.BootstrappedSigmoidClassificationLoss)
    private static final object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss();
    }

    public static object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<BootstrappedSigmoidClassificationLoss>
        PARSER = new com.google.protobuf.AbstractParser<BootstrappedSigmoidClassificationLoss>() {
      @java.lang.Override
      public BootstrappedSigmoidClassificationLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new BootstrappedSigmoidClassificationLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<BootstrappedSigmoidClassificationLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<BootstrappedSigmoidClassificationLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.BootstrappedSigmoidClassificationLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface PenaltyReducedLogisticFocalLossOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.PenaltyReducedLogisticFocalLoss)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Focussing parameter of the focal loss.
     * </pre>
     *
     * <code>optional float alpha = 1;</code>
     * @return Whether the alpha field is set.
     */
    boolean hasAlpha();
    /**
     * <pre>
     * Focussing parameter of the focal loss.
     * </pre>
     *
     * <code>optional float alpha = 1;</code>
     * @return The alpha.
     */
    float getAlpha();

    /**
     * <pre>
     * Penalty reduction factor.
     * </pre>
     *
     * <code>optional float beta = 2;</code>
     * @return Whether the beta field is set.
     */
    boolean hasBeta();
    /**
     * <pre>
     * Penalty reduction factor.
     * </pre>
     *
     * <code>optional float beta = 2;</code>
     * @return The beta.
     */
    float getBeta();
  }
  /**
   * <pre>
   * Pixelwise logistic focal loss with pixels near the target having a reduced
   * penalty.
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.PenaltyReducedLogisticFocalLoss}
   */
  public static final class PenaltyReducedLogisticFocalLoss extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.PenaltyReducedLogisticFocalLoss)
      PenaltyReducedLogisticFocalLossOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use PenaltyReducedLogisticFocalLoss.newBuilder() to construct.
    private PenaltyReducedLogisticFocalLoss(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private PenaltyReducedLogisticFocalLoss() {
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new PenaltyReducedLogisticFocalLoss();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private PenaltyReducedLogisticFocalLoss(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 13: {
              bitField0_ |= 0x00000001;
              alpha_ = input.readFloat();
              break;
            }
            case 21: {
              bitField0_ |= 0x00000002;
              beta_ = input.readFloat();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_PenaltyReducedLogisticFocalLoss_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_PenaltyReducedLogisticFocalLoss_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.class, object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.Builder.class);
    }

    private int bitField0_;
    public static final int ALPHA_FIELD_NUMBER = 1;
    private float alpha_;
    /**
     * <pre>
     * Focussing parameter of the focal loss.
     * </pre>
     *
     * <code>optional float alpha = 1;</code>
     * @return Whether the alpha field is set.
     */
    @java.lang.Override
    public boolean hasAlpha() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * Focussing parameter of the focal loss.
     * </pre>
     *
     * <code>optional float alpha = 1;</code>
     * @return The alpha.
     */
    @java.lang.Override
    public float getAlpha() {
      return alpha_;
    }

    public static final int BETA_FIELD_NUMBER = 2;
    private float beta_;
    /**
     * <pre>
     * Penalty reduction factor.
     * </pre>
     *
     * <code>optional float beta = 2;</code>
     * @return Whether the beta field is set.
     */
    @java.lang.Override
    public boolean hasBeta() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * Penalty reduction factor.
     * </pre>
     *
     * <code>optional float beta = 2;</code>
     * @return The beta.
     */
    @java.lang.Override
    public float getBeta() {
      return beta_;
    }

    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.writeFloat(1, alpha_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeFloat(2, beta_);
      }
      unknownFields.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
          .computeFloatSize(1, alpha_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(2, beta_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss other = (object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) obj;

      if (hasAlpha() != other.hasAlpha()) return false;
      if (hasAlpha()) {
        if (java.lang.Float.floatToIntBits(getAlpha())
            != java.lang.Float.floatToIntBits(
                other.getAlpha())) return false;
      }
      if (hasBeta() != other.hasBeta()) return false;
      if (hasBeta()) {
        if (java.lang.Float.floatToIntBits(getBeta())
            != java.lang.Float.floatToIntBits(
                other.getBeta())) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasAlpha()) {
        hash = (37 * hash) + ALPHA_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getAlpha());
      }
      if (hasBeta()) {
        hash = (37 * hash) + BETA_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getBeta());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss 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 object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss 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 object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss 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(object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss 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;
    }
    /**
     * <pre>
     * Pixelwise logistic focal loss with pixels near the target having a reduced
     * penalty.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.PenaltyReducedLogisticFocalLoss}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.PenaltyReducedLogisticFocalLoss)
        object_detection.protos.Losses.PenaltyReducedLogisticFocalLossOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_PenaltyReducedLogisticFocalLoss_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_PenaltyReducedLogisticFocalLoss_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.class, object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.Builder.class);
      }

      // Construct using object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        alpha_ = 0F;
        bitField0_ = (bitField0_ & ~0x00000001);
        beta_ = 0F;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_PenaltyReducedLogisticFocalLoss_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss getDefaultInstanceForType() {
        return object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss build() {
        object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss buildPartial() {
        object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss result = new object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.alpha_ = alpha_;
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.beta_ = beta_;
          to_bitField0_ |= 0x00000002;
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) {
          return mergeFrom((object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss other) {
        if (other == object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss.getDefaultInstance()) return this;
        if (other.hasAlpha()) {
          setAlpha(other.getAlpha());
        }
        if (other.hasBeta()) {
          setBeta(other.getBeta());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private float alpha_ ;
      /**
       * <pre>
       * Focussing parameter of the focal loss.
       * </pre>
       *
       * <code>optional float alpha = 1;</code>
       * @return Whether the alpha field is set.
       */
      @java.lang.Override
      public boolean hasAlpha() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * Focussing parameter of the focal loss.
       * </pre>
       *
       * <code>optional float alpha = 1;</code>
       * @return The alpha.
       */
      @java.lang.Override
      public float getAlpha() {
        return alpha_;
      }
      /**
       * <pre>
       * Focussing parameter of the focal loss.
       * </pre>
       *
       * <code>optional float alpha = 1;</code>
       * @param value The alpha to set.
       * @return This builder for chaining.
       */
      public Builder setAlpha(float value) {
        bitField0_ |= 0x00000001;
        alpha_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Focussing parameter of the focal loss.
       * </pre>
       *
       * <code>optional float alpha = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearAlpha() {
        bitField0_ = (bitField0_ & ~0x00000001);
        alpha_ = 0F;
        onChanged();
        return this;
      }

      private float beta_ ;
      /**
       * <pre>
       * Penalty reduction factor.
       * </pre>
       *
       * <code>optional float beta = 2;</code>
       * @return Whether the beta field is set.
       */
      @java.lang.Override
      public boolean hasBeta() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <pre>
       * Penalty reduction factor.
       * </pre>
       *
       * <code>optional float beta = 2;</code>
       * @return The beta.
       */
      @java.lang.Override
      public float getBeta() {
        return beta_;
      }
      /**
       * <pre>
       * Penalty reduction factor.
       * </pre>
       *
       * <code>optional float beta = 2;</code>
       * @param value The beta to set.
       * @return This builder for chaining.
       */
      public Builder setBeta(float value) {
        bitField0_ |= 0x00000002;
        beta_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Penalty reduction factor.
       * </pre>
       *
       * <code>optional float beta = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearBeta() {
        bitField0_ = (bitField0_ & ~0x00000002);
        beta_ = 0F;
        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:object_detection.protos.PenaltyReducedLogisticFocalLoss)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.PenaltyReducedLogisticFocalLoss)
    private static final object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss();
    }

    public static object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<PenaltyReducedLogisticFocalLoss>
        PARSER = new com.google.protobuf.AbstractParser<PenaltyReducedLogisticFocalLoss>() {
      @java.lang.Override
      public PenaltyReducedLogisticFocalLoss parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new PenaltyReducedLogisticFocalLoss(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<PenaltyReducedLogisticFocalLoss> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<PenaltyReducedLogisticFocalLoss> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.PenaltyReducedLogisticFocalLoss getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface HardExampleMinerOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.HardExampleMiner)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Maximum number of hard examples to be selected per image (prior to
     * enforcing max negative to positive ratio constraint).  If set to 0,
     * all examples obtained after NMS are considered.
     * </pre>
     *
     * <code>optional int32 num_hard_examples = 1 [default = 64];</code>
     * @return Whether the numHardExamples field is set.
     */
    boolean hasNumHardExamples();
    /**
     * <pre>
     * Maximum number of hard examples to be selected per image (prior to
     * enforcing max negative to positive ratio constraint).  If set to 0,
     * all examples obtained after NMS are considered.
     * </pre>
     *
     * <code>optional int32 num_hard_examples = 1 [default = 64];</code>
     * @return The numHardExamples.
     */
    int getNumHardExamples();

    /**
     * <pre>
     * Minimum intersection over union for an example to be discarded during NMS.
     * </pre>
     *
     * <code>optional float iou_threshold = 2 [default = 0.7];</code>
     * @return Whether the iouThreshold field is set.
     */
    boolean hasIouThreshold();
    /**
     * <pre>
     * Minimum intersection over union for an example to be discarded during NMS.
     * </pre>
     *
     * <code>optional float iou_threshold = 2 [default = 0.7];</code>
     * @return The iouThreshold.
     */
    float getIouThreshold();

    /**
     * <code>optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];</code>
     * @return Whether the lossType field is set.
     */
    boolean hasLossType();
    /**
     * <code>optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];</code>
     * @return The lossType.
     */
    object_detection.protos.Losses.HardExampleMiner.LossType getLossType();

    /**
     * <pre>
     * Maximum number of negatives to retain for each positive anchor. If
     * num_negatives_per_positive is 0 no prespecified negative:positive ratio is
     * enforced.
     * </pre>
     *
     * <code>optional int32 max_negatives_per_positive = 4 [default = 0];</code>
     * @return Whether the maxNegativesPerPositive field is set.
     */
    boolean hasMaxNegativesPerPositive();
    /**
     * <pre>
     * Maximum number of negatives to retain for each positive anchor. If
     * num_negatives_per_positive is 0 no prespecified negative:positive ratio is
     * enforced.
     * </pre>
     *
     * <code>optional int32 max_negatives_per_positive = 4 [default = 0];</code>
     * @return The maxNegativesPerPositive.
     */
    int getMaxNegativesPerPositive();

    /**
     * <pre>
     * Minimum number of negative anchors to sample for a given image. Setting
     * this to a positive number samples negatives in an image without any
     * positive anchors and thus not bias the model towards having at least one
     * detection per image.
     * </pre>
     *
     * <code>optional int32 min_negatives_per_image = 5 [default = 0];</code>
     * @return Whether the minNegativesPerImage field is set.
     */
    boolean hasMinNegativesPerImage();
    /**
     * <pre>
     * Minimum number of negative anchors to sample for a given image. Setting
     * this to a positive number samples negatives in an image without any
     * positive anchors and thus not bias the model towards having at least one
     * detection per image.
     * </pre>
     *
     * <code>optional int32 min_negatives_per_image = 5 [default = 0];</code>
     * @return The minNegativesPerImage.
     */
    int getMinNegativesPerImage();
  }
  /**
   * <pre>
   * Configuration for hard example miner.
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.HardExampleMiner}
   */
  public static final class HardExampleMiner extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.HardExampleMiner)
      HardExampleMinerOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use HardExampleMiner.newBuilder() to construct.
    private HardExampleMiner(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private HardExampleMiner() {
      numHardExamples_ = 64;
      iouThreshold_ = 0.7F;
      lossType_ = 0;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new HardExampleMiner();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private HardExampleMiner(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 8: {
              bitField0_ |= 0x00000001;
              numHardExamples_ = input.readInt32();
              break;
            }
            case 21: {
              bitField0_ |= 0x00000002;
              iouThreshold_ = input.readFloat();
              break;
            }
            case 24: {
              int rawValue = input.readEnum();
                @SuppressWarnings("deprecation")
              object_detection.protos.Losses.HardExampleMiner.LossType value = object_detection.protos.Losses.HardExampleMiner.LossType.valueOf(rawValue);
              if (value == null) {
                unknownFields.mergeVarintField(3, rawValue);
              } else {
                bitField0_ |= 0x00000004;
                lossType_ = rawValue;
              }
              break;
            }
            case 32: {
              bitField0_ |= 0x00000008;
              maxNegativesPerPositive_ = input.readInt32();
              break;
            }
            case 40: {
              bitField0_ |= 0x00000010;
              minNegativesPerImage_ = input.readInt32();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_HardExampleMiner_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_HardExampleMiner_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.HardExampleMiner.class, object_detection.protos.Losses.HardExampleMiner.Builder.class);
    }

    /**
     * <pre>
     * Whether to use classification losses ('cls', default), localization losses
     * ('loc') or both losses ('both'). In the case of 'both', cls_loss_weight and
     * loc_loss_weight are used to compute weighted sum of the two losses.
     * </pre>
     *
     * Protobuf enum {@code object_detection.protos.HardExampleMiner.LossType}
     */
    public enum LossType
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <code>BOTH = 0;</code>
       */
      BOTH(0),
      /**
       * <code>CLASSIFICATION = 1;</code>
       */
      CLASSIFICATION(1),
      /**
       * <code>LOCALIZATION = 2;</code>
       */
      LOCALIZATION(2),
      ;

      /**
       * <code>BOTH = 0;</code>
       */
      public static final int BOTH_VALUE = 0;
      /**
       * <code>CLASSIFICATION = 1;</code>
       */
      public static final int CLASSIFICATION_VALUE = 1;
      /**
       * <code>LOCALIZATION = 2;</code>
       */
      public static final int LOCALIZATION_VALUE = 2;


      public final int getNumber() {
        return value;
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static LossType valueOf(int value) {
        return forNumber(value);
      }

      /**
       * @param value The numeric wire value of the corresponding enum entry.
       * @return The enum associated with the given numeric wire value.
       */
      public static LossType forNumber(int value) {
        switch (value) {
          case 0: return BOTH;
          case 1: return CLASSIFICATION;
          case 2: return LOCALIZATION;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<LossType>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          LossType> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<LossType>() {
              public LossType findValueByNumber(int number) {
                return LossType.forNumber(number);
              }
            };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        return getDescriptor().getValues().get(ordinal());
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return object_detection.protos.Losses.HardExampleMiner.getDescriptor().getEnumTypes().get(0);
      }

      private static final LossType[] VALUES = values();

      public static LossType valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");
        }
        return VALUES[desc.getIndex()];
      }

      private final int value;

      private LossType(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:object_detection.protos.HardExampleMiner.LossType)
    }

    private int bitField0_;
    public static final int NUM_HARD_EXAMPLES_FIELD_NUMBER = 1;
    private int numHardExamples_;
    /**
     * <pre>
     * Maximum number of hard examples to be selected per image (prior to
     * enforcing max negative to positive ratio constraint).  If set to 0,
     * all examples obtained after NMS are considered.
     * </pre>
     *
     * <code>optional int32 num_hard_examples = 1 [default = 64];</code>
     * @return Whether the numHardExamples field is set.
     */
    @java.lang.Override
    public boolean hasNumHardExamples() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * Maximum number of hard examples to be selected per image (prior to
     * enforcing max negative to positive ratio constraint).  If set to 0,
     * all examples obtained after NMS are considered.
     * </pre>
     *
     * <code>optional int32 num_hard_examples = 1 [default = 64];</code>
     * @return The numHardExamples.
     */
    @java.lang.Override
    public int getNumHardExamples() {
      return numHardExamples_;
    }

    public static final int IOU_THRESHOLD_FIELD_NUMBER = 2;
    private float iouThreshold_;
    /**
     * <pre>
     * Minimum intersection over union for an example to be discarded during NMS.
     * </pre>
     *
     * <code>optional float iou_threshold = 2 [default = 0.7];</code>
     * @return Whether the iouThreshold field is set.
     */
    @java.lang.Override
    public boolean hasIouThreshold() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * Minimum intersection over union for an example to be discarded during NMS.
     * </pre>
     *
     * <code>optional float iou_threshold = 2 [default = 0.7];</code>
     * @return The iouThreshold.
     */
    @java.lang.Override
    public float getIouThreshold() {
      return iouThreshold_;
    }

    public static final int LOSS_TYPE_FIELD_NUMBER = 3;
    private int lossType_;
    /**
     * <code>optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];</code>
     * @return Whether the lossType field is set.
     */
    @java.lang.Override public boolean hasLossType() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <code>optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];</code>
     * @return The lossType.
     */
    @java.lang.Override public object_detection.protos.Losses.HardExampleMiner.LossType getLossType() {
      @SuppressWarnings("deprecation")
      object_detection.protos.Losses.HardExampleMiner.LossType result = object_detection.protos.Losses.HardExampleMiner.LossType.valueOf(lossType_);
      return result == null ? object_detection.protos.Losses.HardExampleMiner.LossType.BOTH : result;
    }

    public static final int MAX_NEGATIVES_PER_POSITIVE_FIELD_NUMBER = 4;
    private int maxNegativesPerPositive_;
    /**
     * <pre>
     * Maximum number of negatives to retain for each positive anchor. If
     * num_negatives_per_positive is 0 no prespecified negative:positive ratio is
     * enforced.
     * </pre>
     *
     * <code>optional int32 max_negatives_per_positive = 4 [default = 0];</code>
     * @return Whether the maxNegativesPerPositive field is set.
     */
    @java.lang.Override
    public boolean hasMaxNegativesPerPositive() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     * <pre>
     * Maximum number of negatives to retain for each positive anchor. If
     * num_negatives_per_positive is 0 no prespecified negative:positive ratio is
     * enforced.
     * </pre>
     *
     * <code>optional int32 max_negatives_per_positive = 4 [default = 0];</code>
     * @return The maxNegativesPerPositive.
     */
    @java.lang.Override
    public int getMaxNegativesPerPositive() {
      return maxNegativesPerPositive_;
    }

    public static final int MIN_NEGATIVES_PER_IMAGE_FIELD_NUMBER = 5;
    private int minNegativesPerImage_;
    /**
     * <pre>
     * Minimum number of negative anchors to sample for a given image. Setting
     * this to a positive number samples negatives in an image without any
     * positive anchors and thus not bias the model towards having at least one
     * detection per image.
     * </pre>
     *
     * <code>optional int32 min_negatives_per_image = 5 [default = 0];</code>
     * @return Whether the minNegativesPerImage field is set.
     */
    @java.lang.Override
    public boolean hasMinNegativesPerImage() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     * <pre>
     * Minimum number of negative anchors to sample for a given image. Setting
     * this to a positive number samples negatives in an image without any
     * positive anchors and thus not bias the model towards having at least one
     * detection per image.
     * </pre>
     *
     * <code>optional int32 min_negatives_per_image = 5 [default = 0];</code>
     * @return The minNegativesPerImage.
     */
    @java.lang.Override
    public int getMinNegativesPerImage() {
      return minNegativesPerImage_;
    }

    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.writeInt32(1, numHardExamples_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeFloat(2, iouThreshold_);
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        output.writeEnum(3, lossType_);
      }
      if (((bitField0_ & 0x00000008) != 0)) {
        output.writeInt32(4, maxNegativesPerPositive_);
      }
      if (((bitField0_ & 0x00000010) != 0)) {
        output.writeInt32(5, minNegativesPerImage_);
      }
      unknownFields.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
          .computeInt32Size(1, numHardExamples_);
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeFloatSize(2, iouThreshold_);
      }
      if (((bitField0_ & 0x00000004) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(3, lossType_);
      }
      if (((bitField0_ & 0x00000008) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(4, maxNegativesPerPositive_);
      }
      if (((bitField0_ & 0x00000010) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(5, minNegativesPerImage_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.HardExampleMiner)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.HardExampleMiner other = (object_detection.protos.Losses.HardExampleMiner) obj;

      if (hasNumHardExamples() != other.hasNumHardExamples()) return false;
      if (hasNumHardExamples()) {
        if (getNumHardExamples()
            != other.getNumHardExamples()) return false;
      }
      if (hasIouThreshold() != other.hasIouThreshold()) return false;
      if (hasIouThreshold()) {
        if (java.lang.Float.floatToIntBits(getIouThreshold())
            != java.lang.Float.floatToIntBits(
                other.getIouThreshold())) return false;
      }
      if (hasLossType() != other.hasLossType()) return false;
      if (hasLossType()) {
        if (lossType_ != other.lossType_) return false;
      }
      if (hasMaxNegativesPerPositive() != other.hasMaxNegativesPerPositive()) return false;
      if (hasMaxNegativesPerPositive()) {
        if (getMaxNegativesPerPositive()
            != other.getMaxNegativesPerPositive()) return false;
      }
      if (hasMinNegativesPerImage() != other.hasMinNegativesPerImage()) return false;
      if (hasMinNegativesPerImage()) {
        if (getMinNegativesPerImage()
            != other.getMinNegativesPerImage()) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasNumHardExamples()) {
        hash = (37 * hash) + NUM_HARD_EXAMPLES_FIELD_NUMBER;
        hash = (53 * hash) + getNumHardExamples();
      }
      if (hasIouThreshold()) {
        hash = (37 * hash) + IOU_THRESHOLD_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getIouThreshold());
      }
      if (hasLossType()) {
        hash = (37 * hash) + LOSS_TYPE_FIELD_NUMBER;
        hash = (53 * hash) + lossType_;
      }
      if (hasMaxNegativesPerPositive()) {
        hash = (37 * hash) + MAX_NEGATIVES_PER_POSITIVE_FIELD_NUMBER;
        hash = (53 * hash) + getMaxNegativesPerPositive();
      }
      if (hasMinNegativesPerImage()) {
        hash = (37 * hash) + MIN_NEGATIVES_PER_IMAGE_FIELD_NUMBER;
        hash = (53 * hash) + getMinNegativesPerImage();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.HardExampleMiner parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.HardExampleMiner parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.HardExampleMiner parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.HardExampleMiner parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.HardExampleMiner parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.HardExampleMiner parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.HardExampleMiner parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.HardExampleMiner 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 object_detection.protos.Losses.HardExampleMiner parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.HardExampleMiner 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 object_detection.protos.Losses.HardExampleMiner parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.HardExampleMiner 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(object_detection.protos.Losses.HardExampleMiner 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;
    }
    /**
     * <pre>
     * Configuration for hard example miner.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.HardExampleMiner}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.HardExampleMiner)
        object_detection.protos.Losses.HardExampleMinerOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_HardExampleMiner_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_HardExampleMiner_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.HardExampleMiner.class, object_detection.protos.Losses.HardExampleMiner.Builder.class);
      }

      // Construct using object_detection.protos.Losses.HardExampleMiner.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        numHardExamples_ = 64;
        bitField0_ = (bitField0_ & ~0x00000001);
        iouThreshold_ = 0.7F;
        bitField0_ = (bitField0_ & ~0x00000002);
        lossType_ = 0;
        bitField0_ = (bitField0_ & ~0x00000004);
        maxNegativesPerPositive_ = 0;
        bitField0_ = (bitField0_ & ~0x00000008);
        minNegativesPerImage_ = 0;
        bitField0_ = (bitField0_ & ~0x00000010);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_HardExampleMiner_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.HardExampleMiner getDefaultInstanceForType() {
        return object_detection.protos.Losses.HardExampleMiner.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.HardExampleMiner build() {
        object_detection.protos.Losses.HardExampleMiner result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.HardExampleMiner buildPartial() {
        object_detection.protos.Losses.HardExampleMiner result = new object_detection.protos.Losses.HardExampleMiner(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          to_bitField0_ |= 0x00000001;
        }
        result.numHardExamples_ = numHardExamples_;
        if (((from_bitField0_ & 0x00000002) != 0)) {
          to_bitField0_ |= 0x00000002;
        }
        result.iouThreshold_ = iouThreshold_;
        if (((from_bitField0_ & 0x00000004) != 0)) {
          to_bitField0_ |= 0x00000004;
        }
        result.lossType_ = lossType_;
        if (((from_bitField0_ & 0x00000008) != 0)) {
          result.maxNegativesPerPositive_ = maxNegativesPerPositive_;
          to_bitField0_ |= 0x00000008;
        }
        if (((from_bitField0_ & 0x00000010) != 0)) {
          result.minNegativesPerImage_ = minNegativesPerImage_;
          to_bitField0_ |= 0x00000010;
        }
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.HardExampleMiner) {
          return mergeFrom((object_detection.protos.Losses.HardExampleMiner)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.HardExampleMiner other) {
        if (other == object_detection.protos.Losses.HardExampleMiner.getDefaultInstance()) return this;
        if (other.hasNumHardExamples()) {
          setNumHardExamples(other.getNumHardExamples());
        }
        if (other.hasIouThreshold()) {
          setIouThreshold(other.getIouThreshold());
        }
        if (other.hasLossType()) {
          setLossType(other.getLossType());
        }
        if (other.hasMaxNegativesPerPositive()) {
          setMaxNegativesPerPositive(other.getMaxNegativesPerPositive());
        }
        if (other.hasMinNegativesPerImage()) {
          setMinNegativesPerImage(other.getMinNegativesPerImage());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.HardExampleMiner parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.HardExampleMiner) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private int numHardExamples_ = 64;
      /**
       * <pre>
       * Maximum number of hard examples to be selected per image (prior to
       * enforcing max negative to positive ratio constraint).  If set to 0,
       * all examples obtained after NMS are considered.
       * </pre>
       *
       * <code>optional int32 num_hard_examples = 1 [default = 64];</code>
       * @return Whether the numHardExamples field is set.
       */
      @java.lang.Override
      public boolean hasNumHardExamples() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * Maximum number of hard examples to be selected per image (prior to
       * enforcing max negative to positive ratio constraint).  If set to 0,
       * all examples obtained after NMS are considered.
       * </pre>
       *
       * <code>optional int32 num_hard_examples = 1 [default = 64];</code>
       * @return The numHardExamples.
       */
      @java.lang.Override
      public int getNumHardExamples() {
        return numHardExamples_;
      }
      /**
       * <pre>
       * Maximum number of hard examples to be selected per image (prior to
       * enforcing max negative to positive ratio constraint).  If set to 0,
       * all examples obtained after NMS are considered.
       * </pre>
       *
       * <code>optional int32 num_hard_examples = 1 [default = 64];</code>
       * @param value The numHardExamples to set.
       * @return This builder for chaining.
       */
      public Builder setNumHardExamples(int value) {
        bitField0_ |= 0x00000001;
        numHardExamples_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Maximum number of hard examples to be selected per image (prior to
       * enforcing max negative to positive ratio constraint).  If set to 0,
       * all examples obtained after NMS are considered.
       * </pre>
       *
       * <code>optional int32 num_hard_examples = 1 [default = 64];</code>
       * @return This builder for chaining.
       */
      public Builder clearNumHardExamples() {
        bitField0_ = (bitField0_ & ~0x00000001);
        numHardExamples_ = 64;
        onChanged();
        return this;
      }

      private float iouThreshold_ = 0.7F;
      /**
       * <pre>
       * Minimum intersection over union for an example to be discarded during NMS.
       * </pre>
       *
       * <code>optional float iou_threshold = 2 [default = 0.7];</code>
       * @return Whether the iouThreshold field is set.
       */
      @java.lang.Override
      public boolean hasIouThreshold() {
        return ((bitField0_ & 0x00000002) != 0);
      }
      /**
       * <pre>
       * Minimum intersection over union for an example to be discarded during NMS.
       * </pre>
       *
       * <code>optional float iou_threshold = 2 [default = 0.7];</code>
       * @return The iouThreshold.
       */
      @java.lang.Override
      public float getIouThreshold() {
        return iouThreshold_;
      }
      /**
       * <pre>
       * Minimum intersection over union for an example to be discarded during NMS.
       * </pre>
       *
       * <code>optional float iou_threshold = 2 [default = 0.7];</code>
       * @param value The iouThreshold to set.
       * @return This builder for chaining.
       */
      public Builder setIouThreshold(float value) {
        bitField0_ |= 0x00000002;
        iouThreshold_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Minimum intersection over union for an example to be discarded during NMS.
       * </pre>
       *
       * <code>optional float iou_threshold = 2 [default = 0.7];</code>
       * @return This builder for chaining.
       */
      public Builder clearIouThreshold() {
        bitField0_ = (bitField0_ & ~0x00000002);
        iouThreshold_ = 0.7F;
        onChanged();
        return this;
      }

      private int lossType_ = 0;
      /**
       * <code>optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];</code>
       * @return Whether the lossType field is set.
       */
      @java.lang.Override public boolean hasLossType() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <code>optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];</code>
       * @return The lossType.
       */
      @java.lang.Override
      public object_detection.protos.Losses.HardExampleMiner.LossType getLossType() {
        @SuppressWarnings("deprecation")
        object_detection.protos.Losses.HardExampleMiner.LossType result = object_detection.protos.Losses.HardExampleMiner.LossType.valueOf(lossType_);
        return result == null ? object_detection.protos.Losses.HardExampleMiner.LossType.BOTH : result;
      }
      /**
       * <code>optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];</code>
       * @param value The lossType to set.
       * @return This builder for chaining.
       */
      public Builder setLossType(object_detection.protos.Losses.HardExampleMiner.LossType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000004;
        lossType_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <code>optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];</code>
       * @return This builder for chaining.
       */
      public Builder clearLossType() {
        bitField0_ = (bitField0_ & ~0x00000004);
        lossType_ = 0;
        onChanged();
        return this;
      }

      private int maxNegativesPerPositive_ ;
      /**
       * <pre>
       * Maximum number of negatives to retain for each positive anchor. If
       * num_negatives_per_positive is 0 no prespecified negative:positive ratio is
       * enforced.
       * </pre>
       *
       * <code>optional int32 max_negatives_per_positive = 4 [default = 0];</code>
       * @return Whether the maxNegativesPerPositive field is set.
       */
      @java.lang.Override
      public boolean hasMaxNegativesPerPositive() {
        return ((bitField0_ & 0x00000008) != 0);
      }
      /**
       * <pre>
       * Maximum number of negatives to retain for each positive anchor. If
       * num_negatives_per_positive is 0 no prespecified negative:positive ratio is
       * enforced.
       * </pre>
       *
       * <code>optional int32 max_negatives_per_positive = 4 [default = 0];</code>
       * @return The maxNegativesPerPositive.
       */
      @java.lang.Override
      public int getMaxNegativesPerPositive() {
        return maxNegativesPerPositive_;
      }
      /**
       * <pre>
       * Maximum number of negatives to retain for each positive anchor. If
       * num_negatives_per_positive is 0 no prespecified negative:positive ratio is
       * enforced.
       * </pre>
       *
       * <code>optional int32 max_negatives_per_positive = 4 [default = 0];</code>
       * @param value The maxNegativesPerPositive to set.
       * @return This builder for chaining.
       */
      public Builder setMaxNegativesPerPositive(int value) {
        bitField0_ |= 0x00000008;
        maxNegativesPerPositive_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Maximum number of negatives to retain for each positive anchor. If
       * num_negatives_per_positive is 0 no prespecified negative:positive ratio is
       * enforced.
       * </pre>
       *
       * <code>optional int32 max_negatives_per_positive = 4 [default = 0];</code>
       * @return This builder for chaining.
       */
      public Builder clearMaxNegativesPerPositive() {
        bitField0_ = (bitField0_ & ~0x00000008);
        maxNegativesPerPositive_ = 0;
        onChanged();
        return this;
      }

      private int minNegativesPerImage_ ;
      /**
       * <pre>
       * Minimum number of negative anchors to sample for a given image. Setting
       * this to a positive number samples negatives in an image without any
       * positive anchors and thus not bias the model towards having at least one
       * detection per image.
       * </pre>
       *
       * <code>optional int32 min_negatives_per_image = 5 [default = 0];</code>
       * @return Whether the minNegativesPerImage field is set.
       */
      @java.lang.Override
      public boolean hasMinNegativesPerImage() {
        return ((bitField0_ & 0x00000010) != 0);
      }
      /**
       * <pre>
       * Minimum number of negative anchors to sample for a given image. Setting
       * this to a positive number samples negatives in an image without any
       * positive anchors and thus not bias the model towards having at least one
       * detection per image.
       * </pre>
       *
       * <code>optional int32 min_negatives_per_image = 5 [default = 0];</code>
       * @return The minNegativesPerImage.
       */
      @java.lang.Override
      public int getMinNegativesPerImage() {
        return minNegativesPerImage_;
      }
      /**
       * <pre>
       * Minimum number of negative anchors to sample for a given image. Setting
       * this to a positive number samples negatives in an image without any
       * positive anchors and thus not bias the model towards having at least one
       * detection per image.
       * </pre>
       *
       * <code>optional int32 min_negatives_per_image = 5 [default = 0];</code>
       * @param value The minNegativesPerImage to set.
       * @return This builder for chaining.
       */
      public Builder setMinNegativesPerImage(int value) {
        bitField0_ |= 0x00000010;
        minNegativesPerImage_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Minimum number of negative anchors to sample for a given image. Setting
       * this to a positive number samples negatives in an image without any
       * positive anchors and thus not bias the model towards having at least one
       * detection per image.
       * </pre>
       *
       * <code>optional int32 min_negatives_per_image = 5 [default = 0];</code>
       * @return This builder for chaining.
       */
      public Builder clearMinNegativesPerImage() {
        bitField0_ = (bitField0_ & ~0x00000010);
        minNegativesPerImage_ = 0;
        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:object_detection.protos.HardExampleMiner)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.HardExampleMiner)
    private static final object_detection.protos.Losses.HardExampleMiner DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.HardExampleMiner();
    }

    public static object_detection.protos.Losses.HardExampleMiner getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<HardExampleMiner>
        PARSER = new com.google.protobuf.AbstractParser<HardExampleMiner>() {
      @java.lang.Override
      public HardExampleMiner parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new HardExampleMiner(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<HardExampleMiner> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<HardExampleMiner> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.HardExampleMiner getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public interface RandomExampleSamplerOrBuilder extends
      // @@protoc_insertion_point(interface_extends:object_detection.protos.RandomExampleSampler)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The desired fraction of positive samples in batch when applying random
     * example sampling.
     * </pre>
     *
     * <code>optional float positive_sample_fraction = 1 [default = 0.01];</code>
     * @return Whether the positiveSampleFraction field is set.
     */
    boolean hasPositiveSampleFraction();
    /**
     * <pre>
     * The desired fraction of positive samples in batch when applying random
     * example sampling.
     * </pre>
     *
     * <code>optional float positive_sample_fraction = 1 [default = 0.01];</code>
     * @return The positiveSampleFraction.
     */
    float getPositiveSampleFraction();
  }
  /**
   * <pre>
   * Configuration for random example sampler.
   * </pre>
   *
   * Protobuf type {@code object_detection.protos.RandomExampleSampler}
   */
  public static final class RandomExampleSampler extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:object_detection.protos.RandomExampleSampler)
      RandomExampleSamplerOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use RandomExampleSampler.newBuilder() to construct.
    private RandomExampleSampler(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private RandomExampleSampler() {
      positiveSampleFraction_ = 0.01F;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new RandomExampleSampler();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private RandomExampleSampler(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 13: {
              bitField0_ |= 0x00000001;
              positiveSampleFraction_ = input.readFloat();
              break;
            }
            default: {
              if (!parseUnknownField(
                  input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_RandomExampleSampler_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return object_detection.protos.Losses.internal_static_object_detection_protos_RandomExampleSampler_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              object_detection.protos.Losses.RandomExampleSampler.class, object_detection.protos.Losses.RandomExampleSampler.Builder.class);
    }

    private int bitField0_;
    public static final int POSITIVE_SAMPLE_FRACTION_FIELD_NUMBER = 1;
    private float positiveSampleFraction_;
    /**
     * <pre>
     * The desired fraction of positive samples in batch when applying random
     * example sampling.
     * </pre>
     *
     * <code>optional float positive_sample_fraction = 1 [default = 0.01];</code>
     * @return Whether the positiveSampleFraction field is set.
     */
    @java.lang.Override
    public boolean hasPositiveSampleFraction() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * The desired fraction of positive samples in batch when applying random
     * example sampling.
     * </pre>
     *
     * <code>optional float positive_sample_fraction = 1 [default = 0.01];</code>
     * @return The positiveSampleFraction.
     */
    @java.lang.Override
    public float getPositiveSampleFraction() {
      return positiveSampleFraction_;
    }

    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.writeFloat(1, positiveSampleFraction_);
      }
      unknownFields.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
          .computeFloatSize(1, positiveSampleFraction_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof object_detection.protos.Losses.RandomExampleSampler)) {
        return super.equals(obj);
      }
      object_detection.protos.Losses.RandomExampleSampler other = (object_detection.protos.Losses.RandomExampleSampler) obj;

      if (hasPositiveSampleFraction() != other.hasPositiveSampleFraction()) return false;
      if (hasPositiveSampleFraction()) {
        if (java.lang.Float.floatToIntBits(getPositiveSampleFraction())
            != java.lang.Float.floatToIntBits(
                other.getPositiveSampleFraction())) return false;
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasPositiveSampleFraction()) {
        hash = (37 * hash) + POSITIVE_SAMPLE_FRACTION_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getPositiveSampleFraction());
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static object_detection.protos.Losses.RandomExampleSampler parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.RandomExampleSampler parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.RandomExampleSampler parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.RandomExampleSampler parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.RandomExampleSampler parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static object_detection.protos.Losses.RandomExampleSampler parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static object_detection.protos.Losses.RandomExampleSampler parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.RandomExampleSampler 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 object_detection.protos.Losses.RandomExampleSampler parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.RandomExampleSampler 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 object_detection.protos.Losses.RandomExampleSampler parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static object_detection.protos.Losses.RandomExampleSampler 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(object_detection.protos.Losses.RandomExampleSampler 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;
    }
    /**
     * <pre>
     * Configuration for random example sampler.
     * </pre>
     *
     * Protobuf type {@code object_detection.protos.RandomExampleSampler}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:object_detection.protos.RandomExampleSampler)
        object_detection.protos.Losses.RandomExampleSamplerOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_RandomExampleSampler_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_RandomExampleSampler_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                object_detection.protos.Losses.RandomExampleSampler.class, object_detection.protos.Losses.RandomExampleSampler.Builder.class);
      }

      // Construct using object_detection.protos.Losses.RandomExampleSampler.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

      private Builder(
          com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3
                .alwaysUseFieldBuilders) {
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        positiveSampleFraction_ = 0.01F;
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return object_detection.protos.Losses.internal_static_object_detection_protos_RandomExampleSampler_descriptor;
      }

      @java.lang.Override
      public object_detection.protos.Losses.RandomExampleSampler getDefaultInstanceForType() {
        return object_detection.protos.Losses.RandomExampleSampler.getDefaultInstance();
      }

      @java.lang.Override
      public object_detection.protos.Losses.RandomExampleSampler build() {
        object_detection.protos.Losses.RandomExampleSampler result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public object_detection.protos.Losses.RandomExampleSampler buildPartial() {
        object_detection.protos.Losses.RandomExampleSampler result = new object_detection.protos.Losses.RandomExampleSampler(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          to_bitField0_ |= 0x00000001;
        }
        result.positiveSampleFraction_ = positiveSampleFraction_;
        result.bitField0_ = to_bitField0_;
        onBuilt();
        return result;
      }

      @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 object_detection.protos.Losses.RandomExampleSampler) {
          return mergeFrom((object_detection.protos.Losses.RandomExampleSampler)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(object_detection.protos.Losses.RandomExampleSampler other) {
        if (other == object_detection.protos.Losses.RandomExampleSampler.getDefaultInstance()) return this;
        if (other.hasPositiveSampleFraction()) {
          setPositiveSampleFraction(other.getPositiveSampleFraction());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        object_detection.protos.Losses.RandomExampleSampler parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (object_detection.protos.Losses.RandomExampleSampler) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int bitField0_;

      private float positiveSampleFraction_ = 0.01F;
      /**
       * <pre>
       * The desired fraction of positive samples in batch when applying random
       * example sampling.
       * </pre>
       *
       * <code>optional float positive_sample_fraction = 1 [default = 0.01];</code>
       * @return Whether the positiveSampleFraction field is set.
       */
      @java.lang.Override
      public boolean hasPositiveSampleFraction() {
        return ((bitField0_ & 0x00000001) != 0);
      }
      /**
       * <pre>
       * The desired fraction of positive samples in batch when applying random
       * example sampling.
       * </pre>
       *
       * <code>optional float positive_sample_fraction = 1 [default = 0.01];</code>
       * @return The positiveSampleFraction.
       */
      @java.lang.Override
      public float getPositiveSampleFraction() {
        return positiveSampleFraction_;
      }
      /**
       * <pre>
       * The desired fraction of positive samples in batch when applying random
       * example sampling.
       * </pre>
       *
       * <code>optional float positive_sample_fraction = 1 [default = 0.01];</code>
       * @param value The positiveSampleFraction to set.
       * @return This builder for chaining.
       */
      public Builder setPositiveSampleFraction(float value) {
        bitField0_ |= 0x00000001;
        positiveSampleFraction_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The desired fraction of positive samples in batch when applying random
       * example sampling.
       * </pre>
       *
       * <code>optional float positive_sample_fraction = 1 [default = 0.01];</code>
       * @return This builder for chaining.
       */
      public Builder clearPositiveSampleFraction() {
        bitField0_ = (bitField0_ & ~0x00000001);
        positiveSampleFraction_ = 0.01F;
        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:object_detection.protos.RandomExampleSampler)
    }

    // @@protoc_insertion_point(class_scope:object_detection.protos.RandomExampleSampler)
    private static final object_detection.protos.Losses.RandomExampleSampler DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new object_detection.protos.Losses.RandomExampleSampler();
    }

    public static object_detection.protos.Losses.RandomExampleSampler getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    @java.lang.Deprecated public static final com.google.protobuf.Parser<RandomExampleSampler>
        PARSER = new com.google.protobuf.AbstractParser<RandomExampleSampler>() {
      @java.lang.Override
      public RandomExampleSampler parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new RandomExampleSampler(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<RandomExampleSampler> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<RandomExampleSampler> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public object_detection.protos.Losses.RandomExampleSampler getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_Loss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_Loss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_Loss_EqualizationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_Loss_EqualizationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_LocalizationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_LocalizationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_WeightedL2LocalizationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_WeightedL2LocalizationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_WeightedSmoothL1LocalizationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_WeightedSmoothL1LocalizationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_WeightedIOULocalizationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_WeightedIOULocalizationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_L1LocalizationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_L1LocalizationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_ClassificationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_ClassificationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_WeightedSigmoidClassificationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_WeightedSigmoidClassificationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_SigmoidFocalClassificationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_SigmoidFocalClassificationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_WeightedSoftmaxClassificationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_WeightedSoftmaxClassificationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_WeightedSoftmaxClassificationAgainstLogitsLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_WeightedSoftmaxClassificationAgainstLogitsLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_BootstrappedSigmoidClassificationLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_BootstrappedSigmoidClassificationLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_PenaltyReducedLogisticFocalLoss_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_PenaltyReducedLogisticFocalLoss_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_HardExampleMiner_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_HardExampleMiner_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_object_detection_protos_RandomExampleSampler_descriptor;
  private static final
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_object_detection_protos_RandomExampleSampler_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n$object_detection/protos/losses.proto\022\027" +
      "object_detection.protos\"\376\005\n\004Loss\022D\n\021loca" +
      "lization_loss\030\001 \001(\0132).object_detection.p" +
      "rotos.LocalizationLoss\022H\n\023classification" +
      "_loss\030\002 \001(\0132+.object_detection.protos.Cl" +
      "assificationLoss\022E\n\022hard_example_miner\030\003" +
      " \001(\0132).object_detection.protos.HardExamp" +
      "leMiner\022 \n\025classification_weight\030\004 \001(\002:\001" +
      "1\022\036\n\023localization_weight\030\005 \001(\002:\0011\022M\n\026ran" +
      "dom_example_sampler\030\006 \001(\0132-.object_detec" +
      "tion.protos.RandomExampleSampler\022I\n\021equa" +
      "lization_loss\030\007 \001(\0132..object_detection.p" +
      "rotos.Loss.EqualizationLoss\022V\n\025expected_" +
      "loss_weights\030\022 \001(\01621.object_detection.pr" +
      "otos.Loss.ExpectedLossWeights:\004NONE\022#\n\030m" +
      "in_num_negative_samples\030\023 \001(\002:\0010\022*\n\037desi" +
      "red_negative_sampling_ratio\030\024 \001(\002:\0013\032?\n\020" +
      "EqualizationLoss\022\021\n\006weight\030\001 \001(\002:\0010\022\030\n\020e" +
      "xclude_prefixes\030\002 \003(\t\"Y\n\023ExpectedLossWei" +
      "ghts\022\010\n\004NONE\020\000\022\025\n\021EXPECTED_SAMPLING\020\001\022!\n" +
      "\035REWEIGHTING_UNMATCHED_ANCHORS\020\002\"\347\002\n\020Loc" +
      "alizationLoss\022J\n\013weighted_l2\030\001 \001(\01323.obj" +
      "ect_detection.protos.WeightedL2Localizat" +
      "ionLossH\000\022W\n\022weighted_smooth_l1\030\002 \001(\01329." +
      "object_detection.protos.WeightedSmoothL1" +
      "LocalizationLossH\000\022L\n\014weighted_iou\030\003 \001(\013" +
      "24.object_detection.protos.WeightedIOULo" +
      "calizationLossH\000\022K\n\024l1_localization_loss" +
      "\030\004 \001(\0132+.object_detection.protos.L1Local" +
      "izationLossH\000B\023\n\021localization_loss\">\n\032We" +
      "ightedL2LocalizationLoss\022 \n\021anchorwise_o" +
      "utput\030\001 \001(\010:\005false\"V\n WeightedSmoothL1Lo" +
      "calizationLoss\022 \n\021anchorwise_output\030\001 \001(" +
      "\010:\005false\022\020\n\005delta\030\002 \001(\002:\0011\"\035\n\033WeightedIO" +
      "ULocalizationLoss\"\024\n\022L1LocalizationLoss\"" +
      "\353\004\n\022ClassificationLoss\022V\n\020weighted_sigmo" +
      "id\030\001 \001(\0132:.object_detection.protos.Weigh" +
      "tedSigmoidClassificationLossH\000\022V\n\020weight" +
      "ed_softmax\030\002 \001(\0132:.object_detection.prot" +
      "os.WeightedSoftmaxClassificationLossH\000\022j" +
      "\n\027weighted_logits_softmax\030\005 \001(\0132G.object" +
      "_detection.protos.WeightedSoftmaxClassif" +
      "icationAgainstLogitsLossH\000\022^\n\024bootstrapp" +
      "ed_sigmoid\030\003 \001(\0132>.object_detection.prot" +
      "os.BootstrappedSigmoidClassificationLoss" +
      "H\000\022Y\n\026weighted_sigmoid_focal\030\004 \001(\01327.obj" +
      "ect_detection.protos.SigmoidFocalClassif" +
      "icationLossH\000\022g\n#penalty_reduced_logisti" +
      "c_focal_loss\030\006 \001(\01328.object_detection.pr" +
      "otos.PenaltyReducedLogisticFocalLossH\000B\025" +
      "\n\023classification_loss\"E\n!WeightedSigmoid" +
      "ClassificationLoss\022 \n\021anchorwise_output\030" +
      "\001 \001(\010:\005false\"c\n\036SigmoidFocalClassificati" +
      "onLoss\022 \n\021anchorwise_output\030\001 \001(\010:\005false" +
      "\022\020\n\005gamma\030\002 \001(\002:\0012\022\r\n\005alpha\030\003 \001(\002\"]\n!Wei" +
      "ghtedSoftmaxClassificationLoss\022 \n\021anchor" +
      "wise_output\030\001 \001(\010:\005false\022\026\n\013logit_scale\030" +
      "\002 \001(\002:\0011\"j\n.WeightedSoftmaxClassificatio" +
      "nAgainstLogitsLoss\022 \n\021anchorwise_output\030" +
      "\001 \001(\010:\005false\022\026\n\013logit_scale\030\002 \001(\002:\0011\"w\n%" +
      "BootstrappedSigmoidClassificationLoss\022\r\n" +
      "\005alpha\030\001 \001(\002\022\035\n\016hard_bootstrap\030\002 \001(\010:\005fa" +
      "lse\022 \n\021anchorwise_output\030\003 \001(\010:\005false\">\n" +
      "\037PenaltyReducedLogisticFocalLoss\022\r\n\005alph" +
      "a\030\001 \001(\002\022\014\n\004beta\030\002 \001(\002\"\241\002\n\020HardExampleMin" +
      "er\022\035\n\021num_hard_examples\030\001 \001(\005:\00264\022\032\n\riou" +
      "_threshold\030\002 \001(\002:\0030.7\022K\n\tloss_type\030\003 \001(\016" +
      "22.object_detection.protos.HardExampleMi" +
      "ner.LossType:\004BOTH\022%\n\032max_negatives_per_" +
      "positive\030\004 \001(\005:\0010\022\"\n\027min_negatives_per_i" +
      "mage\030\005 \001(\005:\0010\":\n\010LossType\022\010\n\004BOTH\020\000\022\022\n\016C" +
      "LASSIFICATION\020\001\022\020\n\014LOCALIZATION\020\002\">\n\024Ran" +
      "domExampleSampler\022&\n\030positive_sample_fra" +
      "ction\030\001 \001(\002:\0040.01"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        });
    internal_static_object_detection_protos_Loss_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_object_detection_protos_Loss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_Loss_descriptor,
        new java.lang.String[] { "LocalizationLoss", "ClassificationLoss", "HardExampleMiner", "ClassificationWeight", "LocalizationWeight", "RandomExampleSampler", "EqualizationLoss", "ExpectedLossWeights", "MinNumNegativeSamples", "DesiredNegativeSamplingRatio", });
    internal_static_object_detection_protos_Loss_EqualizationLoss_descriptor =
      internal_static_object_detection_protos_Loss_descriptor.getNestedTypes().get(0);
    internal_static_object_detection_protos_Loss_EqualizationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_Loss_EqualizationLoss_descriptor,
        new java.lang.String[] { "Weight", "ExcludePrefixes", });
    internal_static_object_detection_protos_LocalizationLoss_descriptor =
      getDescriptor().getMessageTypes().get(1);
    internal_static_object_detection_protos_LocalizationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_LocalizationLoss_descriptor,
        new java.lang.String[] { "WeightedL2", "WeightedSmoothL1", "WeightedIou", "L1LocalizationLoss", "LocalizationLoss", });
    internal_static_object_detection_protos_WeightedL2LocalizationLoss_descriptor =
      getDescriptor().getMessageTypes().get(2);
    internal_static_object_detection_protos_WeightedL2LocalizationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_WeightedL2LocalizationLoss_descriptor,
        new java.lang.String[] { "AnchorwiseOutput", });
    internal_static_object_detection_protos_WeightedSmoothL1LocalizationLoss_descriptor =
      getDescriptor().getMessageTypes().get(3);
    internal_static_object_detection_protos_WeightedSmoothL1LocalizationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_WeightedSmoothL1LocalizationLoss_descriptor,
        new java.lang.String[] { "AnchorwiseOutput", "Delta", });
    internal_static_object_detection_protos_WeightedIOULocalizationLoss_descriptor =
      getDescriptor().getMessageTypes().get(4);
    internal_static_object_detection_protos_WeightedIOULocalizationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_WeightedIOULocalizationLoss_descriptor,
        new java.lang.String[] { });
    internal_static_object_detection_protos_L1LocalizationLoss_descriptor =
      getDescriptor().getMessageTypes().get(5);
    internal_static_object_detection_protos_L1LocalizationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_L1LocalizationLoss_descriptor,
        new java.lang.String[] { });
    internal_static_object_detection_protos_ClassificationLoss_descriptor =
      getDescriptor().getMessageTypes().get(6);
    internal_static_object_detection_protos_ClassificationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_ClassificationLoss_descriptor,
        new java.lang.String[] { "WeightedSigmoid", "WeightedSoftmax", "WeightedLogitsSoftmax", "BootstrappedSigmoid", "WeightedSigmoidFocal", "PenaltyReducedLogisticFocalLoss", "ClassificationLoss", });
    internal_static_object_detection_protos_WeightedSigmoidClassificationLoss_descriptor =
      getDescriptor().getMessageTypes().get(7);
    internal_static_object_detection_protos_WeightedSigmoidClassificationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_WeightedSigmoidClassificationLoss_descriptor,
        new java.lang.String[] { "AnchorwiseOutput", });
    internal_static_object_detection_protos_SigmoidFocalClassificationLoss_descriptor =
      getDescriptor().getMessageTypes().get(8);
    internal_static_object_detection_protos_SigmoidFocalClassificationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_SigmoidFocalClassificationLoss_descriptor,
        new java.lang.String[] { "AnchorwiseOutput", "Gamma", "Alpha", });
    internal_static_object_detection_protos_WeightedSoftmaxClassificationLoss_descriptor =
      getDescriptor().getMessageTypes().get(9);
    internal_static_object_detection_protos_WeightedSoftmaxClassificationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_WeightedSoftmaxClassificationLoss_descriptor,
        new java.lang.String[] { "AnchorwiseOutput", "LogitScale", });
    internal_static_object_detection_protos_WeightedSoftmaxClassificationAgainstLogitsLoss_descriptor =
      getDescriptor().getMessageTypes().get(10);
    internal_static_object_detection_protos_WeightedSoftmaxClassificationAgainstLogitsLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_WeightedSoftmaxClassificationAgainstLogitsLoss_descriptor,
        new java.lang.String[] { "AnchorwiseOutput", "LogitScale", });
    internal_static_object_detection_protos_BootstrappedSigmoidClassificationLoss_descriptor =
      getDescriptor().getMessageTypes().get(11);
    internal_static_object_detection_protos_BootstrappedSigmoidClassificationLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_BootstrappedSigmoidClassificationLoss_descriptor,
        new java.lang.String[] { "Alpha", "HardBootstrap", "AnchorwiseOutput", });
    internal_static_object_detection_protos_PenaltyReducedLogisticFocalLoss_descriptor =
      getDescriptor().getMessageTypes().get(12);
    internal_static_object_detection_protos_PenaltyReducedLogisticFocalLoss_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_PenaltyReducedLogisticFocalLoss_descriptor,
        new java.lang.String[] { "Alpha", "Beta", });
    internal_static_object_detection_protos_HardExampleMiner_descriptor =
      getDescriptor().getMessageTypes().get(13);
    internal_static_object_detection_protos_HardExampleMiner_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_HardExampleMiner_descriptor,
        new java.lang.String[] { "NumHardExamples", "IouThreshold", "LossType", "MaxNegativesPerPositive", "MinNegativesPerImage", });
    internal_static_object_detection_protos_RandomExampleSampler_descriptor =
      getDescriptor().getMessageTypes().get(14);
    internal_static_object_detection_protos_RandomExampleSampler_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_object_detection_protos_RandomExampleSampler_descriptor,
        new java.lang.String[] { "PositiveSampleFraction", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
