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

#include "object_detection/protos/box_predictor.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 BoxPredictor::BoxPredictor(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.box_predictor_oneof_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_._oneof_case_)*/{}} {}
struct BoxPredictorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BoxPredictorDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BoxPredictorDefaultTypeInternal() {}
  union {
    BoxPredictor _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BoxPredictorDefaultTypeInternal _BoxPredictor_default_instance_;
PROTOBUF_CONSTEXPR ConvolutionalBoxPredictor_BoxEncodingsClipRange::ConvolutionalBoxPredictor_BoxEncodingsClipRange(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.min_)*/0
  , /*decltype(_impl_.max_)*/0} {}
struct ConvolutionalBoxPredictor_BoxEncodingsClipRangeDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ConvolutionalBoxPredictor_BoxEncodingsClipRangeDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ConvolutionalBoxPredictor_BoxEncodingsClipRangeDefaultTypeInternal() {}
  union {
    ConvolutionalBoxPredictor_BoxEncodingsClipRange _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConvolutionalBoxPredictor_BoxEncodingsClipRangeDefaultTypeInternal _ConvolutionalBoxPredictor_BoxEncodingsClipRange_default_instance_;
PROTOBUF_CONSTEXPR ConvolutionalBoxPredictor::ConvolutionalBoxPredictor(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.conv_hyperparams_)*/nullptr
  , /*decltype(_impl_.box_encodings_clip_range_)*/nullptr
  , /*decltype(_impl_.min_depth_)*/0
  , /*decltype(_impl_.max_depth_)*/0
  , /*decltype(_impl_.num_layers_before_predictor_)*/0
  , /*decltype(_impl_.class_prediction_bias_init_)*/0
  , /*decltype(_impl_.apply_sigmoid_to_scores_)*/false
  , /*decltype(_impl_.use_depthwise_)*/false
  , /*decltype(_impl_.use_dropout_)*/true
  , /*decltype(_impl_.dropout_keep_probability_)*/0.8f
  , /*decltype(_impl_.kernel_size_)*/1
  , /*decltype(_impl_.box_code_size_)*/4} {}
struct ConvolutionalBoxPredictorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ConvolutionalBoxPredictorDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ConvolutionalBoxPredictorDefaultTypeInternal() {}
  union {
    ConvolutionalBoxPredictor _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConvolutionalBoxPredictorDefaultTypeInternal _ConvolutionalBoxPredictor_default_instance_;
PROTOBUF_CONSTEXPR WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.min_)*/0
  , /*decltype(_impl_.max_)*/0} {}
struct WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRangeDefaultTypeInternal {
  PROTOBUF_CONSTEXPR WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRangeDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRangeDefaultTypeInternal() {}
  union {
    WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRangeDefaultTypeInternal _WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange_default_instance_;
PROTOBUF_CONSTEXPR WeightSharedConvolutionalBoxPredictor::WeightSharedConvolutionalBoxPredictor(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.conv_hyperparams_)*/nullptr
  , /*decltype(_impl_.box_encodings_clip_range_)*/nullptr
  , /*decltype(_impl_.depth_)*/0
  , /*decltype(_impl_.num_layers_before_predictor_)*/0
  , /*decltype(_impl_.class_prediction_bias_init_)*/0
  , /*decltype(_impl_.use_dropout_)*/false
  , /*decltype(_impl_.share_prediction_tower_)*/false
  , /*decltype(_impl_.use_depthwise_)*/false
  , /*decltype(_impl_.score_converter_)*/0
  , /*decltype(_impl_.dropout_keep_probability_)*/0.8f
  , /*decltype(_impl_.kernel_size_)*/3
  , /*decltype(_impl_.box_code_size_)*/4} {}
struct WeightSharedConvolutionalBoxPredictorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR WeightSharedConvolutionalBoxPredictorDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~WeightSharedConvolutionalBoxPredictorDefaultTypeInternal() {}
  union {
    WeightSharedConvolutionalBoxPredictor _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WeightSharedConvolutionalBoxPredictorDefaultTypeInternal _WeightSharedConvolutionalBoxPredictor_default_instance_;
PROTOBUF_CONSTEXPR MaskRCNNBoxPredictor::MaskRCNNBoxPredictor(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.fc_hyperparams_)*/nullptr
  , /*decltype(_impl_.conv_hyperparams_)*/nullptr
  , /*decltype(_impl_.use_dropout_)*/false
  , /*decltype(_impl_.predict_instance_masks_)*/false
  , /*decltype(_impl_.predict_keypoints_)*/false
  , /*decltype(_impl_.masks_are_class_agnostic_)*/false
  , /*decltype(_impl_.share_box_across_classes_)*/false
  , /*decltype(_impl_.convolve_then_upsample_masks_)*/false
  , /*decltype(_impl_.dropout_keep_probability_)*/0.5f
  , /*decltype(_impl_.box_code_size_)*/4
  , /*decltype(_impl_.mask_prediction_conv_depth_)*/256
  , /*decltype(_impl_.mask_height_)*/15
  , /*decltype(_impl_.mask_width_)*/15
  , /*decltype(_impl_.mask_prediction_num_conv_layers_)*/2} {}
struct MaskRCNNBoxPredictorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR MaskRCNNBoxPredictorDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~MaskRCNNBoxPredictorDefaultTypeInternal() {}
  union {
    MaskRCNNBoxPredictor _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MaskRCNNBoxPredictorDefaultTypeInternal _MaskRCNNBoxPredictor_default_instance_;
PROTOBUF_CONSTEXPR RfcnBoxPredictor::RfcnBoxPredictor(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.conv_hyperparams_)*/nullptr
  , /*decltype(_impl_.num_spatial_bins_height_)*/3
  , /*decltype(_impl_.num_spatial_bins_width_)*/3
  , /*decltype(_impl_.depth_)*/1024
  , /*decltype(_impl_.box_code_size_)*/4
  , /*decltype(_impl_.crop_height_)*/12
  , /*decltype(_impl_.crop_width_)*/12} {}
struct RfcnBoxPredictorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RfcnBoxPredictorDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~RfcnBoxPredictorDefaultTypeInternal() {}
  union {
    RfcnBoxPredictor _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RfcnBoxPredictorDefaultTypeInternal _RfcnBoxPredictor_default_instance_;
}  // namespace protos
}  // namespace object_detection
static ::_pb::Metadata file_level_metadata_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[7];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[1];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto = nullptr;

const uint32_t TableStruct_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BoxPredictor, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BoxPredictor, _impl_._oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  ::_pbi::kInvalidFieldOffsetTag,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::BoxPredictor, _impl_.box_predictor_oneof_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange, _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::ConvolutionalBoxPredictor_BoxEncodingsClipRange, _impl_.min_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange, _impl_.max_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _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::ConvolutionalBoxPredictor, _impl_.conv_hyperparams_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.min_depth_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.max_depth_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.num_layers_before_predictor_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.use_dropout_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.dropout_keep_probability_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.kernel_size_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.box_code_size_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.apply_sigmoid_to_scores_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.class_prediction_bias_init_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.use_depthwise_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::ConvolutionalBoxPredictor, _impl_.box_encodings_clip_range_),
  0,
  2,
  3,
  4,
  8,
  9,
  10,
  11,
  6,
  5,
  7,
  1,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange, _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::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange, _impl_.min_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange, _impl_.max_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _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::WeightSharedConvolutionalBoxPredictor, _impl_.conv_hyperparams_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.num_layers_before_predictor_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.depth_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.kernel_size_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.box_code_size_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.class_prediction_bias_init_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.use_dropout_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.dropout_keep_probability_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.share_prediction_tower_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.use_depthwise_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.score_converter_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::WeightSharedConvolutionalBoxPredictor, _impl_.box_encodings_clip_range_),
  0,
  3,
  2,
  10,
  11,
  4,
  5,
  9,
  6,
  7,
  8,
  1,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _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::MaskRCNNBoxPredictor, _impl_.fc_hyperparams_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.use_dropout_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.dropout_keep_probability_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.box_code_size_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.conv_hyperparams_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.predict_instance_masks_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.mask_prediction_conv_depth_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.predict_keypoints_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.mask_height_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.mask_width_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.mask_prediction_num_conv_layers_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.masks_are_class_agnostic_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.share_box_across_classes_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::MaskRCNNBoxPredictor, _impl_.convolve_then_upsample_masks_),
  0,
  2,
  8,
  9,
  1,
  3,
  10,
  4,
  11,
  12,
  13,
  5,
  6,
  7,
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RfcnBoxPredictor, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RfcnBoxPredictor, _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::RfcnBoxPredictor, _impl_.conv_hyperparams_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RfcnBoxPredictor, _impl_.num_spatial_bins_height_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RfcnBoxPredictor, _impl_.num_spatial_bins_width_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RfcnBoxPredictor, _impl_.depth_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RfcnBoxPredictor, _impl_.box_code_size_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RfcnBoxPredictor, _impl_.crop_height_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::RfcnBoxPredictor, _impl_.crop_width_),
  0,
  1,
  2,
  3,
  4,
  5,
  6,
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::object_detection::protos::BoxPredictor)},
  { 11, 19, -1, sizeof(::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange)},
  { 21, 39, -1, sizeof(::object_detection::protos::ConvolutionalBoxPredictor)},
  { 51, 59, -1, sizeof(::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange)},
  { 61, 79, -1, sizeof(::object_detection::protos::WeightSharedConvolutionalBoxPredictor)},
  { 91, 111, -1, sizeof(::object_detection::protos::MaskRCNNBoxPredictor)},
  { 125, 138, -1, sizeof(::object_detection::protos::RfcnBoxPredictor)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::object_detection::protos::_BoxPredictor_default_instance_._instance,
  &::object_detection::protos::_ConvolutionalBoxPredictor_BoxEncodingsClipRange_default_instance_._instance,
  &::object_detection::protos::_ConvolutionalBoxPredictor_default_instance_._instance,
  &::object_detection::protos::_WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange_default_instance_._instance,
  &::object_detection::protos::_WeightSharedConvolutionalBoxPredictor_default_instance_._instance,
  &::object_detection::protos::_MaskRCNNBoxPredictor_default_instance_._instance,
  &::object_detection::protos::_RfcnBoxPredictor_default_instance_._instance,
};

const char descriptor_table_protodef_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n+object_detection/protos/box_predictor."
  "proto\022\027object_detection.protos\032)object_d"
  "etection/protos/hyperparams.proto\"\220\003\n\014Bo"
  "xPredictor\022Y\n\033convolutional_box_predicto"
  "r\030\001 \001(\01322.object_detection.protos.Convol"
  "utionalBoxPredictorH\000\022P\n\027mask_rcnn_box_p"
  "redictor\030\002 \001(\0132-.object_detection.protos"
  ".MaskRCNNBoxPredictorH\000\022G\n\022rfcn_box_pred"
  "ictor\030\003 \001(\0132).object_detection.protos.Rf"
  "cnBoxPredictorH\000\022s\n)weight_shared_convol"
  "utional_box_predictor\030\004 \001(\0132>.object_det"
  "ection.protos.WeightSharedConvolutionalB"
  "oxPredictorH\000B\025\n\023box_predictor_oneof\"\257\004\n"
  "\031ConvolutionalBoxPredictor\022>\n\020conv_hyper"
  "params\030\001 \001(\0132$.object_detection.protos.H"
  "yperparams\022\024\n\tmin_depth\030\002 \001(\005:\0010\022\024\n\tmax_"
  "depth\030\003 \001(\005:\0010\022&\n\033num_layers_before_pred"
  "ictor\030\004 \001(\005:\0010\022\031\n\013use_dropout\030\005 \001(\010:\004tru"
  "e\022%\n\030dropout_keep_probability\030\006 \001(\002:\0030.8"
  "\022\026\n\013kernel_size\030\007 \001(\005:\0011\022\030\n\rbox_code_siz"
  "e\030\010 \001(\005:\0014\022&\n\027apply_sigmoid_to_scores\030\t "
  "\001(\010:\005false\022%\n\032class_prediction_bias_init"
  "\030\n \001(\002:\0010\022\034\n\ruse_depthwise\030\013 \001(\010:\005false\022"
  "j\n\030box_encodings_clip_range\030\014 \001(\0132H.obje"
  "ct_detection.protos.ConvolutionalBoxPred"
  "ictor.BoxEncodingsClipRange\0321\n\025BoxEncodi"
  "ngsClipRange\022\013\n\003min\030\001 \001(\002\022\013\n\003max\030\002 \001(\002\"\314"
  "\005\n%WeightSharedConvolutionalBoxPredictor"
  "\022>\n\020conv_hyperparams\030\001 \001(\0132$.object_dete"
  "ction.protos.Hyperparams\022&\n\033num_layers_b"
  "efore_predictor\030\004 \001(\005:\0010\022\020\n\005depth\030\002 \001(\005:"
  "\0010\022\026\n\013kernel_size\030\007 \001(\005:\0013\022\030\n\rbox_code_s"
  "ize\030\010 \001(\005:\0014\022%\n\032class_prediction_bias_in"
  "it\030\n \001(\002:\0010\022\032\n\013use_dropout\030\013 \001(\010:\005false\022"
  "%\n\030dropout_keep_probability\030\014 \001(\002:\0030.8\022%"
  "\n\026share_prediction_tower\030\r \001(\010:\005false\022\034\n"
  "\ruse_depthwise\030\016 \001(\010:\005false\022p\n\017score_con"
  "verter\030\020 \001(\0162M.object_detection.protos.W"
  "eightSharedConvolutionalBoxPredictor.Sco"
  "reConverter:\010IDENTITY\022v\n\030box_encodings_c"
  "lip_range\030\021 \001(\0132T.object_detection.proto"
  "s.WeightSharedConvolutionalBoxPredictor."
  "BoxEncodingsClipRange\0321\n\025BoxEncodingsCli"
  "pRange\022\013\n\003min\030\001 \001(\002\022\013\n\003max\030\002 \001(\002\"+\n\016Scor"
  "eConverter\022\014\n\010IDENTITY\020\000\022\013\n\007SIGMOID\020\001\"\277\004"
  "\n\024MaskRCNNBoxPredictor\022<\n\016fc_hyperparams"
  "\030\001 \001(\0132$.object_detection.protos.Hyperpa"
  "rams\022\032\n\013use_dropout\030\002 \001(\010:\005false\022%\n\030drop"
  "out_keep_probability\030\003 \001(\002:\0030.5\022\030\n\rbox_c"
  "ode_size\030\004 \001(\005:\0014\022>\n\020conv_hyperparams\030\005 "
  "\001(\0132$.object_detection.protos.Hyperparam"
  "s\022%\n\026predict_instance_masks\030\006 \001(\010:\005false"
  "\022\'\n\032mask_prediction_conv_depth\030\007 \001(\005:\00325"
  "6\022 \n\021predict_keypoints\030\010 \001(\010:\005false\022\027\n\013m"
  "ask_height\030\t \001(\005:\00215\022\026\n\nmask_width\030\n \001(\005"
  ":\00215\022*\n\037mask_prediction_num_conv_layers\030"
  "\013 \001(\005:\0012\022\'\n\030masks_are_class_agnostic\030\014 \001"
  "(\010:\005false\022\'\n\030share_box_across_classes\030\r "
  "\001(\010:\005false\022+\n\034convolve_then_upsample_mas"
  "ks\030\016 \001(\010:\005false\"\371\001\n\020RfcnBoxPredictor\022>\n\020"
  "conv_hyperparams\030\001 \001(\0132$.object_detectio"
  "n.protos.Hyperparams\022\"\n\027num_spatial_bins"
  "_height\030\002 \001(\005:\0013\022!\n\026num_spatial_bins_wid"
  "th\030\003 \001(\005:\0013\022\023\n\005depth\030\004 \001(\005:\0041024\022\030\n\rbox_"
  "code_size\030\005 \001(\005:\0014\022\027\n\013crop_height\030\006 \001(\005:"
  "\00212\022\026\n\ncrop_width\030\007 \001(\005:\00212"
  ;
static const ::_pbi::DescriptorTable* const descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_deps[1] = {
  &::descriptor_table_object_5fdetection_2fprotos_2fhyperparams_2eproto,
};
static ::_pbi::once_flag descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto = {
    false, false, 2627, descriptor_table_protodef_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto,
    "object_detection/protos/box_predictor.proto",
    &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_once, descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_deps, 1, 7,
    schemas, file_default_instances, TableStruct_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto::offsets,
    file_level_metadata_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto, file_level_enum_descriptors_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto,
    file_level_service_descriptors_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_getter() {
  return &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto(&descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto);
namespace object_detection {
namespace protos {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* WeightSharedConvolutionalBoxPredictor_ScoreConverter_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto);
  return file_level_enum_descriptors_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[0];
}
bool WeightSharedConvolutionalBoxPredictor_ScoreConverter_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr WeightSharedConvolutionalBoxPredictor_ScoreConverter WeightSharedConvolutionalBoxPredictor::IDENTITY;
constexpr WeightSharedConvolutionalBoxPredictor_ScoreConverter WeightSharedConvolutionalBoxPredictor::SIGMOID;
constexpr WeightSharedConvolutionalBoxPredictor_ScoreConverter WeightSharedConvolutionalBoxPredictor::ScoreConverter_MIN;
constexpr WeightSharedConvolutionalBoxPredictor_ScoreConverter WeightSharedConvolutionalBoxPredictor::ScoreConverter_MAX;
constexpr int WeightSharedConvolutionalBoxPredictor::ScoreConverter_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))

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

class BoxPredictor::_Internal {
 public:
  static const ::object_detection::protos::ConvolutionalBoxPredictor& convolutional_box_predictor(const BoxPredictor* msg);
  static const ::object_detection::protos::MaskRCNNBoxPredictor& mask_rcnn_box_predictor(const BoxPredictor* msg);
  static const ::object_detection::protos::RfcnBoxPredictor& rfcn_box_predictor(const BoxPredictor* msg);
  static const ::object_detection::protos::WeightSharedConvolutionalBoxPredictor& weight_shared_convolutional_box_predictor(const BoxPredictor* msg);
};

const ::object_detection::protos::ConvolutionalBoxPredictor&
BoxPredictor::_Internal::convolutional_box_predictor(const BoxPredictor* msg) {
  return *msg->_impl_.box_predictor_oneof_.convolutional_box_predictor_;
}
const ::object_detection::protos::MaskRCNNBoxPredictor&
BoxPredictor::_Internal::mask_rcnn_box_predictor(const BoxPredictor* msg) {
  return *msg->_impl_.box_predictor_oneof_.mask_rcnn_box_predictor_;
}
const ::object_detection::protos::RfcnBoxPredictor&
BoxPredictor::_Internal::rfcn_box_predictor(const BoxPredictor* msg) {
  return *msg->_impl_.box_predictor_oneof_.rfcn_box_predictor_;
}
const ::object_detection::protos::WeightSharedConvolutionalBoxPredictor&
BoxPredictor::_Internal::weight_shared_convolutional_box_predictor(const BoxPredictor* msg) {
  return *msg->_impl_.box_predictor_oneof_.weight_shared_convolutional_box_predictor_;
}
void BoxPredictor::set_allocated_convolutional_box_predictor(::object_detection::protos::ConvolutionalBoxPredictor* convolutional_box_predictor) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_box_predictor_oneof();
  if (convolutional_box_predictor) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(convolutional_box_predictor);
    if (message_arena != submessage_arena) {
      convolutional_box_predictor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, convolutional_box_predictor, submessage_arena);
    }
    set_has_convolutional_box_predictor();
    _impl_.box_predictor_oneof_.convolutional_box_predictor_ = convolutional_box_predictor;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.BoxPredictor.convolutional_box_predictor)
}
void BoxPredictor::set_allocated_mask_rcnn_box_predictor(::object_detection::protos::MaskRCNNBoxPredictor* mask_rcnn_box_predictor) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_box_predictor_oneof();
  if (mask_rcnn_box_predictor) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(mask_rcnn_box_predictor);
    if (message_arena != submessage_arena) {
      mask_rcnn_box_predictor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, mask_rcnn_box_predictor, submessage_arena);
    }
    set_has_mask_rcnn_box_predictor();
    _impl_.box_predictor_oneof_.mask_rcnn_box_predictor_ = mask_rcnn_box_predictor;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.BoxPredictor.mask_rcnn_box_predictor)
}
void BoxPredictor::set_allocated_rfcn_box_predictor(::object_detection::protos::RfcnBoxPredictor* rfcn_box_predictor) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_box_predictor_oneof();
  if (rfcn_box_predictor) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(rfcn_box_predictor);
    if (message_arena != submessage_arena) {
      rfcn_box_predictor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, rfcn_box_predictor, submessage_arena);
    }
    set_has_rfcn_box_predictor();
    _impl_.box_predictor_oneof_.rfcn_box_predictor_ = rfcn_box_predictor;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.BoxPredictor.rfcn_box_predictor)
}
void BoxPredictor::set_allocated_weight_shared_convolutional_box_predictor(::object_detection::protos::WeightSharedConvolutionalBoxPredictor* weight_shared_convolutional_box_predictor) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
  clear_box_predictor_oneof();
  if (weight_shared_convolutional_box_predictor) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
      ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(weight_shared_convolutional_box_predictor);
    if (message_arena != submessage_arena) {
      weight_shared_convolutional_box_predictor = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, weight_shared_convolutional_box_predictor, submessage_arena);
    }
    set_has_weight_shared_convolutional_box_predictor();
    _impl_.box_predictor_oneof_.weight_shared_convolutional_box_predictor_ = weight_shared_convolutional_box_predictor;
  }
  // @@protoc_insertion_point(field_set_allocated:object_detection.protos.BoxPredictor.weight_shared_convolutional_box_predictor)
}
BoxPredictor::BoxPredictor(::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.BoxPredictor)
}
BoxPredictor::BoxPredictor(const BoxPredictor& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BoxPredictor* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.box_predictor_oneof_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , /*decltype(_impl_._oneof_case_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  clear_has_box_predictor_oneof();
  switch (from.box_predictor_oneof_case()) {
    case kConvolutionalBoxPredictor: {
      _this->_internal_mutable_convolutional_box_predictor()->::object_detection::protos::ConvolutionalBoxPredictor::MergeFrom(
          from._internal_convolutional_box_predictor());
      break;
    }
    case kMaskRcnnBoxPredictor: {
      _this->_internal_mutable_mask_rcnn_box_predictor()->::object_detection::protos::MaskRCNNBoxPredictor::MergeFrom(
          from._internal_mask_rcnn_box_predictor());
      break;
    }
    case kRfcnBoxPredictor: {
      _this->_internal_mutable_rfcn_box_predictor()->::object_detection::protos::RfcnBoxPredictor::MergeFrom(
          from._internal_rfcn_box_predictor());
      break;
    }
    case kWeightSharedConvolutionalBoxPredictor: {
      _this->_internal_mutable_weight_shared_convolutional_box_predictor()->::object_detection::protos::WeightSharedConvolutionalBoxPredictor::MergeFrom(
          from._internal_weight_shared_convolutional_box_predictor());
      break;
    }
    case BOX_PREDICTOR_ONEOF_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.BoxPredictor)
}

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

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

inline void BoxPredictor::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (has_box_predictor_oneof()) {
    clear_box_predictor_oneof();
  }
}

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

void BoxPredictor::clear_box_predictor_oneof() {
// @@protoc_insertion_point(one_of_clear_start:object_detection.protos.BoxPredictor)
  switch (box_predictor_oneof_case()) {
    case kConvolutionalBoxPredictor: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.box_predictor_oneof_.convolutional_box_predictor_;
      }
      break;
    }
    case kMaskRcnnBoxPredictor: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.box_predictor_oneof_.mask_rcnn_box_predictor_;
      }
      break;
    }
    case kRfcnBoxPredictor: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.box_predictor_oneof_.rfcn_box_predictor_;
      }
      break;
    }
    case kWeightSharedConvolutionalBoxPredictor: {
      if (GetArenaForAllocation() == nullptr) {
        delete _impl_.box_predictor_oneof_.weight_shared_convolutional_box_predictor_;
      }
      break;
    }
    case BOX_PREDICTOR_ONEOF_NOT_SET: {
      break;
    }
  }
  _impl_._oneof_case_[0] = BOX_PREDICTOR_ONEOF_NOT_SET;
}


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

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

const char* BoxPredictor::_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.ConvolutionalBoxPredictor convolutional_box_predictor = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_convolutional_box_predictor(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.MaskRCNNBoxPredictor mask_rcnn_box_predictor = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_mask_rcnn_box_predictor(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.RfcnBoxPredictor rfcn_box_predictor = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_rfcn_box_predictor(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // .object_detection.protos.WeightSharedConvolutionalBoxPredictor weight_shared_convolutional_box_predictor = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_weight_shared_convolutional_box_predictor(), 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* BoxPredictor::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.BoxPredictor)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  switch (box_predictor_oneof_case()) {
    case kConvolutionalBoxPredictor: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, _Internal::convolutional_box_predictor(this),
          _Internal::convolutional_box_predictor(this).GetCachedSize(), target, stream);
      break;
    }
    case kMaskRcnnBoxPredictor: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, _Internal::mask_rcnn_box_predictor(this),
          _Internal::mask_rcnn_box_predictor(this).GetCachedSize(), target, stream);
      break;
    }
    case kRfcnBoxPredictor: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, _Internal::rfcn_box_predictor(this),
          _Internal::rfcn_box_predictor(this).GetCachedSize(), target, stream);
      break;
    }
    case kWeightSharedConvolutionalBoxPredictor: {
      target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(4, _Internal::weight_shared_convolutional_box_predictor(this),
          _Internal::weight_shared_convolutional_box_predictor(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.BoxPredictor)
  return target;
}

size_t BoxPredictor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.BoxPredictor)
  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 (box_predictor_oneof_case()) {
    // .object_detection.protos.ConvolutionalBoxPredictor convolutional_box_predictor = 1;
    case kConvolutionalBoxPredictor: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_predictor_oneof_.convolutional_box_predictor_);
      break;
    }
    // .object_detection.protos.MaskRCNNBoxPredictor mask_rcnn_box_predictor = 2;
    case kMaskRcnnBoxPredictor: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_predictor_oneof_.mask_rcnn_box_predictor_);
      break;
    }
    // .object_detection.protos.RfcnBoxPredictor rfcn_box_predictor = 3;
    case kRfcnBoxPredictor: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_predictor_oneof_.rfcn_box_predictor_);
      break;
    }
    // .object_detection.protos.WeightSharedConvolutionalBoxPredictor weight_shared_convolutional_box_predictor = 4;
    case kWeightSharedConvolutionalBoxPredictor: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_predictor_oneof_.weight_shared_convolutional_box_predictor_);
      break;
    }
    case BOX_PREDICTOR_ONEOF_NOT_SET: {
      break;
    }
  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

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


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

  switch (from.box_predictor_oneof_case()) {
    case kConvolutionalBoxPredictor: {
      _this->_internal_mutable_convolutional_box_predictor()->::object_detection::protos::ConvolutionalBoxPredictor::MergeFrom(
          from._internal_convolutional_box_predictor());
      break;
    }
    case kMaskRcnnBoxPredictor: {
      _this->_internal_mutable_mask_rcnn_box_predictor()->::object_detection::protos::MaskRCNNBoxPredictor::MergeFrom(
          from._internal_mask_rcnn_box_predictor());
      break;
    }
    case kRfcnBoxPredictor: {
      _this->_internal_mutable_rfcn_box_predictor()->::object_detection::protos::RfcnBoxPredictor::MergeFrom(
          from._internal_rfcn_box_predictor());
      break;
    }
    case kWeightSharedConvolutionalBoxPredictor: {
      _this->_internal_mutable_weight_shared_convolutional_box_predictor()->::object_detection::protos::WeightSharedConvolutionalBoxPredictor::MergeFrom(
          from._internal_weight_shared_convolutional_box_predictor());
      break;
    }
    case BOX_PREDICTOR_ONEOF_NOT_SET: {
      break;
    }
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata BoxPredictor::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[0]);
}

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

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

ConvolutionalBoxPredictor_BoxEncodingsClipRange::ConvolutionalBoxPredictor_BoxEncodingsClipRange(::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.ConvolutionalBoxPredictor.BoxEncodingsClipRange)
}
ConvolutionalBoxPredictor_BoxEncodingsClipRange::ConvolutionalBoxPredictor_BoxEncodingsClipRange(const ConvolutionalBoxPredictor_BoxEncodingsClipRange& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ConvolutionalBoxPredictor_BoxEncodingsClipRange* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.min_){}
    , decltype(_impl_.max_){}};

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

inline void ConvolutionalBoxPredictor_BoxEncodingsClipRange::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_.min_){0}
    , decltype(_impl_.max_){0}
  };
}

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

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

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

void ConvolutionalBoxPredictor_BoxEncodingsClipRange::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.ConvolutionalBoxPredictor.BoxEncodingsClipRange)
  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) {
    ::memset(&_impl_.min_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.max_) -
        reinterpret_cast<char*>(&_impl_.min_)) + sizeof(_impl_.max_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ConvolutionalBoxPredictor_BoxEncodingsClipRange::_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 min = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_min(&has_bits);
          _impl_.min_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float max = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_max(&has_bits);
          _impl_.max_ = ::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* ConvolutionalBoxPredictor_BoxEncodingsClipRange::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.ConvolutionalBoxPredictor.BoxEncodingsClipRange)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional float max = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_max(), 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.ConvolutionalBoxPredictor.BoxEncodingsClipRange)
  return target;
}

size_t ConvolutionalBoxPredictor_BoxEncodingsClipRange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.ConvolutionalBoxPredictor.BoxEncodingsClipRange)
  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 float min = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

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

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

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


void ConvolutionalBoxPredictor_BoxEncodingsClipRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ConvolutionalBoxPredictor_BoxEncodingsClipRange*>(&to_msg);
  auto& from = static_cast<const ConvolutionalBoxPredictor_BoxEncodingsClipRange&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.ConvolutionalBoxPredictor.BoxEncodingsClipRange)
  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_.min_ = from._impl_.min_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.max_ = from._impl_.max_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ConvolutionalBoxPredictor_BoxEncodingsClipRange::InternalSwap(ConvolutionalBoxPredictor_BoxEncodingsClipRange* 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(ConvolutionalBoxPredictor_BoxEncodingsClipRange, _impl_.max_)
      + sizeof(ConvolutionalBoxPredictor_BoxEncodingsClipRange::_impl_.max_)
      - PROTOBUF_FIELD_OFFSET(ConvolutionalBoxPredictor_BoxEncodingsClipRange, _impl_.min_)>(
          reinterpret_cast<char*>(&_impl_.min_),
          reinterpret_cast<char*>(&other->_impl_.min_));
}

::PROTOBUF_NAMESPACE_ID::Metadata ConvolutionalBoxPredictor_BoxEncodingsClipRange::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[1]);
}

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

class ConvolutionalBoxPredictor::_Internal {
 public:
  using HasBits = decltype(std::declval<ConvolutionalBoxPredictor>()._impl_._has_bits_);
  static const ::object_detection::protos::Hyperparams& conv_hyperparams(const ConvolutionalBoxPredictor* msg);
  static void set_has_conv_hyperparams(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_min_depth(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_max_depth(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_num_layers_before_predictor(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_use_dropout(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_dropout_keep_probability(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_kernel_size(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_box_code_size(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_apply_sigmoid_to_scores(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_class_prediction_bias_init(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_use_depthwise(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange& box_encodings_clip_range(const ConvolutionalBoxPredictor* msg);
  static void set_has_box_encodings_clip_range(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::object_detection::protos::Hyperparams&
ConvolutionalBoxPredictor::_Internal::conv_hyperparams(const ConvolutionalBoxPredictor* msg) {
  return *msg->_impl_.conv_hyperparams_;
}
const ::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange&
ConvolutionalBoxPredictor::_Internal::box_encodings_clip_range(const ConvolutionalBoxPredictor* msg) {
  return *msg->_impl_.box_encodings_clip_range_;
}
void ConvolutionalBoxPredictor::clear_conv_hyperparams() {
  if (_impl_.conv_hyperparams_ != nullptr) _impl_.conv_hyperparams_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
ConvolutionalBoxPredictor::ConvolutionalBoxPredictor(::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.ConvolutionalBoxPredictor)
}
ConvolutionalBoxPredictor::ConvolutionalBoxPredictor(const ConvolutionalBoxPredictor& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ConvolutionalBoxPredictor* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.conv_hyperparams_){nullptr}
    , decltype(_impl_.box_encodings_clip_range_){nullptr}
    , decltype(_impl_.min_depth_){}
    , decltype(_impl_.max_depth_){}
    , decltype(_impl_.num_layers_before_predictor_){}
    , decltype(_impl_.class_prediction_bias_init_){}
    , decltype(_impl_.apply_sigmoid_to_scores_){}
    , decltype(_impl_.use_depthwise_){}
    , decltype(_impl_.use_dropout_){}
    , decltype(_impl_.dropout_keep_probability_){}
    , decltype(_impl_.kernel_size_){}
    , decltype(_impl_.box_code_size_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_conv_hyperparams()) {
    _this->_impl_.conv_hyperparams_ = new ::object_detection::protos::Hyperparams(*from._impl_.conv_hyperparams_);
  }
  if (from._internal_has_box_encodings_clip_range()) {
    _this->_impl_.box_encodings_clip_range_ = new ::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange(*from._impl_.box_encodings_clip_range_);
  }
  ::memcpy(&_impl_.min_depth_, &from._impl_.min_depth_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.box_code_size_) -
    reinterpret_cast<char*>(&_impl_.min_depth_)) + sizeof(_impl_.box_code_size_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.ConvolutionalBoxPredictor)
}

inline void ConvolutionalBoxPredictor::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_.conv_hyperparams_){nullptr}
    , decltype(_impl_.box_encodings_clip_range_){nullptr}
    , decltype(_impl_.min_depth_){0}
    , decltype(_impl_.max_depth_){0}
    , decltype(_impl_.num_layers_before_predictor_){0}
    , decltype(_impl_.class_prediction_bias_init_){0}
    , decltype(_impl_.apply_sigmoid_to_scores_){false}
    , decltype(_impl_.use_depthwise_){false}
    , decltype(_impl_.use_dropout_){true}
    , decltype(_impl_.dropout_keep_probability_){0.8f}
    , decltype(_impl_.kernel_size_){1}
    , decltype(_impl_.box_code_size_){4}
  };
}

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

inline void ConvolutionalBoxPredictor::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.conv_hyperparams_;
  if (this != internal_default_instance()) delete _impl_.box_encodings_clip_range_;
}

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

void ConvolutionalBoxPredictor::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.ConvolutionalBoxPredictor)
  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) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(_impl_.conv_hyperparams_ != nullptr);
      _impl_.conv_hyperparams_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.box_encodings_clip_range_ != nullptr);
      _impl_.box_encodings_clip_range_->Clear();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&_impl_.min_depth_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.use_depthwise_) -
        reinterpret_cast<char*>(&_impl_.min_depth_)) + sizeof(_impl_.use_depthwise_));
  }
  if (cached_has_bits & 0x00000f00u) {
    _impl_.use_dropout_ = true;
    _impl_.dropout_keep_probability_ = 0.8f;
    _impl_.kernel_size_ = 1;
    _impl_.box_code_size_ = 4;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ConvolutionalBoxPredictor::_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.Hyperparams conv_hyperparams = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_conv_hyperparams(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 min_depth = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_min_depth(&has_bits);
          _impl_.min_depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 max_depth = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_max_depth(&has_bits);
          _impl_.max_depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 num_layers_before_predictor = 4 [default = 0];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_num_layers_before_predictor(&has_bits);
          _impl_.num_layers_before_predictor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_dropout = 5 [default = true];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_use_dropout(&has_bits);
          _impl_.use_dropout_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float dropout_keep_probability = 6 [default = 0.8];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
          _Internal::set_has_dropout_keep_probability(&has_bits);
          _impl_.dropout_keep_probability_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 kernel_size = 7 [default = 1];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_kernel_size(&has_bits);
          _impl_.kernel_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 box_code_size = 8 [default = 4];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_box_code_size(&has_bits);
          _impl_.box_code_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool apply_sigmoid_to_scores = 9 [default = false];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_apply_sigmoid_to_scores(&has_bits);
          _impl_.apply_sigmoid_to_scores_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float class_prediction_bias_init = 10 [default = 0];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 85)) {
          _Internal::set_has_class_prediction_bias_init(&has_bits);
          _impl_.class_prediction_bias_init_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_depthwise = 11 [default = false];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_use_depthwise(&has_bits);
          _impl_.use_depthwise_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.ConvolutionalBoxPredictor.BoxEncodingsClipRange box_encodings_clip_range = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_box_encodings_clip_range(), 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* ConvolutionalBoxPredictor::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.ConvolutionalBoxPredictor)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional int32 max_depth = 3 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_max_depth(), target);
  }

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

  // optional bool use_dropout = 5 [default = true];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_use_dropout(), target);
  }

  // optional float dropout_keep_probability = 6 [default = 0.8];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(6, this->_internal_dropout_keep_probability(), target);
  }

  // optional int32 kernel_size = 7 [default = 1];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_kernel_size(), target);
  }

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

  // optional bool apply_sigmoid_to_scores = 9 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_apply_sigmoid_to_scores(), target);
  }

  // optional float class_prediction_bias_init = 10 [default = 0];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(10, this->_internal_class_prediction_bias_init(), target);
  }

  // optional bool use_depthwise = 11 [default = false];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_use_depthwise(), target);
  }

  // optional .object_detection.protos.ConvolutionalBoxPredictor.BoxEncodingsClipRange box_encodings_clip_range = 12;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(12, _Internal::box_encodings_clip_range(this),
        _Internal::box_encodings_clip_range(this).GetCachedSize(), target, stream);
  }

  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.ConvolutionalBoxPredictor)
  return target;
}

size_t ConvolutionalBoxPredictor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.ConvolutionalBoxPredictor)
  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.Hyperparams conv_hyperparams = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.conv_hyperparams_);
    }

    // optional .object_detection.protos.ConvolutionalBoxPredictor.BoxEncodingsClipRange box_encodings_clip_range = 12;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_encodings_clip_range_);
    }

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

    // optional int32 max_depth = 3 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_depth());
    }

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

    // optional float class_prediction_bias_init = 10 [default = 0];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 4;
    }

    // optional bool apply_sigmoid_to_scores = 9 [default = false];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 1;
    }

    // optional bool use_depthwise = 11 [default = false];
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 + 1;
    }

  }
  if (cached_has_bits & 0x00000f00u) {
    // optional bool use_dropout = 5 [default = true];
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 + 1;
    }

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

    // optional int32 kernel_size = 7 [default = 1];
    if (cached_has_bits & 0x00000400u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_kernel_size());
    }

    // optional int32 box_code_size = 8 [default = 4];
    if (cached_has_bits & 0x00000800u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_box_code_size());
    }

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

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


void ConvolutionalBoxPredictor::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ConvolutionalBoxPredictor*>(&to_msg);
  auto& from = static_cast<const ConvolutionalBoxPredictor&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.ConvolutionalBoxPredictor)
  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_conv_hyperparams()->::object_detection::protos::Hyperparams::MergeFrom(
          from._internal_conv_hyperparams());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_box_encodings_clip_range()->::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange::MergeFrom(
          from._internal_box_encodings_clip_range());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.min_depth_ = from._impl_.min_depth_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.max_depth_ = from._impl_.max_depth_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.num_layers_before_predictor_ = from._impl_.num_layers_before_predictor_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.class_prediction_bias_init_ = from._impl_.class_prediction_bias_init_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.apply_sigmoid_to_scores_ = from._impl_.apply_sigmoid_to_scores_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.use_depthwise_ = from._impl_.use_depthwise_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000f00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.use_dropout_ = from._impl_.use_dropout_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.dropout_keep_probability_ = from._impl_.dropout_keep_probability_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.kernel_size_ = from._impl_.kernel_size_;
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_impl_.box_code_size_ = from._impl_.box_code_size_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ConvolutionalBoxPredictor::InternalSwap(ConvolutionalBoxPredictor* 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(ConvolutionalBoxPredictor, _impl_.use_depthwise_)
      + sizeof(ConvolutionalBoxPredictor::_impl_.use_depthwise_)
      - PROTOBUF_FIELD_OFFSET(ConvolutionalBoxPredictor, _impl_.conv_hyperparams_)>(
          reinterpret_cast<char*>(&_impl_.conv_hyperparams_),
          reinterpret_cast<char*>(&other->_impl_.conv_hyperparams_));
  swap(_impl_.use_dropout_, other->_impl_.use_dropout_);
  swap(_impl_.dropout_keep_probability_, other->_impl_.dropout_keep_probability_);
  swap(_impl_.kernel_size_, other->_impl_.kernel_size_);
  swap(_impl_.box_code_size_, other->_impl_.box_code_size_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ConvolutionalBoxPredictor::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[2]);
}

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

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

WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange(::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.WeightSharedConvolutionalBoxPredictor.BoxEncodingsClipRange)
}
WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange(const WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.min_){}
    , decltype(_impl_.max_){}};

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

inline void WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::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_.min_){0}
    , decltype(_impl_.max_){0}
  };
}

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

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

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

void WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.WeightSharedConvolutionalBoxPredictor.BoxEncodingsClipRange)
  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) {
    ::memset(&_impl_.min_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.max_) -
        reinterpret_cast<char*>(&_impl_.min_)) + sizeof(_impl_.max_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::_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 min = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_min(&has_bits);
          _impl_.min_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float max = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_max(&has_bits);
          _impl_.max_ = ::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* WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.WeightSharedConvolutionalBoxPredictor.BoxEncodingsClipRange)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional float max = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_max(), 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.WeightSharedConvolutionalBoxPredictor.BoxEncodingsClipRange)
  return target;
}

size_t WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.WeightSharedConvolutionalBoxPredictor.BoxEncodingsClipRange)
  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 float min = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

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

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

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


void WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange*>(&to_msg);
  auto& from = static_cast<const WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.WeightSharedConvolutionalBoxPredictor.BoxEncodingsClipRange)
  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_.min_ = from._impl_.min_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.max_ = from._impl_.max_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::InternalSwap(WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange* 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(WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange, _impl_.max_)
      + sizeof(WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::_impl_.max_)
      - PROTOBUF_FIELD_OFFSET(WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange, _impl_.min_)>(
          reinterpret_cast<char*>(&_impl_.min_),
          reinterpret_cast<char*>(&other->_impl_.min_));
}

::PROTOBUF_NAMESPACE_ID::Metadata WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[3]);
}

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

class WeightSharedConvolutionalBoxPredictor::_Internal {
 public:
  using HasBits = decltype(std::declval<WeightSharedConvolutionalBoxPredictor>()._impl_._has_bits_);
  static const ::object_detection::protos::Hyperparams& conv_hyperparams(const WeightSharedConvolutionalBoxPredictor* msg);
  static void set_has_conv_hyperparams(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_num_layers_before_predictor(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_depth(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_kernel_size(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_box_code_size(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_class_prediction_bias_init(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_use_dropout(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_dropout_keep_probability(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_share_prediction_tower(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_use_depthwise(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_score_converter(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange& box_encodings_clip_range(const WeightSharedConvolutionalBoxPredictor* msg);
  static void set_has_box_encodings_clip_range(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::object_detection::protos::Hyperparams&
WeightSharedConvolutionalBoxPredictor::_Internal::conv_hyperparams(const WeightSharedConvolutionalBoxPredictor* msg) {
  return *msg->_impl_.conv_hyperparams_;
}
const ::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange&
WeightSharedConvolutionalBoxPredictor::_Internal::box_encodings_clip_range(const WeightSharedConvolutionalBoxPredictor* msg) {
  return *msg->_impl_.box_encodings_clip_range_;
}
void WeightSharedConvolutionalBoxPredictor::clear_conv_hyperparams() {
  if (_impl_.conv_hyperparams_ != nullptr) _impl_.conv_hyperparams_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
WeightSharedConvolutionalBoxPredictor::WeightSharedConvolutionalBoxPredictor(::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.WeightSharedConvolutionalBoxPredictor)
}
WeightSharedConvolutionalBoxPredictor::WeightSharedConvolutionalBoxPredictor(const WeightSharedConvolutionalBoxPredictor& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  WeightSharedConvolutionalBoxPredictor* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.conv_hyperparams_){nullptr}
    , decltype(_impl_.box_encodings_clip_range_){nullptr}
    , decltype(_impl_.depth_){}
    , decltype(_impl_.num_layers_before_predictor_){}
    , decltype(_impl_.class_prediction_bias_init_){}
    , decltype(_impl_.use_dropout_){}
    , decltype(_impl_.share_prediction_tower_){}
    , decltype(_impl_.use_depthwise_){}
    , decltype(_impl_.score_converter_){}
    , decltype(_impl_.dropout_keep_probability_){}
    , decltype(_impl_.kernel_size_){}
    , decltype(_impl_.box_code_size_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_conv_hyperparams()) {
    _this->_impl_.conv_hyperparams_ = new ::object_detection::protos::Hyperparams(*from._impl_.conv_hyperparams_);
  }
  if (from._internal_has_box_encodings_clip_range()) {
    _this->_impl_.box_encodings_clip_range_ = new ::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange(*from._impl_.box_encodings_clip_range_);
  }
  ::memcpy(&_impl_.depth_, &from._impl_.depth_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.box_code_size_) -
    reinterpret_cast<char*>(&_impl_.depth_)) + sizeof(_impl_.box_code_size_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.WeightSharedConvolutionalBoxPredictor)
}

inline void WeightSharedConvolutionalBoxPredictor::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_.conv_hyperparams_){nullptr}
    , decltype(_impl_.box_encodings_clip_range_){nullptr}
    , decltype(_impl_.depth_){0}
    , decltype(_impl_.num_layers_before_predictor_){0}
    , decltype(_impl_.class_prediction_bias_init_){0}
    , decltype(_impl_.use_dropout_){false}
    , decltype(_impl_.share_prediction_tower_){false}
    , decltype(_impl_.use_depthwise_){false}
    , decltype(_impl_.score_converter_){0}
    , decltype(_impl_.dropout_keep_probability_){0.8f}
    , decltype(_impl_.kernel_size_){3}
    , decltype(_impl_.box_code_size_){4}
  };
}

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

inline void WeightSharedConvolutionalBoxPredictor::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.conv_hyperparams_;
  if (this != internal_default_instance()) delete _impl_.box_encodings_clip_range_;
}

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

void WeightSharedConvolutionalBoxPredictor::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.WeightSharedConvolutionalBoxPredictor)
  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) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(_impl_.conv_hyperparams_ != nullptr);
      _impl_.conv_hyperparams_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.box_encodings_clip_range_ != nullptr);
      _impl_.box_encodings_clip_range_->Clear();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&_impl_.depth_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.use_depthwise_) -
        reinterpret_cast<char*>(&_impl_.depth_)) + sizeof(_impl_.use_depthwise_));
  }
  if (cached_has_bits & 0x00000f00u) {
    _impl_.score_converter_ = 0;
    _impl_.dropout_keep_probability_ = 0.8f;
    _impl_.kernel_size_ = 3;
    _impl_.box_code_size_ = 4;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* WeightSharedConvolutionalBoxPredictor::_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.Hyperparams conv_hyperparams = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_conv_hyperparams(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 depth = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_depth(&has_bits);
          _impl_.depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 num_layers_before_predictor = 4 [default = 0];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_num_layers_before_predictor(&has_bits);
          _impl_.num_layers_before_predictor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 kernel_size = 7 [default = 3];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_kernel_size(&has_bits);
          _impl_.kernel_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 box_code_size = 8 [default = 4];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_box_code_size(&has_bits);
          _impl_.box_code_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float class_prediction_bias_init = 10 [default = 0];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 85)) {
          _Internal::set_has_class_prediction_bias_init(&has_bits);
          _impl_.class_prediction_bias_init_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_dropout = 11 [default = false];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_use_dropout(&has_bits);
          _impl_.use_dropout_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float dropout_keep_probability = 12 [default = 0.8];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 101)) {
          _Internal::set_has_dropout_keep_probability(&has_bits);
          _impl_.dropout_keep_probability_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool share_prediction_tower = 13 [default = false];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_share_prediction_tower(&has_bits);
          _impl_.share_prediction_tower_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_depthwise = 14 [default = false];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
          _Internal::set_has_use_depthwise(&has_bits);
          _impl_.use_depthwise_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.WeightSharedConvolutionalBoxPredictor.ScoreConverter score_converter = 16 [default = IDENTITY];
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::object_detection::protos::WeightSharedConvolutionalBoxPredictor_ScoreConverter_IsValid(val))) {
            _internal_set_score_converter(static_cast<::object_detection::protos::WeightSharedConvolutionalBoxPredictor_ScoreConverter>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(16, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.WeightSharedConvolutionalBoxPredictor.BoxEncodingsClipRange box_encodings_clip_range = 17;
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_box_encodings_clip_range(), 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* WeightSharedConvolutionalBoxPredictor::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.WeightSharedConvolutionalBoxPredictor)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

  // optional int32 kernel_size = 7 [default = 3];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_kernel_size(), target);
  }

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

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

  // optional bool use_dropout = 11 [default = false];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_use_dropout(), target);
  }

  // optional float dropout_keep_probability = 12 [default = 0.8];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(12, this->_internal_dropout_keep_probability(), target);
  }

  // optional bool share_prediction_tower = 13 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(13, this->_internal_share_prediction_tower(), target);
  }

  // optional bool use_depthwise = 14 [default = false];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_use_depthwise(), target);
  }

  // optional .object_detection.protos.WeightSharedConvolutionalBoxPredictor.ScoreConverter score_converter = 16 [default = IDENTITY];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      16, this->_internal_score_converter(), target);
  }

  // optional .object_detection.protos.WeightSharedConvolutionalBoxPredictor.BoxEncodingsClipRange box_encodings_clip_range = 17;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(17, _Internal::box_encodings_clip_range(this),
        _Internal::box_encodings_clip_range(this).GetCachedSize(), target, stream);
  }

  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.WeightSharedConvolutionalBoxPredictor)
  return target;
}

size_t WeightSharedConvolutionalBoxPredictor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.WeightSharedConvolutionalBoxPredictor)
  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.Hyperparams conv_hyperparams = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.conv_hyperparams_);
    }

    // optional .object_detection.protos.WeightSharedConvolutionalBoxPredictor.BoxEncodingsClipRange box_encodings_clip_range = 17;
    if (cached_has_bits & 0x00000002u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.box_encodings_clip_range_);
    }

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

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

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

    // optional bool use_dropout = 11 [default = false];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 1;
    }

    // optional bool share_prediction_tower = 13 [default = false];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 1;
    }

    // optional bool use_depthwise = 14 [default = false];
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 + 1;
    }

  }
  if (cached_has_bits & 0x00000f00u) {
    // optional .object_detection.protos.WeightSharedConvolutionalBoxPredictor.ScoreConverter score_converter = 16 [default = IDENTITY];
    if (cached_has_bits & 0x00000100u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_score_converter());
    }

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

    // optional int32 kernel_size = 7 [default = 3];
    if (cached_has_bits & 0x00000400u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_kernel_size());
    }

    // optional int32 box_code_size = 8 [default = 4];
    if (cached_has_bits & 0x00000800u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_box_code_size());
    }

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

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


void WeightSharedConvolutionalBoxPredictor::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<WeightSharedConvolutionalBoxPredictor*>(&to_msg);
  auto& from = static_cast<const WeightSharedConvolutionalBoxPredictor&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.WeightSharedConvolutionalBoxPredictor)
  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_conv_hyperparams()->::object_detection::protos::Hyperparams::MergeFrom(
          from._internal_conv_hyperparams());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_box_encodings_clip_range()->::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange::MergeFrom(
          from._internal_box_encodings_clip_range());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.depth_ = from._impl_.depth_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.num_layers_before_predictor_ = from._impl_.num_layers_before_predictor_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.class_prediction_bias_init_ = from._impl_.class_prediction_bias_init_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.use_dropout_ = from._impl_.use_dropout_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.share_prediction_tower_ = from._impl_.share_prediction_tower_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.use_depthwise_ = from._impl_.use_depthwise_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000f00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.score_converter_ = from._impl_.score_converter_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.dropout_keep_probability_ = from._impl_.dropout_keep_probability_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.kernel_size_ = from._impl_.kernel_size_;
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_impl_.box_code_size_ = from._impl_.box_code_size_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void WeightSharedConvolutionalBoxPredictor::InternalSwap(WeightSharedConvolutionalBoxPredictor* 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(WeightSharedConvolutionalBoxPredictor, _impl_.score_converter_)
      + sizeof(WeightSharedConvolutionalBoxPredictor::_impl_.score_converter_)
      - PROTOBUF_FIELD_OFFSET(WeightSharedConvolutionalBoxPredictor, _impl_.conv_hyperparams_)>(
          reinterpret_cast<char*>(&_impl_.conv_hyperparams_),
          reinterpret_cast<char*>(&other->_impl_.conv_hyperparams_));
  swap(_impl_.dropout_keep_probability_, other->_impl_.dropout_keep_probability_);
  swap(_impl_.kernel_size_, other->_impl_.kernel_size_);
  swap(_impl_.box_code_size_, other->_impl_.box_code_size_);
}

::PROTOBUF_NAMESPACE_ID::Metadata WeightSharedConvolutionalBoxPredictor::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[4]);
}

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

class MaskRCNNBoxPredictor::_Internal {
 public:
  using HasBits = decltype(std::declval<MaskRCNNBoxPredictor>()._impl_._has_bits_);
  static const ::object_detection::protos::Hyperparams& fc_hyperparams(const MaskRCNNBoxPredictor* msg);
  static void set_has_fc_hyperparams(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_use_dropout(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_dropout_keep_probability(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_box_code_size(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::object_detection::protos::Hyperparams& conv_hyperparams(const MaskRCNNBoxPredictor* msg);
  static void set_has_conv_hyperparams(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_predict_instance_masks(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_mask_prediction_conv_depth(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_predict_keypoints(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_mask_height(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_mask_width(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_mask_prediction_num_conv_layers(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static void set_has_masks_are_class_agnostic(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_share_box_across_classes(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_convolve_then_upsample_masks(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
};

const ::object_detection::protos::Hyperparams&
MaskRCNNBoxPredictor::_Internal::fc_hyperparams(const MaskRCNNBoxPredictor* msg) {
  return *msg->_impl_.fc_hyperparams_;
}
const ::object_detection::protos::Hyperparams&
MaskRCNNBoxPredictor::_Internal::conv_hyperparams(const MaskRCNNBoxPredictor* msg) {
  return *msg->_impl_.conv_hyperparams_;
}
void MaskRCNNBoxPredictor::clear_fc_hyperparams() {
  if (_impl_.fc_hyperparams_ != nullptr) _impl_.fc_hyperparams_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
void MaskRCNNBoxPredictor::clear_conv_hyperparams() {
  if (_impl_.conv_hyperparams_ != nullptr) _impl_.conv_hyperparams_->Clear();
  _impl_._has_bits_[0] &= ~0x00000002u;
}
MaskRCNNBoxPredictor::MaskRCNNBoxPredictor(::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.MaskRCNNBoxPredictor)
}
MaskRCNNBoxPredictor::MaskRCNNBoxPredictor(const MaskRCNNBoxPredictor& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  MaskRCNNBoxPredictor* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.fc_hyperparams_){nullptr}
    , decltype(_impl_.conv_hyperparams_){nullptr}
    , decltype(_impl_.use_dropout_){}
    , decltype(_impl_.predict_instance_masks_){}
    , decltype(_impl_.predict_keypoints_){}
    , decltype(_impl_.masks_are_class_agnostic_){}
    , decltype(_impl_.share_box_across_classes_){}
    , decltype(_impl_.convolve_then_upsample_masks_){}
    , decltype(_impl_.dropout_keep_probability_){}
    , decltype(_impl_.box_code_size_){}
    , decltype(_impl_.mask_prediction_conv_depth_){}
    , decltype(_impl_.mask_height_){}
    , decltype(_impl_.mask_width_){}
    , decltype(_impl_.mask_prediction_num_conv_layers_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_fc_hyperparams()) {
    _this->_impl_.fc_hyperparams_ = new ::object_detection::protos::Hyperparams(*from._impl_.fc_hyperparams_);
  }
  if (from._internal_has_conv_hyperparams()) {
    _this->_impl_.conv_hyperparams_ = new ::object_detection::protos::Hyperparams(*from._impl_.conv_hyperparams_);
  }
  ::memcpy(&_impl_.use_dropout_, &from._impl_.use_dropout_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.mask_prediction_num_conv_layers_) -
    reinterpret_cast<char*>(&_impl_.use_dropout_)) + sizeof(_impl_.mask_prediction_num_conv_layers_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.MaskRCNNBoxPredictor)
}

inline void MaskRCNNBoxPredictor::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_.fc_hyperparams_){nullptr}
    , decltype(_impl_.conv_hyperparams_){nullptr}
    , decltype(_impl_.use_dropout_){false}
    , decltype(_impl_.predict_instance_masks_){false}
    , decltype(_impl_.predict_keypoints_){false}
    , decltype(_impl_.masks_are_class_agnostic_){false}
    , decltype(_impl_.share_box_across_classes_){false}
    , decltype(_impl_.convolve_then_upsample_masks_){false}
    , decltype(_impl_.dropout_keep_probability_){0.5f}
    , decltype(_impl_.box_code_size_){4}
    , decltype(_impl_.mask_prediction_conv_depth_){256}
    , decltype(_impl_.mask_height_){15}
    , decltype(_impl_.mask_width_){15}
    , decltype(_impl_.mask_prediction_num_conv_layers_){2}
  };
}

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

inline void MaskRCNNBoxPredictor::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.fc_hyperparams_;
  if (this != internal_default_instance()) delete _impl_.conv_hyperparams_;
}

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

void MaskRCNNBoxPredictor::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.MaskRCNNBoxPredictor)
  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) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(_impl_.fc_hyperparams_ != nullptr);
      _impl_.fc_hyperparams_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.conv_hyperparams_ != nullptr);
      _impl_.conv_hyperparams_->Clear();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&_impl_.use_dropout_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.convolve_then_upsample_masks_) -
        reinterpret_cast<char*>(&_impl_.use_dropout_)) + sizeof(_impl_.convolve_then_upsample_masks_));
  }
  if (cached_has_bits & 0x00003f00u) {
    _impl_.dropout_keep_probability_ = 0.5f;
    _impl_.box_code_size_ = 4;
    _impl_.mask_prediction_conv_depth_ = 256;
    _impl_.mask_height_ = 15;
    _impl_.mask_width_ = 15;
    _impl_.mask_prediction_num_conv_layers_ = 2;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* MaskRCNNBoxPredictor::_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.Hyperparams fc_hyperparams = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_fc_hyperparams(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_dropout = 2 [default = false];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_use_dropout(&has_bits);
          _impl_.use_dropout_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float dropout_keep_probability = 3 [default = 0.5];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_dropout_keep_probability(&has_bits);
          _impl_.dropout_keep_probability_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 box_code_size = 4 [default = 4];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_box_code_size(&has_bits);
          _impl_.box_code_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .object_detection.protos.Hyperparams conv_hyperparams = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_conv_hyperparams(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool predict_instance_masks = 6 [default = false];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_predict_instance_masks(&has_bits);
          _impl_.predict_instance_masks_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 mask_prediction_conv_depth = 7 [default = 256];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_mask_prediction_conv_depth(&has_bits);
          _impl_.mask_prediction_conv_depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool predict_keypoints = 8 [default = false];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_predict_keypoints(&has_bits);
          _impl_.predict_keypoints_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 mask_height = 9 [default = 15];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_mask_height(&has_bits);
          _impl_.mask_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 mask_width = 10 [default = 15];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_mask_width(&has_bits);
          _impl_.mask_width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 mask_prediction_num_conv_layers = 11 [default = 2];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_mask_prediction_num_conv_layers(&has_bits);
          _impl_.mask_prediction_num_conv_layers_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool masks_are_class_agnostic = 12 [default = false];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_masks_are_class_agnostic(&has_bits);
          _impl_.masks_are_class_agnostic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool share_box_across_classes = 13 [default = false];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_share_box_across_classes(&has_bits);
          _impl_.share_box_across_classes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool convolve_then_upsample_masks = 14 [default = false];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
          _Internal::set_has_convolve_then_upsample_masks(&has_bits);
          _impl_.convolve_then_upsample_masks_ = ::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* MaskRCNNBoxPredictor::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.MaskRCNNBoxPredictor)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional float dropout_keep_probability = 3 [default = 0.5];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_dropout_keep_probability(), target);
  }

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

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

  // optional bool predict_instance_masks = 6 [default = false];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_predict_instance_masks(), target);
  }

  // optional int32 mask_prediction_conv_depth = 7 [default = 256];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_mask_prediction_conv_depth(), target);
  }

  // optional bool predict_keypoints = 8 [default = false];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_predict_keypoints(), target);
  }

  // optional int32 mask_height = 9 [default = 15];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_mask_height(), target);
  }

  // optional int32 mask_width = 10 [default = 15];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_mask_width(), target);
  }

  // optional int32 mask_prediction_num_conv_layers = 11 [default = 2];
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_mask_prediction_num_conv_layers(), target);
  }

  // optional bool masks_are_class_agnostic = 12 [default = false];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_masks_are_class_agnostic(), target);
  }

  // optional bool share_box_across_classes = 13 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(13, this->_internal_share_box_across_classes(), target);
  }

  // optional bool convolve_then_upsample_masks = 14 [default = false];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_convolve_then_upsample_masks(), 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.MaskRCNNBoxPredictor)
  return target;
}

size_t MaskRCNNBoxPredictor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.MaskRCNNBoxPredictor)
  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.Hyperparams fc_hyperparams = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.fc_hyperparams_);
    }

    // optional .object_detection.protos.Hyperparams conv_hyperparams = 5;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.conv_hyperparams_);
    }

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

    // optional bool predict_instance_masks = 6 [default = false];
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 1;
    }

    // optional bool predict_keypoints = 8 [default = false];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 1;
    }

    // optional bool masks_are_class_agnostic = 12 [default = false];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 1;
    }

    // optional bool share_box_across_classes = 13 [default = false];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 1;
    }

    // optional bool convolve_then_upsample_masks = 14 [default = false];
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 + 1;
    }

  }
  if (cached_has_bits & 0x00003f00u) {
    // optional float dropout_keep_probability = 3 [default = 0.5];
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 + 4;
    }

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

    // optional int32 mask_prediction_conv_depth = 7 [default = 256];
    if (cached_has_bits & 0x00000400u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_mask_prediction_conv_depth());
    }

    // optional int32 mask_height = 9 [default = 15];
    if (cached_has_bits & 0x00000800u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_mask_height());
    }

    // optional int32 mask_width = 10 [default = 15];
    if (cached_has_bits & 0x00001000u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_mask_width());
    }

    // optional int32 mask_prediction_num_conv_layers = 11 [default = 2];
    if (cached_has_bits & 0x00002000u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_mask_prediction_num_conv_layers());
    }

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

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


void MaskRCNNBoxPredictor::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<MaskRCNNBoxPredictor*>(&to_msg);
  auto& from = static_cast<const MaskRCNNBoxPredictor&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.MaskRCNNBoxPredictor)
  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_fc_hyperparams()->::object_detection::protos::Hyperparams::MergeFrom(
          from._internal_fc_hyperparams());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_conv_hyperparams()->::object_detection::protos::Hyperparams::MergeFrom(
          from._internal_conv_hyperparams());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.use_dropout_ = from._impl_.use_dropout_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.predict_instance_masks_ = from._impl_.predict_instance_masks_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.predict_keypoints_ = from._impl_.predict_keypoints_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.masks_are_class_agnostic_ = from._impl_.masks_are_class_agnostic_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.share_box_across_classes_ = from._impl_.share_box_across_classes_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.convolve_then_upsample_masks_ = from._impl_.convolve_then_upsample_masks_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00003f00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.dropout_keep_probability_ = from._impl_.dropout_keep_probability_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.box_code_size_ = from._impl_.box_code_size_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.mask_prediction_conv_depth_ = from._impl_.mask_prediction_conv_depth_;
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_impl_.mask_height_ = from._impl_.mask_height_;
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_impl_.mask_width_ = from._impl_.mask_width_;
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_impl_.mask_prediction_num_conv_layers_ = from._impl_.mask_prediction_num_conv_layers_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void MaskRCNNBoxPredictor::InternalSwap(MaskRCNNBoxPredictor* 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(MaskRCNNBoxPredictor, _impl_.convolve_then_upsample_masks_)
      + sizeof(MaskRCNNBoxPredictor::_impl_.convolve_then_upsample_masks_)
      - PROTOBUF_FIELD_OFFSET(MaskRCNNBoxPredictor, _impl_.fc_hyperparams_)>(
          reinterpret_cast<char*>(&_impl_.fc_hyperparams_),
          reinterpret_cast<char*>(&other->_impl_.fc_hyperparams_));
  swap(_impl_.dropout_keep_probability_, other->_impl_.dropout_keep_probability_);
  swap(_impl_.box_code_size_, other->_impl_.box_code_size_);
  swap(_impl_.mask_prediction_conv_depth_, other->_impl_.mask_prediction_conv_depth_);
  swap(_impl_.mask_height_, other->_impl_.mask_height_);
  swap(_impl_.mask_width_, other->_impl_.mask_width_);
  swap(_impl_.mask_prediction_num_conv_layers_, other->_impl_.mask_prediction_num_conv_layers_);
}

::PROTOBUF_NAMESPACE_ID::Metadata MaskRCNNBoxPredictor::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[5]);
}

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

class RfcnBoxPredictor::_Internal {
 public:
  using HasBits = decltype(std::declval<RfcnBoxPredictor>()._impl_._has_bits_);
  static const ::object_detection::protos::Hyperparams& conv_hyperparams(const RfcnBoxPredictor* msg);
  static void set_has_conv_hyperparams(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_num_spatial_bins_height(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_num_spatial_bins_width(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_depth(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_box_code_size(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_crop_height(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_crop_width(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
};

const ::object_detection::protos::Hyperparams&
RfcnBoxPredictor::_Internal::conv_hyperparams(const RfcnBoxPredictor* msg) {
  return *msg->_impl_.conv_hyperparams_;
}
void RfcnBoxPredictor::clear_conv_hyperparams() {
  if (_impl_.conv_hyperparams_ != nullptr) _impl_.conv_hyperparams_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
RfcnBoxPredictor::RfcnBoxPredictor(::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.RfcnBoxPredictor)
}
RfcnBoxPredictor::RfcnBoxPredictor(const RfcnBoxPredictor& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  RfcnBoxPredictor* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.conv_hyperparams_){nullptr}
    , decltype(_impl_.num_spatial_bins_height_){}
    , decltype(_impl_.num_spatial_bins_width_){}
    , decltype(_impl_.depth_){}
    , decltype(_impl_.box_code_size_){}
    , decltype(_impl_.crop_height_){}
    , decltype(_impl_.crop_width_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_conv_hyperparams()) {
    _this->_impl_.conv_hyperparams_ = new ::object_detection::protos::Hyperparams(*from._impl_.conv_hyperparams_);
  }
  ::memcpy(&_impl_.num_spatial_bins_height_, &from._impl_.num_spatial_bins_height_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.crop_width_) -
    reinterpret_cast<char*>(&_impl_.num_spatial_bins_height_)) + sizeof(_impl_.crop_width_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.RfcnBoxPredictor)
}

inline void RfcnBoxPredictor::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_.conv_hyperparams_){nullptr}
    , decltype(_impl_.num_spatial_bins_height_){3}
    , decltype(_impl_.num_spatial_bins_width_){3}
    , decltype(_impl_.depth_){1024}
    , decltype(_impl_.box_code_size_){4}
    , decltype(_impl_.crop_height_){12}
    , decltype(_impl_.crop_width_){12}
  };
}

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

inline void RfcnBoxPredictor::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.conv_hyperparams_;
}

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

void RfcnBoxPredictor::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.RfcnBoxPredictor)
  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 & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(_impl_.conv_hyperparams_ != nullptr);
      _impl_.conv_hyperparams_->Clear();
    }
    _impl_.num_spatial_bins_height_ = 3;
    _impl_.num_spatial_bins_width_ = 3;
    _impl_.depth_ = 1024;
    _impl_.box_code_size_ = 4;
    _impl_.crop_height_ = 12;
    _impl_.crop_width_ = 12;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* RfcnBoxPredictor::_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.Hyperparams conv_hyperparams = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_conv_hyperparams(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 num_spatial_bins_height = 2 [default = 3];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_num_spatial_bins_height(&has_bits);
          _impl_.num_spatial_bins_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 num_spatial_bins_width = 3 [default = 3];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_num_spatial_bins_width(&has_bits);
          _impl_.num_spatial_bins_width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 depth = 4 [default = 1024];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_depth(&has_bits);
          _impl_.depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 box_code_size = 5 [default = 4];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_box_code_size(&has_bits);
          _impl_.box_code_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 crop_height = 6 [default = 12];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_crop_height(&has_bits);
          _impl_.crop_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 crop_width = 7 [default = 12];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_crop_width(&has_bits);
          _impl_.crop_width_ = ::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* RfcnBoxPredictor::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.RfcnBoxPredictor)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

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

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

  // optional int32 crop_height = 6 [default = 12];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_crop_height(), target);
  }

  // optional int32 crop_width = 7 [default = 12];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_crop_width(), 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.RfcnBoxPredictor)
  return target;
}

size_t RfcnBoxPredictor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.RfcnBoxPredictor)
  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 & 0x0000007fu) {
    // optional .object_detection.protos.Hyperparams conv_hyperparams = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.conv_hyperparams_);
    }

    // optional int32 num_spatial_bins_height = 2 [default = 3];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_spatial_bins_height());
    }

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

    // optional int32 depth = 4 [default = 1024];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_depth());
    }

    // optional int32 box_code_size = 5 [default = 4];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_box_code_size());
    }

    // optional int32 crop_height = 6 [default = 12];
    if (cached_has_bits & 0x00000020u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_crop_height());
    }

    // optional int32 crop_width = 7 [default = 12];
    if (cached_has_bits & 0x00000040u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_crop_width());
    }

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

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


void RfcnBoxPredictor::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<RfcnBoxPredictor*>(&to_msg);
  auto& from = static_cast<const RfcnBoxPredictor&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.RfcnBoxPredictor)
  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 & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_conv_hyperparams()->::object_detection::protos::Hyperparams::MergeFrom(
          from._internal_conv_hyperparams());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.num_spatial_bins_height_ = from._impl_.num_spatial_bins_height_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.num_spatial_bins_width_ = from._impl_.num_spatial_bins_width_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.depth_ = from._impl_.depth_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.box_code_size_ = from._impl_.box_code_size_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.crop_height_ = from._impl_.crop_height_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.crop_width_ = from._impl_.crop_width_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void RfcnBoxPredictor::InternalSwap(RfcnBoxPredictor* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.conv_hyperparams_, other->_impl_.conv_hyperparams_);
  swap(_impl_.num_spatial_bins_height_, other->_impl_.num_spatial_bins_height_);
  swap(_impl_.num_spatial_bins_width_, other->_impl_.num_spatial_bins_width_);
  swap(_impl_.depth_, other->_impl_.depth_);
  swap(_impl_.box_code_size_, other->_impl_.box_code_size_);
  swap(_impl_.crop_height_, other->_impl_.crop_height_);
  swap(_impl_.crop_width_, other->_impl_.crop_width_);
}

::PROTOBUF_NAMESPACE_ID::Metadata RfcnBoxPredictor::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2fbox_5fpredictor_2eproto[6]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace protos
}  // namespace object_detection
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::object_detection::protos::BoxPredictor*
Arena::CreateMaybeMessage< ::object_detection::protos::BoxPredictor >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::BoxPredictor >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange*
Arena::CreateMaybeMessage< ::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::ConvolutionalBoxPredictor_BoxEncodingsClipRange >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::ConvolutionalBoxPredictor*
Arena::CreateMaybeMessage< ::object_detection::protos::ConvolutionalBoxPredictor >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::ConvolutionalBoxPredictor >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange*
Arena::CreateMaybeMessage< ::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::WeightSharedConvolutionalBoxPredictor_BoxEncodingsClipRange >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::WeightSharedConvolutionalBoxPredictor*
Arena::CreateMaybeMessage< ::object_detection::protos::WeightSharedConvolutionalBoxPredictor >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::WeightSharedConvolutionalBoxPredictor >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::MaskRCNNBoxPredictor*
Arena::CreateMaybeMessage< ::object_detection::protos::MaskRCNNBoxPredictor >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::MaskRCNNBoxPredictor >(arena);
}
template<> PROTOBUF_NOINLINE ::object_detection::protos::RfcnBoxPredictor*
Arena::CreateMaybeMessage< ::object_detection::protos::RfcnBoxPredictor >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::RfcnBoxPredictor >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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