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

#include "object_detection/protos/losses.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace object_detection {
namespace protos {
PROTOBUF_CONSTEXPR Loss_EqualizationLoss::Loss_EqualizationLoss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.exclude_prefixes_)*/{}
  , /*decltype(_impl_.weight_)*/0} {}
struct Loss_EqualizationLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR Loss_EqualizationLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~Loss_EqualizationLossDefaultTypeInternal() {}
  union {
    Loss_EqualizationLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Loss_EqualizationLossDefaultTypeInternal _Loss_EqualizationLoss_default_instance_;
PROTOBUF_CONSTEXPR Loss::Loss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.localization_loss_)*/nullptr
  , /*decltype(_impl_.classification_loss_)*/nullptr
  , /*decltype(_impl_.hard_example_miner_)*/nullptr
  , /*decltype(_impl_.random_example_sampler_)*/nullptr
  , /*decltype(_impl_.equalization_loss_)*/nullptr
  , /*decltype(_impl_.expected_loss_weights_)*/0
  , /*decltype(_impl_.min_num_negative_samples_)*/0
  , /*decltype(_impl_.desired_negative_sampling_ratio_)*/3
  , /*decltype(_impl_.classification_weight_)*/1
  , /*decltype(_impl_.localization_weight_)*/1} {}
struct LossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR LossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~LossDefaultTypeInternal() {}
  union {
    Loss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LossDefaultTypeInternal _Loss_default_instance_;
PROTOBUF_CONSTEXPR LocalizationLoss::LocalizationLoss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.localization_loss_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct LocalizationLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR LocalizationLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~LocalizationLossDefaultTypeInternal() {}
  union {
    LocalizationLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LocalizationLossDefaultTypeInternal _LocalizationLoss_default_instance_;
PROTOBUF_CONSTEXPR WeightedL2LocalizationLoss::WeightedL2LocalizationLoss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.anchorwise_output_)*/false} {}
struct WeightedL2LocalizationLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR WeightedL2LocalizationLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~WeightedL2LocalizationLossDefaultTypeInternal() {}
  union {
    WeightedL2LocalizationLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WeightedL2LocalizationLossDefaultTypeInternal _WeightedL2LocalizationLoss_default_instance_;
PROTOBUF_CONSTEXPR WeightedSmoothL1LocalizationLoss::WeightedSmoothL1LocalizationLoss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.anchorwise_output_)*/false
  , /*decltype(_impl_.delta_)*/1} {}
struct WeightedSmoothL1LocalizationLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR WeightedSmoothL1LocalizationLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~WeightedSmoothL1LocalizationLossDefaultTypeInternal() {}
  union {
    WeightedSmoothL1LocalizationLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WeightedSmoothL1LocalizationLossDefaultTypeInternal _WeightedSmoothL1LocalizationLoss_default_instance_;
PROTOBUF_CONSTEXPR WeightedIOULocalizationLoss::WeightedIOULocalizationLoss(
    ::_pbi::ConstantInitialized) {}
struct WeightedIOULocalizationLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR WeightedIOULocalizationLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~WeightedIOULocalizationLossDefaultTypeInternal() {}
  union {
    WeightedIOULocalizationLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WeightedIOULocalizationLossDefaultTypeInternal _WeightedIOULocalizationLoss_default_instance_;
PROTOBUF_CONSTEXPR ClassificationLoss::ClassificationLoss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.classification_loss_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct ClassificationLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ClassificationLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ClassificationLossDefaultTypeInternal() {}
  union {
    ClassificationLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ClassificationLossDefaultTypeInternal _ClassificationLoss_default_instance_;
PROTOBUF_CONSTEXPR WeightedSigmoidClassificationLoss::WeightedSigmoidClassificationLoss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.anchorwise_output_)*/false} {}
struct WeightedSigmoidClassificationLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR WeightedSigmoidClassificationLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~WeightedSigmoidClassificationLossDefaultTypeInternal() {}
  union {
    WeightedSigmoidClassificationLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WeightedSigmoidClassificationLossDefaultTypeInternal _WeightedSigmoidClassificationLoss_default_instance_;
PROTOBUF_CONSTEXPR SigmoidFocalClassificationLoss::SigmoidFocalClassificationLoss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.anchorwise_output_)*/false
  , /*decltype(_impl_.alpha_)*/0
  , /*decltype(_impl_.gamma_)*/2} {}
struct SigmoidFocalClassificationLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SigmoidFocalClassificationLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SigmoidFocalClassificationLossDefaultTypeInternal() {}
  union {
    SigmoidFocalClassificationLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SigmoidFocalClassificationLossDefaultTypeInternal _SigmoidFocalClassificationLoss_default_instance_;
PROTOBUF_CONSTEXPR WeightedSoftmaxClassificationLoss::WeightedSoftmaxClassificationLoss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.anchorwise_output_)*/false
  , /*decltype(_impl_.logit_scale_)*/1} {}
struct WeightedSoftmaxClassificationLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR WeightedSoftmaxClassificationLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~WeightedSoftmaxClassificationLossDefaultTypeInternal() {}
  union {
    WeightedSoftmaxClassificationLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WeightedSoftmaxClassificationLossDefaultTypeInternal _WeightedSoftmaxClassificationLoss_default_instance_;
PROTOBUF_CONSTEXPR WeightedSoftmaxClassificationAgainstLogitsLoss::WeightedSoftmaxClassificationAgainstLogitsLoss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.anchorwise_output_)*/false
  , /*decltype(_impl_.logit_scale_)*/1} {}
struct WeightedSoftmaxClassificationAgainstLogitsLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR WeightedSoftmaxClassificationAgainstLogitsLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~WeightedSoftmaxClassificationAgainstLogitsLossDefaultTypeInternal() {}
  union {
    WeightedSoftmaxClassificationAgainstLogitsLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WeightedSoftmaxClassificationAgainstLogitsLossDefaultTypeInternal _WeightedSoftmaxClassificationAgainstLogitsLoss_default_instance_;
PROTOBUF_CONSTEXPR BootstrappedSigmoidClassificationLoss::BootstrappedSigmoidClassificationLoss(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.alpha_)*/0
  , /*decltype(_impl_.hard_bootstrap_)*/false
  , /*decltype(_impl_.anchorwise_output_)*/false} {}
struct BootstrappedSigmoidClassificationLossDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BootstrappedSigmoidClassificationLossDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BootstrappedSigmoidClassificationLossDefaultTypeInternal() {}
  union {
    BootstrappedSigmoidClassificationLoss _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BootstrappedSigmoidClassificationLossDefaultTypeInternal _BootstrappedSigmoidClassificationLoss_default_instance_;
PROTOBUF_CONSTEXPR HardExampleMiner::HardExampleMiner(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.loss_type_)*/0
  , /*decltype(_impl_.max_negatives_per_positive_)*/0
  , /*decltype(_impl_.min_negatives_per_image_)*/0
  , /*decltype(_impl_.num_hard_examples_)*/64
  , /*decltype(_impl_.iou_threshold_)*/0.7f} {}
struct HardExampleMinerDefaultTypeInternal {
  PROTOBUF_CONSTEXPR HardExampleMinerDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~HardExampleMinerDefaultTypeInternal() {}
  union {
    HardExampleMiner _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HardExampleMinerDefaultTypeInternal _HardExampleMiner_default_instance_;
PROTOBUF_CONSTEXPR RandomExampleSampler::RandomExampleSampler(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.positive_sample_fraction_)*/0.01f} {}
struct RandomExampleSamplerDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RandomExampleSamplerDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~RandomExampleSamplerDefaultTypeInternal() {}
  union {
    RandomExampleSampler _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RandomExampleSamplerDefaultTypeInternal _RandomExampleSampler_default_instance_;
}  // namespace protos
}  // namespace object_detection
static ::_pb::Metadata file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[14];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_object_5fdetection_2fprotos_2flosses_2eproto[2];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_object_5fdetection_2fprotos_2flosses_2eproto = nullptr;

const uint32_t TableStruct_object_5fdetection_2fprotos_2flosses_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss_EqualizationLoss, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss_EqualizationLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss_EqualizationLoss, _impl_.weight_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss_EqualizationLoss, _impl_.exclude_prefixes_),
  0,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_.localization_loss_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_.classification_loss_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_.hard_example_miner_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_.classification_weight_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_.localization_weight_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_.random_example_sampler_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_.equalization_loss_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_.expected_loss_weights_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_.min_num_negative_samples_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::Loss, _impl_.desired_negative_sampling_ratio_),
  0,
  1,
  2,
  8,
  9,
  3,
  4,
  5,
  6,
  7,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::LocalizationLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::LocalizationLoss, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::LocalizationLoss, _impl_.localization_loss_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedL2LocalizationLoss, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedL2LocalizationLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedL2LocalizationLoss, _impl_.anchorwise_output_),
  0,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSmoothL1LocalizationLoss, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSmoothL1LocalizationLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSmoothL1LocalizationLoss, _impl_.anchorwise_output_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSmoothL1LocalizationLoss, _impl_.delta_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedIOULocalizationLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ClassificationLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ClassificationLoss, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ClassificationLoss, _impl_.classification_loss_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSigmoidClassificationLoss, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSigmoidClassificationLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSigmoidClassificationLoss, _impl_.anchorwise_output_),
  0,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SigmoidFocalClassificationLoss, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SigmoidFocalClassificationLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SigmoidFocalClassificationLoss, _impl_.anchorwise_output_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SigmoidFocalClassificationLoss, _impl_.gamma_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SigmoidFocalClassificationLoss, _impl_.alpha_),
  0,
  2,
  1,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSoftmaxClassificationLoss, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSoftmaxClassificationLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSoftmaxClassificationLoss, _impl_.anchorwise_output_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSoftmaxClassificationLoss, _impl_.logit_scale_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss, _impl_.anchorwise_output_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss, _impl_.logit_scale_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BootstrappedSigmoidClassificationLoss, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BootstrappedSigmoidClassificationLoss, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BootstrappedSigmoidClassificationLoss, _impl_.alpha_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BootstrappedSigmoidClassificationLoss, _impl_.hard_bootstrap_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BootstrappedSigmoidClassificationLoss, _impl_.anchorwise_output_),
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::HardExampleMiner, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::HardExampleMiner, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::HardExampleMiner, _impl_.num_hard_examples_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::HardExampleMiner, _impl_.iou_threshold_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::HardExampleMiner, _impl_.loss_type_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::HardExampleMiner, _impl_.max_negatives_per_positive_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::HardExampleMiner, _impl_.min_negatives_per_image_),
  3,
  4,
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RandomExampleSampler, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RandomExampleSampler, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RandomExampleSampler, _impl_.positive_sample_fraction_),
  0,
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 8, -1, sizeof(::object_detection::protos::Loss_EqualizationLoss)},
  { 10, 26, -1, sizeof(::object_detection::protos::Loss)},
  { 36, -1, -1, sizeof(::object_detection::protos::LocalizationLoss)},
  { 46, 53, -1, sizeof(::object_detection::protos::WeightedL2LocalizationLoss)},
  { 54, 62, -1, sizeof(::object_detection::protos::WeightedSmoothL1LocalizationLoss)},
  { 64, -1, -1, sizeof(::object_detection::protos::WeightedIOULocalizationLoss)},
  { 70, -1, -1, sizeof(::object_detection::protos::ClassificationLoss)},
  { 82, 89, -1, sizeof(::object_detection::protos::WeightedSigmoidClassificationLoss)},
  { 90, 99, -1, sizeof(::object_detection::protos::SigmoidFocalClassificationLoss)},
  { 102, 110, -1, sizeof(::object_detection::protos::WeightedSoftmaxClassificationLoss)},
  { 112, 120, -1, sizeof(::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss)},
  { 122, 131, -1, sizeof(::object_detection::protos::BootstrappedSigmoidClassificationLoss)},
  { 134, 145, -1, sizeof(::object_detection::protos::HardExampleMiner)},
  { 150, 157, -1, sizeof(::object_detection::protos::RandomExampleSampler)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::object_detection::protos::_Loss_EqualizationLoss_default_instance_._instance,
  &::object_detection::protos::_Loss_default_instance_._instance,
  &::object_detection::protos::_LocalizationLoss_default_instance_._instance,
  &::object_detection::protos::_WeightedL2LocalizationLoss_default_instance_._instance,
  &::object_detection::protos::_WeightedSmoothL1LocalizationLoss_default_instance_._instance,
  &::object_detection::protos::_WeightedIOULocalizationLoss_default_instance_._instance,
  &::object_detection::protos::_ClassificationLoss_default_instance_._instance,
  &::object_detection::protos::_WeightedSigmoidClassificationLoss_default_instance_._instance,
  &::object_detection::protos::_SigmoidFocalClassificationLoss_default_instance_._instance,
  &::object_detection::protos::_WeightedSoftmaxClassificationLoss_default_instance_._instance,
  &::object_detection::protos::_WeightedSoftmaxClassificationAgainstLogitsLoss_default_instance_._instance,
  &::object_detection::protos::_BootstrappedSigmoidClassificationLoss_default_instance_._instance,
  &::object_detection::protos::_HardExampleMiner_default_instance_._instance,
  &::object_detection::protos::_RandomExampleSampler_default_instance_._instance,
};

const char descriptor_table_protodef_object_5fdetection_2fprotos_2flosses_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\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\"\232\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\000B\023\n\021localization_loss\">\n"
  "\032WeightedL2LocalizationLoss\022 \n\021anchorwis"
  "e_output\030\001 \001(\010:\005false\"V\n WeightedSmoothL"
  "1LocalizationLoss\022 \n\021anchorwise_output\030\001"
  " \001(\010:\005false\022\020\n\005delta\030\002 \001(\002:\0011\"\035\n\033Weighte"
  "dIOULocalizationLoss\"\202\004\n\022ClassificationL"
  "oss\022V\n\020weighted_sigmoid\030\001 \001(\0132:.object_d"
  "etection.protos.WeightedSigmoidClassific"
  "ationLossH\000\022V\n\020weighted_softmax\030\002 \001(\0132:."
  "object_detection.protos.WeightedSoftmaxC"
  "lassificationLossH\000\022j\n\027weighted_logits_s"
  "oftmax\030\005 \001(\0132G.object_detection.protos.W"
  "eightedSoftmaxClassificationAgainstLogit"
  "sLossH\000\022^\n\024bootstrapped_sigmoid\030\003 \001(\0132>."
  "object_detection.protos.BootstrappedSigm"
  "oidClassificationLossH\000\022Y\n\026weighted_sigm"
  "oid_focal\030\004 \001(\01327.object_detection.proto"
  "s.SigmoidFocalClassificationLossH\000B\025\n\023cl"
  "assification_loss\"E\n!WeightedSigmoidClas"
  "sificationLoss\022 \n\021anchorwise_output\030\001 \001("
  "\010:\005false\"c\n\036SigmoidFocalClassificationLo"
  "ss\022 \n\021anchorwise_output\030\001 \001(\010:\005false\022\020\n\005"
  "gamma\030\002 \001(\002:\0012\022\r\n\005alpha\030\003 \001(\002\"]\n!Weighte"
  "dSoftmaxClassificationLoss\022 \n\021anchorwise"
  "_output\030\001 \001(\010:\005false\022\026\n\013logit_scale\030\002 \001("
  "\002:\0011\"j\n.WeightedSoftmaxClassificationAga"
  "instLogitsLoss\022 \n\021anchorwise_output\030\001 \001("
  "\010:\005false\022\026\n\013logit_scale\030\002 \001(\002:\0011\"w\n%Boot"
  "strappedSigmoidClassificationLoss\022\r\n\005alp"
  "ha\030\001 \001(\002\022\035\n\016hard_bootstrap\030\002 \001(\010:\005false\022"
  " \n\021anchorwise_output\030\003 \001(\010:\005false\"\241\002\n\020Ha"
  "rdExampleMiner\022\035\n\021num_hard_examples\030\001 \001("
  "\005:\00264\022\032\n\riou_threshold\030\002 \001(\002:\0030.7\022K\n\tlos"
  "s_type\030\003 \001(\01622.object_detection.protos.H"
  "ardExampleMiner.LossType:\004BOTH\022%\n\032max_ne"
  "gatives_per_positive\030\004 \001(\005:\0010\022\"\n\027min_neg"
  "atives_per_image\030\005 \001(\005:\0010\":\n\010LossType\022\010\n"
  "\004BOTH\020\000\022\022\n\016CLASSIFICATION\020\001\022\020\n\014LOCALIZAT"
  "ION\020\002\">\n\024RandomExampleSampler\022&\n\030positiv"
  "e_sample_fraction\030\001 \001(\002:\0040.01"
  ;
static ::_pbi::once_flag descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto = {
    false, false, 2669, descriptor_table_protodef_object_5fdetection_2fprotos_2flosses_2eproto,
    "object_detection/protos/losses.proto",
    &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once, nullptr, 0, 14,
    schemas, file_default_instances, TableStruct_object_5fdetection_2fprotos_2flosses_2eproto::offsets,
    file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto, file_level_enum_descriptors_object_5fdetection_2fprotos_2flosses_2eproto,
    file_level_service_descriptors_object_5fdetection_2fprotos_2flosses_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter() {
  return &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_object_5fdetection_2fprotos_2flosses_2eproto(&descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto);
namespace object_detection {
namespace protos {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Loss_ExpectedLossWeights_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto);
  return file_level_enum_descriptors_object_5fdetection_2fprotos_2flosses_2eproto[0];
}
bool Loss_ExpectedLossWeights_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr Loss_ExpectedLossWeights Loss::NONE;
constexpr Loss_ExpectedLossWeights Loss::EXPECTED_SAMPLING;
constexpr Loss_ExpectedLossWeights Loss::REWEIGHTING_UNMATCHED_ANCHORS;
constexpr Loss_ExpectedLossWeights Loss::ExpectedLossWeights_MIN;
constexpr Loss_ExpectedLossWeights Loss::ExpectedLossWeights_MAX;
constexpr int Loss::ExpectedLossWeights_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HardExampleMiner_LossType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto);
  return file_level_enum_descriptors_object_5fdetection_2fprotos_2flosses_2eproto[1];
}
bool HardExampleMiner_LossType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr HardExampleMiner_LossType HardExampleMiner::BOTH;
constexpr HardExampleMiner_LossType HardExampleMiner::CLASSIFICATION;
constexpr HardExampleMiner_LossType HardExampleMiner::LOCALIZATION;
constexpr HardExampleMiner_LossType HardExampleMiner::LossType_MIN;
constexpr HardExampleMiner_LossType HardExampleMiner::LossType_MAX;
constexpr int HardExampleMiner::LossType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

// ===================================================================

class Loss_EqualizationLoss::_Internal {
 public:
  using HasBits = decltype(std::declval<Loss_EqualizationLoss>()._impl_._has_bits_);
  static void set_has_weight(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

Loss_EqualizationLoss::Loss_EqualizationLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.Loss.EqualizationLoss)
}
Loss_EqualizationLoss::Loss_EqualizationLoss(const Loss_EqualizationLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  Loss_EqualizationLoss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.exclude_prefixes_){from._impl_.exclude_prefixes_}
    , decltype(_impl_.weight_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.weight_ = from._impl_.weight_;
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.Loss.EqualizationLoss)
}

inline void Loss_EqualizationLoss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.exclude_prefixes_){arena}
    , decltype(_impl_.weight_){0}
  };
}

Loss_EqualizationLoss::~Loss_EqualizationLoss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.Loss.EqualizationLoss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Loss_EqualizationLoss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.exclude_prefixes_.~RepeatedPtrField();
}

void Loss_EqualizationLoss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Loss_EqualizationLoss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.Loss.EqualizationLoss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.exclude_prefixes_.Clear();
  _impl_.weight_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Loss_EqualizationLoss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float weight = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_weight(&has_bits);
          _impl_.weight_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated string exclude_prefixes = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_exclude_prefixes();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "object_detection.protos.Loss.EqualizationLoss.exclude_prefixes");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Loss_EqualizationLoss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.Loss.EqualizationLoss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional float weight = 1 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_weight(), target);
  }

  // repeated string exclude_prefixes = 2;
  for (int i = 0, n = this->_internal_exclude_prefixes_size(); i < n; i++) {
    const auto& s = this->_internal_exclude_prefixes(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "object_detection.protos.Loss.EqualizationLoss.exclude_prefixes");
    target = stream->WriteString(2, s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.Loss.EqualizationLoss)
  return target;
}

size_t Loss_EqualizationLoss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.Loss.EqualizationLoss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated string exclude_prefixes = 2;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.exclude_prefixes_.size());
  for (int i = 0, n = _impl_.exclude_prefixes_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      _impl_.exclude_prefixes_.Get(i));
  }

  // optional float weight = 1 [default = 0];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 + 4;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Loss_EqualizationLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Loss_EqualizationLoss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Loss_EqualizationLoss::GetClassData() const { return &_class_data_; }


void Loss_EqualizationLoss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<Loss_EqualizationLoss*>(&to_msg);
  auto& from = static_cast<const Loss_EqualizationLoss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.Loss.EqualizationLoss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.exclude_prefixes_.MergeFrom(from._impl_.exclude_prefixes_);
  if (from._internal_has_weight()) {
    _this->_internal_set_weight(from._internal_weight());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Loss_EqualizationLoss::CopyFrom(const Loss_EqualizationLoss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.Loss.EqualizationLoss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Loss_EqualizationLoss::IsInitialized() const {
  return true;
}

void Loss_EqualizationLoss::InternalSwap(Loss_EqualizationLoss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.exclude_prefixes_.InternalSwap(&other->_impl_.exclude_prefixes_);
  swap(_impl_.weight_, other->_impl_.weight_);
}

::PROTOBUF_NAMESPACE_ID::Metadata Loss_EqualizationLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[0]);
}

// ===================================================================

class Loss::_Internal {
 public:
  using HasBits = decltype(std::declval<Loss>()._impl_._has_bits_);
  static const ::object_detection::protos::LocalizationLoss& localization_loss(const Loss* msg);
  static void set_has_localization_loss(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::object_detection::protos::ClassificationLoss& classification_loss(const Loss* msg);
  static void set_has_classification_loss(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::object_detection::protos::HardExampleMiner& hard_example_miner(const Loss* msg);
  static void set_has_hard_example_miner(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_classification_weight(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_localization_weight(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::object_detection::protos::RandomExampleSampler& random_example_sampler(const Loss* msg);
  static void set_has_random_example_sampler(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::object_detection::protos::Loss_EqualizationLoss& equalization_loss(const Loss* msg);
  static void set_has_equalization_loss(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_expected_loss_weights(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_min_num_negative_samples(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_desired_negative_sampling_ratio(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
};

const ::object_detection::protos::LocalizationLoss&
Loss::_Internal::localization_loss(const Loss* msg) {
  return *msg->_impl_.localization_loss_;
}
const ::object_detection::protos::ClassificationLoss&
Loss::_Internal::classification_loss(const Loss* msg) {
  return *msg->_impl_.classification_loss_;
}
const ::object_detection::protos::HardExampleMiner&
Loss::_Internal::hard_example_miner(const Loss* msg) {
  return *msg->_impl_.hard_example_miner_;
}
const ::object_detection::protos::RandomExampleSampler&
Loss::_Internal::random_example_sampler(const Loss* msg) {
  return *msg->_impl_.random_example_sampler_;
}
const ::object_detection::protos::Loss_EqualizationLoss&
Loss::_Internal::equalization_loss(const Loss* msg) {
  return *msg->_impl_.equalization_loss_;
}
Loss::Loss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.Loss)
}
Loss::Loss(const Loss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  Loss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.localization_loss_){nullptr}
    , decltype(_impl_.classification_loss_){nullptr}
    , decltype(_impl_.hard_example_miner_){nullptr}
    , decltype(_impl_.random_example_sampler_){nullptr}
    , decltype(_impl_.equalization_loss_){nullptr}
    , decltype(_impl_.expected_loss_weights_){}
    , decltype(_impl_.min_num_negative_samples_){}
    , decltype(_impl_.desired_negative_sampling_ratio_){}
    , decltype(_impl_.classification_weight_){}
    , decltype(_impl_.localization_weight_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_localization_loss()) {
    _this->_impl_.localization_loss_ = new ::object_detection::protos::LocalizationLoss(*from._impl_.localization_loss_);
  }
  if (from._internal_has_classification_loss()) {
    _this->_impl_.classification_loss_ = new ::object_detection::protos::ClassificationLoss(*from._impl_.classification_loss_);
  }
  if (from._internal_has_hard_example_miner()) {
    _this->_impl_.hard_example_miner_ = new ::object_detection::protos::HardExampleMiner(*from._impl_.hard_example_miner_);
  }
  if (from._internal_has_random_example_sampler()) {
    _this->_impl_.random_example_sampler_ = new ::object_detection::protos::RandomExampleSampler(*from._impl_.random_example_sampler_);
  }
  if (from._internal_has_equalization_loss()) {
    _this->_impl_.equalization_loss_ = new ::object_detection::protos::Loss_EqualizationLoss(*from._impl_.equalization_loss_);
  }
  ::memcpy(&_impl_.expected_loss_weights_, &from._impl_.expected_loss_weights_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.localization_weight_) -
    reinterpret_cast<char*>(&_impl_.expected_loss_weights_)) + sizeof(_impl_.localization_weight_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.Loss)
}

inline void Loss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.localization_loss_){nullptr}
    , decltype(_impl_.classification_loss_){nullptr}
    , decltype(_impl_.hard_example_miner_){nullptr}
    , decltype(_impl_.random_example_sampler_){nullptr}
    , decltype(_impl_.equalization_loss_){nullptr}
    , decltype(_impl_.expected_loss_weights_){0}
    , decltype(_impl_.min_num_negative_samples_){0}
    , decltype(_impl_.desired_negative_sampling_ratio_){3}
    , decltype(_impl_.classification_weight_){1}
    , decltype(_impl_.localization_weight_){1}
  };
}

Loss::~Loss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.Loss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void Loss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.localization_loss_;
  if (this != internal_default_instance()) delete _impl_.classification_loss_;
  if (this != internal_default_instance()) delete _impl_.hard_example_miner_;
  if (this != internal_default_instance()) delete _impl_.random_example_sampler_;
  if (this != internal_default_instance()) delete _impl_.equalization_loss_;
}

void Loss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void Loss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.Loss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(_impl_.localization_loss_ != nullptr);
      _impl_.localization_loss_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.classification_loss_ != nullptr);
      _impl_.classification_loss_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(_impl_.hard_example_miner_ != nullptr);
      _impl_.hard_example_miner_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(_impl_.random_example_sampler_ != nullptr);
      _impl_.random_example_sampler_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      GOOGLE_DCHECK(_impl_.equalization_loss_ != nullptr);
      _impl_.equalization_loss_->Clear();
    }
  }
  if (cached_has_bits & 0x000000e0u) {
    ::memset(&_impl_.expected_loss_weights_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.min_num_negative_samples_) -
        reinterpret_cast<char*>(&_impl_.expected_loss_weights_)) + sizeof(_impl_.min_num_negative_samples_));
    _impl_.desired_negative_sampling_ratio_ = 3;
  }
  if (cached_has_bits & 0x00000300u) {
    _impl_.classification_weight_ = 1;
    _impl_.localization_weight_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Loss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .object_detection.protos.LocalizationLoss localization_loss = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_localization_loss(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.ClassificationLoss classification_loss = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_classification_loss(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_hard_example_miner(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float classification_weight = 4 [default = 1];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          _Internal::set_has_classification_weight(&has_bits);
          _impl_.classification_weight_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float localization_weight = 5 [default = 1];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
          _Internal::set_has_localization_weight(&has_bits);
          _impl_.localization_weight_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_random_example_sampler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_equalization_loss(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::object_detection::protos::Loss_ExpectedLossWeights_IsValid(val))) {
            _internal_set_expected_loss_weights(static_cast<::object_detection::protos::Loss_ExpectedLossWeights>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(18, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional float min_num_negative_samples = 19 [default = 0];
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 157)) {
          _Internal::set_has_min_num_negative_samples(&has_bits);
          _impl_.min_num_negative_samples_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float desired_negative_sampling_ratio = 20 [default = 3];
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 165)) {
          _Internal::set_has_desired_negative_sampling_ratio(&has_bits);
          _impl_.desired_negative_sampling_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* Loss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.Loss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .object_detection.protos.LocalizationLoss localization_loss = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::localization_loss(this),
        _Internal::localization_loss(this).GetCachedSize(), target, stream);
  }

  // optional .object_detection.protos.ClassificationLoss classification_loss = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::classification_loss(this),
        _Internal::classification_loss(this).GetCachedSize(), target, stream);
  }

  // optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::hard_example_miner(this),
        _Internal::hard_example_miner(this).GetCachedSize(), target, stream);
  }

  // optional float classification_weight = 4 [default = 1];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_classification_weight(), target);
  }

  // optional float localization_weight = 5 [default = 1];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(5, this->_internal_localization_weight(), target);
  }

  // optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::random_example_sampler(this),
        _Internal::random_example_sampler(this).GetCachedSize(), target, stream);
  }

  // optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, _Internal::equalization_loss(this),
        _Internal::equalization_loss(this).GetCachedSize(), target, stream);
  }

  // optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      18, this->_internal_expected_loss_weights(), target);
  }

  // optional float min_num_negative_samples = 19 [default = 0];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(19, this->_internal_min_num_negative_samples(), target);
  }

  // optional float desired_negative_sampling_ratio = 20 [default = 3];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(20, this->_internal_desired_negative_sampling_ratio(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.Loss)
  return target;
}

size_t Loss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.Loss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .object_detection.protos.LocalizationLoss localization_loss = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.localization_loss_);
    }

    // optional .object_detection.protos.ClassificationLoss classification_loss = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.classification_loss_);
    }

    // optional .object_detection.protos.HardExampleMiner hard_example_miner = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.hard_example_miner_);
    }

    // optional .object_detection.protos.RandomExampleSampler random_example_sampler = 6;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.random_example_sampler_);
    }

    // optional .object_detection.protos.Loss.EqualizationLoss equalization_loss = 7;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.equalization_loss_);
    }

    // optional .object_detection.protos.Loss.ExpectedLossWeights expected_loss_weights = 18 [default = NONE];
    if (cached_has_bits & 0x00000020u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_expected_loss_weights());
    }

    // optional float min_num_negative_samples = 19 [default = 0];
    if (cached_has_bits & 0x00000040u) {
      total_size += 2 + 4;
    }

    // optional float desired_negative_sampling_ratio = 20 [default = 3];
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 + 4;
    }

  }
  if (cached_has_bits & 0x00000300u) {
    // optional float classification_weight = 4 [default = 1];
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 + 4;
    }

    // optional float localization_weight = 5 [default = 1];
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Loss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    Loss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Loss::GetClassData() const { return &_class_data_; }


void Loss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<Loss*>(&to_msg);
  auto& from = static_cast<const Loss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.Loss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_localization_loss()->::object_detection::protos::LocalizationLoss::MergeFrom(
          from._internal_localization_loss());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_classification_loss()->::object_detection::protos::ClassificationLoss::MergeFrom(
          from._internal_classification_loss());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_hard_example_miner()->::object_detection::protos::HardExampleMiner::MergeFrom(
          from._internal_hard_example_miner());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_random_example_sampler()->::object_detection::protos::RandomExampleSampler::MergeFrom(
          from._internal_random_example_sampler());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_equalization_loss()->::object_detection::protos::Loss_EqualizationLoss::MergeFrom(
          from._internal_equalization_loss());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.expected_loss_weights_ = from._impl_.expected_loss_weights_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.min_num_negative_samples_ = from._impl_.min_num_negative_samples_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.desired_negative_sampling_ratio_ = from._impl_.desired_negative_sampling_ratio_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000300u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.classification_weight_ = from._impl_.classification_weight_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.localization_weight_ = from._impl_.localization_weight_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Loss::CopyFrom(const Loss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.Loss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Loss::IsInitialized() const {
  return true;
}

void Loss::InternalSwap(Loss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Loss, _impl_.min_num_negative_samples_)
      + sizeof(Loss::_impl_.min_num_negative_samples_)
      - PROTOBUF_FIELD_OFFSET(Loss, _impl_.localization_loss_)>(
          reinterpret_cast<char*>(&_impl_.localization_loss_),
          reinterpret_cast<char*>(&other->_impl_.localization_loss_));
  swap(_impl_.desired_negative_sampling_ratio_, other->_impl_.desired_negative_sampling_ratio_);
  swap(_impl_.classification_weight_, other->_impl_.classification_weight_);
  swap(_impl_.localization_weight_, other->_impl_.localization_weight_);
}

::PROTOBUF_NAMESPACE_ID::Metadata Loss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[1]);
}

// ===================================================================

class LocalizationLoss::_Internal {
 public:
  static const ::object_detection::protos::WeightedL2LocalizationLoss& weighted_l2(const LocalizationLoss* msg);
  static const ::object_detection::protos::WeightedSmoothL1LocalizationLoss& weighted_smooth_l1(const LocalizationLoss* msg);
  static const ::object_detection::protos::WeightedIOULocalizationLoss& weighted_iou(const LocalizationLoss* msg);
};

const ::object_detection::protos::WeightedL2LocalizationLoss&
LocalizationLoss::_Internal::weighted_l2(const LocalizationLoss* msg) {
  return *msg->_impl_.localization_loss_.weighted_l2_;
}
const ::object_detection::protos::WeightedSmoothL1LocalizationLoss&
LocalizationLoss::_Internal::weighted_smooth_l1(const LocalizationLoss* msg) {
  return *msg->_impl_.localization_loss_.weighted_smooth_l1_;
}
const ::object_detection::protos::WeightedIOULocalizationLoss&
LocalizationLoss::_Internal::weighted_iou(const LocalizationLoss* msg) {
  return *msg->_impl_.localization_loss_.weighted_iou_;
}
void LocalizationLoss::set_allocated_weighted_l2(::object_detection::protos::WeightedL2LocalizationLoss* weighted_l2) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_localization_loss();
  if (weighted_l2) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(weighted_l2);
    if (message_arena != submessage_arena) {
      weighted_l2 = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, weighted_l2, submessage_arena);
    }
    set_has_weighted_l2();
    _impl_.localization_loss_.weighted_l2_ = weighted_l2;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.LocalizationLoss.weighted_l2)
}
void LocalizationLoss::set_allocated_weighted_smooth_l1(::object_detection::protos::WeightedSmoothL1LocalizationLoss* weighted_smooth_l1) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_localization_loss();
  if (weighted_smooth_l1) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(weighted_smooth_l1);
    if (message_arena != submessage_arena) {
      weighted_smooth_l1 = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, weighted_smooth_l1, submessage_arena);
    }
    set_has_weighted_smooth_l1();
    _impl_.localization_loss_.weighted_smooth_l1_ = weighted_smooth_l1;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.LocalizationLoss.weighted_smooth_l1)
}
void LocalizationLoss::set_allocated_weighted_iou(::object_detection::protos::WeightedIOULocalizationLoss* weighted_iou) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_localization_loss();
  if (weighted_iou) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(weighted_iou);
    if (message_arena != submessage_arena) {
      weighted_iou = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, weighted_iou, submessage_arena);
    }
    set_has_weighted_iou();
    _impl_.localization_loss_.weighted_iou_ = weighted_iou;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.LocalizationLoss.weighted_iou)
}
LocalizationLoss::LocalizationLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.LocalizationLoss)
}
LocalizationLoss::LocalizationLoss(const LocalizationLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  LocalizationLoss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.localization_loss_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  clear_has_localization_loss();
  switch (from.localization_loss_case()) {
    case kWeightedL2: {
      _this->_internal_mutable_weighted_l2()->::object_detection::protos::WeightedL2LocalizationLoss::MergeFrom(
          from._internal_weighted_l2());
      break;
    }
    case kWeightedSmoothL1: {
      _this->_internal_mutable_weighted_smooth_l1()->::object_detection::protos::WeightedSmoothL1LocalizationLoss::MergeFrom(
          from._internal_weighted_smooth_l1());
      break;
    }
    case kWeightedIou: {
      _this->_internal_mutable_weighted_iou()->::object_detection::protos::WeightedIOULocalizationLoss::MergeFrom(
          from._internal_weighted_iou());
      break;
    }
    case LOCALIZATION_LOSS_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.LocalizationLoss)
}

inline void LocalizationLoss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.localization_loss_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_localization_loss();
}

LocalizationLoss::~LocalizationLoss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.LocalizationLoss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void LocalizationLoss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_localization_loss()) {
    clear_localization_loss();
  }
}

void LocalizationLoss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void LocalizationLoss::clear_localization_loss() {
// @@protoc_insertion_point(one_of_clear_start:object_detection.protos.LocalizationLoss)
  switch (localization_loss_case()) {
    case kWeightedL2: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.localization_loss_.weighted_l2_;
      }
      break;
    }
    case kWeightedSmoothL1: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.localization_loss_.weighted_smooth_l1_;
      }
      break;
    }
    case kWeightedIou: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.localization_loss_.weighted_iou_;
      }
      break;
    }
    case LOCALIZATION_LOSS_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = LOCALIZATION_LOSS_NOT_SET;
}


void LocalizationLoss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.LocalizationLoss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_localization_loss();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* LocalizationLoss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_weighted_l2(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_weighted_smooth_l1(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_weighted_iou(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* LocalizationLoss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.LocalizationLoss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (localization_loss_case()) {
    case kWeightedL2: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::weighted_l2(this),
          _Internal::weighted_l2(this).GetCachedSize(), target, stream);
      break;
    }
    case kWeightedSmoothL1: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::weighted_smooth_l1(this),
          _Internal::weighted_smooth_l1(this).GetCachedSize(), target, stream);
      break;
    }
    case kWeightedIou: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, _Internal::weighted_iou(this),
          _Internal::weighted_iou(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.LocalizationLoss)
  return target;
}

size_t LocalizationLoss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.LocalizationLoss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  switch (localization_loss_case()) {
    // .object_detection.protos.WeightedL2LocalizationLoss weighted_l2 = 1;
    case kWeightedL2: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.localization_loss_.weighted_l2_);
      break;
    }
    // .object_detection.protos.WeightedSmoothL1LocalizationLoss weighted_smooth_l1 = 2;
    case kWeightedSmoothL1: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.localization_loss_.weighted_smooth_l1_);
      break;
    }
    // .object_detection.protos.WeightedIOULocalizationLoss weighted_iou = 3;
    case kWeightedIou: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.localization_loss_.weighted_iou_);
      break;
    }
    case LOCALIZATION_LOSS_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LocalizationLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    LocalizationLoss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LocalizationLoss::GetClassData() const { return &_class_data_; }


void LocalizationLoss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<LocalizationLoss*>(&to_msg);
  auto& from = static_cast<const LocalizationLoss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.LocalizationLoss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.localization_loss_case()) {
    case kWeightedL2: {
      _this->_internal_mutable_weighted_l2()->::object_detection::protos::WeightedL2LocalizationLoss::MergeFrom(
          from._internal_weighted_l2());
      break;
    }
    case kWeightedSmoothL1: {
      _this->_internal_mutable_weighted_smooth_l1()->::object_detection::protos::WeightedSmoothL1LocalizationLoss::MergeFrom(
          from._internal_weighted_smooth_l1());
      break;
    }
    case kWeightedIou: {
      _this->_internal_mutable_weighted_iou()->::object_detection::protos::WeightedIOULocalizationLoss::MergeFrom(
          from._internal_weighted_iou());
      break;
    }
    case LOCALIZATION_LOSS_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void LocalizationLoss::CopyFrom(const LocalizationLoss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.LocalizationLoss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool LocalizationLoss::IsInitialized() const {
  return true;
}

void LocalizationLoss::InternalSwap(LocalizationLoss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.localization_loss_, other->_impl_.localization_loss_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata LocalizationLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[2]);
}

// ===================================================================

class WeightedL2LocalizationLoss::_Internal {
 public:
  using HasBits = decltype(std::declval<WeightedL2LocalizationLoss>()._impl_._has_bits_);
  static void set_has_anchorwise_output(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

WeightedL2LocalizationLoss::WeightedL2LocalizationLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.WeightedL2LocalizationLoss)
}
WeightedL2LocalizationLoss::WeightedL2LocalizationLoss(const WeightedL2LocalizationLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  WeightedL2LocalizationLoss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.anchorwise_output_ = from._impl_.anchorwise_output_;
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.WeightedL2LocalizationLoss)
}

inline void WeightedL2LocalizationLoss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){false}
  };
}

WeightedL2LocalizationLoss::~WeightedL2LocalizationLoss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.WeightedL2LocalizationLoss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void WeightedL2LocalizationLoss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void WeightedL2LocalizationLoss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void WeightedL2LocalizationLoss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.WeightedL2LocalizationLoss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.anchorwise_output_ = false;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* WeightedL2LocalizationLoss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool anchorwise_output = 1 [default = false];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_anchorwise_output(&has_bits);
          _impl_.anchorwise_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* WeightedL2LocalizationLoss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.WeightedL2LocalizationLoss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional bool anchorwise_output = 1 [default = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_anchorwise_output(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.WeightedL2LocalizationLoss)
  return target;
}

size_t WeightedL2LocalizationLoss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.WeightedL2LocalizationLoss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // optional bool anchorwise_output = 1 [default = false];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 + 1;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WeightedL2LocalizationLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    WeightedL2LocalizationLoss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WeightedL2LocalizationLoss::GetClassData() const { return &_class_data_; }


void WeightedL2LocalizationLoss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<WeightedL2LocalizationLoss*>(&to_msg);
  auto& from = static_cast<const WeightedL2LocalizationLoss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.WeightedL2LocalizationLoss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_anchorwise_output()) {
    _this->_internal_set_anchorwise_output(from._internal_anchorwise_output());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void WeightedL2LocalizationLoss::CopyFrom(const WeightedL2LocalizationLoss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.WeightedL2LocalizationLoss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WeightedL2LocalizationLoss::IsInitialized() const {
  return true;
}

void WeightedL2LocalizationLoss::InternalSwap(WeightedL2LocalizationLoss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.anchorwise_output_, other->_impl_.anchorwise_output_);
}

::PROTOBUF_NAMESPACE_ID::Metadata WeightedL2LocalizationLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[3]);
}

// ===================================================================

class WeightedSmoothL1LocalizationLoss::_Internal {
 public:
  using HasBits = decltype(std::declval<WeightedSmoothL1LocalizationLoss>()._impl_._has_bits_);
  static void set_has_anchorwise_output(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_delta(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

WeightedSmoothL1LocalizationLoss::WeightedSmoothL1LocalizationLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.WeightedSmoothL1LocalizationLoss)
}
WeightedSmoothL1LocalizationLoss::WeightedSmoothL1LocalizationLoss(const WeightedSmoothL1LocalizationLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  WeightedSmoothL1LocalizationLoss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){}
    , decltype(_impl_.delta_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.anchorwise_output_, &from._impl_.anchorwise_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.delta_) -
    reinterpret_cast<char*>(&_impl_.anchorwise_output_)) + sizeof(_impl_.delta_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.WeightedSmoothL1LocalizationLoss)
}

inline void WeightedSmoothL1LocalizationLoss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){false}
    , decltype(_impl_.delta_){1}
  };
}

WeightedSmoothL1LocalizationLoss::~WeightedSmoothL1LocalizationLoss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.WeightedSmoothL1LocalizationLoss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void WeightedSmoothL1LocalizationLoss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void WeightedSmoothL1LocalizationLoss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void WeightedSmoothL1LocalizationLoss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.WeightedSmoothL1LocalizationLoss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    _impl_.anchorwise_output_ = false;
    _impl_.delta_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* WeightedSmoothL1LocalizationLoss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool anchorwise_output = 1 [default = false];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_anchorwise_output(&has_bits);
          _impl_.anchorwise_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float delta = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_delta(&has_bits);
          _impl_.delta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* WeightedSmoothL1LocalizationLoss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.WeightedSmoothL1LocalizationLoss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional bool anchorwise_output = 1 [default = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_anchorwise_output(), target);
  }

  // optional float delta = 2 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_delta(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.WeightedSmoothL1LocalizationLoss)
  return target;
}

size_t WeightedSmoothL1LocalizationLoss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.WeightedSmoothL1LocalizationLoss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional bool anchorwise_output = 1 [default = false];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 1;
    }

    // optional float delta = 2 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WeightedSmoothL1LocalizationLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    WeightedSmoothL1LocalizationLoss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WeightedSmoothL1LocalizationLoss::GetClassData() const { return &_class_data_; }


void WeightedSmoothL1LocalizationLoss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<WeightedSmoothL1LocalizationLoss*>(&to_msg);
  auto& from = static_cast<const WeightedSmoothL1LocalizationLoss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.WeightedSmoothL1LocalizationLoss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.anchorwise_output_ = from._impl_.anchorwise_output_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.delta_ = from._impl_.delta_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void WeightedSmoothL1LocalizationLoss::CopyFrom(const WeightedSmoothL1LocalizationLoss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.WeightedSmoothL1LocalizationLoss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WeightedSmoothL1LocalizationLoss::IsInitialized() const {
  return true;
}

void WeightedSmoothL1LocalizationLoss::InternalSwap(WeightedSmoothL1LocalizationLoss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.anchorwise_output_, other->_impl_.anchorwise_output_);
  swap(_impl_.delta_, other->_impl_.delta_);
}

::PROTOBUF_NAMESPACE_ID::Metadata WeightedSmoothL1LocalizationLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[4]);
}

// ===================================================================

class WeightedIOULocalizationLoss::_Internal {
 public:
};

WeightedIOULocalizationLoss::WeightedIOULocalizationLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) {
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.WeightedIOULocalizationLoss)
}
WeightedIOULocalizationLoss::WeightedIOULocalizationLoss(const WeightedIOULocalizationLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() {
  WeightedIOULocalizationLoss* const _this = this; (void)_this;
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.WeightedIOULocalizationLoss)
}





const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WeightedIOULocalizationLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl,
    ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl,
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WeightedIOULocalizationLoss::GetClassData() const { return &_class_data_; }







::PROTOBUF_NAMESPACE_ID::Metadata WeightedIOULocalizationLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[5]);
}

// ===================================================================

class ClassificationLoss::_Internal {
 public:
  static const ::object_detection::protos::WeightedSigmoidClassificationLoss& weighted_sigmoid(const ClassificationLoss* msg);
  static const ::object_detection::protos::WeightedSoftmaxClassificationLoss& weighted_softmax(const ClassificationLoss* msg);
  static const ::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss& weighted_logits_softmax(const ClassificationLoss* msg);
  static const ::object_detection::protos::BootstrappedSigmoidClassificationLoss& bootstrapped_sigmoid(const ClassificationLoss* msg);
  static const ::object_detection::protos::SigmoidFocalClassificationLoss& weighted_sigmoid_focal(const ClassificationLoss* msg);
};

const ::object_detection::protos::WeightedSigmoidClassificationLoss&
ClassificationLoss::_Internal::weighted_sigmoid(const ClassificationLoss* msg) {
  return *msg->_impl_.classification_loss_.weighted_sigmoid_;
}
const ::object_detection::protos::WeightedSoftmaxClassificationLoss&
ClassificationLoss::_Internal::weighted_softmax(const ClassificationLoss* msg) {
  return *msg->_impl_.classification_loss_.weighted_softmax_;
}
const ::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss&
ClassificationLoss::_Internal::weighted_logits_softmax(const ClassificationLoss* msg) {
  return *msg->_impl_.classification_loss_.weighted_logits_softmax_;
}
const ::object_detection::protos::BootstrappedSigmoidClassificationLoss&
ClassificationLoss::_Internal::bootstrapped_sigmoid(const ClassificationLoss* msg) {
  return *msg->_impl_.classification_loss_.bootstrapped_sigmoid_;
}
const ::object_detection::protos::SigmoidFocalClassificationLoss&
ClassificationLoss::_Internal::weighted_sigmoid_focal(const ClassificationLoss* msg) {
  return *msg->_impl_.classification_loss_.weighted_sigmoid_focal_;
}
void ClassificationLoss::set_allocated_weighted_sigmoid(::object_detection::protos::WeightedSigmoidClassificationLoss* weighted_sigmoid) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_classification_loss();
  if (weighted_sigmoid) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(weighted_sigmoid);
    if (message_arena != submessage_arena) {
      weighted_sigmoid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, weighted_sigmoid, submessage_arena);
    }
    set_has_weighted_sigmoid();
    _impl_.classification_loss_.weighted_sigmoid_ = weighted_sigmoid;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.ClassificationLoss.weighted_sigmoid)
}
void ClassificationLoss::set_allocated_weighted_softmax(::object_detection::protos::WeightedSoftmaxClassificationLoss* weighted_softmax) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_classification_loss();
  if (weighted_softmax) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(weighted_softmax);
    if (message_arena != submessage_arena) {
      weighted_softmax = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, weighted_softmax, submessage_arena);
    }
    set_has_weighted_softmax();
    _impl_.classification_loss_.weighted_softmax_ = weighted_softmax;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.ClassificationLoss.weighted_softmax)
}
void ClassificationLoss::set_allocated_weighted_logits_softmax(::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss* weighted_logits_softmax) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_classification_loss();
  if (weighted_logits_softmax) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(weighted_logits_softmax);
    if (message_arena != submessage_arena) {
      weighted_logits_softmax = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, weighted_logits_softmax, submessage_arena);
    }
    set_has_weighted_logits_softmax();
    _impl_.classification_loss_.weighted_logits_softmax_ = weighted_logits_softmax;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.ClassificationLoss.weighted_logits_softmax)
}
void ClassificationLoss::set_allocated_bootstrapped_sigmoid(::object_detection::protos::BootstrappedSigmoidClassificationLoss* bootstrapped_sigmoid) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_classification_loss();
  if (bootstrapped_sigmoid) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(bootstrapped_sigmoid);
    if (message_arena != submessage_arena) {
      bootstrapped_sigmoid = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, bootstrapped_sigmoid, submessage_arena);
    }
    set_has_bootstrapped_sigmoid();
    _impl_.classification_loss_.bootstrapped_sigmoid_ = bootstrapped_sigmoid;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.ClassificationLoss.bootstrapped_sigmoid)
}
void ClassificationLoss::set_allocated_weighted_sigmoid_focal(::object_detection::protos::SigmoidFocalClassificationLoss* weighted_sigmoid_focal) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_classification_loss();
  if (weighted_sigmoid_focal) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(weighted_sigmoid_focal);
    if (message_arena != submessage_arena) {
      weighted_sigmoid_focal = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, weighted_sigmoid_focal, submessage_arena);
    }
    set_has_weighted_sigmoid_focal();
    _impl_.classification_loss_.weighted_sigmoid_focal_ = weighted_sigmoid_focal;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.ClassificationLoss.weighted_sigmoid_focal)
}
ClassificationLoss::ClassificationLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.ClassificationLoss)
}
ClassificationLoss::ClassificationLoss(const ClassificationLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ClassificationLoss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.classification_loss_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  clear_has_classification_loss();
  switch (from.classification_loss_case()) {
    case kWeightedSigmoid: {
      _this->_internal_mutable_weighted_sigmoid()->::object_detection::protos::WeightedSigmoidClassificationLoss::MergeFrom(
          from._internal_weighted_sigmoid());
      break;
    }
    case kWeightedSoftmax: {
      _this->_internal_mutable_weighted_softmax()->::object_detection::protos::WeightedSoftmaxClassificationLoss::MergeFrom(
          from._internal_weighted_softmax());
      break;
    }
    case kWeightedLogitsSoftmax: {
      _this->_internal_mutable_weighted_logits_softmax()->::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss::MergeFrom(
          from._internal_weighted_logits_softmax());
      break;
    }
    case kBootstrappedSigmoid: {
      _this->_internal_mutable_bootstrapped_sigmoid()->::object_detection::protos::BootstrappedSigmoidClassificationLoss::MergeFrom(
          from._internal_bootstrapped_sigmoid());
      break;
    }
    case kWeightedSigmoidFocal: {
      _this->_internal_mutable_weighted_sigmoid_focal()->::object_detection::protos::SigmoidFocalClassificationLoss::MergeFrom(
          from._internal_weighted_sigmoid_focal());
      break;
    }
    case CLASSIFICATION_LOSS_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.ClassificationLoss)
}

inline void ClassificationLoss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.classification_loss_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}
  };
  clear_has_classification_loss();
}

ClassificationLoss::~ClassificationLoss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.ClassificationLoss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ClassificationLoss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_classification_loss()) {
    clear_classification_loss();
  }
}

void ClassificationLoss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ClassificationLoss::clear_classification_loss() {
// @@protoc_insertion_point(one_of_clear_start:object_detection.protos.ClassificationLoss)
  switch (classification_loss_case()) {
    case kWeightedSigmoid: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.classification_loss_.weighted_sigmoid_;
      }
      break;
    }
    case kWeightedSoftmax: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.classification_loss_.weighted_softmax_;
      }
      break;
    }
    case kWeightedLogitsSoftmax: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.classification_loss_.weighted_logits_softmax_;
      }
      break;
    }
    case kBootstrappedSigmoid: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.classification_loss_.bootstrapped_sigmoid_;
      }
      break;
    }
    case kWeightedSigmoidFocal: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.classification_loss_.weighted_sigmoid_focal_;
      }
      break;
    }
    case CLASSIFICATION_LOSS_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = CLASSIFICATION_LOSS_NOT_SET;
}


void ClassificationLoss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.ClassificationLoss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  clear_classification_loss();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ClassificationLoss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // .object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_weighted_sigmoid(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_weighted_softmax(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_bootstrapped_sigmoid(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_weighted_sigmoid_focal(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_weighted_logits_softmax(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ClassificationLoss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.ClassificationLoss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (classification_loss_case()) {
    case kWeightedSigmoid: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::weighted_sigmoid(this),
          _Internal::weighted_sigmoid(this).GetCachedSize(), target, stream);
      break;
    }
    case kWeightedSoftmax: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::weighted_softmax(this),
          _Internal::weighted_softmax(this).GetCachedSize(), target, stream);
      break;
    }
    case kBootstrappedSigmoid: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, _Internal::bootstrapped_sigmoid(this),
          _Internal::bootstrapped_sigmoid(this).GetCachedSize(), target, stream);
      break;
    }
    case kWeightedSigmoidFocal: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(4, _Internal::weighted_sigmoid_focal(this),
          _Internal::weighted_sigmoid_focal(this).GetCachedSize(), target, stream);
      break;
    }
    case kWeightedLogitsSoftmax: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(5, _Internal::weighted_logits_softmax(this),
          _Internal::weighted_logits_softmax(this).GetCachedSize(), target, stream);
      break;
    }
    default: ;
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.ClassificationLoss)
  return target;
}

size_t ClassificationLoss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.ClassificationLoss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  switch (classification_loss_case()) {
    // .object_detection.protos.WeightedSigmoidClassificationLoss weighted_sigmoid = 1;
    case kWeightedSigmoid: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.classification_loss_.weighted_sigmoid_);
      break;
    }
    // .object_detection.protos.WeightedSoftmaxClassificationLoss weighted_softmax = 2;
    case kWeightedSoftmax: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.classification_loss_.weighted_softmax_);
      break;
    }
    // .object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss weighted_logits_softmax = 5;
    case kWeightedLogitsSoftmax: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.classification_loss_.weighted_logits_softmax_);
      break;
    }
    // .object_detection.protos.BootstrappedSigmoidClassificationLoss bootstrapped_sigmoid = 3;
    case kBootstrappedSigmoid: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.classification_loss_.bootstrapped_sigmoid_);
      break;
    }
    // .object_detection.protos.SigmoidFocalClassificationLoss weighted_sigmoid_focal = 4;
    case kWeightedSigmoidFocal: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.classification_loss_.weighted_sigmoid_focal_);
      break;
    }
    case CLASSIFICATION_LOSS_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ClassificationLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    ClassificationLoss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ClassificationLoss::GetClassData() const { return &_class_data_; }


void ClassificationLoss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ClassificationLoss*>(&to_msg);
  auto& from = static_cast<const ClassificationLoss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.ClassificationLoss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.classification_loss_case()) {
    case kWeightedSigmoid: {
      _this->_internal_mutable_weighted_sigmoid()->::object_detection::protos::WeightedSigmoidClassificationLoss::MergeFrom(
          from._internal_weighted_sigmoid());
      break;
    }
    case kWeightedSoftmax: {
      _this->_internal_mutable_weighted_softmax()->::object_detection::protos::WeightedSoftmaxClassificationLoss::MergeFrom(
          from._internal_weighted_softmax());
      break;
    }
    case kWeightedLogitsSoftmax: {
      _this->_internal_mutable_weighted_logits_softmax()->::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss::MergeFrom(
          from._internal_weighted_logits_softmax());
      break;
    }
    case kBootstrappedSigmoid: {
      _this->_internal_mutable_bootstrapped_sigmoid()->::object_detection::protos::BootstrappedSigmoidClassificationLoss::MergeFrom(
          from._internal_bootstrapped_sigmoid());
      break;
    }
    case kWeightedSigmoidFocal: {
      _this->_internal_mutable_weighted_sigmoid_focal()->::object_detection::protos::SigmoidFocalClassificationLoss::MergeFrom(
          from._internal_weighted_sigmoid_focal());
      break;
    }
    case CLASSIFICATION_LOSS_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ClassificationLoss::CopyFrom(const ClassificationLoss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.ClassificationLoss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ClassificationLoss::IsInitialized() const {
  return true;
}

void ClassificationLoss::InternalSwap(ClassificationLoss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_.classification_loss_, other->_impl_.classification_loss_);
  swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata ClassificationLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[6]);
}

// ===================================================================

class WeightedSigmoidClassificationLoss::_Internal {
 public:
  using HasBits = decltype(std::declval<WeightedSigmoidClassificationLoss>()._impl_._has_bits_);
  static void set_has_anchorwise_output(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

WeightedSigmoidClassificationLoss::WeightedSigmoidClassificationLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.WeightedSigmoidClassificationLoss)
}
WeightedSigmoidClassificationLoss::WeightedSigmoidClassificationLoss(const WeightedSigmoidClassificationLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  WeightedSigmoidClassificationLoss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.anchorwise_output_ = from._impl_.anchorwise_output_;
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.WeightedSigmoidClassificationLoss)
}

inline void WeightedSigmoidClassificationLoss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){false}
  };
}

WeightedSigmoidClassificationLoss::~WeightedSigmoidClassificationLoss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.WeightedSigmoidClassificationLoss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void WeightedSigmoidClassificationLoss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void WeightedSigmoidClassificationLoss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void WeightedSigmoidClassificationLoss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.WeightedSigmoidClassificationLoss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.anchorwise_output_ = false;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* WeightedSigmoidClassificationLoss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool anchorwise_output = 1 [default = false];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_anchorwise_output(&has_bits);
          _impl_.anchorwise_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* WeightedSigmoidClassificationLoss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.WeightedSigmoidClassificationLoss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional bool anchorwise_output = 1 [default = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_anchorwise_output(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.WeightedSigmoidClassificationLoss)
  return target;
}

size_t WeightedSigmoidClassificationLoss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.WeightedSigmoidClassificationLoss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // optional bool anchorwise_output = 1 [default = false];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 + 1;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WeightedSigmoidClassificationLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    WeightedSigmoidClassificationLoss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WeightedSigmoidClassificationLoss::GetClassData() const { return &_class_data_; }


void WeightedSigmoidClassificationLoss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<WeightedSigmoidClassificationLoss*>(&to_msg);
  auto& from = static_cast<const WeightedSigmoidClassificationLoss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.WeightedSigmoidClassificationLoss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_anchorwise_output()) {
    _this->_internal_set_anchorwise_output(from._internal_anchorwise_output());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void WeightedSigmoidClassificationLoss::CopyFrom(const WeightedSigmoidClassificationLoss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.WeightedSigmoidClassificationLoss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WeightedSigmoidClassificationLoss::IsInitialized() const {
  return true;
}

void WeightedSigmoidClassificationLoss::InternalSwap(WeightedSigmoidClassificationLoss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.anchorwise_output_, other->_impl_.anchorwise_output_);
}

::PROTOBUF_NAMESPACE_ID::Metadata WeightedSigmoidClassificationLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[7]);
}

// ===================================================================

class SigmoidFocalClassificationLoss::_Internal {
 public:
  using HasBits = decltype(std::declval<SigmoidFocalClassificationLoss>()._impl_._has_bits_);
  static void set_has_anchorwise_output(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_gamma(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_alpha(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

SigmoidFocalClassificationLoss::SigmoidFocalClassificationLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.SigmoidFocalClassificationLoss)
}
SigmoidFocalClassificationLoss::SigmoidFocalClassificationLoss(const SigmoidFocalClassificationLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  SigmoidFocalClassificationLoss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){}
    , decltype(_impl_.alpha_){}
    , decltype(_impl_.gamma_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.anchorwise_output_, &from._impl_.anchorwise_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.gamma_) -
    reinterpret_cast<char*>(&_impl_.anchorwise_output_)) + sizeof(_impl_.gamma_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.SigmoidFocalClassificationLoss)
}

inline void SigmoidFocalClassificationLoss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){false}
    , decltype(_impl_.alpha_){0}
    , decltype(_impl_.gamma_){2}
  };
}

SigmoidFocalClassificationLoss::~SigmoidFocalClassificationLoss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.SigmoidFocalClassificationLoss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void SigmoidFocalClassificationLoss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void SigmoidFocalClassificationLoss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void SigmoidFocalClassificationLoss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.SigmoidFocalClassificationLoss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    ::memset(&_impl_.anchorwise_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.alpha_) -
        reinterpret_cast<char*>(&_impl_.anchorwise_output_)) + sizeof(_impl_.alpha_));
    _impl_.gamma_ = 2;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SigmoidFocalClassificationLoss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool anchorwise_output = 1 [default = false];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_anchorwise_output(&has_bits);
          _impl_.anchorwise_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float gamma = 2 [default = 2];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_gamma(&has_bits);
          _impl_.gamma_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float alpha = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_alpha(&has_bits);
          _impl_.alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* SigmoidFocalClassificationLoss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.SigmoidFocalClassificationLoss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional bool anchorwise_output = 1 [default = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_anchorwise_output(), target);
  }

  // optional float gamma = 2 [default = 2];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_gamma(), target);
  }

  // optional float alpha = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_alpha(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.SigmoidFocalClassificationLoss)
  return target;
}

size_t SigmoidFocalClassificationLoss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.SigmoidFocalClassificationLoss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional bool anchorwise_output = 1 [default = false];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 1;
    }

    // optional float alpha = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 4;
    }

    // optional float gamma = 2 [default = 2];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SigmoidFocalClassificationLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    SigmoidFocalClassificationLoss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SigmoidFocalClassificationLoss::GetClassData() const { return &_class_data_; }


void SigmoidFocalClassificationLoss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<SigmoidFocalClassificationLoss*>(&to_msg);
  auto& from = static_cast<const SigmoidFocalClassificationLoss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.SigmoidFocalClassificationLoss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.anchorwise_output_ = from._impl_.anchorwise_output_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.alpha_ = from._impl_.alpha_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.gamma_ = from._impl_.gamma_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SigmoidFocalClassificationLoss::CopyFrom(const SigmoidFocalClassificationLoss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.SigmoidFocalClassificationLoss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SigmoidFocalClassificationLoss::IsInitialized() const {
  return true;
}

void SigmoidFocalClassificationLoss::InternalSwap(SigmoidFocalClassificationLoss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SigmoidFocalClassificationLoss, _impl_.alpha_)
      + sizeof(SigmoidFocalClassificationLoss::_impl_.alpha_)
      - PROTOBUF_FIELD_OFFSET(SigmoidFocalClassificationLoss, _impl_.anchorwise_output_)>(
          reinterpret_cast<char*>(&_impl_.anchorwise_output_),
          reinterpret_cast<char*>(&other->_impl_.anchorwise_output_));
  swap(_impl_.gamma_, other->_impl_.gamma_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SigmoidFocalClassificationLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[8]);
}

// ===================================================================

class WeightedSoftmaxClassificationLoss::_Internal {
 public:
  using HasBits = decltype(std::declval<WeightedSoftmaxClassificationLoss>()._impl_._has_bits_);
  static void set_has_anchorwise_output(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_logit_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

WeightedSoftmaxClassificationLoss::WeightedSoftmaxClassificationLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.WeightedSoftmaxClassificationLoss)
}
WeightedSoftmaxClassificationLoss::WeightedSoftmaxClassificationLoss(const WeightedSoftmaxClassificationLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  WeightedSoftmaxClassificationLoss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){}
    , decltype(_impl_.logit_scale_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.anchorwise_output_, &from._impl_.anchorwise_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.logit_scale_) -
    reinterpret_cast<char*>(&_impl_.anchorwise_output_)) + sizeof(_impl_.logit_scale_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.WeightedSoftmaxClassificationLoss)
}

inline void WeightedSoftmaxClassificationLoss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){false}
    , decltype(_impl_.logit_scale_){1}
  };
}

WeightedSoftmaxClassificationLoss::~WeightedSoftmaxClassificationLoss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.WeightedSoftmaxClassificationLoss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void WeightedSoftmaxClassificationLoss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void WeightedSoftmaxClassificationLoss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void WeightedSoftmaxClassificationLoss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.WeightedSoftmaxClassificationLoss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    _impl_.anchorwise_output_ = false;
    _impl_.logit_scale_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* WeightedSoftmaxClassificationLoss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool anchorwise_output = 1 [default = false];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_anchorwise_output(&has_bits);
          _impl_.anchorwise_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float logit_scale = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_logit_scale(&has_bits);
          _impl_.logit_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* WeightedSoftmaxClassificationLoss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.WeightedSoftmaxClassificationLoss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional bool anchorwise_output = 1 [default = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_anchorwise_output(), target);
  }

  // optional float logit_scale = 2 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_logit_scale(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.WeightedSoftmaxClassificationLoss)
  return target;
}

size_t WeightedSoftmaxClassificationLoss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.WeightedSoftmaxClassificationLoss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional bool anchorwise_output = 1 [default = false];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 1;
    }

    // optional float logit_scale = 2 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WeightedSoftmaxClassificationLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    WeightedSoftmaxClassificationLoss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WeightedSoftmaxClassificationLoss::GetClassData() const { return &_class_data_; }


void WeightedSoftmaxClassificationLoss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<WeightedSoftmaxClassificationLoss*>(&to_msg);
  auto& from = static_cast<const WeightedSoftmaxClassificationLoss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.WeightedSoftmaxClassificationLoss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.anchorwise_output_ = from._impl_.anchorwise_output_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.logit_scale_ = from._impl_.logit_scale_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void WeightedSoftmaxClassificationLoss::CopyFrom(const WeightedSoftmaxClassificationLoss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.WeightedSoftmaxClassificationLoss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WeightedSoftmaxClassificationLoss::IsInitialized() const {
  return true;
}

void WeightedSoftmaxClassificationLoss::InternalSwap(WeightedSoftmaxClassificationLoss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.anchorwise_output_, other->_impl_.anchorwise_output_);
  swap(_impl_.logit_scale_, other->_impl_.logit_scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata WeightedSoftmaxClassificationLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[9]);
}

// ===================================================================

class WeightedSoftmaxClassificationAgainstLogitsLoss::_Internal {
 public:
  using HasBits = decltype(std::declval<WeightedSoftmaxClassificationAgainstLogitsLoss>()._impl_._has_bits_);
  static void set_has_anchorwise_output(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_logit_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

WeightedSoftmaxClassificationAgainstLogitsLoss::WeightedSoftmaxClassificationAgainstLogitsLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
}
WeightedSoftmaxClassificationAgainstLogitsLoss::WeightedSoftmaxClassificationAgainstLogitsLoss(const WeightedSoftmaxClassificationAgainstLogitsLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  WeightedSoftmaxClassificationAgainstLogitsLoss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){}
    , decltype(_impl_.logit_scale_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.anchorwise_output_, &from._impl_.anchorwise_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.logit_scale_) -
    reinterpret_cast<char*>(&_impl_.anchorwise_output_)) + sizeof(_impl_.logit_scale_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
}

inline void WeightedSoftmaxClassificationAgainstLogitsLoss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.anchorwise_output_){false}
    , decltype(_impl_.logit_scale_){1}
  };
}

WeightedSoftmaxClassificationAgainstLogitsLoss::~WeightedSoftmaxClassificationAgainstLogitsLoss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void WeightedSoftmaxClassificationAgainstLogitsLoss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void WeightedSoftmaxClassificationAgainstLogitsLoss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void WeightedSoftmaxClassificationAgainstLogitsLoss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    _impl_.anchorwise_output_ = false;
    _impl_.logit_scale_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* WeightedSoftmaxClassificationAgainstLogitsLoss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool anchorwise_output = 1 [default = false];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_anchorwise_output(&has_bits);
          _impl_.anchorwise_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float logit_scale = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_logit_scale(&has_bits);
          _impl_.logit_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* WeightedSoftmaxClassificationAgainstLogitsLoss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional bool anchorwise_output = 1 [default = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_anchorwise_output(), target);
  }

  // optional float logit_scale = 2 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_logit_scale(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
  return target;
}

size_t WeightedSoftmaxClassificationAgainstLogitsLoss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional bool anchorwise_output = 1 [default = false];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 1;
    }

    // optional float logit_scale = 2 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WeightedSoftmaxClassificationAgainstLogitsLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    WeightedSoftmaxClassificationAgainstLogitsLoss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WeightedSoftmaxClassificationAgainstLogitsLoss::GetClassData() const { return &_class_data_; }


void WeightedSoftmaxClassificationAgainstLogitsLoss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<WeightedSoftmaxClassificationAgainstLogitsLoss*>(&to_msg);
  auto& from = static_cast<const WeightedSoftmaxClassificationAgainstLogitsLoss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.anchorwise_output_ = from._impl_.anchorwise_output_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.logit_scale_ = from._impl_.logit_scale_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void WeightedSoftmaxClassificationAgainstLogitsLoss::CopyFrom(const WeightedSoftmaxClassificationAgainstLogitsLoss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.WeightedSoftmaxClassificationAgainstLogitsLoss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WeightedSoftmaxClassificationAgainstLogitsLoss::IsInitialized() const {
  return true;
}

void WeightedSoftmaxClassificationAgainstLogitsLoss::InternalSwap(WeightedSoftmaxClassificationAgainstLogitsLoss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.anchorwise_output_, other->_impl_.anchorwise_output_);
  swap(_impl_.logit_scale_, other->_impl_.logit_scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata WeightedSoftmaxClassificationAgainstLogitsLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[10]);
}

// ===================================================================

class BootstrappedSigmoidClassificationLoss::_Internal {
 public:
  using HasBits = decltype(std::declval<BootstrappedSigmoidClassificationLoss>()._impl_._has_bits_);
  static void set_has_alpha(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_hard_bootstrap(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_anchorwise_output(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

BootstrappedSigmoidClassificationLoss::BootstrappedSigmoidClassificationLoss(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.BootstrappedSigmoidClassificationLoss)
}
BootstrappedSigmoidClassificationLoss::BootstrappedSigmoidClassificationLoss(const BootstrappedSigmoidClassificationLoss& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BootstrappedSigmoidClassificationLoss* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.alpha_){}
    , decltype(_impl_.hard_bootstrap_){}
    , decltype(_impl_.anchorwise_output_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.alpha_, &from._impl_.alpha_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.anchorwise_output_) -
    reinterpret_cast<char*>(&_impl_.alpha_)) + sizeof(_impl_.anchorwise_output_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.BootstrappedSigmoidClassificationLoss)
}

inline void BootstrappedSigmoidClassificationLoss::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.alpha_){0}
    , decltype(_impl_.hard_bootstrap_){false}
    , decltype(_impl_.anchorwise_output_){false}
  };
}

BootstrappedSigmoidClassificationLoss::~BootstrappedSigmoidClassificationLoss() {
  // @@protoc_insertion_point(destructor:object_detection.protos.BootstrappedSigmoidClassificationLoss)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void BootstrappedSigmoidClassificationLoss::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void BootstrappedSigmoidClassificationLoss::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void BootstrappedSigmoidClassificationLoss::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.BootstrappedSigmoidClassificationLoss)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    ::memset(&_impl_.alpha_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.anchorwise_output_) -
        reinterpret_cast<char*>(&_impl_.alpha_)) + sizeof(_impl_.anchorwise_output_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BootstrappedSigmoidClassificationLoss::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float alpha = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_alpha(&has_bits);
          _impl_.alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool hard_bootstrap = 2 [default = false];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_hard_bootstrap(&has_bits);
          _impl_.hard_bootstrap_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool anchorwise_output = 3 [default = false];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_anchorwise_output(&has_bits);
          _impl_.anchorwise_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* BootstrappedSigmoidClassificationLoss::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.BootstrappedSigmoidClassificationLoss)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional float alpha = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_alpha(), target);
  }

  // optional bool hard_bootstrap = 2 [default = false];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_hard_bootstrap(), target);
  }

  // optional bool anchorwise_output = 3 [default = false];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_anchorwise_output(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.BootstrappedSigmoidClassificationLoss)
  return target;
}

size_t BootstrappedSigmoidClassificationLoss::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.BootstrappedSigmoidClassificationLoss)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional float alpha = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

    // optional bool hard_bootstrap = 2 [default = false];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 1;
    }

    // optional bool anchorwise_output = 3 [default = false];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 + 1;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BootstrappedSigmoidClassificationLoss::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    BootstrappedSigmoidClassificationLoss::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BootstrappedSigmoidClassificationLoss::GetClassData() const { return &_class_data_; }


void BootstrappedSigmoidClassificationLoss::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<BootstrappedSigmoidClassificationLoss*>(&to_msg);
  auto& from = static_cast<const BootstrappedSigmoidClassificationLoss&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.BootstrappedSigmoidClassificationLoss)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.alpha_ = from._impl_.alpha_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.hard_bootstrap_ = from._impl_.hard_bootstrap_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.anchorwise_output_ = from._impl_.anchorwise_output_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void BootstrappedSigmoidClassificationLoss::CopyFrom(const BootstrappedSigmoidClassificationLoss& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.BootstrappedSigmoidClassificationLoss)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool BootstrappedSigmoidClassificationLoss::IsInitialized() const {
  return true;
}

void BootstrappedSigmoidClassificationLoss::InternalSwap(BootstrappedSigmoidClassificationLoss* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BootstrappedSigmoidClassificationLoss, _impl_.anchorwise_output_)
      + sizeof(BootstrappedSigmoidClassificationLoss::_impl_.anchorwise_output_)
      - PROTOBUF_FIELD_OFFSET(BootstrappedSigmoidClassificationLoss, _impl_.alpha_)>(
          reinterpret_cast<char*>(&_impl_.alpha_),
          reinterpret_cast<char*>(&other->_impl_.alpha_));
}

::PROTOBUF_NAMESPACE_ID::Metadata BootstrappedSigmoidClassificationLoss::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[11]);
}

// ===================================================================

class HardExampleMiner::_Internal {
 public:
  using HasBits = decltype(std::declval<HardExampleMiner>()._impl_._has_bits_);
  static void set_has_num_hard_examples(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_iou_threshold(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_loss_type(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_max_negatives_per_positive(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_min_negatives_per_image(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

HardExampleMiner::HardExampleMiner(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.HardExampleMiner)
}
HardExampleMiner::HardExampleMiner(const HardExampleMiner& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  HardExampleMiner* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.loss_type_){}
    , decltype(_impl_.max_negatives_per_positive_){}
    , decltype(_impl_.min_negatives_per_image_){}
    , decltype(_impl_.num_hard_examples_){}
    , decltype(_impl_.iou_threshold_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.loss_type_, &from._impl_.loss_type_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.iou_threshold_) -
    reinterpret_cast<char*>(&_impl_.loss_type_)) + sizeof(_impl_.iou_threshold_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.HardExampleMiner)
}

inline void HardExampleMiner::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.loss_type_){0}
    , decltype(_impl_.max_negatives_per_positive_){0}
    , decltype(_impl_.min_negatives_per_image_){0}
    , decltype(_impl_.num_hard_examples_){64}
    , decltype(_impl_.iou_threshold_){0.7f}
  };
}

HardExampleMiner::~HardExampleMiner() {
  // @@protoc_insertion_point(destructor:object_detection.protos.HardExampleMiner)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void HardExampleMiner::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void HardExampleMiner::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void HardExampleMiner::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.HardExampleMiner)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    ::memset(&_impl_.loss_type_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.min_negatives_per_image_) -
        reinterpret_cast<char*>(&_impl_.loss_type_)) + sizeof(_impl_.min_negatives_per_image_));
    _impl_.num_hard_examples_ = 64;
    _impl_.iou_threshold_ = 0.7f;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* HardExampleMiner::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 num_hard_examples = 1 [default = 64];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_num_hard_examples(&has_bits);
          _impl_.num_hard_examples_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float iou_threshold = 2 [default = 0.7];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_iou_threshold(&has_bits);
          _impl_.iou_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::object_detection::protos::HardExampleMiner_LossType_IsValid(val))) {
            _internal_set_loss_type(static_cast<::object_detection::protos::HardExampleMiner_LossType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int32 max_negatives_per_positive = 4 [default = 0];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_max_negatives_per_positive(&has_bits);
          _impl_.max_negatives_per_positive_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 min_negatives_per_image = 5 [default = 0];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_min_negatives_per_image(&has_bits);
          _impl_.min_negatives_per_image_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* HardExampleMiner::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.HardExampleMiner)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional int32 num_hard_examples = 1 [default = 64];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_num_hard_examples(), target);
  }

  // optional float iou_threshold = 2 [default = 0.7];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_iou_threshold(), target);
  }

  // optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      3, this->_internal_loss_type(), target);
  }

  // optional int32 max_negatives_per_positive = 4 [default = 0];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_max_negatives_per_positive(), target);
  }

  // optional int32 min_negatives_per_image = 5 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_min_negatives_per_image(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.HardExampleMiner)
  return target;
}

size_t HardExampleMiner::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.HardExampleMiner)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional .object_detection.protos.HardExampleMiner.LossType loss_type = 3 [default = BOTH];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_loss_type());
    }

    // optional int32 max_negatives_per_positive = 4 [default = 0];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_negatives_per_positive());
    }

    // optional int32 min_negatives_per_image = 5 [default = 0];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_min_negatives_per_image());
    }

    // optional int32 num_hard_examples = 1 [default = 64];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_hard_examples());
    }

    // optional float iou_threshold = 2 [default = 0.7];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HardExampleMiner::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    HardExampleMiner::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HardExampleMiner::GetClassData() const { return &_class_data_; }


void HardExampleMiner::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<HardExampleMiner*>(&to_msg);
  auto& from = static_cast<const HardExampleMiner&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.HardExampleMiner)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.loss_type_ = from._impl_.loss_type_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.max_negatives_per_positive_ = from._impl_.max_negatives_per_positive_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.min_negatives_per_image_ = from._impl_.min_negatives_per_image_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.num_hard_examples_ = from._impl_.num_hard_examples_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.iou_threshold_ = from._impl_.iou_threshold_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void HardExampleMiner::CopyFrom(const HardExampleMiner& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.HardExampleMiner)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool HardExampleMiner::IsInitialized() const {
  return true;
}

void HardExampleMiner::InternalSwap(HardExampleMiner* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(HardExampleMiner, _impl_.min_negatives_per_image_)
      + sizeof(HardExampleMiner::_impl_.min_negatives_per_image_)
      - PROTOBUF_FIELD_OFFSET(HardExampleMiner, _impl_.loss_type_)>(
          reinterpret_cast<char*>(&_impl_.loss_type_),
          reinterpret_cast<char*>(&other->_impl_.loss_type_));
  swap(_impl_.num_hard_examples_, other->_impl_.num_hard_examples_);
  swap(_impl_.iou_threshold_, other->_impl_.iou_threshold_);
}

::PROTOBUF_NAMESPACE_ID::Metadata HardExampleMiner::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[12]);
}

// ===================================================================

class RandomExampleSampler::_Internal {
 public:
  using HasBits = decltype(std::declval<RandomExampleSampler>()._impl_._has_bits_);
  static void set_has_positive_sample_fraction(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

RandomExampleSampler::RandomExampleSampler(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.RandomExampleSampler)
}
RandomExampleSampler::RandomExampleSampler(const RandomExampleSampler& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  RandomExampleSampler* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.positive_sample_fraction_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.positive_sample_fraction_ = from._impl_.positive_sample_fraction_;
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.RandomExampleSampler)
}

inline void RandomExampleSampler::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.positive_sample_fraction_){0.01f}
  };
}

RandomExampleSampler::~RandomExampleSampler() {
  // @@protoc_insertion_point(destructor:object_detection.protos.RandomExampleSampler)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void RandomExampleSampler::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void RandomExampleSampler::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void RandomExampleSampler::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.RandomExampleSampler)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.positive_sample_fraction_ = 0.01f;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* RandomExampleSampler::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float positive_sample_fraction = 1 [default = 0.01];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_positive_sample_fraction(&has_bits);
          _impl_.positive_sample_fraction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* RandomExampleSampler::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.RandomExampleSampler)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional float positive_sample_fraction = 1 [default = 0.01];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_positive_sample_fraction(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:object_detection.protos.RandomExampleSampler)
  return target;
}

size_t RandomExampleSampler::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.RandomExampleSampler)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // optional float positive_sample_fraction = 1 [default = 0.01];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 + 4;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RandomExampleSampler::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    RandomExampleSampler::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RandomExampleSampler::GetClassData() const { return &_class_data_; }


void RandomExampleSampler::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<RandomExampleSampler*>(&to_msg);
  auto& from = static_cast<const RandomExampleSampler&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.RandomExampleSampler)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_positive_sample_fraction()) {
    _this->_internal_set_positive_sample_fraction(from._internal_positive_sample_fraction());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void RandomExampleSampler::CopyFrom(const RandomExampleSampler& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.RandomExampleSampler)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool RandomExampleSampler::IsInitialized() const {
  return true;
}

void RandomExampleSampler::InternalSwap(RandomExampleSampler* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.positive_sample_fraction_, other->_impl_.positive_sample_fraction_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RandomExampleSampler::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2flosses_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2flosses_2eproto[13]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace protos
}  // namespace object_detection
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::object_detection::protos::Loss_EqualizationLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::Loss_EqualizationLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::Loss_EqualizationLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::Loss*
Arena::CreateMaybeMessage< ::object_detection::protos::Loss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::Loss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::LocalizationLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::LocalizationLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::LocalizationLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::WeightedL2LocalizationLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::WeightedL2LocalizationLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::WeightedL2LocalizationLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::WeightedSmoothL1LocalizationLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::WeightedSmoothL1LocalizationLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::WeightedSmoothL1LocalizationLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::WeightedIOULocalizationLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::WeightedIOULocalizationLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::WeightedIOULocalizationLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::ClassificationLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::ClassificationLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::ClassificationLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::WeightedSigmoidClassificationLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::WeightedSigmoidClassificationLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::WeightedSigmoidClassificationLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::SigmoidFocalClassificationLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::SigmoidFocalClassificationLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::SigmoidFocalClassificationLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::WeightedSoftmaxClassificationLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::WeightedSoftmaxClassificationLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::WeightedSoftmaxClassificationLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::WeightedSoftmaxClassificationAgainstLogitsLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::BootstrappedSigmoidClassificationLoss*
Arena::CreateMaybeMessage< ::object_detection::protos::BootstrappedSigmoidClassificationLoss >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::BootstrappedSigmoidClassificationLoss >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::HardExampleMiner*
Arena::CreateMaybeMessage< ::object_detection::protos::HardExampleMiner >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::HardExampleMiner >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::RandomExampleSampler*
Arena::CreateMaybeMessage< ::object_detection::protos::RandomExampleSampler >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::RandomExampleSampler >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
