// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: opencv-caffe.proto

#include "opencv-caffe.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 opencv_caffe {
PROTOBUF_CONSTEXPR BlobShape::BlobShape(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.dim_)*/{}
  , /*decltype(_impl_._dim_cached_byte_size_)*/{0}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct BlobShapeDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BlobShapeDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BlobShapeDefaultTypeInternal() {}
  union {
    BlobShape _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BlobShapeDefaultTypeInternal _BlobShape_default_instance_;
PROTOBUF_CONSTEXPR BlobProto::BlobProto(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.data_)*/{}
  , /*decltype(_impl_.diff_)*/{}
  , /*decltype(_impl_.double_data_)*/{}
  , /*decltype(_impl_.double_diff_)*/{}
  , /*decltype(_impl_.raw_data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.shape_)*/nullptr
  , /*decltype(_impl_.num_)*/0
  , /*decltype(_impl_.channels_)*/0
  , /*decltype(_impl_.height_)*/0
  , /*decltype(_impl_.width_)*/0
  , /*decltype(_impl_.raw_data_type_)*/0} {}
struct BlobProtoDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BlobProtoDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BlobProtoDefaultTypeInternal() {}
  union {
    BlobProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BlobProtoDefaultTypeInternal _BlobProto_default_instance_;
PROTOBUF_CONSTEXPR BlobProtoVector::BlobProtoVector(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.blobs_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct BlobProtoVectorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BlobProtoVectorDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BlobProtoVectorDefaultTypeInternal() {}
  union {
    BlobProtoVector _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BlobProtoVectorDefaultTypeInternal _BlobProtoVector_default_instance_;
PROTOBUF_CONSTEXPR PermuteParameter::PermuteParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.order_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct PermuteParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PermuteParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~PermuteParameterDefaultTypeInternal() {}
  union {
    PermuteParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PermuteParameterDefaultTypeInternal _PermuteParameter_default_instance_;
PROTOBUF_CONSTEXPR NormalizeBBoxParameter::NormalizeBBoxParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.scale_filler_)*/nullptr
  , /*decltype(_impl_.across_spatial_)*/true
  , /*decltype(_impl_.channel_shared_)*/true
  , /*decltype(_impl_.eps_)*/1e-10f} {}
struct NormalizeBBoxParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR NormalizeBBoxParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~NormalizeBBoxParameterDefaultTypeInternal() {}
  union {
    NormalizeBBoxParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NormalizeBBoxParameterDefaultTypeInternal _NormalizeBBoxParameter_default_instance_;
PROTOBUF_CONSTEXPR PriorBoxParameter::PriorBoxParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.min_size_)*/{}
  , /*decltype(_impl_.max_size_)*/{}
  , /*decltype(_impl_.aspect_ratio_)*/{}
  , /*decltype(_impl_.variance_)*/{}
  , /*decltype(_impl_.offset_h_)*/{}
  , /*decltype(_impl_.offset_w_)*/{}
  , /*decltype(_impl_.width_)*/{}
  , /*decltype(_impl_.height_)*/{}
  , /*decltype(_impl_.img_size_)*/0u
  , /*decltype(_impl_.img_h_)*/0u
  , /*decltype(_impl_.img_w_)*/0u
  , /*decltype(_impl_.step_)*/0
  , /*decltype(_impl_.step_h_)*/0
  , /*decltype(_impl_.step_w_)*/0
  , /*decltype(_impl_.flip_)*/true
  , /*decltype(_impl_.clip_)*/true
  , /*decltype(_impl_.offset_)*/0.5f} {}
struct PriorBoxParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PriorBoxParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~PriorBoxParameterDefaultTypeInternal() {}
  union {
    PriorBoxParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PriorBoxParameterDefaultTypeInternal _PriorBoxParameter_default_instance_;
PROTOBUF_CONSTEXPR DetectionOutputParameter::DetectionOutputParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.nms_param_)*/nullptr
  , /*decltype(_impl_.save_output_param_)*/nullptr
  , /*decltype(_impl_.num_classes_)*/0u
  , /*decltype(_impl_.background_label_id_)*/0
  , /*decltype(_impl_.confidence_threshold_)*/0
  , /*decltype(_impl_.variance_encoded_in_target_)*/false
  , /*decltype(_impl_.clip_)*/false
  , /*decltype(_impl_.keep_top_k_)*/-1
  , /*decltype(_impl_.code_type_)*/1
  , /*decltype(_impl_.share_location_)*/true
  , /*decltype(_impl_.normalized_bbox_)*/true} {}
struct DetectionOutputParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DetectionOutputParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~DetectionOutputParameterDefaultTypeInternal() {}
  union {
    DetectionOutputParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DetectionOutputParameterDefaultTypeInternal _DetectionOutputParameter_default_instance_;
PROTOBUF_CONSTEXPR Datum::Datum(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.float_data_)*/{}
  , /*decltype(_impl_.data_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.channels_)*/0
  , /*decltype(_impl_.height_)*/0
  , /*decltype(_impl_.width_)*/0
  , /*decltype(_impl_.label_)*/0
  , /*decltype(_impl_.encoded_)*/false} {}
struct DatumDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DatumDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~DatumDefaultTypeInternal() {}
  union {
    Datum _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DatumDefaultTypeInternal _Datum_default_instance_;
PROTOBUF_CONSTEXPR FillerParameter::FillerParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.type_)*/{nullptr, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.value_)*/0
  , /*decltype(_impl_.min_)*/0
  , /*decltype(_impl_.mean_)*/0
  , /*decltype(_impl_.variance_norm_)*/0
  , /*decltype(_impl_.sparse_)*/-1
  , /*decltype(_impl_.max_)*/1
  , /*decltype(_impl_.std_)*/1} {}
struct FillerParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR FillerParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~FillerParameterDefaultTypeInternal() {}
  union {
    FillerParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FillerParameterDefaultTypeInternal _FillerParameter_default_instance_;
PROTOBUF_CONSTEXPR NetParameter::NetParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.layers_)*/{}
  , /*decltype(_impl_.input_)*/{}
  , /*decltype(_impl_.input_dim_)*/{}
  , /*decltype(_impl_.input_shape_)*/{}
  , /*decltype(_impl_.layer_)*/{}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.state_)*/nullptr
  , /*decltype(_impl_.force_backward_)*/false
  , /*decltype(_impl_.debug_info_)*/false} {}
struct NetParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR NetParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~NetParameterDefaultTypeInternal() {}
  union {
    NetParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NetParameterDefaultTypeInternal _NetParameter_default_instance_;
PROTOBUF_CONSTEXPR SolverParameter::SolverParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.test_net_)*/{}
  , /*decltype(_impl_.test_iter_)*/{}
  , /*decltype(_impl_.test_net_param_)*/{}
  , /*decltype(_impl_.test_state_)*/{}
  , /*decltype(_impl_.stepvalue_)*/{}
  , /*decltype(_impl_.train_net_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.lr_policy_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.snapshot_prefix_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.net_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.regularization_type_)*/{nullptr, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.type_)*/{nullptr, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.train_net_param_)*/nullptr
  , /*decltype(_impl_.net_param_)*/nullptr
  , /*decltype(_impl_.train_state_)*/nullptr
  , /*decltype(_impl_.test_interval_)*/0
  , /*decltype(_impl_.base_lr_)*/0
  , /*decltype(_impl_.display_)*/0
  , /*decltype(_impl_.max_iter_)*/0
  , /*decltype(_impl_.gamma_)*/0
  , /*decltype(_impl_.power_)*/0
  , /*decltype(_impl_.momentum_)*/0
  , /*decltype(_impl_.weight_decay_)*/0
  , /*decltype(_impl_.stepsize_)*/0
  , /*decltype(_impl_.snapshot_)*/0
  , /*decltype(_impl_.device_id_)*/0
  , /*decltype(_impl_.test_compute_loss_)*/false
  , /*decltype(_impl_.snapshot_diff_)*/false
  , /*decltype(_impl_.debug_info_)*/false
  , /*decltype(_impl_.solver_type_)*/0
  , /*decltype(_impl_.momentum2_)*/0.999f
  , /*decltype(_impl_.random_seed_)*/int64_t{-1}
  , /*decltype(_impl_.solver_mode_)*/1
  , /*decltype(_impl_.test_initialization_)*/true
  , /*decltype(_impl_.snapshot_after_train_)*/true
  , /*decltype(_impl_.delta_)*/1e-08f
  , /*decltype(_impl_.average_loss_)*/1
  , /*decltype(_impl_.clip_gradients_)*/-1
  , /*decltype(_impl_.iter_size_)*/1
  , /*decltype(_impl_.snapshot_format_)*/1
  , /*decltype(_impl_.rms_decay_)*/0.99f} {}
struct SolverParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SolverParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SolverParameterDefaultTypeInternal() {}
  union {
    SolverParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SolverParameterDefaultTypeInternal _SolverParameter_default_instance_;
PROTOBUF_CONSTEXPR SolverState::SolverState(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.history_)*/{}
  , /*decltype(_impl_.learned_net_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.iter_)*/0
  , /*decltype(_impl_.current_step_)*/0} {}
struct SolverStateDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SolverStateDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SolverStateDefaultTypeInternal() {}
  union {
    SolverState _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SolverStateDefaultTypeInternal _SolverState_default_instance_;
PROTOBUF_CONSTEXPR NetState::NetState(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.stage_)*/{}
  , /*decltype(_impl_.level_)*/0
  , /*decltype(_impl_.phase_)*/1} {}
struct NetStateDefaultTypeInternal {
  PROTOBUF_CONSTEXPR NetStateDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~NetStateDefaultTypeInternal() {}
  union {
    NetState _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NetStateDefaultTypeInternal _NetState_default_instance_;
PROTOBUF_CONSTEXPR NetStateRule::NetStateRule(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.stage_)*/{}
  , /*decltype(_impl_.not_stage_)*/{}
  , /*decltype(_impl_.phase_)*/0
  , /*decltype(_impl_.min_level_)*/0
  , /*decltype(_impl_.max_level_)*/0} {}
struct NetStateRuleDefaultTypeInternal {
  PROTOBUF_CONSTEXPR NetStateRuleDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~NetStateRuleDefaultTypeInternal() {}
  union {
    NetStateRule _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NetStateRuleDefaultTypeInternal _NetStateRule_default_instance_;
PROTOBUF_CONSTEXPR ParamSpec::ParamSpec(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.share_mode_)*/0
  , /*decltype(_impl_.lr_mult_)*/1
  , /*decltype(_impl_.decay_mult_)*/1} {}
struct ParamSpecDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ParamSpecDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ParamSpecDefaultTypeInternal() {}
  union {
    ParamSpec _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ParamSpecDefaultTypeInternal _ParamSpec_default_instance_;
PROTOBUF_CONSTEXPR LayerParameter::LayerParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.bottom_)*/{}
  , /*decltype(_impl_.top_)*/{}
  , /*decltype(_impl_.loss_weight_)*/{}
  , /*decltype(_impl_.param_)*/{}
  , /*decltype(_impl_.blobs_)*/{}
  , /*decltype(_impl_.include_)*/{}
  , /*decltype(_impl_.exclude_)*/{}
  , /*decltype(_impl_.propagate_down_)*/{}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.transform_param_)*/nullptr
  , /*decltype(_impl_.loss_param_)*/nullptr
  , /*decltype(_impl_.accuracy_param_)*/nullptr
  , /*decltype(_impl_.argmax_param_)*/nullptr
  , /*decltype(_impl_.concat_param_)*/nullptr
  , /*decltype(_impl_.contrastive_loss_param_)*/nullptr
  , /*decltype(_impl_.convolution_param_)*/nullptr
  , /*decltype(_impl_.data_param_)*/nullptr
  , /*decltype(_impl_.dropout_param_)*/nullptr
  , /*decltype(_impl_.dummy_data_param_)*/nullptr
  , /*decltype(_impl_.eltwise_param_)*/nullptr
  , /*decltype(_impl_.exp_param_)*/nullptr
  , /*decltype(_impl_.hdf5_data_param_)*/nullptr
  , /*decltype(_impl_.hdf5_output_param_)*/nullptr
  , /*decltype(_impl_.hinge_loss_param_)*/nullptr
  , /*decltype(_impl_.image_data_param_)*/nullptr
  , /*decltype(_impl_.infogain_loss_param_)*/nullptr
  , /*decltype(_impl_.inner_product_param_)*/nullptr
  , /*decltype(_impl_.lrn_param_)*/nullptr
  , /*decltype(_impl_.memory_data_param_)*/nullptr
  , /*decltype(_impl_.mvn_param_)*/nullptr
  , /*decltype(_impl_.pooling_param_)*/nullptr
  , /*decltype(_impl_.power_param_)*/nullptr
  , /*decltype(_impl_.relu_param_)*/nullptr
  , /*decltype(_impl_.sigmoid_param_)*/nullptr
  , /*decltype(_impl_.softmax_param_)*/nullptr
  , /*decltype(_impl_.slice_param_)*/nullptr
  , /*decltype(_impl_.tanh_param_)*/nullptr
  , /*decltype(_impl_.threshold_param_)*/nullptr
  , /*decltype(_impl_.window_data_param_)*/nullptr
  , /*decltype(_impl_.python_param_)*/nullptr
  , /*decltype(_impl_.prelu_param_)*/nullptr
  , /*decltype(_impl_.spp_param_)*/nullptr
  , /*decltype(_impl_.reshape_param_)*/nullptr
  , /*decltype(_impl_.log_param_)*/nullptr
  , /*decltype(_impl_.flatten_param_)*/nullptr
  , /*decltype(_impl_.reduction_param_)*/nullptr
  , /*decltype(_impl_.embed_param_)*/nullptr
  , /*decltype(_impl_.tile_param_)*/nullptr
  , /*decltype(_impl_.batch_norm_param_)*/nullptr
  , /*decltype(_impl_.elu_param_)*/nullptr
  , /*decltype(_impl_.bias_param_)*/nullptr
  , /*decltype(_impl_.scale_param_)*/nullptr
  , /*decltype(_impl_.input_param_)*/nullptr
  , /*decltype(_impl_.crop_param_)*/nullptr
  , /*decltype(_impl_.parameter_param_)*/nullptr
  , /*decltype(_impl_.recurrent_param_)*/nullptr
  , /*decltype(_impl_.detection_output_param_)*/nullptr
  , /*decltype(_impl_.permute_param_)*/nullptr
  , /*decltype(_impl_.norm_param_)*/nullptr
  , /*decltype(_impl_.prior_box_param_)*/nullptr
  , /*decltype(_impl_.proposal_param_)*/nullptr
  , /*decltype(_impl_.psroi_pooling_param_)*/nullptr
  , /*decltype(_impl_.roi_pooling_param_)*/nullptr
  , /*decltype(_impl_.phase_)*/0} {}
struct LayerParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR LayerParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~LayerParameterDefaultTypeInternal() {}
  union {
    LayerParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LayerParameterDefaultTypeInternal _LayerParameter_default_instance_;
PROTOBUF_CONSTEXPR TransformationParameter::TransformationParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.mean_value_)*/{}
  , /*decltype(_impl_.mean_file_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.crop_size_)*/0u
  , /*decltype(_impl_.mirror_)*/false
  , /*decltype(_impl_.force_color_)*/false
  , /*decltype(_impl_.force_gray_)*/false
  , /*decltype(_impl_.scale_)*/1} {}
struct TransformationParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TransformationParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TransformationParameterDefaultTypeInternal() {}
  union {
    TransformationParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TransformationParameterDefaultTypeInternal _TransformationParameter_default_instance_;
PROTOBUF_CONSTEXPR LossParameter::LossParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.ignore_label_)*/0
  , /*decltype(_impl_.normalize_)*/false
  , /*decltype(_impl_.normalization_)*/1} {}
struct LossParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR LossParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~LossParameterDefaultTypeInternal() {}
  union {
    LossParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LossParameterDefaultTypeInternal _LossParameter_default_instance_;
PROTOBUF_CONSTEXPR AccuracyParameter::AccuracyParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.ignore_label_)*/0
  , /*decltype(_impl_.top_k_)*/1u
  , /*decltype(_impl_.axis_)*/1} {}
struct AccuracyParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR AccuracyParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~AccuracyParameterDefaultTypeInternal() {}
  union {
    AccuracyParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AccuracyParameterDefaultTypeInternal _AccuracyParameter_default_instance_;
PROTOBUF_CONSTEXPR ArgMaxParameter::ArgMaxParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.out_max_val_)*/false
  , /*decltype(_impl_.axis_)*/0
  , /*decltype(_impl_.top_k_)*/1u} {}
struct ArgMaxParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ArgMaxParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ArgMaxParameterDefaultTypeInternal() {}
  union {
    ArgMaxParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArgMaxParameterDefaultTypeInternal _ArgMaxParameter_default_instance_;
PROTOBUF_CONSTEXPR ConcatParameter::ConcatParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.concat_dim_)*/1u
  , /*decltype(_impl_.axis_)*/1} {}
struct ConcatParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ConcatParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ConcatParameterDefaultTypeInternal() {}
  union {
    ConcatParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConcatParameterDefaultTypeInternal _ConcatParameter_default_instance_;
PROTOBUF_CONSTEXPR BatchNormParameter::BatchNormParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.use_global_stats_)*/false
  , /*decltype(_impl_.scale_bias_)*/false
  , /*decltype(_impl_.moving_average_fraction_)*/0.999f
  , /*decltype(_impl_.eps_)*/1e-05f} {}
struct BatchNormParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BatchNormParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BatchNormParameterDefaultTypeInternal() {}
  union {
    BatchNormParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BatchNormParameterDefaultTypeInternal _BatchNormParameter_default_instance_;
PROTOBUF_CONSTEXPR BiasParameter::BiasParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filler_)*/nullptr
  , /*decltype(_impl_.axis_)*/1
  , /*decltype(_impl_.num_axes_)*/1} {}
struct BiasParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR BiasParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~BiasParameterDefaultTypeInternal() {}
  union {
    BiasParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BiasParameterDefaultTypeInternal _BiasParameter_default_instance_;
PROTOBUF_CONSTEXPR ContrastiveLossParameter::ContrastiveLossParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.legacy_version_)*/false
  , /*decltype(_impl_.margin_)*/1} {}
struct ContrastiveLossParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ContrastiveLossParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ContrastiveLossParameterDefaultTypeInternal() {}
  union {
    ContrastiveLossParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ContrastiveLossParameterDefaultTypeInternal _ContrastiveLossParameter_default_instance_;
PROTOBUF_CONSTEXPR ConvolutionParameter::ConvolutionParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.pad_)*/{}
  , /*decltype(_impl_.kernel_size_)*/{}
  , /*decltype(_impl_.stride_)*/{}
  , /*decltype(_impl_.dilation_)*/{}
  , /*decltype(_impl_.weight_filler_)*/nullptr
  , /*decltype(_impl_.bias_filler_)*/nullptr
  , /*decltype(_impl_.num_output_)*/0u
  , /*decltype(_impl_.pad_h_)*/0u
  , /*decltype(_impl_.pad_w_)*/0u
  , /*decltype(_impl_.kernel_h_)*/0u
  , /*decltype(_impl_.kernel_w_)*/0u
  , /*decltype(_impl_.stride_h_)*/0u
  , /*decltype(_impl_.stride_w_)*/0u
  , /*decltype(_impl_.engine_)*/0
  , /*decltype(_impl_.force_nd_im2col_)*/false
  , /*decltype(_impl_.axis_)*/1
  , /*decltype(_impl_.bias_term_)*/true
  , /*decltype(_impl_.group_)*/1u} {}
struct ConvolutionParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ConvolutionParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ConvolutionParameterDefaultTypeInternal() {}
  union {
    ConvolutionParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConvolutionParameterDefaultTypeInternal _ConvolutionParameter_default_instance_;
PROTOBUF_CONSTEXPR CropParameter::CropParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.offset_)*/{}
  , /*decltype(_impl_.axis_)*/2} {}
struct CropParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR CropParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~CropParameterDefaultTypeInternal() {}
  union {
    CropParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CropParameterDefaultTypeInternal _CropParameter_default_instance_;
PROTOBUF_CONSTEXPR DataParameter::DataParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.source_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.mean_file_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.batch_size_)*/0u
  , /*decltype(_impl_.crop_size_)*/0u
  , /*decltype(_impl_.rand_skip_)*/0u
  , /*decltype(_impl_.mirror_)*/false
  , /*decltype(_impl_.force_encoded_color_)*/false
  , /*decltype(_impl_.backend_)*/0
  , /*decltype(_impl_.scale_)*/1
  , /*decltype(_impl_.prefetch_)*/4u} {}
struct DataParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DataParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~DataParameterDefaultTypeInternal() {}
  union {
    DataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DataParameterDefaultTypeInternal _DataParameter_default_instance_;
PROTOBUF_CONSTEXPR NonMaximumSuppressionParameter::NonMaximumSuppressionParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.top_k_)*/0
  , /*decltype(_impl_.nms_threshold_)*/0.3f
  , /*decltype(_impl_.eta_)*/1} {}
struct NonMaximumSuppressionParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR NonMaximumSuppressionParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~NonMaximumSuppressionParameterDefaultTypeInternal() {}
  union {
    NonMaximumSuppressionParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NonMaximumSuppressionParameterDefaultTypeInternal _NonMaximumSuppressionParameter_default_instance_;
PROTOBUF_CONSTEXPR SaveOutputParameter::SaveOutputParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.output_directory_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.output_name_prefix_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.output_format_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.label_map_file_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.name_size_file_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.num_test_image_)*/0u} {}
struct SaveOutputParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SaveOutputParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SaveOutputParameterDefaultTypeInternal() {}
  union {
    SaveOutputParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SaveOutputParameterDefaultTypeInternal _SaveOutputParameter_default_instance_;
PROTOBUF_CONSTEXPR DropoutParameter::DropoutParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.dropout_ratio_)*/0.5f
  , /*decltype(_impl_.scale_train_)*/true} {}
struct DropoutParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DropoutParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~DropoutParameterDefaultTypeInternal() {}
  union {
    DropoutParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DropoutParameterDefaultTypeInternal _DropoutParameter_default_instance_;
PROTOBUF_CONSTEXPR DummyDataParameter::DummyDataParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.data_filler_)*/{}
  , /*decltype(_impl_.num_)*/{}
  , /*decltype(_impl_.channels_)*/{}
  , /*decltype(_impl_.height_)*/{}
  , /*decltype(_impl_.width_)*/{}
  , /*decltype(_impl_.shape_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct DummyDataParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR DummyDataParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~DummyDataParameterDefaultTypeInternal() {}
  union {
    DummyDataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DummyDataParameterDefaultTypeInternal _DummyDataParameter_default_instance_;
PROTOBUF_CONSTEXPR EltwiseParameter::EltwiseParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.coeff_)*/{}
  , /*decltype(_impl_.operation_)*/1
  , /*decltype(_impl_.stable_prod_grad_)*/true} {}
struct EltwiseParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EltwiseParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~EltwiseParameterDefaultTypeInternal() {}
  union {
    EltwiseParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EltwiseParameterDefaultTypeInternal _EltwiseParameter_default_instance_;
PROTOBUF_CONSTEXPR ELUParameter::ELUParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.alpha_)*/1} {}
struct ELUParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ELUParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ELUParameterDefaultTypeInternal() {}
  union {
    ELUParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ELUParameterDefaultTypeInternal _ELUParameter_default_instance_;
PROTOBUF_CONSTEXPR EmbedParameter::EmbedParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.weight_filler_)*/nullptr
  , /*decltype(_impl_.bias_filler_)*/nullptr
  , /*decltype(_impl_.num_output_)*/0u
  , /*decltype(_impl_.input_dim_)*/0u
  , /*decltype(_impl_.bias_term_)*/true} {}
struct EmbedParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR EmbedParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~EmbedParameterDefaultTypeInternal() {}
  union {
    EmbedParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EmbedParameterDefaultTypeInternal _EmbedParameter_default_instance_;
PROTOBUF_CONSTEXPR ExpParameter::ExpParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.shift_)*/0
  , /*decltype(_impl_.base_)*/-1
  , /*decltype(_impl_.scale_)*/1} {}
struct ExpParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ExpParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ExpParameterDefaultTypeInternal() {}
  union {
    ExpParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExpParameterDefaultTypeInternal _ExpParameter_default_instance_;
PROTOBUF_CONSTEXPR FlattenParameter::FlattenParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.axis_)*/1
  , /*decltype(_impl_.end_axis_)*/-1} {}
struct FlattenParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR FlattenParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~FlattenParameterDefaultTypeInternal() {}
  union {
    FlattenParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlattenParameterDefaultTypeInternal _FlattenParameter_default_instance_;
PROTOBUF_CONSTEXPR HDF5DataParameter::HDF5DataParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.source_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.batch_size_)*/0u
  , /*decltype(_impl_.shuffle_)*/false} {}
struct HDF5DataParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR HDF5DataParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~HDF5DataParameterDefaultTypeInternal() {}
  union {
    HDF5DataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HDF5DataParameterDefaultTypeInternal _HDF5DataParameter_default_instance_;
PROTOBUF_CONSTEXPR HDF5OutputParameter::HDF5OutputParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.file_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
struct HDF5OutputParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR HDF5OutputParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~HDF5OutputParameterDefaultTypeInternal() {}
  union {
    HDF5OutputParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HDF5OutputParameterDefaultTypeInternal _HDF5OutputParameter_default_instance_;
PROTOBUF_CONSTEXPR HingeLossParameter::HingeLossParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.norm_)*/1} {}
struct HingeLossParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR HingeLossParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~HingeLossParameterDefaultTypeInternal() {}
  union {
    HingeLossParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HingeLossParameterDefaultTypeInternal _HingeLossParameter_default_instance_;
PROTOBUF_CONSTEXPR ImageDataParameter::ImageDataParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.source_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.mean_file_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.root_folder_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.crop_size_)*/0u
  , /*decltype(_impl_.rand_skip_)*/0u
  , /*decltype(_impl_.shuffle_)*/false
  , /*decltype(_impl_.mirror_)*/false
  , /*decltype(_impl_.new_height_)*/0u
  , /*decltype(_impl_.new_width_)*/0u
  , /*decltype(_impl_.is_color_)*/true
  , /*decltype(_impl_.scale_)*/1
  , /*decltype(_impl_.batch_size_)*/1u} {}
struct ImageDataParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ImageDataParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ImageDataParameterDefaultTypeInternal() {}
  union {
    ImageDataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ImageDataParameterDefaultTypeInternal _ImageDataParameter_default_instance_;
PROTOBUF_CONSTEXPR InfogainLossParameter::InfogainLossParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.source_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
struct InfogainLossParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR InfogainLossParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~InfogainLossParameterDefaultTypeInternal() {}
  union {
    InfogainLossParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InfogainLossParameterDefaultTypeInternal _InfogainLossParameter_default_instance_;
PROTOBUF_CONSTEXPR InnerProductParameter::InnerProductParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.weight_filler_)*/nullptr
  , /*decltype(_impl_.bias_filler_)*/nullptr
  , /*decltype(_impl_.num_output_)*/0u
  , /*decltype(_impl_.transpose_)*/false
  , /*decltype(_impl_.bias_term_)*/true
  , /*decltype(_impl_.axis_)*/1} {}
struct InnerProductParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR InnerProductParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~InnerProductParameterDefaultTypeInternal() {}
  union {
    InnerProductParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InnerProductParameterDefaultTypeInternal _InnerProductParameter_default_instance_;
PROTOBUF_CONSTEXPR InputParameter::InputParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_.shape_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}} {}
struct InputParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR InputParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~InputParameterDefaultTypeInternal() {}
  union {
    InputParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InputParameterDefaultTypeInternal _InputParameter_default_instance_;
PROTOBUF_CONSTEXPR LogParameter::LogParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.shift_)*/0
  , /*decltype(_impl_.base_)*/-1
  , /*decltype(_impl_.scale_)*/1} {}
struct LogParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR LogParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~LogParameterDefaultTypeInternal() {}
  union {
    LogParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LogParameterDefaultTypeInternal _LogParameter_default_instance_;
PROTOBUF_CONSTEXPR LRNParameter::LRNParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.norm_region_)*/0
  , /*decltype(_impl_.engine_)*/0
  , /*decltype(_impl_.local_size_)*/5u
  , /*decltype(_impl_.alpha_)*/1
  , /*decltype(_impl_.beta_)*/0.75f
  , /*decltype(_impl_.k_)*/1} {}
struct LRNParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR LRNParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~LRNParameterDefaultTypeInternal() {}
  union {
    LRNParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LRNParameterDefaultTypeInternal _LRNParameter_default_instance_;
PROTOBUF_CONSTEXPR MemoryDataParameter::MemoryDataParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.batch_size_)*/0u
  , /*decltype(_impl_.channels_)*/0u
  , /*decltype(_impl_.height_)*/0u
  , /*decltype(_impl_.width_)*/0u} {}
struct MemoryDataParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR MemoryDataParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~MemoryDataParameterDefaultTypeInternal() {}
  union {
    MemoryDataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MemoryDataParameterDefaultTypeInternal _MemoryDataParameter_default_instance_;
PROTOBUF_CONSTEXPR MVNParameter::MVNParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.across_channels_)*/false
  , /*decltype(_impl_.normalize_variance_)*/true
  , /*decltype(_impl_.eps_)*/1e-09f} {}
struct MVNParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR MVNParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~MVNParameterDefaultTypeInternal() {}
  union {
    MVNParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MVNParameterDefaultTypeInternal _MVNParameter_default_instance_;
PROTOBUF_CONSTEXPR ParameterParameter::ParameterParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.shape_)*/nullptr} {}
struct ParameterParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ParameterParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ParameterParameterDefaultTypeInternal() {}
  union {
    ParameterParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ParameterParameterDefaultTypeInternal _ParameterParameter_default_instance_;
PROTOBUF_CONSTEXPR PoolingParameter::PoolingParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.pool_)*/0
  , /*decltype(_impl_.kernel_size_)*/0u
  , /*decltype(_impl_.pad_)*/0u
  , /*decltype(_impl_.kernel_h_)*/0u
  , /*decltype(_impl_.kernel_w_)*/0u
  , /*decltype(_impl_.stride_h_)*/0u
  , /*decltype(_impl_.stride_w_)*/0u
  , /*decltype(_impl_.pad_h_)*/0u
  , /*decltype(_impl_.pad_w_)*/0u
  , /*decltype(_impl_.engine_)*/0
  , /*decltype(_impl_.global_pooling_)*/false
  , /*decltype(_impl_.stride_)*/1u
  , /*decltype(_impl_.ceil_mode_)*/true} {}
struct PoolingParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PoolingParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~PoolingParameterDefaultTypeInternal() {}
  union {
    PoolingParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PoolingParameterDefaultTypeInternal _PoolingParameter_default_instance_;
PROTOBUF_CONSTEXPR PowerParameter::PowerParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.shift_)*/0
  , /*decltype(_impl_.power_)*/1
  , /*decltype(_impl_.scale_)*/1} {}
struct PowerParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PowerParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~PowerParameterDefaultTypeInternal() {}
  union {
    PowerParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PowerParameterDefaultTypeInternal _PowerParameter_default_instance_;
PROTOBUF_CONSTEXPR PythonParameter::PythonParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.module_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.layer_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.param_str_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.share_in_parallel_)*/false} {}
struct PythonParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PythonParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~PythonParameterDefaultTypeInternal() {}
  union {
    PythonParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PythonParameterDefaultTypeInternal _PythonParameter_default_instance_;
PROTOBUF_CONSTEXPR RecurrentParameter::RecurrentParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.weight_filler_)*/nullptr
  , /*decltype(_impl_.bias_filler_)*/nullptr
  , /*decltype(_impl_.num_output_)*/0u
  , /*decltype(_impl_.debug_info_)*/false
  , /*decltype(_impl_.expose_hidden_)*/false} {}
struct RecurrentParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR RecurrentParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~RecurrentParameterDefaultTypeInternal() {}
  union {
    RecurrentParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RecurrentParameterDefaultTypeInternal _RecurrentParameter_default_instance_;
PROTOBUF_CONSTEXPR ReductionParameter::ReductionParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.axis_)*/0
  , /*decltype(_impl_.operation_)*/1
  , /*decltype(_impl_.coeff_)*/1} {}
struct ReductionParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ReductionParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ReductionParameterDefaultTypeInternal() {}
  union {
    ReductionParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReductionParameterDefaultTypeInternal _ReductionParameter_default_instance_;
PROTOBUF_CONSTEXPR ReLUParameter::ReLUParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.negative_slope_)*/0
  , /*decltype(_impl_.engine_)*/0} {}
struct ReLUParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ReLUParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ReLUParameterDefaultTypeInternal() {}
  union {
    ReLUParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReLUParameterDefaultTypeInternal _ReLUParameter_default_instance_;
PROTOBUF_CONSTEXPR ReshapeParameter::ReshapeParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.shape_)*/nullptr
  , /*decltype(_impl_.axis_)*/0
  , /*decltype(_impl_.num_axes_)*/-1} {}
struct ReshapeParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ReshapeParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ReshapeParameterDefaultTypeInternal() {}
  union {
    ReshapeParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ReshapeParameterDefaultTypeInternal _ReshapeParameter_default_instance_;
PROTOBUF_CONSTEXPR ScaleParameter::ScaleParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filler_)*/nullptr
  , /*decltype(_impl_.bias_filler_)*/nullptr
  , /*decltype(_impl_.bias_term_)*/false
  , /*decltype(_impl_.axis_)*/1
  , /*decltype(_impl_.num_axes_)*/1} {}
struct ScaleParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ScaleParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ScaleParameterDefaultTypeInternal() {}
  union {
    ScaleParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ScaleParameterDefaultTypeInternal _ScaleParameter_default_instance_;
PROTOBUF_CONSTEXPR SigmoidParameter::SigmoidParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.engine_)*/0} {}
struct SigmoidParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SigmoidParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SigmoidParameterDefaultTypeInternal() {}
  union {
    SigmoidParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SigmoidParameterDefaultTypeInternal _SigmoidParameter_default_instance_;
PROTOBUF_CONSTEXPR SliceParameter::SliceParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.slice_point_)*/{}
  , /*decltype(_impl_.slice_dim_)*/1u
  , /*decltype(_impl_.axis_)*/1} {}
struct SliceParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SliceParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SliceParameterDefaultTypeInternal() {}
  union {
    SliceParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SliceParameterDefaultTypeInternal _SliceParameter_default_instance_;
PROTOBUF_CONSTEXPR SoftmaxParameter::SoftmaxParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.engine_)*/0
  , /*decltype(_impl_.axis_)*/1} {}
struct SoftmaxParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SoftmaxParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SoftmaxParameterDefaultTypeInternal() {}
  union {
    SoftmaxParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SoftmaxParameterDefaultTypeInternal _SoftmaxParameter_default_instance_;
PROTOBUF_CONSTEXPR TanHParameter::TanHParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.engine_)*/0} {}
struct TanHParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TanHParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TanHParameterDefaultTypeInternal() {}
  union {
    TanHParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TanHParameterDefaultTypeInternal _TanHParameter_default_instance_;
PROTOBUF_CONSTEXPR TileParameter::TileParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.tiles_)*/0
  , /*decltype(_impl_.axis_)*/1} {}
struct TileParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR TileParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~TileParameterDefaultTypeInternal() {}
  union {
    TileParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TileParameterDefaultTypeInternal _TileParameter_default_instance_;
PROTOBUF_CONSTEXPR ThresholdParameter::ThresholdParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.threshold_)*/0} {}
struct ThresholdParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ThresholdParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ThresholdParameterDefaultTypeInternal() {}
  union {
    ThresholdParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ThresholdParameterDefaultTypeInternal _ThresholdParameter_default_instance_;
PROTOBUF_CONSTEXPR WindowDataParameter::WindowDataParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.source_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.mean_file_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.crop_mode_)*/{nullptr, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.root_folder_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.batch_size_)*/0u
  , /*decltype(_impl_.crop_size_)*/0u
  , /*decltype(_impl_.mirror_)*/false
  , /*decltype(_impl_.cache_images_)*/false
  , /*decltype(_impl_.context_pad_)*/0u
  , /*decltype(_impl_.scale_)*/1
  , /*decltype(_impl_.fg_threshold_)*/0.5f
  , /*decltype(_impl_.bg_threshold_)*/0.5f
  , /*decltype(_impl_.fg_fraction_)*/0.25f} {}
struct WindowDataParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR WindowDataParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~WindowDataParameterDefaultTypeInternal() {}
  union {
    WindowDataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 WindowDataParameterDefaultTypeInternal _WindowDataParameter_default_instance_;
PROTOBUF_CONSTEXPR SPPParameter::SPPParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.pyramid_height_)*/0u
  , /*decltype(_impl_.pool_)*/0
  , /*decltype(_impl_.engine_)*/0} {}
struct SPPParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SPPParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SPPParameterDefaultTypeInternal() {}
  union {
    SPPParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SPPParameterDefaultTypeInternal _SPPParameter_default_instance_;
PROTOBUF_CONSTEXPR V1LayerParameter::V1LayerParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.bottom_)*/{}
  , /*decltype(_impl_.top_)*/{}
  , /*decltype(_impl_.blobs_)*/{}
  , /*decltype(_impl_.blobs_lr_)*/{}
  , /*decltype(_impl_.weight_decay_)*/{}
  , /*decltype(_impl_.include_)*/{}
  , /*decltype(_impl_.exclude_)*/{}
  , /*decltype(_impl_.loss_weight_)*/{}
  , /*decltype(_impl_.param_)*/{}
  , /*decltype(_impl_.blob_share_mode_)*/{}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.layer_)*/nullptr
  , /*decltype(_impl_.concat_param_)*/nullptr
  , /*decltype(_impl_.convolution_param_)*/nullptr
  , /*decltype(_impl_.data_param_)*/nullptr
  , /*decltype(_impl_.dropout_param_)*/nullptr
  , /*decltype(_impl_.hdf5_data_param_)*/nullptr
  , /*decltype(_impl_.hdf5_output_param_)*/nullptr
  , /*decltype(_impl_.image_data_param_)*/nullptr
  , /*decltype(_impl_.infogain_loss_param_)*/nullptr
  , /*decltype(_impl_.inner_product_param_)*/nullptr
  , /*decltype(_impl_.lrn_param_)*/nullptr
  , /*decltype(_impl_.pooling_param_)*/nullptr
  , /*decltype(_impl_.window_data_param_)*/nullptr
  , /*decltype(_impl_.power_param_)*/nullptr
  , /*decltype(_impl_.memory_data_param_)*/nullptr
  , /*decltype(_impl_.argmax_param_)*/nullptr
  , /*decltype(_impl_.eltwise_param_)*/nullptr
  , /*decltype(_impl_.threshold_param_)*/nullptr
  , /*decltype(_impl_.dummy_data_param_)*/nullptr
  , /*decltype(_impl_.accuracy_param_)*/nullptr
  , /*decltype(_impl_.hinge_loss_param_)*/nullptr
  , /*decltype(_impl_.relu_param_)*/nullptr
  , /*decltype(_impl_.slice_param_)*/nullptr
  , /*decltype(_impl_.mvn_param_)*/nullptr
  , /*decltype(_impl_.transform_param_)*/nullptr
  , /*decltype(_impl_.tanh_param_)*/nullptr
  , /*decltype(_impl_.sigmoid_param_)*/nullptr
  , /*decltype(_impl_.softmax_param_)*/nullptr
  , /*decltype(_impl_.contrastive_loss_param_)*/nullptr
  , /*decltype(_impl_.exp_param_)*/nullptr
  , /*decltype(_impl_.loss_param_)*/nullptr
  , /*decltype(_impl_.type_)*/0} {}
struct V1LayerParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR V1LayerParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~V1LayerParameterDefaultTypeInternal() {}
  union {
    V1LayerParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 V1LayerParameterDefaultTypeInternal _V1LayerParameter_default_instance_;
PROTOBUF_CONSTEXPR V0LayerParameter::V0LayerParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.blobs_)*/{}
  , /*decltype(_impl_.blobs_lr_)*/{}
  , /*decltype(_impl_.weight_decay_)*/{}
  , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.source_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.meanfile_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.det_crop_mode_)*/{nullptr, ::_pbi::ConstantInitialized{}}
  , /*decltype(_impl_.weight_filler_)*/nullptr
  , /*decltype(_impl_.bias_filler_)*/nullptr
  , /*decltype(_impl_.hdf5_output_param_)*/nullptr
  , /*decltype(_impl_.num_output_)*/0u
  , /*decltype(_impl_.pad_)*/0u
  , /*decltype(_impl_.kernelsize_)*/0u
  , /*decltype(_impl_.pool_)*/0
  , /*decltype(_impl_.batchsize_)*/0u
  , /*decltype(_impl_.cropsize_)*/0u
  , /*decltype(_impl_.mirror_)*/false
  , /*decltype(_impl_.shuffle_images_)*/false
  , /*decltype(_impl_.rand_skip_)*/0u
  , /*decltype(_impl_.det_context_pad_)*/0u
  , /*decltype(_impl_.new_num_)*/0
  , /*decltype(_impl_.new_channels_)*/0
  , /*decltype(_impl_.new_height_)*/0
  , /*decltype(_impl_.new_width_)*/0
  , /*decltype(_impl_.concat_dim_)*/1u
  , /*decltype(_impl_.biasterm_)*/true
  , /*decltype(_impl_.group_)*/1u
  , /*decltype(_impl_.stride_)*/1u
  , /*decltype(_impl_.dropout_ratio_)*/0.5f
  , /*decltype(_impl_.local_size_)*/5u
  , /*decltype(_impl_.alpha_)*/1
  , /*decltype(_impl_.beta_)*/0.75f
  , /*decltype(_impl_.scale_)*/1
  , /*decltype(_impl_.k_)*/1
  , /*decltype(_impl_.det_fg_threshold_)*/0.5f
  , /*decltype(_impl_.det_bg_threshold_)*/0.5f
  , /*decltype(_impl_.det_fg_fraction_)*/0.25f} {}
struct V0LayerParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR V0LayerParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~V0LayerParameterDefaultTypeInternal() {}
  union {
    V0LayerParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 V0LayerParameterDefaultTypeInternal _V0LayerParameter_default_instance_;
PROTOBUF_CONSTEXPR PReLUParameter::PReLUParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.filler_)*/nullptr
  , /*decltype(_impl_.channel_shared_)*/false} {}
struct PReLUParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PReLUParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~PReLUParameterDefaultTypeInternal() {}
  union {
    PReLUParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PReLUParameterDefaultTypeInternal _PReLUParameter_default_instance_;
PROTOBUF_CONSTEXPR NormalizedBBox::NormalizedBBox(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.xmin_)*/0
  , /*decltype(_impl_.ymin_)*/0
  , /*decltype(_impl_.xmax_)*/0
  , /*decltype(_impl_.ymax_)*/0
  , /*decltype(_impl_.label_)*/0
  , /*decltype(_impl_.difficult_)*/false
  , /*decltype(_impl_.score_)*/0
  , /*decltype(_impl_.size_)*/0} {}
struct NormalizedBBoxDefaultTypeInternal {
  PROTOBUF_CONSTEXPR NormalizedBBoxDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~NormalizedBBoxDefaultTypeInternal() {}
  union {
    NormalizedBBox _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NormalizedBBoxDefaultTypeInternal _NormalizedBBox_default_instance_;
PROTOBUF_CONSTEXPR ROIPoolingParameter::ROIPoolingParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.pooled_h_)*/0u
  , /*decltype(_impl_.pooled_w_)*/0u
  , /*decltype(_impl_.spatial_scale_)*/1} {}
struct ROIPoolingParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ROIPoolingParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ROIPoolingParameterDefaultTypeInternal() {}
  union {
    ROIPoolingParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ROIPoolingParameterDefaultTypeInternal _ROIPoolingParameter_default_instance_;
PROTOBUF_CONSTEXPR ProposalParameter::ProposalParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.ratio_)*/{}
  , /*decltype(_impl_.scale_)*/{}
  , /*decltype(_impl_.feat_stride_)*/16u
  , /*decltype(_impl_.base_size_)*/16u
  , /*decltype(_impl_.min_size_)*/16u
  , /*decltype(_impl_.pre_nms_topn_)*/6000u
  , /*decltype(_impl_.post_nms_topn_)*/300u
  , /*decltype(_impl_.nms_thresh_)*/0.7f} {}
struct ProposalParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR ProposalParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~ProposalParameterDefaultTypeInternal() {}
  union {
    ProposalParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProposalParameterDefaultTypeInternal _ProposalParameter_default_instance_;
PROTOBUF_CONSTEXPR PSROIPoolingParameter::PSROIPoolingParameter(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.spatial_scale_)*/0
  , /*decltype(_impl_.output_dim_)*/0
  , /*decltype(_impl_.group_size_)*/0} {}
struct PSROIPoolingParameterDefaultTypeInternal {
  PROTOBUF_CONSTEXPR PSROIPoolingParameterDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~PSROIPoolingParameterDefaultTypeInternal() {}
  union {
    PSROIPoolingParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PSROIPoolingParameterDefaultTypeInternal _PSROIPoolingParameter_default_instance_;
}  // namespace opencv_caffe
static ::_pb::Metadata file_level_metadata_opencv_2dcaffe_2eproto[71];
static const ::_pb::EnumDescriptor* file_level_enum_descriptors_opencv_2dcaffe_2eproto[27];
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_opencv_2dcaffe_2eproto = nullptr;

const uint32_t TableStruct_opencv_2dcaffe_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobShape, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobShape, _impl_.dim_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.shape_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.data_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.diff_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.double_data_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.double_diff_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.raw_data_type_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.raw_data_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.num_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.channels_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.height_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _impl_.width_),
  1,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  6,
  0,
  2,
  3,
  4,
  5,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProtoVector, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProtoVector, _impl_.blobs_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PermuteParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PermuteParameter, _impl_.order_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, _impl_.across_spatial_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, _impl_.scale_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, _impl_.channel_shared_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, _impl_.eps_),
  1,
  0,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.min_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.max_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.aspect_ratio_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.flip_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.clip_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.variance_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.img_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.img_h_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.img_w_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.step_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.step_h_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.step_w_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.offset_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.offset_h_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.offset_w_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.width_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _impl_.height_),
  ~0u,
  ~0u,
  ~0u,
  6,
  7,
  ~0u,
  0,
  1,
  2,
  3,
  4,
  5,
  8,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.num_classes_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.share_location_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.background_label_id_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.nms_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.save_output_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.code_type_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.variance_encoded_in_target_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.keep_top_k_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.confidence_threshold_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.normalized_bbox_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _impl_.clip_),
  2,
  9,
  3,
  0,
  1,
  8,
  5,
  7,
  4,
  10,
  6,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _impl_.channels_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _impl_.height_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _impl_.width_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _impl_.data_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _impl_.label_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _impl_.float_data_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _impl_.encoded_),
  1,
  2,
  3,
  0,
  4,
  ~0u,
  5,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _impl_.type_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _impl_.value_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _impl_.min_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _impl_.max_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _impl_.mean_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _impl_.std_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _impl_.sparse_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _impl_.variance_norm_),
  0,
  1,
  2,
  6,
  3,
  7,
  5,
  4,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _impl_.input_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _impl_.input_shape_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _impl_.input_dim_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _impl_.force_backward_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _impl_.state_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _impl_.debug_info_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _impl_.layer_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _impl_.layers_),
  0,
  ~0u,
  ~0u,
  ~0u,
  2,
  1,
  3,
  ~0u,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.net_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.net_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.train_net_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.test_net_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.train_net_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.test_net_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.train_state_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.test_state_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.test_iter_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.test_interval_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.test_compute_loss_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.test_initialization_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.base_lr_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.display_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.average_loss_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.max_iter_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.iter_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.lr_policy_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.gamma_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.power_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.momentum_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.weight_decay_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.regularization_type_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.stepsize_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.stepvalue_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.clip_gradients_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.snapshot_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.snapshot_prefix_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.snapshot_diff_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.snapshot_format_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.solver_mode_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.device_id_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.random_seed_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.type_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.delta_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.momentum2_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.rms_decay_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.debug_info_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.snapshot_after_train_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _impl_.solver_type_),
  3,
  7,
  0,
  ~0u,
  6,
  ~0u,
  8,
  ~0u,
  ~0u,
  9,
  20,
  27,
  10,
  11,
  30,
  12,
  32,
  1,
  13,
  14,
  15,
  16,
  4,
  17,
  ~0u,
  31,
  18,
  2,
  21,
  33,
  26,
  19,
  25,
  5,
  29,
  24,
  34,
  22,
  28,
  23,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, _impl_.iter_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, _impl_.learned_net_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, _impl_.history_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, _impl_.current_step_),
  1,
  0,
  ~0u,
  2,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetState, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetState, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetState, _impl_.phase_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetState, _impl_.level_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetState, _impl_.stage_),
  1,
  0,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, _impl_.phase_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, _impl_.min_level_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, _impl_.max_level_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, _impl_.stage_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, _impl_.not_stage_),
  0,
  1,
  2,
  ~0u,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, _impl_.share_mode_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, _impl_.lr_mult_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, _impl_.decay_mult_),
  0,
  1,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.type_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.bottom_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.top_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.phase_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.loss_weight_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.blobs_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.propagate_down_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.include_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.exclude_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.transform_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.loss_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.accuracy_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.argmax_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.batch_norm_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.bias_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.concat_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.contrastive_loss_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.convolution_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.crop_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.detection_output_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.dropout_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.dummy_data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.eltwise_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.elu_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.embed_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.exp_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.flatten_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.hdf5_data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.hdf5_output_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.hinge_loss_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.image_data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.infogain_loss_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.inner_product_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.input_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.log_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.lrn_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.memory_data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.mvn_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.norm_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.permute_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.parameter_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.pooling_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.power_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.prelu_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.prior_box_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.proposal_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.psroi_pooling_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.python_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.recurrent_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.reduction_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.relu_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.reshape_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.roi_pooling_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.scale_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.sigmoid_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.softmax_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.spp_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.slice_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.tanh_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.threshold_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.tile_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _impl_.window_data_param_),
  0,
  1,
  ~0u,
  ~0u,
  56,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  2,
  3,
  4,
  5,
  41,
  43,
  6,
  7,
  8,
  46,
  9,
  49,
  10,
  11,
  12,
  42,
  39,
  13,
  37,
  14,
  15,
  16,
  17,
  18,
  19,
  45,
  36,
  20,
  21,
  22,
  51,
  50,
  47,
  23,
  24,
  33,
  52,
  53,
  54,
  32,
  48,
  38,
  25,
  35,
  55,
  44,
  26,
  27,
  34,
  28,
  29,
  30,
  40,
  31,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _impl_.scale_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _impl_.mirror_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _impl_.crop_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _impl_.mean_file_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _impl_.mean_value_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _impl_.force_color_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _impl_.force_gray_),
  5,
  2,
  1,
  0,
  ~0u,
  3,
  4,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LossParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LossParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LossParameter, _impl_.ignore_label_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LossParameter, _impl_.normalization_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LossParameter, _impl_.normalize_),
  0,
  2,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::AccuracyParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::AccuracyParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::AccuracyParameter, _impl_.top_k_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::AccuracyParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::AccuracyParameter, _impl_.ignore_label_),
  1,
  2,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ArgMaxParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ArgMaxParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ArgMaxParameter, _impl_.out_max_val_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ArgMaxParameter, _impl_.top_k_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ArgMaxParameter, _impl_.axis_),
  0,
  2,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConcatParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConcatParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConcatParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConcatParameter, _impl_.concat_dim_),
  1,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, _impl_.use_global_stats_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, _impl_.moving_average_fraction_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, _impl_.eps_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, _impl_.scale_bias_),
  0,
  2,
  3,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BiasParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BiasParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BiasParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BiasParameter, _impl_.num_axes_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::BiasParameter, _impl_.filler_),
  1,
  2,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ContrastiveLossParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ContrastiveLossParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ContrastiveLossParameter, _impl_.margin_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ContrastiveLossParameter, _impl_.legacy_version_),
  1,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.num_output_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.bias_term_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.pad_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.kernel_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.stride_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.dilation_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.pad_h_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.pad_w_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.kernel_h_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.kernel_w_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.stride_h_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.stride_w_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.group_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.weight_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.bias_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.engine_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _impl_.force_nd_im2col_),
  2,
  12,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  3,
  4,
  5,
  6,
  7,
  8,
  13,
  0,
  1,
  9,
  11,
  10,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::CropParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::CropParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::CropParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::CropParameter, _impl_.offset_),
  0,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_.source_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_.batch_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_.rand_skip_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_.backend_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_.scale_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_.mean_file_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_.crop_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_.mirror_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_.force_encoded_color_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _impl_.prefetch_),
  0,
  2,
  4,
  7,
  8,
  1,
  3,
  5,
  6,
  9,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NonMaximumSuppressionParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NonMaximumSuppressionParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NonMaximumSuppressionParameter, _impl_.nms_threshold_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NonMaximumSuppressionParameter, _impl_.top_k_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NonMaximumSuppressionParameter, _impl_.eta_),
  1,
  0,
  2,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, _impl_.output_directory_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, _impl_.output_name_prefix_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, _impl_.output_format_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, _impl_.label_map_file_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, _impl_.name_size_file_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, _impl_.num_test_image_),
  0,
  1,
  2,
  3,
  4,
  5,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DropoutParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DropoutParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DropoutParameter, _impl_.dropout_ratio_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DropoutParameter, _impl_.scale_train_),
  0,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, _impl_.data_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, _impl_.shape_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, _impl_.num_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, _impl_.channels_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, _impl_.height_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, _impl_.width_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EltwiseParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EltwiseParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EltwiseParameter, _impl_.operation_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EltwiseParameter, _impl_.coeff_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EltwiseParameter, _impl_.stable_prod_grad_),
  0,
  ~0u,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ELUParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ELUParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ELUParameter, _impl_.alpha_),
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, _impl_.num_output_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, _impl_.input_dim_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, _impl_.bias_term_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, _impl_.weight_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, _impl_.bias_filler_),
  2,
  3,
  4,
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ExpParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ExpParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ExpParameter, _impl_.base_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ExpParameter, _impl_.scale_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ExpParameter, _impl_.shift_),
  1,
  2,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FlattenParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FlattenParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FlattenParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::FlattenParameter, _impl_.end_axis_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5DataParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5DataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5DataParameter, _impl_.source_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5DataParameter, _impl_.batch_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5DataParameter, _impl_.shuffle_),
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5OutputParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5OutputParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5OutputParameter, _impl_.file_name_),
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HingeLossParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HingeLossParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::HingeLossParameter, _impl_.norm_),
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.source_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.batch_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.rand_skip_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.shuffle_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.new_height_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.new_width_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.is_color_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.scale_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.mean_file_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.crop_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.mirror_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _impl_.root_folder_),
  0,
  11,
  4,
  5,
  7,
  8,
  9,
  10,
  1,
  3,
  6,
  2,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InfogainLossParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InfogainLossParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InfogainLossParameter, _impl_.source_),
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, _impl_.num_output_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, _impl_.bias_term_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, _impl_.weight_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, _impl_.bias_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, _impl_.transpose_),
  2,
  4,
  0,
  1,
  5,
  3,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InputParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::InputParameter, _impl_.shape_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LogParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LogParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LogParameter, _impl_.base_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LogParameter, _impl_.scale_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LogParameter, _impl_.shift_),
  1,
  2,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, _impl_.local_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, _impl_.alpha_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, _impl_.beta_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, _impl_.norm_region_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, _impl_.k_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, _impl_.engine_),
  2,
  3,
  4,
  0,
  5,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, _impl_.batch_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, _impl_.channels_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, _impl_.height_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, _impl_.width_),
  0,
  1,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MVNParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MVNParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MVNParameter, _impl_.normalize_variance_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MVNParameter, _impl_.across_channels_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::MVNParameter, _impl_.eps_),
  1,
  0,
  2,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParameterParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParameterParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParameterParameter, _impl_.shape_),
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.pool_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.pad_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.pad_h_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.pad_w_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.kernel_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.kernel_h_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.kernel_w_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.stride_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.stride_h_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.stride_w_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.engine_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.global_pooling_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _impl_.ceil_mode_),
  0,
  2,
  7,
  8,
  1,
  3,
  4,
  11,
  5,
  6,
  9,
  10,
  12,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PowerParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PowerParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PowerParameter, _impl_.power_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PowerParameter, _impl_.scale_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PowerParameter, _impl_.shift_),
  1,
  2,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, _impl_.module_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, _impl_.layer_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, _impl_.param_str_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, _impl_.share_in_parallel_),
  0,
  1,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, _impl_.num_output_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, _impl_.weight_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, _impl_.bias_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, _impl_.debug_info_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, _impl_.expose_hidden_),
  2,
  0,
  1,
  3,
  4,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReductionParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReductionParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReductionParameter, _impl_.operation_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReductionParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReductionParameter, _impl_.coeff_),
  1,
  0,
  2,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReLUParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReLUParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReLUParameter, _impl_.negative_slope_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReLUParameter, _impl_.engine_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReshapeParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReshapeParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReshapeParameter, _impl_.shape_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReshapeParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReshapeParameter, _impl_.num_axes_),
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, _impl_.num_axes_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, _impl_.filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, _impl_.bias_term_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, _impl_.bias_filler_),
  3,
  4,
  0,
  2,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SigmoidParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SigmoidParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SigmoidParameter, _impl_.engine_),
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SliceParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SliceParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SliceParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SliceParameter, _impl_.slice_point_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SliceParameter, _impl_.slice_dim_),
  1,
  ~0u,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SoftmaxParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SoftmaxParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SoftmaxParameter, _impl_.engine_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SoftmaxParameter, _impl_.axis_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TanHParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TanHParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TanHParameter, _impl_.engine_),
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TileParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TileParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TileParameter, _impl_.axis_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::TileParameter, _impl_.tiles_),
  1,
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ThresholdParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ThresholdParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ThresholdParameter, _impl_.threshold_),
  0,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.source_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.scale_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.mean_file_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.batch_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.crop_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.mirror_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.fg_threshold_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.bg_threshold_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.fg_fraction_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.context_pad_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.crop_mode_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.cache_images_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _impl_.root_folder_),
  0,
  9,
  1,
  4,
  5,
  6,
  10,
  11,
  12,
  8,
  2,
  7,
  3,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SPPParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SPPParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SPPParameter, _impl_.pyramid_height_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SPPParameter, _impl_.pool_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::SPPParameter, _impl_.engine_),
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.bottom_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.top_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.include_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.exclude_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.type_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.blobs_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.blob_share_mode_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.blobs_lr_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.weight_decay_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.loss_weight_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.accuracy_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.argmax_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.concat_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.contrastive_loss_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.convolution_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.dropout_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.dummy_data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.eltwise_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.exp_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.hdf5_data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.hdf5_output_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.hinge_loss_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.image_data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.infogain_loss_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.inner_product_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.lrn_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.memory_data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.mvn_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.pooling_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.power_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.relu_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.sigmoid_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.softmax_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.slice_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.tanh_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.threshold_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.window_data_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.transform_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.loss_param_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _impl_.layer_),
  ~0u,
  ~0u,
  0,
  ~0u,
  ~0u,
  32,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  20,
  16,
  2,
  29,
  3,
  4,
  5,
  19,
  17,
  30,
  6,
  7,
  21,
  8,
  9,
  10,
  11,
  15,
  24,
  12,
  14,
  22,
  27,
  28,
  23,
  26,
  18,
  13,
  25,
  31,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.name_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.type_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.num_output_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.biasterm_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.weight_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.bias_filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.pad_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.kernelsize_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.group_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.stride_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.pool_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.dropout_ratio_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.local_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.alpha_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.beta_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.k_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.source_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.scale_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.meanfile_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.batchsize_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.cropsize_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.mirror_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.blobs_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.blobs_lr_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.weight_decay_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.rand_skip_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.det_fg_threshold_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.det_bg_threshold_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.det_fg_fraction_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.det_context_pad_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.det_crop_mode_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.new_num_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.new_channels_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.new_height_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.new_width_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.shuffle_images_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.concat_dim_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _impl_.hdf5_output_param_),
  0,
  1,
  8,
  23,
  5,
  6,
  9,
  10,
  24,
  25,
  11,
  26,
  27,
  28,
  29,
  31,
  2,
  30,
  3,
  12,
  13,
  14,
  ~0u,
  ~0u,
  ~0u,
  16,
  32,
  33,
  34,
  17,
  4,
  18,
  19,
  20,
  21,
  15,
  22,
  7,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PReLUParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PReLUParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PReLUParameter, _impl_.filler_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PReLUParameter, _impl_.channel_shared_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _impl_.xmin_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _impl_.ymin_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _impl_.xmax_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _impl_.ymax_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _impl_.label_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _impl_.difficult_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _impl_.score_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _impl_.size_),
  0,
  1,
  2,
  3,
  4,
  5,
  6,
  7,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ROIPoolingParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ROIPoolingParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ROIPoolingParameter, _impl_.pooled_h_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ROIPoolingParameter, _impl_.pooled_w_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ROIPoolingParameter, _impl_.spatial_scale_),
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _impl_.feat_stride_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _impl_.base_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _impl_.min_size_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _impl_.ratio_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _impl_.scale_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _impl_.pre_nms_topn_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _impl_.post_nms_topn_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _impl_.nms_thresh_),
  0,
  1,
  2,
  ~0u,
  ~0u,
  3,
  4,
  5,
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PSROIPoolingParameter, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PSROIPoolingParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PSROIPoolingParameter, _impl_.spatial_scale_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PSROIPoolingParameter, _impl_.output_dim_),
  PROTOBUF_FIELD_OFFSET(::opencv_caffe::PSROIPoolingParameter, _impl_.group_size_),
  0,
  1,
  2,
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::opencv_caffe::BlobShape)},
  { 7, 24, -1, sizeof(::opencv_caffe::BlobProto)},
  { 35, -1, -1, sizeof(::opencv_caffe::BlobProtoVector)},
  { 42, -1, -1, sizeof(::opencv_caffe::PermuteParameter)},
  { 49, 59, -1, sizeof(::opencv_caffe::NormalizeBBoxParameter)},
  { 63, 86, -1, sizeof(::opencv_caffe::PriorBoxParameter)},
  { 103, 120, -1, sizeof(::opencv_caffe::DetectionOutputParameter)},
  { 131, 144, -1, sizeof(::opencv_caffe::Datum)},
  { 151, 165, -1, sizeof(::opencv_caffe::FillerParameter)},
  { 173, 188, -1, sizeof(::opencv_caffe::NetParameter)},
  { 197, 243, -1, sizeof(::opencv_caffe::SolverParameter)},
  { 283, 293, -1, sizeof(::opencv_caffe::SolverState)},
  { 297, 306, -1, sizeof(::opencv_caffe::NetState)},
  { 309, 320, -1, sizeof(::opencv_caffe::NetStateRule)},
  { 325, 335, -1, sizeof(::opencv_caffe::ParamSpec)},
  { 339, 410, -1, sizeof(::opencv_caffe::LayerParameter)},
  { 475, 488, -1, sizeof(::opencv_caffe::TransformationParameter)},
  { 495, 504, -1, sizeof(::opencv_caffe::LossParameter)},
  { 507, 516, -1, sizeof(::opencv_caffe::AccuracyParameter)},
  { 519, 528, -1, sizeof(::opencv_caffe::ArgMaxParameter)},
  { 531, 539, -1, sizeof(::opencv_caffe::ConcatParameter)},
  { 541, 551, -1, sizeof(::opencv_caffe::BatchNormParameter)},
  { 555, 564, -1, sizeof(::opencv_caffe::BiasParameter)},
  { 567, 575, -1, sizeof(::opencv_caffe::ContrastiveLossParameter)},
  { 577, 601, -1, sizeof(::opencv_caffe::ConvolutionParameter)},
  { 619, 627, -1, sizeof(::opencv_caffe::CropParameter)},
  { 629, 645, -1, sizeof(::opencv_caffe::DataParameter)},
  { 655, 664, -1, sizeof(::opencv_caffe::NonMaximumSuppressionParameter)},
  { 667, 679, -1, sizeof(::opencv_caffe::SaveOutputParameter)},
  { 685, 693, -1, sizeof(::opencv_caffe::DropoutParameter)},
  { 695, -1, -1, sizeof(::opencv_caffe::DummyDataParameter)},
  { 707, 716, -1, sizeof(::opencv_caffe::EltwiseParameter)},
  { 719, 726, -1, sizeof(::opencv_caffe::ELUParameter)},
  { 727, 738, -1, sizeof(::opencv_caffe::EmbedParameter)},
  { 743, 752, -1, sizeof(::opencv_caffe::ExpParameter)},
  { 755, 763, -1, sizeof(::opencv_caffe::FlattenParameter)},
  { 765, 774, -1, sizeof(::opencv_caffe::HDF5DataParameter)},
  { 777, 784, -1, sizeof(::opencv_caffe::HDF5OutputParameter)},
  { 785, 792, -1, sizeof(::opencv_caffe::HingeLossParameter)},
  { 793, 811, -1, sizeof(::opencv_caffe::ImageDataParameter)},
  { 823, 830, -1, sizeof(::opencv_caffe::InfogainLossParameter)},
  { 831, 843, -1, sizeof(::opencv_caffe::InnerProductParameter)},
  { 849, -1, -1, sizeof(::opencv_caffe::InputParameter)},
  { 856, 865, -1, sizeof(::opencv_caffe::LogParameter)},
  { 868, 880, -1, sizeof(::opencv_caffe::LRNParameter)},
  { 886, 896, -1, sizeof(::opencv_caffe::MemoryDataParameter)},
  { 900, 909, -1, sizeof(::opencv_caffe::MVNParameter)},
  { 912, 919, -1, sizeof(::opencv_caffe::ParameterParameter)},
  { 920, 939, -1, sizeof(::opencv_caffe::PoolingParameter)},
  { 952, 961, -1, sizeof(::opencv_caffe::PowerParameter)},
  { 964, 974, -1, sizeof(::opencv_caffe::PythonParameter)},
  { 978, 989, -1, sizeof(::opencv_caffe::RecurrentParameter)},
  { 994, 1003, -1, sizeof(::opencv_caffe::ReductionParameter)},
  { 1006, 1014, -1, sizeof(::opencv_caffe::ReLUParameter)},
  { 1016, 1025, -1, sizeof(::opencv_caffe::ReshapeParameter)},
  { 1028, 1039, -1, sizeof(::opencv_caffe::ScaleParameter)},
  { 1044, 1051, -1, sizeof(::opencv_caffe::SigmoidParameter)},
  { 1052, 1061, -1, sizeof(::opencv_caffe::SliceParameter)},
  { 1064, 1072, -1, sizeof(::opencv_caffe::SoftmaxParameter)},
  { 1074, 1081, -1, sizeof(::opencv_caffe::TanHParameter)},
  { 1082, 1090, -1, sizeof(::opencv_caffe::TileParameter)},
  { 1092, 1099, -1, sizeof(::opencv_caffe::ThresholdParameter)},
  { 1100, 1119, -1, sizeof(::opencv_caffe::WindowDataParameter)},
  { 1132, 1141, -1, sizeof(::opencv_caffe::SPPParameter)},
  { 1144, 1193, -1, sizeof(::opencv_caffe::V1LayerParameter)},
  { 1236, 1280, -1, sizeof(::opencv_caffe::V0LayerParameter)},
  { 1318, 1326, -1, sizeof(::opencv_caffe::PReLUParameter)},
  { 1328, 1342, -1, sizeof(::opencv_caffe::NormalizedBBox)},
  { 1350, 1359, -1, sizeof(::opencv_caffe::ROIPoolingParameter)},
  { 1362, 1376, -1, sizeof(::opencv_caffe::ProposalParameter)},
  { 1384, 1393, -1, sizeof(::opencv_caffe::PSROIPoolingParameter)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::opencv_caffe::_BlobShape_default_instance_._instance,
  &::opencv_caffe::_BlobProto_default_instance_._instance,
  &::opencv_caffe::_BlobProtoVector_default_instance_._instance,
  &::opencv_caffe::_PermuteParameter_default_instance_._instance,
  &::opencv_caffe::_NormalizeBBoxParameter_default_instance_._instance,
  &::opencv_caffe::_PriorBoxParameter_default_instance_._instance,
  &::opencv_caffe::_DetectionOutputParameter_default_instance_._instance,
  &::opencv_caffe::_Datum_default_instance_._instance,
  &::opencv_caffe::_FillerParameter_default_instance_._instance,
  &::opencv_caffe::_NetParameter_default_instance_._instance,
  &::opencv_caffe::_SolverParameter_default_instance_._instance,
  &::opencv_caffe::_SolverState_default_instance_._instance,
  &::opencv_caffe::_NetState_default_instance_._instance,
  &::opencv_caffe::_NetStateRule_default_instance_._instance,
  &::opencv_caffe::_ParamSpec_default_instance_._instance,
  &::opencv_caffe::_LayerParameter_default_instance_._instance,
  &::opencv_caffe::_TransformationParameter_default_instance_._instance,
  &::opencv_caffe::_LossParameter_default_instance_._instance,
  &::opencv_caffe::_AccuracyParameter_default_instance_._instance,
  &::opencv_caffe::_ArgMaxParameter_default_instance_._instance,
  &::opencv_caffe::_ConcatParameter_default_instance_._instance,
  &::opencv_caffe::_BatchNormParameter_default_instance_._instance,
  &::opencv_caffe::_BiasParameter_default_instance_._instance,
  &::opencv_caffe::_ContrastiveLossParameter_default_instance_._instance,
  &::opencv_caffe::_ConvolutionParameter_default_instance_._instance,
  &::opencv_caffe::_CropParameter_default_instance_._instance,
  &::opencv_caffe::_DataParameter_default_instance_._instance,
  &::opencv_caffe::_NonMaximumSuppressionParameter_default_instance_._instance,
  &::opencv_caffe::_SaveOutputParameter_default_instance_._instance,
  &::opencv_caffe::_DropoutParameter_default_instance_._instance,
  &::opencv_caffe::_DummyDataParameter_default_instance_._instance,
  &::opencv_caffe::_EltwiseParameter_default_instance_._instance,
  &::opencv_caffe::_ELUParameter_default_instance_._instance,
  &::opencv_caffe::_EmbedParameter_default_instance_._instance,
  &::opencv_caffe::_ExpParameter_default_instance_._instance,
  &::opencv_caffe::_FlattenParameter_default_instance_._instance,
  &::opencv_caffe::_HDF5DataParameter_default_instance_._instance,
  &::opencv_caffe::_HDF5OutputParameter_default_instance_._instance,
  &::opencv_caffe::_HingeLossParameter_default_instance_._instance,
  &::opencv_caffe::_ImageDataParameter_default_instance_._instance,
  &::opencv_caffe::_InfogainLossParameter_default_instance_._instance,
  &::opencv_caffe::_InnerProductParameter_default_instance_._instance,
  &::opencv_caffe::_InputParameter_default_instance_._instance,
  &::opencv_caffe::_LogParameter_default_instance_._instance,
  &::opencv_caffe::_LRNParameter_default_instance_._instance,
  &::opencv_caffe::_MemoryDataParameter_default_instance_._instance,
  &::opencv_caffe::_MVNParameter_default_instance_._instance,
  &::opencv_caffe::_ParameterParameter_default_instance_._instance,
  &::opencv_caffe::_PoolingParameter_default_instance_._instance,
  &::opencv_caffe::_PowerParameter_default_instance_._instance,
  &::opencv_caffe::_PythonParameter_default_instance_._instance,
  &::opencv_caffe::_RecurrentParameter_default_instance_._instance,
  &::opencv_caffe::_ReductionParameter_default_instance_._instance,
  &::opencv_caffe::_ReLUParameter_default_instance_._instance,
  &::opencv_caffe::_ReshapeParameter_default_instance_._instance,
  &::opencv_caffe::_ScaleParameter_default_instance_._instance,
  &::opencv_caffe::_SigmoidParameter_default_instance_._instance,
  &::opencv_caffe::_SliceParameter_default_instance_._instance,
  &::opencv_caffe::_SoftmaxParameter_default_instance_._instance,
  &::opencv_caffe::_TanHParameter_default_instance_._instance,
  &::opencv_caffe::_TileParameter_default_instance_._instance,
  &::opencv_caffe::_ThresholdParameter_default_instance_._instance,
  &::opencv_caffe::_WindowDataParameter_default_instance_._instance,
  &::opencv_caffe::_SPPParameter_default_instance_._instance,
  &::opencv_caffe::_V1LayerParameter_default_instance_._instance,
  &::opencv_caffe::_V0LayerParameter_default_instance_._instance,
  &::opencv_caffe::_PReLUParameter_default_instance_._instance,
  &::opencv_caffe::_NormalizedBBox_default_instance_._instance,
  &::opencv_caffe::_ROIPoolingParameter_default_instance_._instance,
  &::opencv_caffe::_ProposalParameter_default_instance_._instance,
  &::opencv_caffe::_PSROIPoolingParameter_default_instance_._instance,
};

const char descriptor_table_protodef_opencv_2dcaffe_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\022opencv-caffe.proto\022\014opencv_caffe\"\034\n\tBl"
  "obShape\022\017\n\003dim\030\001 \003(\003B\002\020\001\"\224\002\n\tBlobProto\022&"
  "\n\005shape\030\007 \001(\0132\027.opencv_caffe.BlobShape\022\020"
  "\n\004data\030\005 \003(\002B\002\020\001\022\020\n\004diff\030\006 \003(\002B\002\020\001\022\027\n\013do"
  "uble_data\030\010 \003(\001B\002\020\001\022\027\n\013double_diff\030\t \003(\001"
  "B\002\020\001\022)\n\rraw_data_type\030\n \001(\0162\022.opencv_caf"
  "fe.Type\022\024\n\010raw_data\030\014 \001(\014B\002\020\000\022\016\n\003num\030\001 \001"
  "(\005:\0010\022\023\n\010channels\030\002 \001(\005:\0010\022\021\n\006height\030\003 \001"
  "(\005:\0010\022\020\n\005width\030\004 \001(\005:\0010\"9\n\017BlobProtoVect"
  "or\022&\n\005blobs\030\001 \003(\0132\027.opencv_caffe.BlobPro"
  "to\"!\n\020PermuteParameter\022\r\n\005order\030\001 \003(\r\"\235\001"
  "\n\026NormalizeBBoxParameter\022\034\n\016across_spati"
  "al\030\001 \001(\010:\004true\0223\n\014scale_filler\030\002 \001(\0132\035.o"
  "pencv_caffe.FillerParameter\022\034\n\016channel_s"
  "hared\030\003 \001(\010:\004true\022\022\n\003eps\030\004 \001(\002:\0051e-10\"\346\002"
  "\n\021PriorBoxParameter\022\020\n\010min_size\030\001 \003(\002\022\020\n"
  "\010max_size\030\002 \003(\002\022\024\n\014aspect_ratio\030\003 \003(\002\022\022\n"
  "\004flip\030\004 \001(\010:\004true\022\022\n\004clip\030\005 \001(\010:\004true\022\020\n"
  "\010variance\030\006 \003(\002\022\020\n\010img_size\030\007 \001(\r\022\r\n\005img"
  "_h\030\010 \001(\r\022\r\n\005img_w\030\t \001(\r\022\014\n\004step\030\n \001(\002\022\016\n"
  "\006step_h\030\013 \001(\002\022\016\n\006step_w\030\014 \001(\002\022\023\n\006offset\030"
  "\r \001(\002:\0030.5\022\020\n\010offset_h\030\016 \003(\002\022\020\n\010offset_w"
  "\030\017 \003(\002\022\r\n\005width\030\020 \003(\002\022\016\n\006height\030\021 \003(\002\"\'\n"
  "\010CodeType\022\n\n\006CORNER\020\001\022\017\n\013CENTER_SIZE\020\002\"\307"
  "\003\n\030DetectionOutputParameter\022\023\n\013num_class"
  "es\030\001 \001(\r\022\034\n\016share_location\030\002 \001(\010:\004true\022\036"
  "\n\023background_label_id\030\003 \001(\005:\0010\022\?\n\tnms_pa"
  "ram\030\004 \001(\0132,.opencv_caffe.NonMaximumSuppr"
  "essionParameter\022<\n\021save_output_param\030\005 \001"
  "(\0132!.opencv_caffe.SaveOutputParameter\022C\n"
  "\tcode_type\030\006 \001(\0162(.opencv_caffe.PriorBox"
  "Parameter.CodeType:\006CORNER\022)\n\032variance_e"
  "ncoded_in_target\030\010 \001(\010:\005false\022\026\n\nkeep_to"
  "p_k\030\007 \001(\005:\002-1\022\034\n\024confidence_threshold\030\t "
  "\001(\002\022\035\n\017normalized_bbox\030\n \001(\010:\004true\022\024\n\004cl"
  "ip\030\350\007 \001(\010:\005false\"\201\001\n\005Datum\022\020\n\010channels\030\001"
  " \001(\005\022\016\n\006height\030\002 \001(\005\022\r\n\005width\030\003 \001(\005\022\014\n\004d"
  "ata\030\004 \001(\014\022\r\n\005label\030\005 \001(\005\022\022\n\nfloat_data\030\006"
  " \003(\002\022\026\n\007encoded\030\007 \001(\010:\005false\"\221\002\n\017FillerP"
  "arameter\022\026\n\004type\030\001 \001(\t:\010constant\022\020\n\005valu"
  "e\030\002 \001(\002:\0010\022\016\n\003min\030\003 \001(\002:\0010\022\016\n\003max\030\004 \001(\002:"
  "\0011\022\017\n\004mean\030\005 \001(\002:\0010\022\016\n\003std\030\006 \001(\002:\0011\022\022\n\006s"
  "parse\030\007 \001(\005:\002-1\022I\n\rvariance_norm\030\010 \001(\0162*"
  ".opencv_caffe.FillerParameter.VarianceNo"
  "rm:\006FAN_IN\"4\n\014VarianceNorm\022\n\n\006FAN_IN\020\000\022\013"
  "\n\007FAN_OUT\020\001\022\013\n\007AVERAGE\020\002\"\252\002\n\014NetParamete"
  "r\022\014\n\004name\030\001 \001(\t\022\r\n\005input\030\003 \003(\t\022,\n\013input_"
  "shape\030\010 \003(\0132\027.opencv_caffe.BlobShape\022\021\n\t"
  "input_dim\030\004 \003(\005\022\035\n\016force_backward\030\005 \001(\010:"
  "\005false\022%\n\005state\030\006 \001(\0132\026.opencv_caffe.Net"
  "State\022\031\n\ndebug_info\030\007 \001(\010:\005false\022+\n\005laye"
  "r\030d \003(\0132\034.opencv_caffe.LayerParameter\022.\n"
  "\006layers\030\002 \003(\0132\036.opencv_caffe.V1LayerPara"
  "meter\"\332\n\n\017SolverParameter\022\013\n\003net\030\030 \001(\t\022-"
  "\n\tnet_param\030\031 \001(\0132\032.opencv_caffe.NetPara"
  "meter\022\021\n\ttrain_net\030\001 \001(\t\022\020\n\010test_net\030\002 \003"
  "(\t\0223\n\017train_net_param\030\025 \001(\0132\032.opencv_caf"
  "fe.NetParameter\0222\n\016test_net_param\030\026 \003(\0132"
  "\032.opencv_caffe.NetParameter\022+\n\013train_sta"
  "te\030\032 \001(\0132\026.opencv_caffe.NetState\022*\n\ntest"
  "_state\030\033 \003(\0132\026.opencv_caffe.NetState\022\021\n\t"
  "test_iter\030\003 \003(\005\022\030\n\rtest_interval\030\004 \001(\005:\001"
  "0\022 \n\021test_compute_loss\030\023 \001(\010:\005false\022!\n\023t"
  "est_initialization\030  \001(\010:\004true\022\017\n\007base_l"
  "r\030\005 \001(\002\022\017\n\007display\030\006 \001(\005\022\027\n\014average_loss"
  "\030! \001(\005:\0011\022\020\n\010max_iter\030\007 \001(\005\022\024\n\titer_size"
  "\030$ \001(\005:\0011\022\021\n\tlr_policy\030\010 \001(\t\022\r\n\005gamma\030\t "
  "\001(\002\022\r\n\005power\030\n \001(\002\022\020\n\010momentum\030\013 \001(\002\022\024\n\014"
  "weight_decay\030\014 \001(\002\022\037\n\023regularization_typ"
  "e\030\035 \001(\t:\002L2\022\020\n\010stepsize\030\r \001(\005\022\021\n\tstepval"
  "ue\030\" \003(\005\022\032\n\016clip_gradients\030# \001(\002:\002-1\022\023\n\010"
  "snapshot\030\016 \001(\005:\0010\022\027\n\017snapshot_prefix\030\017 \001"
  "(\t\022\034\n\rsnapshot_diff\030\020 \001(\010:\005false\022R\n\017snap"
  "shot_format\030% \001(\0162,.opencv_caffe.SolverP"
  "arameter.SnapshotFormat:\013BINARYPROTO\022B\n\013"
  "solver_mode\030\021 \001(\0162(.opencv_caffe.SolverP"
  "arameter.SolverMode:\003GPU\022\024\n\tdevice_id\030\022 "
  "\001(\005:\0010\022\027\n\013random_seed\030\024 \001(\003:\002-1\022\021\n\004type\030"
  "( \001(\t:\003SGD\022\024\n\005delta\030\037 \001(\002:\0051e-08\022\030\n\tmome"
  "ntum2\030\' \001(\002:\0050.999\022\027\n\trms_decay\030& \001(\002:\0040"
  ".99\022\031\n\ndebug_info\030\027 \001(\010:\005false\022\"\n\024snapsh"
  "ot_after_train\030\034 \001(\010:\004true\022B\n\013solver_typ"
  "e\030\036 \001(\0162(.opencv_caffe.SolverParameter.S"
  "olverType:\003SGD\"+\n\016SnapshotFormat\022\010\n\004HDF5"
  "\020\000\022\017\n\013BINARYPROTO\020\001\"\036\n\nSolverMode\022\007\n\003CPU"
  "\020\000\022\007\n\003GPU\020\001\"U\n\nSolverType\022\007\n\003SGD\020\000\022\014\n\010NE"
  "STEROV\020\001\022\013\n\007ADAGRAD\020\002\022\013\n\007RMSPROP\020\003\022\014\n\010AD"
  "ADELTA\020\004\022\010\n\004ADAM\020\005\"s\n\013SolverState\022\014\n\004ite"
  "r\030\001 \001(\005\022\023\n\013learned_net\030\002 \001(\t\022(\n\007history\030"
  "\003 \003(\0132\027.opencv_caffe.BlobProto\022\027\n\014curren"
  "t_step\030\004 \001(\005:\0010\"U\n\010NetState\022(\n\005phase\030\001 \001"
  "(\0162\023.opencv_caffe.Phase:\004TEST\022\020\n\005level\030\002"
  " \001(\005:\0010\022\r\n\005stage\030\003 \003(\t\"z\n\014NetStateRule\022\""
  "\n\005phase\030\001 \001(\0162\023.opencv_caffe.Phase\022\021\n\tmi"
  "n_level\030\002 \001(\005\022\021\n\tmax_level\030\003 \001(\005\022\r\n\005stag"
  "e\030\004 \003(\t\022\021\n\tnot_stage\030\005 \003(\t\"\252\001\n\tParamSpec"
  "\022\014\n\004name\030\001 \001(\t\0228\n\nshare_mode\030\002 \001(\0162$.ope"
  "ncv_caffe.ParamSpec.DimCheckMode\022\022\n\007lr_m"
  "ult\030\003 \001(\002:\0011\022\025\n\ndecay_mult\030\004 \001(\002:\0011\"*\n\014D"
  "imCheckMode\022\n\n\006STRICT\020\000\022\016\n\nPERMISSIVE\020\001\""
  "\243\032\n\016LayerParameter\022\014\n\004name\030\001 \001(\t\022\014\n\004type"
  "\030\002 \001(\t\022\016\n\006bottom\030\003 \003(\t\022\013\n\003top\030\004 \003(\t\022\"\n\005p"
  "hase\030\n \001(\0162\023.opencv_caffe.Phase\022\023\n\013loss_"
  "weight\030\005 \003(\002\022&\n\005param\030\006 \003(\0132\027.opencv_caf"
  "fe.ParamSpec\022&\n\005blobs\030\007 \003(\0132\027.opencv_caf"
  "fe.BlobProto\022\026\n\016propagate_down\030\013 \003(\010\022+\n\007"
  "include\030\010 \003(\0132\032.opencv_caffe.NetStateRul"
  "e\022+\n\007exclude\030\t \003(\0132\032.opencv_caffe.NetSta"
  "teRule\022>\n\017transform_param\030d \001(\0132%.opencv"
  "_caffe.TransformationParameter\022/\n\nloss_p"
  "aram\030e \001(\0132\033.opencv_caffe.LossParameter\022"
  "7\n\016accuracy_param\030f \001(\0132\037.opencv_caffe.A"
  "ccuracyParameter\0223\n\014argmax_param\030g \001(\0132\035"
  ".opencv_caffe.ArgMaxParameter\022;\n\020batch_n"
  "orm_param\030\213\001 \001(\0132 .opencv_caffe.BatchNor"
  "mParameter\0220\n\nbias_param\030\215\001 \001(\0132\033.opencv"
  "_caffe.BiasParameter\0223\n\014concat_param\030h \001"
  "(\0132\035.opencv_caffe.ConcatParameter\022F\n\026con"
  "trastive_loss_param\030i \001(\0132&.opencv_caffe"
  ".ContrastiveLossParameter\022=\n\021convolution"
  "_param\030j \001(\0132\".opencv_caffe.ConvolutionP"
  "arameter\0220\n\ncrop_param\030\220\001 \001(\0132\033.opencv_c"
  "affe.CropParameter\022/\n\ndata_param\030k \001(\0132\033"
  ".opencv_caffe.DataParameter\022G\n\026detection"
  "_output_param\030\223\001 \001(\0132&.opencv_caffe.Dete"
  "ctionOutputParameter\0225\n\rdropout_param\030l "
  "\001(\0132\036.opencv_caffe.DropoutParameter\022:\n\020d"
  "ummy_data_param\030m \001(\0132 .opencv_caffe.Dum"
  "myDataParameter\0225\n\reltwise_param\030n \001(\0132\036"
  ".opencv_caffe.EltwiseParameter\022.\n\telu_pa"
  "ram\030\214\001 \001(\0132\032.opencv_caffe.ELUParameter\0222"
  "\n\013embed_param\030\211\001 \001(\0132\034.opencv_caffe.Embe"
  "dParameter\022-\n\texp_param\030o \001(\0132\032.opencv_c"
  "affe.ExpParameter\0226\n\rflatten_param\030\207\001 \001("
  "\0132\036.opencv_caffe.FlattenParameter\0228\n\017hdf"
  "5_data_param\030p \001(\0132\037.opencv_caffe.HDF5Da"
  "taParameter\022<\n\021hdf5_output_param\030q \001(\0132!"
  ".opencv_caffe.HDF5OutputParameter\022:\n\020hin"
  "ge_loss_param\030r \001(\0132 .opencv_caffe.Hinge"
  "LossParameter\022:\n\020image_data_param\030s \001(\0132"
  " .opencv_caffe.ImageDataParameter\022@\n\023inf"
  "ogain_loss_param\030t \001(\0132#.opencv_caffe.In"
  "fogainLossParameter\022@\n\023inner_product_par"
  "am\030u \001(\0132#.opencv_caffe.InnerProductPara"
  "meter\0222\n\013input_param\030\217\001 \001(\0132\034.opencv_caf"
  "fe.InputParameter\022.\n\tlog_param\030\206\001 \001(\0132\032."
  "opencv_caffe.LogParameter\022-\n\tlrn_param\030v"
  " \001(\0132\032.opencv_caffe.LRNParameter\022<\n\021memo"
  "ry_data_param\030w \001(\0132!.opencv_caffe.Memor"
  "yDataParameter\022-\n\tmvn_param\030x \001(\0132\032.open"
  "cv_caffe.MVNParameter\0229\n\nnorm_param\030\225\001 \001"
  "(\0132$.opencv_caffe.NormalizeBBoxParameter"
  "\0226\n\rpermute_param\030\224\001 \001(\0132\036.opencv_caffe."
  "PermuteParameter\022:\n\017parameter_param\030\221\001 \001"
  "(\0132 .opencv_caffe.ParameterParameter\0225\n\r"
  "pooling_param\030y \001(\0132\036.opencv_caffe.Pooli"
  "ngParameter\0221\n\013power_param\030z \001(\0132\034.openc"
  "v_caffe.PowerParameter\0222\n\013prelu_param\030\203\001"
  " \001(\0132\034.opencv_caffe.PReLUParameter\0229\n\017pr"
  "ior_box_param\030\226\001 \001(\0132\037.opencv_caffe.Prio"
  "rBoxParameter\0228\n\016proposal_param\030\311\001 \001(\0132\037"
  ".opencv_caffe.ProposalParameter\022A\n\023psroi"
  "_pooling_param\030\222N \001(\0132#.opencv_caffe.PSR"
  "OIPoolingParameter\0224\n\014python_param\030\202\001 \001("
  "\0132\035.opencv_caffe.PythonParameter\022:\n\017recu"
  "rrent_param\030\222\001 \001(\0132 .opencv_caffe.Recurr"
  "entParameter\022:\n\017reduction_param\030\210\001 \001(\0132 "
  ".opencv_caffe.ReductionParameter\022/\n\nrelu"
  "_param\030{ \001(\0132\033.opencv_caffe.ReLUParamete"
  "r\0226\n\rreshape_param\030\205\001 \001(\0132\036.opencv_caffe"
  ".ReshapeParameter\022\?\n\021roi_pooling_param\030\327"
  "\307\370\003 \001(\0132!.opencv_caffe.ROIPoolingParamet"
  "er\0222\n\013scale_param\030\216\001 \001(\0132\034.opencv_caffe."
  "ScaleParameter\0225\n\rsigmoid_param\030| \001(\0132\036."
  "opencv_caffe.SigmoidParameter\0225\n\rsoftmax"
  "_param\030} \001(\0132\036.opencv_caffe.SoftmaxParam"
  "eter\022.\n\tspp_param\030\204\001 \001(\0132\032.opencv_caffe."
  "SPPParameter\0221\n\013slice_param\030~ \001(\0132\034.open"
  "cv_caffe.SliceParameter\022/\n\ntanh_param\030\177 "
  "\001(\0132\033.opencv_caffe.TanHParameter\022:\n\017thre"
  "shold_param\030\200\001 \001(\0132 .opencv_caffe.Thresh"
  "oldParameter\0220\n\ntile_param\030\212\001 \001(\0132\033.open"
  "cv_caffe.TileParameter\022=\n\021window_data_pa"
  "ram\030\201\001 \001(\0132!.opencv_caffe.WindowDataPara"
  "meter\"\266\001\n\027TransformationParameter\022\020\n\005sca"
  "le\030\001 \001(\002:\0011\022\025\n\006mirror\030\002 \001(\010:\005false\022\024\n\tcr"
  "op_size\030\003 \001(\r:\0010\022\021\n\tmean_file\030\004 \001(\t\022\022\n\nm"
  "ean_value\030\005 \003(\002\022\032\n\013force_color\030\006 \001(\010:\005fa"
  "lse\022\031\n\nforce_gray\030\007 \001(\010:\005false\"\311\001\n\rLossP"
  "arameter\022\024\n\014ignore_label\030\001 \001(\005\022K\n\rnormal"
  "ization\030\003 \001(\0162-.opencv_caffe.LossParamet"
  "er.NormalizationMode:\005VALID\022\021\n\tnormalize"
  "\030\002 \001(\010\"B\n\021NormalizationMode\022\010\n\004FULL\020\000\022\t\n"
  "\005VALID\020\001\022\016\n\nBATCH_SIZE\020\002\022\010\n\004NONE\020\003\"L\n\021Ac"
  "curacyParameter\022\020\n\005top_k\030\001 \001(\r:\0011\022\017\n\004axi"
  "s\030\002 \001(\005:\0011\022\024\n\014ignore_label\030\003 \001(\005\"M\n\017ArgM"
  "axParameter\022\032\n\013out_max_val\030\001 \001(\010:\005false\022"
  "\020\n\005top_k\030\002 \001(\r:\0011\022\014\n\004axis\030\003 \001(\005\"9\n\017Conca"
  "tParameter\022\017\n\004axis\030\002 \001(\005:\0011\022\025\n\nconcat_di"
  "m\030\001 \001(\r:\0011\"\205\001\n\022BatchNormParameter\022\030\n\020use"
  "_global_stats\030\001 \001(\010\022&\n\027moving_average_fr"
  "action\030\002 \001(\002:\0050.999\022\022\n\003eps\030\003 \001(\002:\0051e-05\022"
  "\031\n\nscale_bias\030\007 \001(\010:\005false\"d\n\rBiasParame"
  "ter\022\017\n\004axis\030\001 \001(\005:\0011\022\023\n\010num_axes\030\002 \001(\005:\001"
  "1\022-\n\006filler\030\003 \001(\0132\035.opencv_caffe.FillerP"
  "arameter\"L\n\030ContrastiveLossParameter\022\021\n\006"
  "margin\030\001 \001(\002:\0011\022\035\n\016legacy_version\030\002 \001(\010:"
  "\005false\"\221\004\n\024ConvolutionParameter\022\022\n\nnum_o"
  "utput\030\001 \001(\r\022\027\n\tbias_term\030\002 \001(\010:\004true\022\013\n\003"
  "pad\030\003 \003(\r\022\023\n\013kernel_size\030\004 \003(\r\022\016\n\006stride"
  "\030\006 \003(\r\022\020\n\010dilation\030\022 \003(\r\022\020\n\005pad_h\030\t \001(\r:"
  "\0010\022\020\n\005pad_w\030\n \001(\r:\0010\022\020\n\010kernel_h\030\013 \001(\r\022\020"
  "\n\010kernel_w\030\014 \001(\r\022\020\n\010stride_h\030\r \001(\r\022\020\n\010st"
  "ride_w\030\016 \001(\r\022\020\n\005group\030\005 \001(\r:\0011\0224\n\rweight"
  "_filler\030\007 \001(\0132\035.opencv_caffe.FillerParam"
  "eter\0222\n\013bias_filler\030\010 \001(\0132\035.opencv_caffe"
  ".FillerParameter\022B\n\006engine\030\017 \001(\0162).openc"
  "v_caffe.ConvolutionParameter.Engine:\007DEF"
  "AULT\022\017\n\004axis\030\020 \001(\005:\0011\022\036\n\017force_nd_im2col"
  "\030\021 \001(\010:\005false\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005"
  "CAFFE\020\001\022\t\n\005CUDNN\020\002\"0\n\rCropParameter\022\017\n\004a"
  "xis\030\001 \001(\005:\0012\022\016\n\006offset\030\002 \003(\r\"\253\002\n\rDataPar"
  "ameter\022\016\n\006source\030\001 \001(\t\022\022\n\nbatch_size\030\004 \001"
  "(\r\022\024\n\trand_skip\030\007 \001(\r:\0010\0228\n\007backend\030\010 \001("
  "\0162\036.opencv_caffe.DataParameter.DB:\007LEVEL"
  "DB\022\020\n\005scale\030\002 \001(\002:\0011\022\021\n\tmean_file\030\003 \001(\t\022"
  "\024\n\tcrop_size\030\005 \001(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005f"
  "alse\022\"\n\023force_encoded_color\030\t \001(\010:\005false"
  "\022\023\n\010prefetch\030\n \001(\r:\0014\"\033\n\002DB\022\013\n\007LEVELDB\020\000"
  "\022\010\n\004LMDB\020\001\"[\n\036NonMaximumSuppressionParam"
  "eter\022\032\n\rnms_threshold\030\001 \001(\002:\0030.3\022\r\n\005top_"
  "k\030\002 \001(\005\022\016\n\003eta\030\003 \001(\002:\0011\"\252\001\n\023SaveOutputPa"
  "rameter\022\030\n\020output_directory\030\001 \001(\t\022\032\n\022out"
  "put_name_prefix\030\002 \001(\t\022\025\n\routput_format\030\003"
  " \001(\t\022\026\n\016label_map_file\030\004 \001(\t\022\026\n\016name_siz"
  "e_file\030\005 \001(\t\022\026\n\016num_test_image\030\006 \001(\r\"I\n\020"
  "DropoutParameter\022\032\n\rdropout_ratio\030\001 \001(\002:"
  "\0030.5\022\031\n\013scale_train\030\002 \001(\010:\004true\"\256\001\n\022Dumm"
  "yDataParameter\0222\n\013data_filler\030\001 \003(\0132\035.op"
  "encv_caffe.FillerParameter\022&\n\005shape\030\006 \003("
  "\0132\027.opencv_caffe.BlobShape\022\013\n\003num\030\002 \003(\r\022"
  "\020\n\010channels\030\003 \003(\r\022\016\n\006height\030\004 \003(\r\022\r\n\005wid"
  "th\030\005 \003(\r\"\254\001\n\020EltwiseParameter\022@\n\toperati"
  "on\030\001 \001(\0162(.opencv_caffe.EltwiseParameter"
  ".EltwiseOp:\003SUM\022\r\n\005coeff\030\002 \003(\002\022\036\n\020stable"
  "_prod_grad\030\003 \001(\010:\004true\"\'\n\tEltwiseOp\022\010\n\004P"
  "ROD\020\000\022\007\n\003SUM\020\001\022\007\n\003MAX\020\002\" \n\014ELUParameter\022"
  "\020\n\005alpha\030\001 \001(\002:\0011\"\272\001\n\016EmbedParameter\022\022\n\n"
  "num_output\030\001 \001(\r\022\021\n\tinput_dim\030\002 \001(\r\022\027\n\tb"
  "ias_term\030\003 \001(\010:\004true\0224\n\rweight_filler\030\004 "
  "\001(\0132\035.opencv_caffe.FillerParameter\0222\n\013bi"
  "as_filler\030\005 \001(\0132\035.opencv_caffe.FillerPar"
  "ameter\"D\n\014ExpParameter\022\020\n\004base\030\001 \001(\002:\002-1"
  "\022\020\n\005scale\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"9\n\020"
  "FlattenParameter\022\017\n\004axis\030\001 \001(\005:\0011\022\024\n\010end"
  "_axis\030\002 \001(\005:\002-1\"O\n\021HDF5DataParameter\022\016\n\006"
  "source\030\001 \001(\t\022\022\n\nbatch_size\030\002 \001(\r\022\026\n\007shuf"
  "fle\030\003 \001(\010:\005false\"(\n\023HDF5OutputParameter\022"
  "\021\n\tfile_name\030\001 \001(\t\"e\n\022HingeLossParameter"
  "\0227\n\004norm\030\001 \001(\0162%.opencv_caffe.HingeLossP"
  "arameter.Norm:\002L1\"\026\n\004Norm\022\006\n\002L1\020\001\022\006\n\002L2\020"
  "\002\"\227\002\n\022ImageDataParameter\022\016\n\006source\030\001 \001(\t"
  "\022\025\n\nbatch_size\030\004 \001(\r:\0011\022\024\n\trand_skip\030\007 \001"
  "(\r:\0010\022\026\n\007shuffle\030\010 \001(\010:\005false\022\025\n\nnew_hei"
  "ght\030\t \001(\r:\0010\022\024\n\tnew_width\030\n \001(\r:\0010\022\026\n\010is"
  "_color\030\013 \001(\010:\004true\022\020\n\005scale\030\002 \001(\002:\0011\022\021\n\t"
  "mean_file\030\003 \001(\t\022\024\n\tcrop_size\030\005 \001(\r:\0010\022\025\n"
  "\006mirror\030\006 \001(\010:\005false\022\025\n\013root_folder\030\014 \001("
  "\t:\000\"\'\n\025InfogainLossParameter\022\016\n\006source\030\001"
  " \001(\t\"\331\001\n\025InnerProductParameter\022\022\n\nnum_ou"
  "tput\030\001 \001(\r\022\027\n\tbias_term\030\002 \001(\010:\004true\0224\n\rw"
  "eight_filler\030\003 \001(\0132\035.opencv_caffe.Filler"
  "Parameter\0222\n\013bias_filler\030\004 \001(\0132\035.opencv_"
  "caffe.FillerParameter\022\017\n\004axis\030\005 \001(\005:\0011\022\030"
  "\n\ttranspose\030\006 \001(\010:\005false\"8\n\016InputParamet"
  "er\022&\n\005shape\030\001 \003(\0132\027.opencv_caffe.BlobSha"
  "pe\"D\n\014LogParameter\022\020\n\004base\030\001 \001(\002:\002-1\022\020\n\005"
  "scale\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"\306\002\n\014LRN"
  "Parameter\022\025\n\nlocal_size\030\001 \001(\r:\0015\022\020\n\005alph"
  "a\030\002 \001(\002:\0011\022\022\n\004beta\030\003 \001(\002:\0040.75\022K\n\013norm_r"
  "egion\030\004 \001(\0162%.opencv_caffe.LRNParameter."
  "NormRegion:\017ACROSS_CHANNELS\022\014\n\001k\030\005 \001(\002:\001"
  "1\022:\n\006engine\030\006 \001(\0162!.opencv_caffe.LRNPara"
  "meter.Engine:\007DEFAULT\"5\n\nNormRegion\022\023\n\017A"
  "CROSS_CHANNELS\020\000\022\022\n\016WITHIN_CHANNEL\020\001\"+\n\006"
  "Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020"
  "\002\"Z\n\023MemoryDataParameter\022\022\n\nbatch_size\030\001"
  " \001(\r\022\020\n\010channels\030\002 \001(\r\022\016\n\006height\030\003 \001(\r\022\r"
  "\n\005width\030\004 \001(\r\"d\n\014MVNParameter\022 \n\022normali"
  "ze_variance\030\001 \001(\010:\004true\022\036\n\017across_channe"
  "ls\030\002 \001(\010:\005false\022\022\n\003eps\030\003 \001(\002:\0051e-09\"<\n\022P"
  "arameterParameter\022&\n\005shape\030\001 \001(\0132\027.openc"
  "v_caffe.BlobShape\"\311\003\n\020PoolingParameter\022<"
  "\n\004pool\030\001 \001(\0162).opencv_caffe.PoolingParam"
  "eter.PoolMethod:\003MAX\022\016\n\003pad\030\004 \001(\r:\0010\022\020\n\005"
  "pad_h\030\t \001(\r:\0010\022\020\n\005pad_w\030\n \001(\r:\0010\022\023\n\013kern"
  "el_size\030\002 \001(\r\022\020\n\010kernel_h\030\005 \001(\r\022\020\n\010kerne"
  "l_w\030\006 \001(\r\022\021\n\006stride\030\003 \001(\r:\0011\022\020\n\010stride_h"
  "\030\007 \001(\r\022\020\n\010stride_w\030\010 \001(\r\022>\n\006engine\030\013 \001(\016"
  "2%.opencv_caffe.PoolingParameter.Engine:"
  "\007DEFAULT\022\035\n\016global_pooling\030\014 \001(\010:\005false\022"
  "\027\n\tceil_mode\030\r \001(\010:\004true\".\n\nPoolMethod\022\007"
  "\n\003MAX\020\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Engi"
  "ne\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"F\n"
  "\016PowerParameter\022\020\n\005power\030\001 \001(\002:\0011\022\020\n\005sca"
  "le\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"g\n\017PythonP"
  "arameter\022\016\n\006module\030\001 \001(\t\022\r\n\005layer\030\002 \001(\t\022"
  "\023\n\tparam_str\030\003 \001(\t:\000\022 \n\021share_in_paralle"
  "l\030\004 \001(\010:\005false\"\316\001\n\022RecurrentParameter\022\025\n"
  "\nnum_output\030\001 \001(\r:\0010\0224\n\rweight_filler\030\002 "
  "\001(\0132\035.opencv_caffe.FillerParameter\0222\n\013bi"
  "as_filler\030\003 \001(\0132\035.opencv_caffe.FillerPar"
  "ameter\022\031\n\ndebug_info\030\004 \001(\010:\005false\022\034\n\rexp"
  "ose_hidden\030\005 \001(\010:\005false\"\264\001\n\022ReductionPar"
  "ameter\022D\n\toperation\030\001 \001(\0162,.opencv_caffe"
  ".ReductionParameter.ReductionOp:\003SUM\022\017\n\004"
  "axis\030\002 \001(\005:\0010\022\020\n\005coeff\030\003 \001(\002:\0011\"5\n\013Reduc"
  "tionOp\022\007\n\003SUM\020\001\022\010\n\004ASUM\020\002\022\t\n\005SUMSQ\020\003\022\010\n\004"
  "MEAN\020\004\"\224\001\n\rReLUParameter\022\031\n\016negative_slo"
  "pe\030\001 \001(\002:\0010\022;\n\006engine\030\002 \001(\0162\".opencv_caf"
  "fe.ReLUParameter.Engine:\007DEFAULT\"+\n\006Engi"
  "ne\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"a\n"
  "\020ReshapeParameter\022&\n\005shape\030\001 \001(\0132\027.openc"
  "v_caffe.BlobShape\022\017\n\004axis\030\002 \001(\005:\0010\022\024\n\010nu"
  "m_axes\030\003 \001(\005:\002-1\"\263\001\n\016ScaleParameter\022\017\n\004a"
  "xis\030\001 \001(\005:\0011\022\023\n\010num_axes\030\002 \001(\005:\0011\022-\n\006fil"
  "ler\030\003 \001(\0132\035.opencv_caffe.FillerParameter"
  "\022\030\n\tbias_term\030\004 \001(\010:\005false\0222\n\013bias_fille"
  "r\030\005 \001(\0132\035.opencv_caffe.FillerParameter\"\177"
  "\n\020SigmoidParameter\022>\n\006engine\030\001 \001(\0162%.ope"
  "ncv_caffe.SigmoidParameter.Engine:\007DEFAU"
  "LT\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005"
  "CUDNN\020\002\"L\n\016SliceParameter\022\017\n\004axis\030\003 \001(\005:"
  "\0011\022\023\n\013slice_point\030\002 \003(\r\022\024\n\tslice_dim\030\001 \001"
  "(\r:\0011\"\220\001\n\020SoftmaxParameter\022>\n\006engine\030\001 \001"
  "(\0162%.opencv_caffe.SoftmaxParameter.Engin"
  "e:\007DEFAULT\022\017\n\004axis\030\002 \001(\005:\0011\"+\n\006Engine\022\013\n"
  "\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"y\n\rTanH"
  "Parameter\022;\n\006engine\030\001 \001(\0162\".opencv_caffe"
  ".TanHParameter.Engine:\007DEFAULT\"+\n\006Engine"
  "\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"/\n\rT"
  "ileParameter\022\017\n\004axis\030\001 \001(\005:\0011\022\r\n\005tiles\030\002"
  " \001(\005\"*\n\022ThresholdParameter\022\024\n\tthreshold\030"
  "\001 \001(\002:\0010\"\301\002\n\023WindowDataParameter\022\016\n\006sour"
  "ce\030\001 \001(\t\022\020\n\005scale\030\002 \001(\002:\0011\022\021\n\tmean_file\030"
  "\003 \001(\t\022\022\n\nbatch_size\030\004 \001(\r\022\024\n\tcrop_size\030\005"
  " \001(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005false\022\031\n\014fg_thr"
  "eshold\030\007 \001(\002:\0030.5\022\031\n\014bg_threshold\030\010 \001(\002:"
  "\0030.5\022\031\n\013fg_fraction\030\t \001(\002:\0040.25\022\026\n\013conte"
  "xt_pad\030\n \001(\r:\0010\022\027\n\tcrop_mode\030\013 \001(\t:\004warp"
  "\022\033\n\014cache_images\030\014 \001(\010:\005false\022\025\n\013root_fo"
  "lder\030\r \001(\t:\000\"\371\001\n\014SPPParameter\022\026\n\016pyramid"
  "_height\030\001 \001(\r\0228\n\004pool\030\002 \001(\0162%.opencv_caf"
  "fe.SPPParameter.PoolMethod:\003MAX\022:\n\006engin"
  "e\030\006 \001(\0162!.opencv_caffe.SPPParameter.Engi"
  "ne:\007DEFAULT\".\n\nPoolMethod\022\007\n\003MAX\020\000\022\007\n\003AV"
  "E\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Engine\022\013\n\007DEFAULT"
  "\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"\334\025\n\020V1LayerPara"
  "meter\022\016\n\006bottom\030\002 \003(\t\022\013\n\003top\030\003 \003(\t\022\014\n\004na"
  "me\030\004 \001(\t\022+\n\007include\030  \003(\0132\032.opencv_caffe"
  ".NetStateRule\022+\n\007exclude\030! \003(\0132\032.opencv_"
  "caffe.NetStateRule\0226\n\004type\030\005 \001(\0162(.openc"
  "v_caffe.V1LayerParameter.LayerType\022&\n\005bl"
  "obs\030\006 \003(\0132\027.opencv_caffe.BlobProto\022\016\n\005pa"
  "ram\030\351\007 \003(\t\022E\n\017blob_share_mode\030\352\007 \003(\0162+.o"
  "pencv_caffe.V1LayerParameter.DimCheckMod"
  "e\022\020\n\010blobs_lr\030\007 \003(\002\022\024\n\014weight_decay\030\010 \003("
  "\002\022\023\n\013loss_weight\030# \003(\002\0227\n\016accuracy_param"
  "\030\033 \001(\0132\037.opencv_caffe.AccuracyParameter\022"
  "3\n\014argmax_param\030\027 \001(\0132\035.opencv_caffe.Arg"
  "MaxParameter\0223\n\014concat_param\030\t \001(\0132\035.ope"
  "ncv_caffe.ConcatParameter\022F\n\026contrastive"
  "_loss_param\030( \001(\0132&.opencv_caffe.Contras"
  "tiveLossParameter\022=\n\021convolution_param\030\n"
  " \001(\0132\".opencv_caffe.ConvolutionParameter"
  "\022/\n\ndata_param\030\013 \001(\0132\033.opencv_caffe.Data"
  "Parameter\0225\n\rdropout_param\030\014 \001(\0132\036.openc"
  "v_caffe.DropoutParameter\022:\n\020dummy_data_p"
  "aram\030\032 \001(\0132 .opencv_caffe.DummyDataParam"
  "eter\0225\n\reltwise_param\030\030 \001(\0132\036.opencv_caf"
  "fe.EltwiseParameter\022-\n\texp_param\030) \001(\0132\032"
  ".opencv_caffe.ExpParameter\0228\n\017hdf5_data_"
  "param\030\r \001(\0132\037.opencv_caffe.HDF5DataParam"
  "eter\022<\n\021hdf5_output_param\030\016 \001(\0132!.opencv"
  "_caffe.HDF5OutputParameter\022:\n\020hinge_loss"
  "_param\030\035 \001(\0132 .opencv_caffe.HingeLossPar"
  "ameter\022:\n\020image_data_param\030\017 \001(\0132 .openc"
  "v_caffe.ImageDataParameter\022@\n\023infogain_l"
  "oss_param\030\020 \001(\0132#.opencv_caffe.InfogainL"
  "ossParameter\022@\n\023inner_product_param\030\021 \001("
  "\0132#.opencv_caffe.InnerProductParameter\022-"
  "\n\tlrn_param\030\022 \001(\0132\032.opencv_caffe.LRNPara"
  "meter\022<\n\021memory_data_param\030\026 \001(\0132!.openc"
  "v_caffe.MemoryDataParameter\022-\n\tmvn_param"
  "\030\" \001(\0132\032.opencv_caffe.MVNParameter\0225\n\rpo"
  "oling_param\030\023 \001(\0132\036.opencv_caffe.Pooling"
  "Parameter\0221\n\013power_param\030\025 \001(\0132\034.opencv_"
  "caffe.PowerParameter\022/\n\nrelu_param\030\036 \001(\013"
  "2\033.opencv_caffe.ReLUParameter\0225\n\rsigmoid"
  "_param\030& \001(\0132\036.opencv_caffe.SigmoidParam"
  "eter\0225\n\rsoftmax_param\030\' \001(\0132\036.opencv_caf"
  "fe.SoftmaxParameter\0221\n\013slice_param\030\037 \001(\013"
  "2\034.opencv_caffe.SliceParameter\022/\n\ntanh_p"
  "aram\030% \001(\0132\033.opencv_caffe.TanHParameter\022"
  "9\n\017threshold_param\030\031 \001(\0132 .opencv_caffe."
  "ThresholdParameter\022<\n\021window_data_param\030"
  "\024 \001(\0132!.opencv_caffe.WindowDataParameter"
  "\022>\n\017transform_param\030$ \001(\0132%.opencv_caffe"
  ".TransformationParameter\022/\n\nloss_param\030*"
  " \001(\0132\033.opencv_caffe.LossParameter\022-\n\005lay"
  "er\030\001 \001(\0132\036.opencv_caffe.V0LayerParameter"
  "\"\330\004\n\tLayerType\022\010\n\004NONE\020\000\022\n\n\006ABSVAL\020#\022\014\n\010"
  "ACCURACY\020\001\022\n\n\006ARGMAX\020\036\022\010\n\004BNLL\020\002\022\n\n\006CONC"
  "AT\020\003\022\024\n\020CONTRASTIVE_LOSS\020%\022\017\n\013CONVOLUTIO"
  "N\020\004\022\010\n\004DATA\020\005\022\021\n\rDECONVOLUTION\020\'\022\013\n\007DROP"
  "OUT\020\006\022\016\n\nDUMMY_DATA\020 \022\022\n\016EUCLIDEAN_LOSS\020"
  "\007\022\013\n\007ELTWISE\020\031\022\007\n\003EXP\020&\022\013\n\007FLATTEN\020\010\022\r\n\t"
  "HDF5_DATA\020\t\022\017\n\013HDF5_OUTPUT\020\n\022\016\n\nHINGE_LO"
  "SS\020\034\022\n\n\006IM2COL\020\013\022\016\n\nIMAGE_DATA\020\014\022\021\n\rINFO"
  "GAIN_LOSS\020\r\022\021\n\rINNER_PRODUCT\020\016\022\007\n\003LRN\020\017\022"
  "\017\n\013MEMORY_DATA\020\035\022\035\n\031MULTINOMIAL_LOGISTIC"
  "_LOSS\020\020\022\007\n\003MVN\020\"\022\013\n\007POOLING\020\021\022\t\n\005POWER\020\032"
  "\022\010\n\004RELU\020\022\022\013\n\007SIGMOID\020\023\022\036\n\032SIGMOID_CROSS"
  "_ENTROPY_LOSS\020\033\022\013\n\007SILENCE\020$\022\013\n\007SOFTMAX\020"
  "\024\022\020\n\014SOFTMAX_LOSS\020\025\022\t\n\005SPLIT\020\026\022\t\n\005SLICE\020"
  "!\022\010\n\004TANH\020\027\022\017\n\013WINDOW_DATA\020\030\022\r\n\tTHRESHOL"
  "D\020\037\"*\n\014DimCheckMode\022\n\n\006STRICT\020\000\022\016\n\nPERMI"
  "SSIVE\020\001\"\240\010\n\020V0LayerParameter\022\014\n\004name\030\001 \001"
  "(\t\022\014\n\004type\030\002 \001(\t\022\022\n\nnum_output\030\003 \001(\r\022\026\n\010"
  "biasterm\030\004 \001(\010:\004true\0224\n\rweight_filler\030\005 "
  "\001(\0132\035.opencv_caffe.FillerParameter\0222\n\013bi"
  "as_filler\030\006 \001(\0132\035.opencv_caffe.FillerPar"
  "ameter\022\016\n\003pad\030\007 \001(\r:\0010\022\022\n\nkernelsize\030\010 \001"
  "(\r\022\020\n\005group\030\t \001(\r:\0011\022\021\n\006stride\030\n \001(\r:\0011\022"
  "<\n\004pool\030\013 \001(\0162).opencv_caffe.V0LayerPara"
  "meter.PoolMethod:\003MAX\022\032\n\rdropout_ratio\030\014"
  " \001(\002:\0030.5\022\025\n\nlocal_size\030\r \001(\r:\0015\022\020\n\005alph"
  "a\030\016 \001(\002:\0011\022\022\n\004beta\030\017 \001(\002:\0040.75\022\014\n\001k\030\026 \001("
  "\002:\0011\022\016\n\006source\030\020 \001(\t\022\020\n\005scale\030\021 \001(\002:\0011\022\020"
  "\n\010meanfile\030\022 \001(\t\022\021\n\tbatchsize\030\023 \001(\r\022\023\n\010c"
  "ropsize\030\024 \001(\r:\0010\022\025\n\006mirror\030\025 \001(\010:\005false\022"
  "&\n\005blobs\0302 \003(\0132\027.opencv_caffe.BlobProto\022"
  "\020\n\010blobs_lr\0303 \003(\002\022\024\n\014weight_decay\0304 \003(\002\022"
  "\024\n\trand_skip\0305 \001(\r:\0010\022\035\n\020det_fg_threshol"
  "d\0306 \001(\002:\0030.5\022\035\n\020det_bg_threshold\0307 \001(\002:\003"
  "0.5\022\035\n\017det_fg_fraction\0308 \001(\002:\0040.25\022\032\n\017de"
  "t_context_pad\030: \001(\r:\0010\022\033\n\rdet_crop_mode\030"
  "; \001(\t:\004warp\022\022\n\007new_num\030< \001(\005:\0010\022\027\n\014new_c"
  "hannels\030= \001(\005:\0010\022\025\n\nnew_height\030> \001(\005:\0010\022"
  "\024\n\tnew_width\030\? \001(\005:\0010\022\035\n\016shuffle_images\030"
  "@ \001(\010:\005false\022\025\n\nconcat_dim\030A \001(\r:\0011\022=\n\021h"
  "df5_output_param\030\351\007 \001(\0132!.opencv_caffe.H"
  "DF5OutputParameter\".\n\nPoolMethod\022\007\n\003MAX\020"
  "\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"^\n\016PReLUParam"
  "eter\022-\n\006filler\030\001 \001(\0132\035.opencv_caffe.Fill"
  "erParameter\022\035\n\016channel_shared\030\002 \001(\010:\005fal"
  "se\"\207\001\n\016NormalizedBBox\022\014\n\004xmin\030\001 \001(\002\022\014\n\004y"
  "min\030\002 \001(\002\022\014\n\004xmax\030\003 \001(\002\022\014\n\004ymax\030\004 \001(\002\022\r\n"
  "\005label\030\005 \001(\005\022\021\n\tdifficult\030\006 \001(\010\022\r\n\005score"
  "\030\007 \001(\002\022\014\n\004size\030\010 \001(\002\"Y\n\023ROIPoolingParame"
  "ter\022\023\n\010pooled_h\030\001 \001(\r:\0010\022\023\n\010pooled_w\030\002 \001"
  "(\r:\0010\022\030\n\rspatial_scale\030\003 \001(\002:\0011\"\310\001\n\021Prop"
  "osalParameter\022\027\n\013feat_stride\030\001 \001(\r:\00216\022\025"
  "\n\tbase_size\030\002 \001(\r:\00216\022\024\n\010min_size\030\003 \001(\r:"
  "\00216\022\r\n\005ratio\030\004 \003(\002\022\r\n\005scale\030\005 \003(\002\022\032\n\014pre"
  "_nms_topn\030\006 \001(\r:\0046000\022\032\n\rpost_nms_topn\030\007"
  " \001(\r:\003300\022\027\n\nnms_thresh\030\010 \001(\002:\0030.7\"V\n\025PS"
  "ROIPoolingParameter\022\025\n\rspatial_scale\030\001 \002"
  "(\002\022\022\n\noutput_dim\030\002 \002(\005\022\022\n\ngroup_size\030\003 \002"
  "(\005*=\n\004Type\022\n\n\006DOUBLE\020\000\022\t\n\005FLOAT\020\001\022\013\n\007FLO"
  "AT16\020\002\022\007\n\003INT\020\003\022\010\n\004UINT\020\004*\034\n\005Phase\022\t\n\005TR"
  "AIN\020\000\022\010\n\004TEST\020\001"
  ;
static ::_pbi::once_flag descriptor_table_opencv_2dcaffe_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_opencv_2dcaffe_2eproto = {
    false, false, 18855, descriptor_table_protodef_opencv_2dcaffe_2eproto,
    "opencv-caffe.proto",
    &descriptor_table_opencv_2dcaffe_2eproto_once, nullptr, 0, 71,
    schemas, file_default_instances, TableStruct_opencv_2dcaffe_2eproto::offsets,
    file_level_metadata_opencv_2dcaffe_2eproto, file_level_enum_descriptors_opencv_2dcaffe_2eproto,
    file_level_service_descriptors_opencv_2dcaffe_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_opencv_2dcaffe_2eproto_getter() {
  return &descriptor_table_opencv_2dcaffe_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_opencv_2dcaffe_2eproto(&descriptor_table_opencv_2dcaffe_2eproto);
namespace opencv_caffe {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PriorBoxParameter_CodeType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[0];
}
bool PriorBoxParameter_CodeType_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr PriorBoxParameter_CodeType PriorBoxParameter::CORNER;
constexpr PriorBoxParameter_CodeType PriorBoxParameter::CENTER_SIZE;
constexpr PriorBoxParameter_CodeType PriorBoxParameter::CodeType_MIN;
constexpr PriorBoxParameter_CodeType PriorBoxParameter::CodeType_MAX;
constexpr int PriorBoxParameter::CodeType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FillerParameter_VarianceNorm_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[1];
}
bool FillerParameter_VarianceNorm_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr FillerParameter_VarianceNorm FillerParameter::FAN_IN;
constexpr FillerParameter_VarianceNorm FillerParameter::FAN_OUT;
constexpr FillerParameter_VarianceNorm FillerParameter::AVERAGE;
constexpr FillerParameter_VarianceNorm FillerParameter::VarianceNorm_MIN;
constexpr FillerParameter_VarianceNorm FillerParameter::VarianceNorm_MAX;
constexpr int FillerParameter::VarianceNorm_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SolverParameter_SnapshotFormat_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[2];
}
bool SolverParameter_SnapshotFormat_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 SolverParameter_SnapshotFormat SolverParameter::HDF5;
constexpr SolverParameter_SnapshotFormat SolverParameter::BINARYPROTO;
constexpr SolverParameter_SnapshotFormat SolverParameter::SnapshotFormat_MIN;
constexpr SolverParameter_SnapshotFormat SolverParameter::SnapshotFormat_MAX;
constexpr int SolverParameter::SnapshotFormat_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SolverParameter_SolverMode_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[3];
}
bool SolverParameter_SolverMode_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 SolverParameter_SolverMode SolverParameter::CPU;
constexpr SolverParameter_SolverMode SolverParameter::GPU;
constexpr SolverParameter_SolverMode SolverParameter::SolverMode_MIN;
constexpr SolverParameter_SolverMode SolverParameter::SolverMode_MAX;
constexpr int SolverParameter::SolverMode_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SolverParameter_SolverType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[4];
}
bool SolverParameter_SolverType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SolverParameter_SolverType SolverParameter::SGD;
constexpr SolverParameter_SolverType SolverParameter::NESTEROV;
constexpr SolverParameter_SolverType SolverParameter::ADAGRAD;
constexpr SolverParameter_SolverType SolverParameter::RMSPROP;
constexpr SolverParameter_SolverType SolverParameter::ADADELTA;
constexpr SolverParameter_SolverType SolverParameter::ADAM;
constexpr SolverParameter_SolverType SolverParameter::SolverType_MIN;
constexpr SolverParameter_SolverType SolverParameter::SolverType_MAX;
constexpr int SolverParameter::SolverType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ParamSpec_DimCheckMode_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[5];
}
bool ParamSpec_DimCheckMode_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 ParamSpec_DimCheckMode ParamSpec::STRICT;
constexpr ParamSpec_DimCheckMode ParamSpec::PERMISSIVE;
constexpr ParamSpec_DimCheckMode ParamSpec::DimCheckMode_MIN;
constexpr ParamSpec_DimCheckMode ParamSpec::DimCheckMode_MAX;
constexpr int ParamSpec::DimCheckMode_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LossParameter_NormalizationMode_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[6];
}
bool LossParameter_NormalizationMode_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr LossParameter_NormalizationMode LossParameter::FULL;
constexpr LossParameter_NormalizationMode LossParameter::VALID;
constexpr LossParameter_NormalizationMode LossParameter::BATCH_SIZE;
constexpr LossParameter_NormalizationMode LossParameter::NONE;
constexpr LossParameter_NormalizationMode LossParameter::NormalizationMode_MIN;
constexpr LossParameter_NormalizationMode LossParameter::NormalizationMode_MAX;
constexpr int LossParameter::NormalizationMode_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ConvolutionParameter_Engine_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[7];
}
bool ConvolutionParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ConvolutionParameter_Engine ConvolutionParameter::DEFAULT;
constexpr ConvolutionParameter_Engine ConvolutionParameter::CAFFE;
constexpr ConvolutionParameter_Engine ConvolutionParameter::CUDNN;
constexpr ConvolutionParameter_Engine ConvolutionParameter::Engine_MIN;
constexpr ConvolutionParameter_Engine ConvolutionParameter::Engine_MAX;
constexpr int ConvolutionParameter::Engine_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DataParameter_DB_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[8];
}
bool DataParameter_DB_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 DataParameter_DB DataParameter::LEVELDB;
constexpr DataParameter_DB DataParameter::LMDB;
constexpr DataParameter_DB DataParameter::DB_MIN;
constexpr DataParameter_DB DataParameter::DB_MAX;
constexpr int DataParameter::DB_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EltwiseParameter_EltwiseOp_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[9];
}
bool EltwiseParameter_EltwiseOp_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr EltwiseParameter_EltwiseOp EltwiseParameter::PROD;
constexpr EltwiseParameter_EltwiseOp EltwiseParameter::SUM;
constexpr EltwiseParameter_EltwiseOp EltwiseParameter::MAX;
constexpr EltwiseParameter_EltwiseOp EltwiseParameter::EltwiseOp_MIN;
constexpr EltwiseParameter_EltwiseOp EltwiseParameter::EltwiseOp_MAX;
constexpr int EltwiseParameter::EltwiseOp_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HingeLossParameter_Norm_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[10];
}
bool HingeLossParameter_Norm_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr HingeLossParameter_Norm HingeLossParameter::L1;
constexpr HingeLossParameter_Norm HingeLossParameter::L2;
constexpr HingeLossParameter_Norm HingeLossParameter::Norm_MIN;
constexpr HingeLossParameter_Norm HingeLossParameter::Norm_MAX;
constexpr int HingeLossParameter::Norm_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LRNParameter_NormRegion_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[11];
}
bool LRNParameter_NormRegion_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 LRNParameter_NormRegion LRNParameter::ACROSS_CHANNELS;
constexpr LRNParameter_NormRegion LRNParameter::WITHIN_CHANNEL;
constexpr LRNParameter_NormRegion LRNParameter::NormRegion_MIN;
constexpr LRNParameter_NormRegion LRNParameter::NormRegion_MAX;
constexpr int LRNParameter::NormRegion_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LRNParameter_Engine_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[12];
}
bool LRNParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr LRNParameter_Engine LRNParameter::DEFAULT;
constexpr LRNParameter_Engine LRNParameter::CAFFE;
constexpr LRNParameter_Engine LRNParameter::CUDNN;
constexpr LRNParameter_Engine LRNParameter::Engine_MIN;
constexpr LRNParameter_Engine LRNParameter::Engine_MAX;
constexpr int LRNParameter::Engine_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PoolingParameter_PoolMethod_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[13];
}
bool PoolingParameter_PoolMethod_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr PoolingParameter_PoolMethod PoolingParameter::MAX;
constexpr PoolingParameter_PoolMethod PoolingParameter::AVE;
constexpr PoolingParameter_PoolMethod PoolingParameter::STOCHASTIC;
constexpr PoolingParameter_PoolMethod PoolingParameter::PoolMethod_MIN;
constexpr PoolingParameter_PoolMethod PoolingParameter::PoolMethod_MAX;
constexpr int PoolingParameter::PoolMethod_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PoolingParameter_Engine_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[14];
}
bool PoolingParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr PoolingParameter_Engine PoolingParameter::DEFAULT;
constexpr PoolingParameter_Engine PoolingParameter::CAFFE;
constexpr PoolingParameter_Engine PoolingParameter::CUDNN;
constexpr PoolingParameter_Engine PoolingParameter::Engine_MIN;
constexpr PoolingParameter_Engine PoolingParameter::Engine_MAX;
constexpr int PoolingParameter::Engine_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ReductionParameter_ReductionOp_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[15];
}
bool ReductionParameter_ReductionOp_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ReductionParameter_ReductionOp ReductionParameter::SUM;
constexpr ReductionParameter_ReductionOp ReductionParameter::ASUM;
constexpr ReductionParameter_ReductionOp ReductionParameter::SUMSQ;
constexpr ReductionParameter_ReductionOp ReductionParameter::MEAN;
constexpr ReductionParameter_ReductionOp ReductionParameter::ReductionOp_MIN;
constexpr ReductionParameter_ReductionOp ReductionParameter::ReductionOp_MAX;
constexpr int ReductionParameter::ReductionOp_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ReLUParameter_Engine_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[16];
}
bool ReLUParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ReLUParameter_Engine ReLUParameter::DEFAULT;
constexpr ReLUParameter_Engine ReLUParameter::CAFFE;
constexpr ReLUParameter_Engine ReLUParameter::CUDNN;
constexpr ReLUParameter_Engine ReLUParameter::Engine_MIN;
constexpr ReLUParameter_Engine ReLUParameter::Engine_MAX;
constexpr int ReLUParameter::Engine_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SigmoidParameter_Engine_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[17];
}
bool SigmoidParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SigmoidParameter_Engine SigmoidParameter::DEFAULT;
constexpr SigmoidParameter_Engine SigmoidParameter::CAFFE;
constexpr SigmoidParameter_Engine SigmoidParameter::CUDNN;
constexpr SigmoidParameter_Engine SigmoidParameter::Engine_MIN;
constexpr SigmoidParameter_Engine SigmoidParameter::Engine_MAX;
constexpr int SigmoidParameter::Engine_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SoftmaxParameter_Engine_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[18];
}
bool SoftmaxParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SoftmaxParameter_Engine SoftmaxParameter::DEFAULT;
constexpr SoftmaxParameter_Engine SoftmaxParameter::CAFFE;
constexpr SoftmaxParameter_Engine SoftmaxParameter::CUDNN;
constexpr SoftmaxParameter_Engine SoftmaxParameter::Engine_MIN;
constexpr SoftmaxParameter_Engine SoftmaxParameter::Engine_MAX;
constexpr int SoftmaxParameter::Engine_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TanHParameter_Engine_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[19];
}
bool TanHParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr TanHParameter_Engine TanHParameter::DEFAULT;
constexpr TanHParameter_Engine TanHParameter::CAFFE;
constexpr TanHParameter_Engine TanHParameter::CUDNN;
constexpr TanHParameter_Engine TanHParameter::Engine_MIN;
constexpr TanHParameter_Engine TanHParameter::Engine_MAX;
constexpr int TanHParameter::Engine_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SPPParameter_PoolMethod_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[20];
}
bool SPPParameter_PoolMethod_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SPPParameter_PoolMethod SPPParameter::MAX;
constexpr SPPParameter_PoolMethod SPPParameter::AVE;
constexpr SPPParameter_PoolMethod SPPParameter::STOCHASTIC;
constexpr SPPParameter_PoolMethod SPPParameter::PoolMethod_MIN;
constexpr SPPParameter_PoolMethod SPPParameter::PoolMethod_MAX;
constexpr int SPPParameter::PoolMethod_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SPPParameter_Engine_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[21];
}
bool SPPParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SPPParameter_Engine SPPParameter::DEFAULT;
constexpr SPPParameter_Engine SPPParameter::CAFFE;
constexpr SPPParameter_Engine SPPParameter::CUDNN;
constexpr SPPParameter_Engine SPPParameter::Engine_MIN;
constexpr SPPParameter_Engine SPPParameter::Engine_MAX;
constexpr int SPPParameter::Engine_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* V1LayerParameter_LayerType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[22];
}
bool V1LayerParameter_LayerType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
    case 14:
    case 15:
    case 16:
    case 17:
    case 18:
    case 19:
    case 20:
    case 21:
    case 22:
    case 23:
    case 24:
    case 25:
    case 26:
    case 27:
    case 28:
    case 29:
    case 30:
    case 31:
    case 32:
    case 33:
    case 34:
    case 35:
    case 36:
    case 37:
    case 38:
    case 39:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr V1LayerParameter_LayerType V1LayerParameter::NONE;
constexpr V1LayerParameter_LayerType V1LayerParameter::ABSVAL;
constexpr V1LayerParameter_LayerType V1LayerParameter::ACCURACY;
constexpr V1LayerParameter_LayerType V1LayerParameter::ARGMAX;
constexpr V1LayerParameter_LayerType V1LayerParameter::BNLL;
constexpr V1LayerParameter_LayerType V1LayerParameter::CONCAT;
constexpr V1LayerParameter_LayerType V1LayerParameter::CONTRASTIVE_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::CONVOLUTION;
constexpr V1LayerParameter_LayerType V1LayerParameter::DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::DECONVOLUTION;
constexpr V1LayerParameter_LayerType V1LayerParameter::DROPOUT;
constexpr V1LayerParameter_LayerType V1LayerParameter::DUMMY_DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::EUCLIDEAN_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::ELTWISE;
constexpr V1LayerParameter_LayerType V1LayerParameter::EXP;
constexpr V1LayerParameter_LayerType V1LayerParameter::FLATTEN;
constexpr V1LayerParameter_LayerType V1LayerParameter::HDF5_DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::HDF5_OUTPUT;
constexpr V1LayerParameter_LayerType V1LayerParameter::HINGE_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::IM2COL;
constexpr V1LayerParameter_LayerType V1LayerParameter::IMAGE_DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::INFOGAIN_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::INNER_PRODUCT;
constexpr V1LayerParameter_LayerType V1LayerParameter::LRN;
constexpr V1LayerParameter_LayerType V1LayerParameter::MEMORY_DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::MULTINOMIAL_LOGISTIC_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::MVN;
constexpr V1LayerParameter_LayerType V1LayerParameter::POOLING;
constexpr V1LayerParameter_LayerType V1LayerParameter::POWER;
constexpr V1LayerParameter_LayerType V1LayerParameter::RELU;
constexpr V1LayerParameter_LayerType V1LayerParameter::SIGMOID;
constexpr V1LayerParameter_LayerType V1LayerParameter::SIGMOID_CROSS_ENTROPY_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::SILENCE;
constexpr V1LayerParameter_LayerType V1LayerParameter::SOFTMAX;
constexpr V1LayerParameter_LayerType V1LayerParameter::SOFTMAX_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::SPLIT;
constexpr V1LayerParameter_LayerType V1LayerParameter::SLICE;
constexpr V1LayerParameter_LayerType V1LayerParameter::TANH;
constexpr V1LayerParameter_LayerType V1LayerParameter::WINDOW_DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::THRESHOLD;
constexpr V1LayerParameter_LayerType V1LayerParameter::LayerType_MIN;
constexpr V1LayerParameter_LayerType V1LayerParameter::LayerType_MAX;
constexpr int V1LayerParameter::LayerType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* V1LayerParameter_DimCheckMode_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[23];
}
bool V1LayerParameter_DimCheckMode_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 V1LayerParameter_DimCheckMode V1LayerParameter::STRICT;
constexpr V1LayerParameter_DimCheckMode V1LayerParameter::PERMISSIVE;
constexpr V1LayerParameter_DimCheckMode V1LayerParameter::DimCheckMode_MIN;
constexpr V1LayerParameter_DimCheckMode V1LayerParameter::DimCheckMode_MAX;
constexpr int V1LayerParameter::DimCheckMode_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* V0LayerParameter_PoolMethod_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[24];
}
bool V0LayerParameter_PoolMethod_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr V0LayerParameter_PoolMethod V0LayerParameter::MAX;
constexpr V0LayerParameter_PoolMethod V0LayerParameter::AVE;
constexpr V0LayerParameter_PoolMethod V0LayerParameter::STOCHASTIC;
constexpr V0LayerParameter_PoolMethod V0LayerParameter::PoolMethod_MIN;
constexpr V0LayerParameter_PoolMethod V0LayerParameter::PoolMethod_MAX;
constexpr int V0LayerParameter::PoolMethod_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Type_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[25];
}
bool Type_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}

const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Phase_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
  return file_level_enum_descriptors_opencv_2dcaffe_2eproto[26];
}
bool Phase_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}


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

class BlobShape::_Internal {
 public:
};

BlobShape::BlobShape(::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:opencv_caffe.BlobShape)
}
BlobShape::BlobShape(const BlobShape& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BlobShape* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.dim_){from._impl_.dim_}
    , /*decltype(_impl_._dim_cached_byte_size_)*/{0}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.BlobShape)
}

inline void BlobShape::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.dim_){arena}
    , /*decltype(_impl_._dim_cached_byte_size_)*/{0}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void BlobShape::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.dim_.~RepeatedField();
}

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

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

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

const char* BlobShape::_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) {
      // repeated int64 dim = 1 [packed = true];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_dim(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 8) {
          _internal_add_dim(::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:
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // repeated int64 dim = 1 [packed = true];
  {
    int byte_size = _impl_._dim_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt64Packed(
          1, _internal_dim(), byte_size, 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:opencv_caffe.BlobShape)
  return target;
}

size_t BlobShape::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.BlobShape)
  size_t total_size = 0;

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

  // repeated int64 dim = 1 [packed = true];
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int64Size(this->_impl_.dim_);
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    int cached_size = ::_pbi::ToCachedSize(data_size);
    _impl_._dim_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

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

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


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

  _this->_impl_.dim_.MergeFrom(from._impl_.dim_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void BlobShape::InternalSwap(BlobShape* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.dim_.InternalSwap(&other->_impl_.dim_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BlobShape::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[0]);
}

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

class BlobProto::_Internal {
 public:
  using HasBits = decltype(std::declval<BlobProto>()._impl_._has_bits_);
  static const ::opencv_caffe::BlobShape& shape(const BlobProto* msg);
  static void set_has_shape(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_raw_data_type(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_raw_data(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_num(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_channels(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_height(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_width(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

const ::opencv_caffe::BlobShape&
BlobProto::_Internal::shape(const BlobProto* msg) {
  return *msg->_impl_.shape_;
}
BlobProto::BlobProto(::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:opencv_caffe.BlobProto)
}
BlobProto::BlobProto(const BlobProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BlobProto* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.data_){from._impl_.data_}
    , decltype(_impl_.diff_){from._impl_.diff_}
    , decltype(_impl_.double_data_){from._impl_.double_data_}
    , decltype(_impl_.double_diff_){from._impl_.double_diff_}
    , decltype(_impl_.raw_data_){}
    , decltype(_impl_.shape_){nullptr}
    , decltype(_impl_.num_){}
    , decltype(_impl_.channels_){}
    , decltype(_impl_.height_){}
    , decltype(_impl_.width_){}
    , decltype(_impl_.raw_data_type_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.raw_data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.raw_data_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_raw_data()) {
    _this->_impl_.raw_data_.Set(from._internal_raw_data(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_shape()) {
    _this->_impl_.shape_ = new ::opencv_caffe::BlobShape(*from._impl_.shape_);
  }
  ::memcpy(&_impl_.num_, &from._impl_.num_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.raw_data_type_) -
    reinterpret_cast<char*>(&_impl_.num_)) + sizeof(_impl_.raw_data_type_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.BlobProto)
}

inline void BlobProto::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_.data_){arena}
    , decltype(_impl_.diff_){arena}
    , decltype(_impl_.double_data_){arena}
    , decltype(_impl_.double_diff_){arena}
    , decltype(_impl_.raw_data_){}
    , decltype(_impl_.shape_){nullptr}
    , decltype(_impl_.num_){0}
    , decltype(_impl_.channels_){0}
    , decltype(_impl_.height_){0}
    , decltype(_impl_.width_){0}
    , decltype(_impl_.raw_data_type_){0}
  };
  _impl_.raw_data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.raw_data_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void BlobProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.data_.~RepeatedField();
  _impl_.diff_.~RepeatedField();
  _impl_.double_data_.~RepeatedField();
  _impl_.double_diff_.~RepeatedField();
  _impl_.raw_data_.Destroy();
  if (this != internal_default_instance()) delete _impl_.shape_;
}

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

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

  _impl_.data_.Clear();
  _impl_.diff_.Clear();
  _impl_.double_data_.Clear();
  _impl_.double_diff_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.raw_data_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.shape_ != nullptr);
      _impl_.shape_->Clear();
    }
  }
  if (cached_has_bits & 0x0000007cu) {
    ::memset(&_impl_.num_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.raw_data_type_) -
        reinterpret_cast<char*>(&_impl_.num_)) + sizeof(_impl_.raw_data_type_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BlobProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 num = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_num(&has_bits);
          _impl_.num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 channels = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_channels(&has_bits);
          _impl_.channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 height = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_height(&has_bits);
          _impl_.height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 width = 4 [default = 0];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_width(&has_bits);
          _impl_.width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float data = 5 [packed = true];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_data(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 45) {
          _internal_add_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated float diff = 6 [packed = true];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_diff(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 53) {
          _internal_add_diff(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.BlobShape shape = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated double double_data = 8 [packed = true];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_double_data(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 65) {
          _internal_add_double_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // repeated double double_diff = 9 [packed = true];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_double_diff(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<uint8_t>(tag) == 73) {
          _internal_add_double_diff(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
          ptr += sizeof(double);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.Type raw_data_type = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::Type_IsValid(val))) {
            _internal_set_raw_data_type(static_cast<::opencv_caffe::Type>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(10, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional bytes raw_data = 12 [packed = false];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          auto str = _internal_mutable_raw_data();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          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* BlobProto::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.BlobProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

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

  // repeated float data = 5 [packed = true];
  if (this->_internal_data_size() > 0) {
    target = stream->WriteFixedPacked(5, _internal_data(), target);
  }

  // repeated float diff = 6 [packed = true];
  if (this->_internal_diff_size() > 0) {
    target = stream->WriteFixedPacked(6, _internal_diff(), target);
  }

  // optional .opencv_caffe.BlobShape shape = 7;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, _Internal::shape(this),
        _Internal::shape(this).GetCachedSize(), target, stream);
  }

  // repeated double double_data = 8 [packed = true];
  if (this->_internal_double_data_size() > 0) {
    target = stream->WriteFixedPacked(8, _internal_double_data(), target);
  }

  // repeated double double_diff = 9 [packed = true];
  if (this->_internal_double_diff_size() > 0) {
    target = stream->WriteFixedPacked(9, _internal_double_diff(), target);
  }

  // optional .opencv_caffe.Type raw_data_type = 10;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      10, this->_internal_raw_data_type(), target);
  }

  // optional bytes raw_data = 12 [packed = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteBytesMaybeAliased(
        12, this->_internal_raw_data(), 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:opencv_caffe.BlobProto)
  return target;
}

size_t BlobProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.BlobProto)
  size_t total_size = 0;

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

  // repeated float data = 5 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_data_size());
    size_t data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

  // repeated float diff = 6 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_diff_size());
    size_t data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

  // repeated double double_data = 8 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_double_data_size());
    size_t data_size = 8UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

  // repeated double double_diff = 9 [packed = true];
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_double_diff_size());
    size_t data_size = 8UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::_pbi::WireFormatLite::Int32Size(static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    // optional bytes raw_data = 12 [packed = false];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_raw_data());
    }

    // optional .opencv_caffe.BlobShape shape = 7;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.shape_);
    }

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

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

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

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

    // optional .opencv_caffe.Type raw_data_type = 10;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_raw_data_type());
    }

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

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


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

  _this->_impl_.data_.MergeFrom(from._impl_.data_);
  _this->_impl_.diff_.MergeFrom(from._impl_.diff_);
  _this->_impl_.double_data_.MergeFrom(from._impl_.double_data_);
  _this->_impl_.double_diff_.MergeFrom(from._impl_.double_diff_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_raw_data(from._internal_raw_data());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_shape()->::opencv_caffe::BlobShape::MergeFrom(
          from._internal_shape());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.num_ = from._impl_.num_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.channels_ = from._impl_.channels_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.height_ = from._impl_.height_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.width_ = from._impl_.width_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.raw_data_type_ = from._impl_.raw_data_type_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void BlobProto::InternalSwap(BlobProto* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.data_.InternalSwap(&other->_impl_.data_);
  _impl_.diff_.InternalSwap(&other->_impl_.diff_);
  _impl_.double_data_.InternalSwap(&other->_impl_.double_data_);
  _impl_.double_diff_.InternalSwap(&other->_impl_.double_diff_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.raw_data_, lhs_arena,
      &other->_impl_.raw_data_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BlobProto, _impl_.raw_data_type_)
      + sizeof(BlobProto::_impl_.raw_data_type_)
      - PROTOBUF_FIELD_OFFSET(BlobProto, _impl_.shape_)>(
          reinterpret_cast<char*>(&_impl_.shape_),
          reinterpret_cast<char*>(&other->_impl_.shape_));
}

::PROTOBUF_NAMESPACE_ID::Metadata BlobProto::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[1]);
}

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

class BlobProtoVector::_Internal {
 public:
};

BlobProtoVector::BlobProtoVector(::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:opencv_caffe.BlobProtoVector)
}
BlobProtoVector::BlobProtoVector(const BlobProtoVector& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BlobProtoVector* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.blobs_){from._impl_.blobs_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.BlobProtoVector)
}

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

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

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

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

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

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

const char* BlobProtoVector::_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) {
      // repeated .opencv_caffe.BlobProto blobs = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_blobs(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* BlobProtoVector::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.BlobProtoVector)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .opencv_caffe.BlobProto blobs = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_blobs_size()); i < n; i++) {
    const auto& repfield = this->_internal_blobs(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.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:opencv_caffe.BlobProtoVector)
  return target;
}

size_t BlobProtoVector::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.BlobProtoVector)
  size_t total_size = 0;

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

  // repeated .opencv_caffe.BlobProto blobs = 1;
  total_size += 1UL * this->_internal_blobs_size();
  for (const auto& msg : this->_impl_.blobs_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

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


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

  _this->_impl_.blobs_.MergeFrom(from._impl_.blobs_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void BlobProtoVector::InternalSwap(BlobProtoVector* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.blobs_.InternalSwap(&other->_impl_.blobs_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BlobProtoVector::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[2]);
}

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

class PermuteParameter::_Internal {
 public:
};

PermuteParameter::PermuteParameter(::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:opencv_caffe.PermuteParameter)
}
PermuteParameter::PermuteParameter(const PermuteParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  PermuteParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.order_){from._impl_.order_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.PermuteParameter)
}

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

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

inline void PermuteParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.order_.~RepeatedField();
}

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

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

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

const char* PermuteParameter::_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) {
      // repeated uint32 order = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_order(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr));
        } else if (static_cast<uint8_t>(tag) == 10) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_order(), ptr, ctx);
          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* PermuteParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PermuteParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated uint32 order = 1;
  for (int i = 0, n = this->_internal_order_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_order(i), 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:opencv_caffe.PermuteParameter)
  return target;
}

size_t PermuteParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PermuteParameter)
  size_t total_size = 0;

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

  // repeated uint32 order = 1;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.order_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_order_size());
    total_size += data_size;
  }

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

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


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

  _this->_impl_.order_.MergeFrom(from._impl_.order_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void PermuteParameter::InternalSwap(PermuteParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.order_.InternalSwap(&other->_impl_.order_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PermuteParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[3]);
}

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

class NormalizeBBoxParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<NormalizeBBoxParameter>()._impl_._has_bits_);
  static void set_has_across_spatial(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::opencv_caffe::FillerParameter& scale_filler(const NormalizeBBoxParameter* msg);
  static void set_has_scale_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_channel_shared(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_eps(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

const ::opencv_caffe::FillerParameter&
NormalizeBBoxParameter::_Internal::scale_filler(const NormalizeBBoxParameter* msg) {
  return *msg->_impl_.scale_filler_;
}
NormalizeBBoxParameter::NormalizeBBoxParameter(::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:opencv_caffe.NormalizeBBoxParameter)
}
NormalizeBBoxParameter::NormalizeBBoxParameter(const NormalizeBBoxParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  NormalizeBBoxParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.scale_filler_){nullptr}
    , decltype(_impl_.across_spatial_){}
    , decltype(_impl_.channel_shared_){}
    , decltype(_impl_.eps_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_scale_filler()) {
    _this->_impl_.scale_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.scale_filler_);
  }
  ::memcpy(&_impl_.across_spatial_, &from._impl_.across_spatial_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.eps_) -
    reinterpret_cast<char*>(&_impl_.across_spatial_)) + sizeof(_impl_.eps_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.NormalizeBBoxParameter)
}

inline void NormalizeBBoxParameter::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_.scale_filler_){nullptr}
    , decltype(_impl_.across_spatial_){true}
    , decltype(_impl_.channel_shared_){true}
    , decltype(_impl_.eps_){1e-10f}
  };
}

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

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

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

void NormalizeBBoxParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.NormalizeBBoxParameter)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(_impl_.scale_filler_ != nullptr);
      _impl_.scale_filler_->Clear();
    }
    _impl_.across_spatial_ = true;
    _impl_.channel_shared_ = true;
    _impl_.eps_ = 1e-10f;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* NormalizeBBoxParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool across_spatial = 1 [default = true];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_across_spatial(&has_bits);
          _impl_.across_spatial_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter scale_filler = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_scale_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool channel_shared = 3 [default = true];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_channel_shared(&has_bits);
          _impl_.channel_shared_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float eps = 4 [default = 1e-10];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          _Internal::set_has_eps(&has_bits);
          _impl_.eps_ = ::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* NormalizeBBoxParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NormalizeBBoxParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional bool across_spatial = 1 [default = true];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_across_spatial(), target);
  }

  // optional .opencv_caffe.FillerParameter scale_filler = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::scale_filler(this),
        _Internal::scale_filler(this).GetCachedSize(), target, stream);
  }

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

  // optional float eps = 4 [default = 1e-10];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_eps(), 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:opencv_caffe.NormalizeBBoxParameter)
  return target;
}

size_t NormalizeBBoxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NormalizeBBoxParameter)
  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 & 0x0000000fu) {
    // optional .opencv_caffe.FillerParameter scale_filler = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.scale_filler_);
    }

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

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

    // optional float eps = 4 [default = 1e-10];
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 4;
    }

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

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


void NormalizeBBoxParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<NormalizeBBoxParameter*>(&to_msg);
  auto& from = static_cast<const NormalizeBBoxParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.NormalizeBBoxParameter)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_scale_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_scale_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.across_spatial_ = from._impl_.across_spatial_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.channel_shared_ = from._impl_.channel_shared_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.eps_ = from._impl_.eps_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void NormalizeBBoxParameter::InternalSwap(NormalizeBBoxParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.scale_filler_, other->_impl_.scale_filler_);
  swap(_impl_.across_spatial_, other->_impl_.across_spatial_);
  swap(_impl_.channel_shared_, other->_impl_.channel_shared_);
  swap(_impl_.eps_, other->_impl_.eps_);
}

::PROTOBUF_NAMESPACE_ID::Metadata NormalizeBBoxParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[4]);
}

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

class PriorBoxParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<PriorBoxParameter>()._impl_._has_bits_);
  static void set_has_flip(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_clip(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_img_size(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_img_h(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_img_w(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_step(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_step_h(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_step_w(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_offset(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
};

PriorBoxParameter::PriorBoxParameter(::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:opencv_caffe.PriorBoxParameter)
}
PriorBoxParameter::PriorBoxParameter(const PriorBoxParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  PriorBoxParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.min_size_){from._impl_.min_size_}
    , decltype(_impl_.max_size_){from._impl_.max_size_}
    , decltype(_impl_.aspect_ratio_){from._impl_.aspect_ratio_}
    , decltype(_impl_.variance_){from._impl_.variance_}
    , decltype(_impl_.offset_h_){from._impl_.offset_h_}
    , decltype(_impl_.offset_w_){from._impl_.offset_w_}
    , decltype(_impl_.width_){from._impl_.width_}
    , decltype(_impl_.height_){from._impl_.height_}
    , decltype(_impl_.img_size_){}
    , decltype(_impl_.img_h_){}
    , decltype(_impl_.img_w_){}
    , decltype(_impl_.step_){}
    , decltype(_impl_.step_h_){}
    , decltype(_impl_.step_w_){}
    , decltype(_impl_.flip_){}
    , decltype(_impl_.clip_){}
    , decltype(_impl_.offset_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.img_size_, &from._impl_.img_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.offset_) -
    reinterpret_cast<char*>(&_impl_.img_size_)) + sizeof(_impl_.offset_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.PriorBoxParameter)
}

inline void PriorBoxParameter::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_size_){arena}
    , decltype(_impl_.max_size_){arena}
    , decltype(_impl_.aspect_ratio_){arena}
    , decltype(_impl_.variance_){arena}
    , decltype(_impl_.offset_h_){arena}
    , decltype(_impl_.offset_w_){arena}
    , decltype(_impl_.width_){arena}
    , decltype(_impl_.height_){arena}
    , decltype(_impl_.img_size_){0u}
    , decltype(_impl_.img_h_){0u}
    , decltype(_impl_.img_w_){0u}
    , decltype(_impl_.step_){0}
    , decltype(_impl_.step_h_){0}
    , decltype(_impl_.step_w_){0}
    , decltype(_impl_.flip_){true}
    , decltype(_impl_.clip_){true}
    , decltype(_impl_.offset_){0.5f}
  };
}

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

inline void PriorBoxParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.min_size_.~RepeatedField();
  _impl_.max_size_.~RepeatedField();
  _impl_.aspect_ratio_.~RepeatedField();
  _impl_.variance_.~RepeatedField();
  _impl_.offset_h_.~RepeatedField();
  _impl_.offset_w_.~RepeatedField();
  _impl_.width_.~RepeatedField();
  _impl_.height_.~RepeatedField();
}

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

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

  _impl_.min_size_.Clear();
  _impl_.max_size_.Clear();
  _impl_.aspect_ratio_.Clear();
  _impl_.variance_.Clear();
  _impl_.offset_h_.Clear();
  _impl_.offset_w_.Clear();
  _impl_.width_.Clear();
  _impl_.height_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    ::memset(&_impl_.img_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.step_w_) -
        reinterpret_cast<char*>(&_impl_.img_size_)) + sizeof(_impl_.step_w_));
    _impl_.flip_ = true;
    _impl_.clip_ = true;
  }
  _impl_.offset_ = 0.5f;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PriorBoxParameter::_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) {
      // repeated float min_size = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_min_size(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<13>(ptr));
        } else if (static_cast<uint8_t>(tag) == 10) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_min_size(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float max_size = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_max_size(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<21>(ptr));
        } else if (static_cast<uint8_t>(tag) == 18) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_max_size(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float aspect_ratio = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_aspect_ratio(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<29>(ptr));
        } else if (static_cast<uint8_t>(tag) == 26) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_aspect_ratio(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool flip = 4 [default = true];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_flip(&has_bits);
          _impl_.flip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool clip = 5 [default = true];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_clip(&has_bits);
          _impl_.clip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float variance = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_variance(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<53>(ptr));
        } else if (static_cast<uint8_t>(tag) == 50) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_variance(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 img_size = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_img_size(&has_bits);
          _impl_.img_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 img_h = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_img_h(&has_bits);
          _impl_.img_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 img_w = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_img_w(&has_bits);
          _impl_.img_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float step = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 85)) {
          _Internal::set_has_step(&has_bits);
          _impl_.step_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float step_h = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 93)) {
          _Internal::set_has_step_h(&has_bits);
          _impl_.step_h_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float step_w = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 101)) {
          _Internal::set_has_step_w(&has_bits);
          _impl_.step_w_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float offset = 13 [default = 0.5];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 109)) {
          _Internal::set_has_offset(&has_bits);
          _impl_.offset_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated float offset_h = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 117)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_offset_h(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<117>(ptr));
        } else if (static_cast<uint8_t>(tag) == 114) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_offset_h(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float offset_w = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 125)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_offset_w(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<125>(ptr));
        } else if (static_cast<uint8_t>(tag) == 122) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_offset_w(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float width = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 133)) {
          ptr -= 2;
          do {
            ptr += 2;
            _internal_add_width(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<133>(ptr));
        } else if (static_cast<uint8_t>(tag) == 130) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_width(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float height = 17;
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 141)) {
          ptr -= 2;
          do {
            ptr += 2;
            _internal_add_height(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<141>(ptr));
        } else if (static_cast<uint8_t>(tag) == 138) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_height(), ptr, ctx);
          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* PriorBoxParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PriorBoxParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated float min_size = 1;
  for (int i = 0, n = this->_internal_min_size_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_min_size(i), target);
  }

  // repeated float max_size = 2;
  for (int i = 0, n = this->_internal_max_size_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_max_size(i), target);
  }

  // repeated float aspect_ratio = 3;
  for (int i = 0, n = this->_internal_aspect_ratio_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_aspect_ratio(i), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // optional bool flip = 4 [default = true];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_flip(), target);
  }

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

  // repeated float variance = 6;
  for (int i = 0, n = this->_internal_variance_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(6, this->_internal_variance(i), target);
  }

  // optional uint32 img_size = 7;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_img_size(), target);
  }

  // optional uint32 img_h = 8;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_img_h(), target);
  }

  // optional uint32 img_w = 9;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_img_w(), target);
  }

  // optional float step = 10;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(10, this->_internal_step(), target);
  }

  // optional float step_h = 11;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(11, this->_internal_step_h(), target);
  }

  // optional float step_w = 12;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(12, this->_internal_step_w(), target);
  }

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

  // repeated float offset_h = 14;
  for (int i = 0, n = this->_internal_offset_h_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(14, this->_internal_offset_h(i), target);
  }

  // repeated float offset_w = 15;
  for (int i = 0, n = this->_internal_offset_w_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(15, this->_internal_offset_w(i), target);
  }

  // repeated float width = 16;
  for (int i = 0, n = this->_internal_width_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(16, this->_internal_width(i), target);
  }

  // repeated float height = 17;
  for (int i = 0, n = this->_internal_height_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(17, this->_internal_height(i), 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:opencv_caffe.PriorBoxParameter)
  return target;
}

size_t PriorBoxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PriorBoxParameter)
  size_t total_size = 0;

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

  // repeated float min_size = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_min_size_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_min_size_size());
    total_size += data_size;
  }

  // repeated float max_size = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_max_size_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_max_size_size());
    total_size += data_size;
  }

  // repeated float aspect_ratio = 3;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_aspect_ratio_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_aspect_ratio_size());
    total_size += data_size;
  }

  // repeated float variance = 6;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_variance_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_variance_size());
    total_size += data_size;
  }

  // repeated float offset_h = 14;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_offset_h_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_offset_h_size());
    total_size += data_size;
  }

  // repeated float offset_w = 15;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_offset_w_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_offset_w_size());
    total_size += data_size;
  }

  // repeated float width = 16;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_width_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::_pbi::FromIntSize(this->_internal_width_size());
    total_size += data_size;
  }

  // repeated float height = 17;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_height_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::_pbi::FromIntSize(this->_internal_height_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional uint32 img_size = 7;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_img_size());
    }

    // optional uint32 img_h = 8;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_img_h());
    }

    // optional uint32 img_w = 9;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_img_w());
    }

    // optional float step = 10;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 4;
    }

    // optional float step_h = 11;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 4;
    }

    // optional float step_w = 12;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 4;
    }

    // optional bool flip = 4 [default = true];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 1;
    }

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

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

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

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


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

  _this->_impl_.min_size_.MergeFrom(from._impl_.min_size_);
  _this->_impl_.max_size_.MergeFrom(from._impl_.max_size_);
  _this->_impl_.aspect_ratio_.MergeFrom(from._impl_.aspect_ratio_);
  _this->_impl_.variance_.MergeFrom(from._impl_.variance_);
  _this->_impl_.offset_h_.MergeFrom(from._impl_.offset_h_);
  _this->_impl_.offset_w_.MergeFrom(from._impl_.offset_w_);
  _this->_impl_.width_.MergeFrom(from._impl_.width_);
  _this->_impl_.height_.MergeFrom(from._impl_.height_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.img_size_ = from._impl_.img_size_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.img_h_ = from._impl_.img_h_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.img_w_ = from._impl_.img_w_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.step_ = from._impl_.step_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.step_h_ = from._impl_.step_h_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.step_w_ = from._impl_.step_w_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.flip_ = from._impl_.flip_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.clip_ = from._impl_.clip_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000100u) {
    _this->_internal_set_offset(from._internal_offset());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void PriorBoxParameter::InternalSwap(PriorBoxParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.min_size_.InternalSwap(&other->_impl_.min_size_);
  _impl_.max_size_.InternalSwap(&other->_impl_.max_size_);
  _impl_.aspect_ratio_.InternalSwap(&other->_impl_.aspect_ratio_);
  _impl_.variance_.InternalSwap(&other->_impl_.variance_);
  _impl_.offset_h_.InternalSwap(&other->_impl_.offset_h_);
  _impl_.offset_w_.InternalSwap(&other->_impl_.offset_w_);
  _impl_.width_.InternalSwap(&other->_impl_.width_);
  _impl_.height_.InternalSwap(&other->_impl_.height_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PriorBoxParameter, _impl_.step_w_)
      + sizeof(PriorBoxParameter::_impl_.step_w_)
      - PROTOBUF_FIELD_OFFSET(PriorBoxParameter, _impl_.img_size_)>(
          reinterpret_cast<char*>(&_impl_.img_size_),
          reinterpret_cast<char*>(&other->_impl_.img_size_));
  swap(_impl_.flip_, other->_impl_.flip_);
  swap(_impl_.clip_, other->_impl_.clip_);
  swap(_impl_.offset_, other->_impl_.offset_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PriorBoxParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[5]);
}

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

class DetectionOutputParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<DetectionOutputParameter>()._impl_._has_bits_);
  static void set_has_num_classes(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_share_location(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_background_label_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::opencv_caffe::NonMaximumSuppressionParameter& nms_param(const DetectionOutputParameter* msg);
  static void set_has_nms_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::opencv_caffe::SaveOutputParameter& save_output_param(const DetectionOutputParameter* msg);
  static void set_has_save_output_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_code_type(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_variance_encoded_in_target(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_keep_top_k(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_confidence_threshold(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_normalized_bbox(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_clip(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
};

const ::opencv_caffe::NonMaximumSuppressionParameter&
DetectionOutputParameter::_Internal::nms_param(const DetectionOutputParameter* msg) {
  return *msg->_impl_.nms_param_;
}
const ::opencv_caffe::SaveOutputParameter&
DetectionOutputParameter::_Internal::save_output_param(const DetectionOutputParameter* msg) {
  return *msg->_impl_.save_output_param_;
}
DetectionOutputParameter::DetectionOutputParameter(::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:opencv_caffe.DetectionOutputParameter)
}
DetectionOutputParameter::DetectionOutputParameter(const DetectionOutputParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  DetectionOutputParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.nms_param_){nullptr}
    , decltype(_impl_.save_output_param_){nullptr}
    , decltype(_impl_.num_classes_){}
    , decltype(_impl_.background_label_id_){}
    , decltype(_impl_.confidence_threshold_){}
    , decltype(_impl_.variance_encoded_in_target_){}
    , decltype(_impl_.clip_){}
    , decltype(_impl_.keep_top_k_){}
    , decltype(_impl_.code_type_){}
    , decltype(_impl_.share_location_){}
    , decltype(_impl_.normalized_bbox_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_nms_param()) {
    _this->_impl_.nms_param_ = new ::opencv_caffe::NonMaximumSuppressionParameter(*from._impl_.nms_param_);
  }
  if (from._internal_has_save_output_param()) {
    _this->_impl_.save_output_param_ = new ::opencv_caffe::SaveOutputParameter(*from._impl_.save_output_param_);
  }
  ::memcpy(&_impl_.num_classes_, &from._impl_.num_classes_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.normalized_bbox_) -
    reinterpret_cast<char*>(&_impl_.num_classes_)) + sizeof(_impl_.normalized_bbox_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.DetectionOutputParameter)
}

inline void DetectionOutputParameter::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_.nms_param_){nullptr}
    , decltype(_impl_.save_output_param_){nullptr}
    , decltype(_impl_.num_classes_){0u}
    , decltype(_impl_.background_label_id_){0}
    , decltype(_impl_.confidence_threshold_){0}
    , decltype(_impl_.variance_encoded_in_target_){false}
    , decltype(_impl_.clip_){false}
    , decltype(_impl_.keep_top_k_){-1}
    , decltype(_impl_.code_type_){1}
    , decltype(_impl_.share_location_){true}
    , decltype(_impl_.normalized_bbox_){true}
  };
}

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

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

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

void DetectionOutputParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.DetectionOutputParameter)
  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_.nms_param_ != nullptr);
      _impl_.nms_param_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.save_output_param_ != nullptr);
      _impl_.save_output_param_->Clear();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&_impl_.num_classes_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.clip_) -
        reinterpret_cast<char*>(&_impl_.num_classes_)) + sizeof(_impl_.clip_));
    _impl_.keep_top_k_ = -1;
  }
  if (cached_has_bits & 0x00000700u) {
    _impl_.code_type_ = 1;
    _impl_.share_location_ = true;
    _impl_.normalized_bbox_ = true;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DetectionOutputParameter::_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 uint32 num_classes = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_num_classes(&has_bits);
          _impl_.num_classes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool share_location = 2 [default = true];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_share_location(&has_bits);
          _impl_.share_location_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 background_label_id = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_background_label_id(&has_bits);
          _impl_.background_label_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.NonMaximumSuppressionParameter nms_param = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_nms_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SaveOutputParameter save_output_param = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_save_output_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::PriorBoxParameter_CodeType_IsValid(val))) {
            _internal_set_code_type(static_cast<::opencv_caffe::PriorBoxParameter_CodeType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int32 keep_top_k = 7 [default = -1];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_keep_top_k(&has_bits);
          _impl_.keep_top_k_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool variance_encoded_in_target = 8 [default = false];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_variance_encoded_in_target(&has_bits);
          _impl_.variance_encoded_in_target_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float confidence_threshold = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 77)) {
          _Internal::set_has_confidence_threshold(&has_bits);
          _impl_.confidence_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool normalized_bbox = 10 [default = true];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_normalized_bbox(&has_bits);
          _impl_.normalized_bbox_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool clip = 1000 [default = false];
      case 1000:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_clip(&has_bits);
          _impl_.clip_ = ::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* DetectionOutputParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.DetectionOutputParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 num_classes = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_classes(), target);
  }

  // optional bool share_location = 2 [default = true];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_share_location(), target);
  }

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

  // optional .opencv_caffe.NonMaximumSuppressionParameter nms_param = 4;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::nms_param(this),
        _Internal::nms_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.SaveOutputParameter save_output_param = 5;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::save_output_param(this),
        _Internal::save_output_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      6, this->_internal_code_type(), target);
  }

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

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

  // optional float confidence_threshold = 9;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(9, this->_internal_confidence_threshold(), target);
  }

  // optional bool normalized_bbox = 10 [default = true];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(10, this->_internal_normalized_bbox(), target);
  }

  // optional bool clip = 1000 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1000, this->_internal_clip(), 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:opencv_caffe.DetectionOutputParameter)
  return target;
}

size_t DetectionOutputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.DetectionOutputParameter)
  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 .opencv_caffe.NonMaximumSuppressionParameter nms_param = 4;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.nms_param_);
    }

    // optional .opencv_caffe.SaveOutputParameter save_output_param = 5;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.save_output_param_);
    }

    // optional uint32 num_classes = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_classes());
    }

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

    // optional float confidence_threshold = 9;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 4;
    }

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

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

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

  }
  if (cached_has_bits & 0x00000700u) {
    // optional .opencv_caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_code_type());
    }

    // optional bool share_location = 2 [default = true];
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 + 1;
    }

    // optional bool normalized_bbox = 10 [default = true];
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 + 1;
    }

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

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


void DetectionOutputParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<DetectionOutputParameter*>(&to_msg);
  auto& from = static_cast<const DetectionOutputParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.DetectionOutputParameter)
  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_nms_param()->::opencv_caffe::NonMaximumSuppressionParameter::MergeFrom(
          from._internal_nms_param());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_save_output_param()->::opencv_caffe::SaveOutputParameter::MergeFrom(
          from._internal_save_output_param());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.num_classes_ = from._impl_.num_classes_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.background_label_id_ = from._impl_.background_label_id_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.confidence_threshold_ = from._impl_.confidence_threshold_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.variance_encoded_in_target_ = from._impl_.variance_encoded_in_target_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.clip_ = from._impl_.clip_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.keep_top_k_ = from._impl_.keep_top_k_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000700u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.code_type_ = from._impl_.code_type_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.share_location_ = from._impl_.share_location_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.normalized_bbox_ = from._impl_.normalized_bbox_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void DetectionOutputParameter::InternalSwap(DetectionOutputParameter* 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(DetectionOutputParameter, _impl_.clip_)
      + sizeof(DetectionOutputParameter::_impl_.clip_)
      - PROTOBUF_FIELD_OFFSET(DetectionOutputParameter, _impl_.nms_param_)>(
          reinterpret_cast<char*>(&_impl_.nms_param_),
          reinterpret_cast<char*>(&other->_impl_.nms_param_));
  swap(_impl_.keep_top_k_, other->_impl_.keep_top_k_);
  swap(_impl_.code_type_, other->_impl_.code_type_);
  swap(_impl_.share_location_, other->_impl_.share_location_);
  swap(_impl_.normalized_bbox_, other->_impl_.normalized_bbox_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DetectionOutputParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[6]);
}

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

class Datum::_Internal {
 public:
  using HasBits = decltype(std::declval<Datum>()._impl_._has_bits_);
  static void set_has_channels(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_height(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_width(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_data(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_label(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_encoded(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

Datum::Datum(::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:opencv_caffe.Datum)
}
Datum::Datum(const Datum& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  Datum* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.float_data_){from._impl_.float_data_}
    , decltype(_impl_.data_){}
    , decltype(_impl_.channels_){}
    , decltype(_impl_.height_){}
    , decltype(_impl_.width_){}
    , decltype(_impl_.label_){}
    , decltype(_impl_.encoded_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.data_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_data()) {
    _this->_impl_.data_.Set(from._internal_data(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.channels_, &from._impl_.channels_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.encoded_) -
    reinterpret_cast<char*>(&_impl_.channels_)) + sizeof(_impl_.encoded_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.Datum)
}

inline void Datum::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_.float_data_){arena}
    , decltype(_impl_.data_){}
    , decltype(_impl_.channels_){0}
    , decltype(_impl_.height_){0}
    , decltype(_impl_.width_){0}
    , decltype(_impl_.label_){0}
    , decltype(_impl_.encoded_){false}
  };
  _impl_.data_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.data_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void Datum::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.float_data_.~RepeatedField();
  _impl_.data_.Destroy();
}

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

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

  _impl_.float_data_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    _impl_.data_.ClearNonDefaultToEmpty();
  }
  if (cached_has_bits & 0x0000003eu) {
    ::memset(&_impl_.channels_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.encoded_) -
        reinterpret_cast<char*>(&_impl_.channels_)) + sizeof(_impl_.encoded_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Datum::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 channels = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_channels(&has_bits);
          _impl_.channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 height = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_height(&has_bits);
          _impl_.height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 width = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_width(&has_bits);
          _impl_.width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes data = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_data();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 label = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_label(&has_bits);
          _impl_.label_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float float_data = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_float_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<53>(ptr));
        } else if (static_cast<uint8_t>(tag) == 50) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_float_data(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool encoded = 7 [default = false];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_encoded(&has_bits);
          _impl_.encoded_ = ::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* Datum::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.Datum)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional int32 channels = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_channels(), target);
  }

  // optional int32 height = 2;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_height(), target);
  }

  // optional int32 width = 3;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_width(), target);
  }

  // optional bytes data = 4;
  if (cached_has_bits & 0x00000001u) {
    target = stream->WriteBytesMaybeAliased(
        4, this->_internal_data(), target);
  }

  // optional int32 label = 5;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_label(), target);
  }

  // repeated float float_data = 6;
  for (int i = 0, n = this->_internal_float_data_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(6, this->_internal_float_data(i), target);
  }

  // optional bool encoded = 7 [default = false];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_encoded(), 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:opencv_caffe.Datum)
  return target;
}

size_t Datum::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.Datum)
  size_t total_size = 0;

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

  // repeated float float_data = 6;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_float_data_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_float_data_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional bytes data = 4;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_data());
    }

    // optional int32 channels = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_channels());
    }

    // optional int32 height = 2;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_height());
    }

    // optional int32 width = 3;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_width());
    }

    // optional int32 label = 5;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_label());
    }

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

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

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


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

  _this->_impl_.float_data_.MergeFrom(from._impl_.float_data_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_data(from._internal_data());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.channels_ = from._impl_.channels_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.height_ = from._impl_.height_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.width_ = from._impl_.width_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.label_ = from._impl_.label_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.encoded_ = from._impl_.encoded_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void Datum::InternalSwap(Datum* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.float_data_.InternalSwap(&other->_impl_.float_data_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.data_, lhs_arena,
      &other->_impl_.data_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Datum, _impl_.encoded_)
      + sizeof(Datum::_impl_.encoded_)
      - PROTOBUF_FIELD_OFFSET(Datum, _impl_.channels_)>(
          reinterpret_cast<char*>(&_impl_.channels_),
          reinterpret_cast<char*>(&other->_impl_.channels_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Datum::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[7]);
}

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

class FillerParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<FillerParameter>()._impl_._has_bits_);
  static void set_has_type(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_value(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_min(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_max(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_mean(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_std(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_sparse(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_variance_norm(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::internal::LazyString FillerParameter::Impl_::_i_give_permission_to_break_this_code_default_type_{{{"constant", 8}}, {nullptr}};
FillerParameter::FillerParameter(::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:opencv_caffe.FillerParameter)
}
FillerParameter::FillerParameter(const FillerParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  FillerParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.type_){}
    , decltype(_impl_.value_){}
    , decltype(_impl_.min_){}
    , decltype(_impl_.mean_){}
    , decltype(_impl_.variance_norm_){}
    , decltype(_impl_.sparse_){}
    , decltype(_impl_.max_){}
    , decltype(_impl_.std_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.type_.InitDefault();
  if (from._internal_has_type()) {
    _this->_impl_.type_.Set(from._internal_type(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.value_, &from._impl_.value_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.std_) -
    reinterpret_cast<char*>(&_impl_.value_)) + sizeof(_impl_.std_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.FillerParameter)
}

inline void FillerParameter::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_.type_){}
    , decltype(_impl_.value_){0}
    , decltype(_impl_.min_){0}
    , decltype(_impl_.mean_){0}
    , decltype(_impl_.variance_norm_){0}
    , decltype(_impl_.sparse_){-1}
    , decltype(_impl_.max_){1}
    , decltype(_impl_.std_){1}
  };
  _impl_.type_.InitDefault();
}

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

inline void FillerParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.type_.Destroy();
}

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

void FillerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.FillerParameter)
  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 & 0x00000001u) {
    _impl_.type_.ClearToDefault(::opencv_caffe::FillerParameter::Impl_::_i_give_permission_to_break_this_code_default_type_, GetArenaForAllocation());
     }
  if (cached_has_bits & 0x000000feu) {
    ::memset(&_impl_.value_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.variance_norm_) -
        reinterpret_cast<char*>(&_impl_.value_)) + sizeof(_impl_.variance_norm_));
    _impl_.sparse_ = -1;
    _impl_.max_ = 1;
    _impl_.std_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* FillerParameter::_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 string type = 1 [default = "constant"];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_type();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.FillerParameter.type");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional float value = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_value(&has_bits);
          _impl_.value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float min = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _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 = 4 [default = 1];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          _Internal::set_has_max(&has_bits);
          _impl_.max_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float mean = 5 [default = 0];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
          _Internal::set_has_mean(&has_bits);
          _impl_.mean_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float std = 6 [default = 1];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
          _Internal::set_has_std(&has_bits);
          _impl_.std_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 sparse = 7 [default = -1];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_sparse(&has_bits);
          _impl_.sparse_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::FillerParameter_VarianceNorm_IsValid(val))) {
            _internal_set_variance_norm(static_cast<::opencv_caffe::FillerParameter_VarianceNorm>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(8, val, mutable_unknown_fields());
          }
        } 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* FillerParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.FillerParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string type = 1 [default = "constant"];
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_type().data(), static_cast<int>(this->_internal_type().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.FillerParameter.type");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_type(), target);
  }

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

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

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

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

  // optional float std = 6 [default = 1];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(6, this->_internal_std(), target);
  }

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

  // optional .opencv_caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      8, this->_internal_variance_norm(), 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:opencv_caffe.FillerParameter)
  return target;
}

size_t FillerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.FillerParameter)
  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 string type = 1 [default = "constant"];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_type());
    }

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

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

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

    // optional .opencv_caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_variance_norm());
    }

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

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

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

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

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


void FillerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<FillerParameter*>(&to_msg);
  auto& from = static_cast<const FillerParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.FillerParameter)
  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_set_type(from._internal_type());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.value_ = from._impl_.value_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.min_ = from._impl_.min_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.mean_ = from._impl_.mean_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.variance_norm_ = from._impl_.variance_norm_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.sparse_ = from._impl_.sparse_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.max_ = from._impl_.max_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.std_ = from._impl_.std_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void FillerParameter::InternalSwap(FillerParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.type_, lhs_arena,
      &other->_impl_.type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(FillerParameter, _impl_.variance_norm_)
      + sizeof(FillerParameter::_impl_.variance_norm_)
      - PROTOBUF_FIELD_OFFSET(FillerParameter, _impl_.value_)>(
          reinterpret_cast<char*>(&_impl_.value_),
          reinterpret_cast<char*>(&other->_impl_.value_));
  swap(_impl_.sparse_, other->_impl_.sparse_);
  swap(_impl_.max_, other->_impl_.max_);
  swap(_impl_.std_, other->_impl_.std_);
}

::PROTOBUF_NAMESPACE_ID::Metadata FillerParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[8]);
}

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

class NetParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<NetParameter>()._impl_._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_force_backward(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::opencv_caffe::NetState& state(const NetParameter* msg);
  static void set_has_state(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_debug_info(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

const ::opencv_caffe::NetState&
NetParameter::_Internal::state(const NetParameter* msg) {
  return *msg->_impl_.state_;
}
NetParameter::NetParameter(::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:opencv_caffe.NetParameter)
}
NetParameter::NetParameter(const NetParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  NetParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.layers_){from._impl_.layers_}
    , decltype(_impl_.input_){from._impl_.input_}
    , decltype(_impl_.input_dim_){from._impl_.input_dim_}
    , decltype(_impl_.input_shape_){from._impl_.input_shape_}
    , decltype(_impl_.layer_){from._impl_.layer_}
    , decltype(_impl_.name_){}
    , decltype(_impl_.state_){nullptr}
    , decltype(_impl_.force_backward_){}
    , decltype(_impl_.debug_info_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_state()) {
    _this->_impl_.state_ = new ::opencv_caffe::NetState(*from._impl_.state_);
  }
  ::memcpy(&_impl_.force_backward_, &from._impl_.force_backward_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.debug_info_) -
    reinterpret_cast<char*>(&_impl_.force_backward_)) + sizeof(_impl_.debug_info_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.NetParameter)
}

inline void NetParameter::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_.layers_){arena}
    , decltype(_impl_.input_){arena}
    , decltype(_impl_.input_dim_){arena}
    , decltype(_impl_.input_shape_){arena}
    , decltype(_impl_.layer_){arena}
    , decltype(_impl_.name_){}
    , decltype(_impl_.state_){nullptr}
    , decltype(_impl_.force_backward_){false}
    , decltype(_impl_.debug_info_){false}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void NetParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.layers_.~RepeatedPtrField();
  _impl_.input_.~RepeatedPtrField();
  _impl_.input_dim_.~RepeatedField();
  _impl_.input_shape_.~RepeatedPtrField();
  _impl_.layer_.~RepeatedPtrField();
  _impl_.name_.Destroy();
  if (this != internal_default_instance()) delete _impl_.state_;
}

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

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

  _impl_.layers_.Clear();
  _impl_.input_.Clear();
  _impl_.input_dim_.Clear();
  _impl_.input_shape_.Clear();
  _impl_.layer_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.state_ != nullptr);
      _impl_.state_->Clear();
    }
  }
  ::memset(&_impl_.force_backward_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.debug_info_) -
      reinterpret_cast<char*>(&_impl_.force_backward_)) + sizeof(_impl_.debug_info_));
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* NetParameter::_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 string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.NetParameter.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.V1LayerParameter layers = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_layers(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated string input = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_input();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_caffe.NetParameter.input");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated int32 input_dim = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_input_dim(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
        } else if (static_cast<uint8_t>(tag) == 34) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_input_dim(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool force_backward = 5 [default = false];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_force_backward(&has_bits);
          _impl_.force_backward_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.NetState state = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_state(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool debug_info = 7 [default = false];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_debug_info(&has_bits);
          _impl_.debug_info_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.BlobShape input_shape = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_input_shape(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.LayerParameter layer = 100;
      case 100:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_layer(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<802>(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* NetParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NetParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.NetParameter.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // repeated .opencv_caffe.V1LayerParameter layers = 2;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_layers_size()); i < n; i++) {
    const auto& repfield = this->_internal_layers(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated string input = 3;
  for (int i = 0, n = this->_internal_input_size(); i < n; i++) {
    const auto& s = this->_internal_input(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.NetParameter.input");
    target = stream->WriteString(3, s, target);
  }

  // repeated int32 input_dim = 4;
  for (int i = 0, n = this->_internal_input_dim_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_input_dim(i), target);
  }

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

  // optional .opencv_caffe.NetState state = 6;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::state(this),
        _Internal::state(this).GetCachedSize(), target, stream);
  }

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

  // repeated .opencv_caffe.BlobShape input_shape = 8;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_input_shape_size()); i < n; i++) {
    const auto& repfield = this->_internal_input_shape(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(8, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .opencv_caffe.LayerParameter layer = 100;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_layer_size()); i < n; i++) {
    const auto& repfield = this->_internal_layer(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(100, repfield, repfield.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:opencv_caffe.NetParameter)
  return target;
}

size_t NetParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NetParameter)
  size_t total_size = 0;

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

  // repeated .opencv_caffe.V1LayerParameter layers = 2;
  total_size += 1UL * this->_internal_layers_size();
  for (const auto& msg : this->_impl_.layers_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

  // repeated int32 input_dim = 4;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int32Size(this->_impl_.input_dim_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_input_dim_size());
    total_size += data_size;
  }

  // repeated .opencv_caffe.BlobShape input_shape = 8;
  total_size += 1UL * this->_internal_input_shape_size();
  for (const auto& msg : this->_impl_.input_shape_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_caffe.LayerParameter layer = 100;
  total_size += 2UL * this->_internal_layer_size();
  for (const auto& msg : this->_impl_.layer_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional string name = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional .opencv_caffe.NetState state = 6;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.state_);
    }

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

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

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

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


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

  _this->_impl_.layers_.MergeFrom(from._impl_.layers_);
  _this->_impl_.input_.MergeFrom(from._impl_.input_);
  _this->_impl_.input_dim_.MergeFrom(from._impl_.input_dim_);
  _this->_impl_.input_shape_.MergeFrom(from._impl_.input_shape_);
  _this->_impl_.layer_.MergeFrom(from._impl_.layer_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_state()->::opencv_caffe::NetState::MergeFrom(
          from._internal_state());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.force_backward_ = from._impl_.force_backward_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.debug_info_ = from._impl_.debug_info_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool NetParameter::IsInitialized() const {
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.layer_))
    return false;
  return true;
}

void NetParameter::InternalSwap(NetParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.layers_.InternalSwap(&other->_impl_.layers_);
  _impl_.input_.InternalSwap(&other->_impl_.input_);
  _impl_.input_dim_.InternalSwap(&other->_impl_.input_dim_);
  _impl_.input_shape_.InternalSwap(&other->_impl_.input_shape_);
  _impl_.layer_.InternalSwap(&other->_impl_.layer_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(NetParameter, _impl_.debug_info_)
      + sizeof(NetParameter::_impl_.debug_info_)
      - PROTOBUF_FIELD_OFFSET(NetParameter, _impl_.state_)>(
          reinterpret_cast<char*>(&_impl_.state_),
          reinterpret_cast<char*>(&other->_impl_.state_));
}

::PROTOBUF_NAMESPACE_ID::Metadata NetParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[9]);
}

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

class SolverParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<SolverParameter>()._impl_._has_bits_);
  static void set_has_net(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::opencv_caffe::NetParameter& net_param(const SolverParameter* msg);
  static void set_has_net_param(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_train_net(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::opencv_caffe::NetParameter& train_net_param(const SolverParameter* msg);
  static void set_has_train_net_param(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::opencv_caffe::NetState& train_state(const SolverParameter* msg);
  static void set_has_train_state(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_test_interval(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_test_compute_loss(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static void set_has_test_initialization(HasBits* has_bits) {
    (*has_bits)[0] |= 134217728u;
  }
  static void set_has_base_lr(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_display(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_average_loss(HasBits* has_bits) {
    (*has_bits)[0] |= 1073741824u;
  }
  static void set_has_max_iter(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_iter_size(HasBits* has_bits) {
    (*has_bits)[1] |= 1u;
  }
  static void set_has_lr_policy(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_gamma(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static void set_has_power(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static void set_has_momentum(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static void set_has_weight_decay(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static void set_has_regularization_type(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_stepsize(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static void set_has_clip_gradients(HasBits* has_bits) {
    (*has_bits)[0] |= 2147483648u;
  }
  static void set_has_snapshot(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static void set_has_snapshot_prefix(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_snapshot_diff(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
  static void set_has_snapshot_format(HasBits* has_bits) {
    (*has_bits)[1] |= 2u;
  }
  static void set_has_solver_mode(HasBits* has_bits) {
    (*has_bits)[0] |= 67108864u;
  }
  static void set_has_device_id(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static void set_has_random_seed(HasBits* has_bits) {
    (*has_bits)[0] |= 33554432u;
  }
  static void set_has_type(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_delta(HasBits* has_bits) {
    (*has_bits)[0] |= 536870912u;
  }
  static void set_has_momentum2(HasBits* has_bits) {
    (*has_bits)[0] |= 16777216u;
  }
  static void set_has_rms_decay(HasBits* has_bits) {
    (*has_bits)[1] |= 4u;
  }
  static void set_has_debug_info(HasBits* has_bits) {
    (*has_bits)[0] |= 4194304u;
  }
  static void set_has_snapshot_after_train(HasBits* has_bits) {
    (*has_bits)[0] |= 268435456u;
  }
  static void set_has_solver_type(HasBits* has_bits) {
    (*has_bits)[0] |= 8388608u;
  }
};

const ::opencv_caffe::NetParameter&
SolverParameter::_Internal::net_param(const SolverParameter* msg) {
  return *msg->_impl_.net_param_;
}
const ::opencv_caffe::NetParameter&
SolverParameter::_Internal::train_net_param(const SolverParameter* msg) {
  return *msg->_impl_.train_net_param_;
}
const ::opencv_caffe::NetState&
SolverParameter::_Internal::train_state(const SolverParameter* msg) {
  return *msg->_impl_.train_state_;
}
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString SolverParameter::Impl_::_i_give_permission_to_break_this_code_default_regularization_type_{{{"L2", 2}}, {nullptr}};
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString SolverParameter::Impl_::_i_give_permission_to_break_this_code_default_type_{{{"SGD", 3}}, {nullptr}};
SolverParameter::SolverParameter(::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:opencv_caffe.SolverParameter)
}
SolverParameter::SolverParameter(const SolverParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  SolverParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.test_net_){from._impl_.test_net_}
    , decltype(_impl_.test_iter_){from._impl_.test_iter_}
    , decltype(_impl_.test_net_param_){from._impl_.test_net_param_}
    , decltype(_impl_.test_state_){from._impl_.test_state_}
    , decltype(_impl_.stepvalue_){from._impl_.stepvalue_}
    , decltype(_impl_.train_net_){}
    , decltype(_impl_.lr_policy_){}
    , decltype(_impl_.snapshot_prefix_){}
    , decltype(_impl_.net_){}
    , decltype(_impl_.regularization_type_){}
    , decltype(_impl_.type_){}
    , decltype(_impl_.train_net_param_){nullptr}
    , decltype(_impl_.net_param_){nullptr}
    , decltype(_impl_.train_state_){nullptr}
    , decltype(_impl_.test_interval_){}
    , decltype(_impl_.base_lr_){}
    , decltype(_impl_.display_){}
    , decltype(_impl_.max_iter_){}
    , decltype(_impl_.gamma_){}
    , decltype(_impl_.power_){}
    , decltype(_impl_.momentum_){}
    , decltype(_impl_.weight_decay_){}
    , decltype(_impl_.stepsize_){}
    , decltype(_impl_.snapshot_){}
    , decltype(_impl_.device_id_){}
    , decltype(_impl_.test_compute_loss_){}
    , decltype(_impl_.snapshot_diff_){}
    , decltype(_impl_.debug_info_){}
    , decltype(_impl_.solver_type_){}
    , decltype(_impl_.momentum2_){}
    , decltype(_impl_.random_seed_){}
    , decltype(_impl_.solver_mode_){}
    , decltype(_impl_.test_initialization_){}
    , decltype(_impl_.snapshot_after_train_){}
    , decltype(_impl_.delta_){}
    , decltype(_impl_.average_loss_){}
    , decltype(_impl_.clip_gradients_){}
    , decltype(_impl_.iter_size_){}
    , decltype(_impl_.snapshot_format_){}
    , decltype(_impl_.rms_decay_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.train_net_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.train_net_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_train_net()) {
    _this->_impl_.train_net_.Set(from._internal_train_net(), 
      _this->GetArenaForAllocation());
  }
  _impl_.lr_policy_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.lr_policy_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_lr_policy()) {
    _this->_impl_.lr_policy_.Set(from._internal_lr_policy(), 
      _this->GetArenaForAllocation());
  }
  _impl_.snapshot_prefix_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.snapshot_prefix_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_snapshot_prefix()) {
    _this->_impl_.snapshot_prefix_.Set(from._internal_snapshot_prefix(), 
      _this->GetArenaForAllocation());
  }
  _impl_.net_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.net_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_net()) {
    _this->_impl_.net_.Set(from._internal_net(), 
      _this->GetArenaForAllocation());
  }
  _impl_.regularization_type_.InitDefault();
  if (from._internal_has_regularization_type()) {
    _this->_impl_.regularization_type_.Set(from._internal_regularization_type(), 
      _this->GetArenaForAllocation());
  }
  _impl_.type_.InitDefault();
  if (from._internal_has_type()) {
    _this->_impl_.type_.Set(from._internal_type(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_train_net_param()) {
    _this->_impl_.train_net_param_ = new ::opencv_caffe::NetParameter(*from._impl_.train_net_param_);
  }
  if (from._internal_has_net_param()) {
    _this->_impl_.net_param_ = new ::opencv_caffe::NetParameter(*from._impl_.net_param_);
  }
  if (from._internal_has_train_state()) {
    _this->_impl_.train_state_ = new ::opencv_caffe::NetState(*from._impl_.train_state_);
  }
  ::memcpy(&_impl_.test_interval_, &from._impl_.test_interval_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.rms_decay_) -
    reinterpret_cast<char*>(&_impl_.test_interval_)) + sizeof(_impl_.rms_decay_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.SolverParameter)
}

inline void SolverParameter::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_.test_net_){arena}
    , decltype(_impl_.test_iter_){arena}
    , decltype(_impl_.test_net_param_){arena}
    , decltype(_impl_.test_state_){arena}
    , decltype(_impl_.stepvalue_){arena}
    , decltype(_impl_.train_net_){}
    , decltype(_impl_.lr_policy_){}
    , decltype(_impl_.snapshot_prefix_){}
    , decltype(_impl_.net_){}
    , decltype(_impl_.regularization_type_){}
    , decltype(_impl_.type_){}
    , decltype(_impl_.train_net_param_){nullptr}
    , decltype(_impl_.net_param_){nullptr}
    , decltype(_impl_.train_state_){nullptr}
    , decltype(_impl_.test_interval_){0}
    , decltype(_impl_.base_lr_){0}
    , decltype(_impl_.display_){0}
    , decltype(_impl_.max_iter_){0}
    , decltype(_impl_.gamma_){0}
    , decltype(_impl_.power_){0}
    , decltype(_impl_.momentum_){0}
    , decltype(_impl_.weight_decay_){0}
    , decltype(_impl_.stepsize_){0}
    , decltype(_impl_.snapshot_){0}
    , decltype(_impl_.device_id_){0}
    , decltype(_impl_.test_compute_loss_){false}
    , decltype(_impl_.snapshot_diff_){false}
    , decltype(_impl_.debug_info_){false}
    , decltype(_impl_.solver_type_){0}
    , decltype(_impl_.momentum2_){0.999f}
    , decltype(_impl_.random_seed_){int64_t{-1}}
    , decltype(_impl_.solver_mode_){1}
    , decltype(_impl_.test_initialization_){true}
    , decltype(_impl_.snapshot_after_train_){true}
    , decltype(_impl_.delta_){1e-08f}
    , decltype(_impl_.average_loss_){1}
    , decltype(_impl_.clip_gradients_){-1}
    , decltype(_impl_.iter_size_){1}
    , decltype(_impl_.snapshot_format_){1}
    , decltype(_impl_.rms_decay_){0.99f}
  };
  _impl_.train_net_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.train_net_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.lr_policy_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.lr_policy_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.snapshot_prefix_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.snapshot_prefix_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.net_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.net_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.regularization_type_.InitDefault();
  _impl_.type_.InitDefault();
}

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

inline void SolverParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.test_net_.~RepeatedPtrField();
  _impl_.test_iter_.~RepeatedField();
  _impl_.test_net_param_.~RepeatedPtrField();
  _impl_.test_state_.~RepeatedPtrField();
  _impl_.stepvalue_.~RepeatedField();
  _impl_.train_net_.Destroy();
  _impl_.lr_policy_.Destroy();
  _impl_.snapshot_prefix_.Destroy();
  _impl_.net_.Destroy();
  _impl_.regularization_type_.Destroy();
  _impl_.type_.Destroy();
  if (this != internal_default_instance()) delete _impl_.train_net_param_;
  if (this != internal_default_instance()) delete _impl_.net_param_;
  if (this != internal_default_instance()) delete _impl_.train_state_;
}

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

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

  _impl_.test_net_.Clear();
  _impl_.test_iter_.Clear();
  _impl_.test_net_param_.Clear();
  _impl_.test_state_.Clear();
  _impl_.stepvalue_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.train_net_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.lr_policy_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.snapshot_prefix_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      _impl_.net_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      _impl_.regularization_type_.ClearToDefault(::opencv_caffe::SolverParameter::Impl_::_i_give_permission_to_break_this_code_default_regularization_type_, GetArenaForAllocation());
       }
    if (cached_has_bits & 0x00000020u) {
      _impl_.type_.ClearToDefault(::opencv_caffe::SolverParameter::Impl_::_i_give_permission_to_break_this_code_default_type_, GetArenaForAllocation());
       }
    if (cached_has_bits & 0x00000040u) {
      GOOGLE_DCHECK(_impl_.train_net_param_ != nullptr);
      _impl_.train_net_param_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      GOOGLE_DCHECK(_impl_.net_param_ != nullptr);
      _impl_.net_param_->Clear();
    }
  }
  if (cached_has_bits & 0x00000100u) {
    GOOGLE_DCHECK(_impl_.train_state_ != nullptr);
    _impl_.train_state_->Clear();
  }
  if (cached_has_bits & 0x0000fe00u) {
    ::memset(&_impl_.test_interval_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.momentum_) -
        reinterpret_cast<char*>(&_impl_.test_interval_)) + sizeof(_impl_.momentum_));
  }
  if (cached_has_bits & 0x00ff0000u) {
    ::memset(&_impl_.weight_decay_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.solver_type_) -
        reinterpret_cast<char*>(&_impl_.weight_decay_)) + sizeof(_impl_.solver_type_));
  }
  if (cached_has_bits & 0xff000000u) {
    _impl_.momentum2_ = 0.999f;
    _impl_.random_seed_ = int64_t{-1};
    _impl_.solver_mode_ = 1;
    _impl_.test_initialization_ = true;
    _impl_.snapshot_after_train_ = true;
    _impl_.delta_ = 1e-08f;
    _impl_.average_loss_ = 1;
    _impl_.clip_gradients_ = -1;
  }
  cached_has_bits = _impl_._has_bits_[1];
  if (cached_has_bits & 0x00000007u) {
    _impl_.iter_size_ = 1;
    _impl_.snapshot_format_ = 1;
    _impl_.rms_decay_ = 0.99f;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SolverParameter::_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) {
      // optional string train_net = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_train_net();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SolverParameter.train_net");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // repeated string test_net = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_test_net();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_caffe.SolverParameter.test_net");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated int32 test_iter = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_test_iter(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
        } else if (static_cast<uint8_t>(tag) == 26) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_test_iter(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 test_interval = 4 [default = 0];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_test_interval(&_impl_._has_bits_);
          _impl_.test_interval_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float base_lr = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
          _Internal::set_has_base_lr(&_impl_._has_bits_);
          _impl_.base_lr_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 display = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_display(&_impl_._has_bits_);
          _impl_.display_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 max_iter = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_max_iter(&_impl_._has_bits_);
          _impl_.max_iter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string lr_policy = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_lr_policy();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SolverParameter.lr_policy");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional float gamma = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 77)) {
          _Internal::set_has_gamma(&_impl_._has_bits_);
          _impl_.gamma_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float power = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 85)) {
          _Internal::set_has_power(&_impl_._has_bits_);
          _impl_.power_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float momentum = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 93)) {
          _Internal::set_has_momentum(&_impl_._has_bits_);
          _impl_.momentum_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float weight_decay = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 101)) {
          _Internal::set_has_weight_decay(&_impl_._has_bits_);
          _impl_.weight_decay_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 stepsize = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_stepsize(&_impl_._has_bits_);
          _impl_.stepsize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 snapshot = 14 [default = 0];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
          _Internal::set_has_snapshot(&_impl_._has_bits_);
          _impl_.snapshot_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string snapshot_prefix = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
          auto str = _internal_mutable_snapshot_prefix();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SolverParameter.snapshot_prefix");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional bool snapshot_diff = 16 [default = false];
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
          _Internal::set_has_snapshot_diff(&_impl_._has_bits_);
          _impl_.snapshot_diff_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SolverParameter_SolverMode_IsValid(val))) {
            _internal_set_solver_mode(static_cast<::opencv_caffe::SolverParameter_SolverMode>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(17, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int32 device_id = 18 [default = 0];
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
          _Internal::set_has_device_id(&_impl_._has_bits_);
          _impl_.device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool test_compute_loss = 19 [default = false];
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
          _Internal::set_has_test_compute_loss(&_impl_._has_bits_);
          _impl_.test_compute_loss_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int64 random_seed = 20 [default = -1];
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
          _Internal::set_has_random_seed(&_impl_._has_bits_);
          _impl_.random_seed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.NetParameter train_net_param = 21;
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
          ptr = ctx->ParseMessage(_internal_mutable_train_net_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.NetParameter test_net_param = 22;
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 178)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_test_net_param(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<178>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional bool debug_info = 23 [default = false];
      case 23:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 184)) {
          _Internal::set_has_debug_info(&_impl_._has_bits_);
          _impl_.debug_info_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string net = 24;
      case 24:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 194)) {
          auto str = _internal_mutable_net();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SolverParameter.net");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.NetParameter net_param = 25;
      case 25:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 202)) {
          ptr = ctx->ParseMessage(_internal_mutable_net_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.NetState train_state = 26;
      case 26:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 210)) {
          ptr = ctx->ParseMessage(_internal_mutable_train_state(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.NetState test_state = 27;
      case 27:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 218)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_test_state(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<218>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional bool snapshot_after_train = 28 [default = true];
      case 28:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 224)) {
          _Internal::set_has_snapshot_after_train(&_impl_._has_bits_);
          _impl_.snapshot_after_train_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string regularization_type = 29 [default = "L2"];
      case 29:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 234)) {
          auto str = _internal_mutable_regularization_type();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SolverParameter.regularization_type");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
      case 30:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 240)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SolverParameter_SolverType_IsValid(val))) {
            _internal_set_solver_type(static_cast<::opencv_caffe::SolverParameter_SolverType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(30, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional float delta = 31 [default = 1e-08];
      case 31:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 253)) {
          _Internal::set_has_delta(&_impl_._has_bits_);
          _impl_.delta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool test_initialization = 32 [default = true];
      case 32:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 0)) {
          _Internal::set_has_test_initialization(&_impl_._has_bits_);
          _impl_.test_initialization_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 average_loss = 33 [default = 1];
      case 33:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_average_loss(&_impl_._has_bits_);
          _impl_.average_loss_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 stepvalue = 34;
      case 34:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          ptr -= 2;
          do {
            ptr += 2;
            _internal_add_stepvalue(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<272>(ptr));
        } else if (static_cast<uint8_t>(tag) == 18) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_stepvalue(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float clip_gradients = 35 [default = -1];
      case 35:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_clip_gradients(&_impl_._has_bits_);
          _impl_.clip_gradients_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 iter_size = 36 [default = 1];
      case 36:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_iter_size(&_impl_._has_bits_);
          _impl_.iter_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
      case 37:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SolverParameter_SnapshotFormat_IsValid(val))) {
            _internal_set_snapshot_format(static_cast<::opencv_caffe::SolverParameter_SnapshotFormat>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(37, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional float rms_decay = 38 [default = 0.99];
      case 38:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
          _Internal::set_has_rms_decay(&_impl_._has_bits_);
          _impl_.rms_decay_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float momentum2 = 39 [default = 0.999];
      case 39:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
          _Internal::set_has_momentum2(&_impl_._has_bits_);
          _impl_.momentum2_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional string type = 40 [default = "SGD"];
      case 40:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          auto str = _internal_mutable_type();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SolverParameter.type");
          #endif  // !NDEBUG
        } 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* SolverParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SolverParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string train_net = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_train_net().data(), static_cast<int>(this->_internal_train_net().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SolverParameter.train_net");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_train_net(), target);
  }

  // repeated string test_net = 2;
  for (int i = 0, n = this->_internal_test_net_size(); i < n; i++) {
    const auto& s = this->_internal_test_net(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SolverParameter.test_net");
    target = stream->WriteString(2, s, target);
  }

  // repeated int32 test_iter = 3;
  for (int i = 0, n = this->_internal_test_iter_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_test_iter(i), target);
  }

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

  // optional float base_lr = 5;
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(5, this->_internal_base_lr(), target);
  }

  // optional int32 display = 6;
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_display(), target);
  }

  // optional int32 max_iter = 7;
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_max_iter(), target);
  }

  // optional string lr_policy = 8;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_lr_policy().data(), static_cast<int>(this->_internal_lr_policy().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SolverParameter.lr_policy");
    target = stream->WriteStringMaybeAliased(
        8, this->_internal_lr_policy(), target);
  }

  // optional float gamma = 9;
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(9, this->_internal_gamma(), target);
  }

  // optional float power = 10;
  if (cached_has_bits & 0x00004000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(10, this->_internal_power(), target);
  }

  // optional float momentum = 11;
  if (cached_has_bits & 0x00008000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(11, this->_internal_momentum(), target);
  }

  // optional float weight_decay = 12;
  if (cached_has_bits & 0x00010000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(12, this->_internal_weight_decay(), target);
  }

  // optional int32 stepsize = 13;
  if (cached_has_bits & 0x00020000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_stepsize(), target);
  }

  // optional int32 snapshot = 14 [default = 0];
  if (cached_has_bits & 0x00040000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(14, this->_internal_snapshot(), target);
  }

  // optional string snapshot_prefix = 15;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_snapshot_prefix().data(), static_cast<int>(this->_internal_snapshot_prefix().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SolverParameter.snapshot_prefix");
    target = stream->WriteStringMaybeAliased(
        15, this->_internal_snapshot_prefix(), target);
  }

  // optional bool snapshot_diff = 16 [default = false];
  if (cached_has_bits & 0x00200000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(16, this->_internal_snapshot_diff(), target);
  }

  // optional .opencv_caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
  if (cached_has_bits & 0x04000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      17, this->_internal_solver_mode(), target);
  }

  // optional int32 device_id = 18 [default = 0];
  if (cached_has_bits & 0x00080000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(18, this->_internal_device_id(), target);
  }

  // optional bool test_compute_loss = 19 [default = false];
  if (cached_has_bits & 0x00100000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(19, this->_internal_test_compute_loss(), target);
  }

  // optional int64 random_seed = 20 [default = -1];
  if (cached_has_bits & 0x02000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt64ToArray(20, this->_internal_random_seed(), target);
  }

  // optional .opencv_caffe.NetParameter train_net_param = 21;
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(21, _Internal::train_net_param(this),
        _Internal::train_net_param(this).GetCachedSize(), target, stream);
  }

  // repeated .opencv_caffe.NetParameter test_net_param = 22;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_test_net_param_size()); i < n; i++) {
    const auto& repfield = this->_internal_test_net_param(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(22, repfield, repfield.GetCachedSize(), target, stream);
  }

  // optional bool debug_info = 23 [default = false];
  if (cached_has_bits & 0x00400000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(23, this->_internal_debug_info(), target);
  }

  // optional string net = 24;
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_net().data(), static_cast<int>(this->_internal_net().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SolverParameter.net");
    target = stream->WriteStringMaybeAliased(
        24, this->_internal_net(), target);
  }

  // optional .opencv_caffe.NetParameter net_param = 25;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(25, _Internal::net_param(this),
        _Internal::net_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.NetState train_state = 26;
  if (cached_has_bits & 0x00000100u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(26, _Internal::train_state(this),
        _Internal::train_state(this).GetCachedSize(), target, stream);
  }

  // repeated .opencv_caffe.NetState test_state = 27;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_test_state_size()); i < n; i++) {
    const auto& repfield = this->_internal_test_state(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(27, repfield, repfield.GetCachedSize(), target, stream);
  }

  // optional bool snapshot_after_train = 28 [default = true];
  if (cached_has_bits & 0x10000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(28, this->_internal_snapshot_after_train(), target);
  }

  // optional string regularization_type = 29 [default = "L2"];
  if (cached_has_bits & 0x00000010u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_regularization_type().data(), static_cast<int>(this->_internal_regularization_type().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SolverParameter.regularization_type");
    target = stream->WriteStringMaybeAliased(
        29, this->_internal_regularization_type(), target);
  }

  // optional .opencv_caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
  if (cached_has_bits & 0x00800000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      30, this->_internal_solver_type(), target);
  }

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

  // optional bool test_initialization = 32 [default = true];
  if (cached_has_bits & 0x08000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(32, this->_internal_test_initialization(), target);
  }

  // optional int32 average_loss = 33 [default = 1];
  if (cached_has_bits & 0x40000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(33, this->_internal_average_loss(), target);
  }

  // repeated int32 stepvalue = 34;
  for (int i = 0, n = this->_internal_stepvalue_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(34, this->_internal_stepvalue(i), target);
  }

  // optional float clip_gradients = 35 [default = -1];
  if (cached_has_bits & 0x80000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(35, this->_internal_clip_gradients(), target);
  }

  cached_has_bits = _impl_._has_bits_[1];
  // optional int32 iter_size = 36 [default = 1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(36, this->_internal_iter_size(), target);
  }

  // optional .opencv_caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      37, this->_internal_snapshot_format(), target);
  }

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

  cached_has_bits = _impl_._has_bits_[0];
  // optional float momentum2 = 39 [default = 0.999];
  if (cached_has_bits & 0x01000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(39, this->_internal_momentum2(), target);
  }

  // optional string type = 40 [default = "SGD"];
  if (cached_has_bits & 0x00000020u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_type().data(), static_cast<int>(this->_internal_type().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SolverParameter.type");
    target = stream->WriteStringMaybeAliased(
        40, this->_internal_type(), 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:opencv_caffe.SolverParameter)
  return target;
}

size_t SolverParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SolverParameter)
  size_t total_size = 0;

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

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

  // repeated int32 test_iter = 3;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int32Size(this->_impl_.test_iter_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_test_iter_size());
    total_size += data_size;
  }

  // repeated .opencv_caffe.NetParameter test_net_param = 22;
  total_size += 2UL * this->_internal_test_net_param_size();
  for (const auto& msg : this->_impl_.test_net_param_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_caffe.NetState test_state = 27;
  total_size += 2UL * this->_internal_test_state_size();
  for (const auto& msg : this->_impl_.test_state_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated int32 stepvalue = 34;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int32Size(this->_impl_.stepvalue_);
    total_size += 2 *
                  ::_pbi::FromIntSize(this->_internal_stepvalue_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional string train_net = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_train_net());
    }

    // optional string lr_policy = 8;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_lr_policy());
    }

    // optional string snapshot_prefix = 15;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_snapshot_prefix());
    }

    // optional string net = 24;
    if (cached_has_bits & 0x00000008u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_net());
    }

    // optional string regularization_type = 29 [default = "L2"];
    if (cached_has_bits & 0x00000010u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_regularization_type());
    }

    // optional string type = 40 [default = "SGD"];
    if (cached_has_bits & 0x00000020u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_type());
    }

    // optional .opencv_caffe.NetParameter train_net_param = 21;
    if (cached_has_bits & 0x00000040u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.train_net_param_);
    }

    // optional .opencv_caffe.NetParameter net_param = 25;
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.net_param_);
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // optional .opencv_caffe.NetState train_state = 26;
    if (cached_has_bits & 0x00000100u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.train_state_);
    }

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

    // optional float base_lr = 5;
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 + 4;
    }

    // optional int32 display = 6;
    if (cached_has_bits & 0x00000800u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_display());
    }

    // optional int32 max_iter = 7;
    if (cached_has_bits & 0x00001000u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_iter());
    }

    // optional float gamma = 9;
    if (cached_has_bits & 0x00002000u) {
      total_size += 1 + 4;
    }

    // optional float power = 10;
    if (cached_has_bits & 0x00004000u) {
      total_size += 1 + 4;
    }

    // optional float momentum = 11;
    if (cached_has_bits & 0x00008000u) {
      total_size += 1 + 4;
    }

  }
  if (cached_has_bits & 0x00ff0000u) {
    // optional float weight_decay = 12;
    if (cached_has_bits & 0x00010000u) {
      total_size += 1 + 4;
    }

    // optional int32 stepsize = 13;
    if (cached_has_bits & 0x00020000u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_stepsize());
    }

    // optional int32 snapshot = 14 [default = 0];
    if (cached_has_bits & 0x00040000u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_snapshot());
    }

    // optional int32 device_id = 18 [default = 0];
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_device_id());
    }

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

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

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

    // optional .opencv_caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
    if (cached_has_bits & 0x00800000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_solver_type());
    }

  }
  if (cached_has_bits & 0xff000000u) {
    // optional float momentum2 = 39 [default = 0.999];
    if (cached_has_bits & 0x01000000u) {
      total_size += 2 + 4;
    }

    // optional int64 random_seed = 20 [default = -1];
    if (cached_has_bits & 0x02000000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int64Size(
          this->_internal_random_seed());
    }

    // optional .opencv_caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
    if (cached_has_bits & 0x04000000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_solver_mode());
    }

    // optional bool test_initialization = 32 [default = true];
    if (cached_has_bits & 0x08000000u) {
      total_size += 2 + 1;
    }

    // optional bool snapshot_after_train = 28 [default = true];
    if (cached_has_bits & 0x10000000u) {
      total_size += 2 + 1;
    }

    // optional float delta = 31 [default = 1e-08];
    if (cached_has_bits & 0x20000000u) {
      total_size += 2 + 4;
    }

    // optional int32 average_loss = 33 [default = 1];
    if (cached_has_bits & 0x40000000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_average_loss());
    }

    // optional float clip_gradients = 35 [default = -1];
    if (cached_has_bits & 0x80000000u) {
      total_size += 2 + 4;
    }

  }
  cached_has_bits = _impl_._has_bits_[1];
  if (cached_has_bits & 0x00000007u) {
    // optional int32 iter_size = 36 [default = 1];
    if (cached_has_bits & 0x00000001u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_iter_size());
    }

    // optional .opencv_caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
    if (cached_has_bits & 0x00000002u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_snapshot_format());
    }

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

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

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


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

  _this->_impl_.test_net_.MergeFrom(from._impl_.test_net_);
  _this->_impl_.test_iter_.MergeFrom(from._impl_.test_iter_);
  _this->_impl_.test_net_param_.MergeFrom(from._impl_.test_net_param_);
  _this->_impl_.test_state_.MergeFrom(from._impl_.test_state_);
  _this->_impl_.stepvalue_.MergeFrom(from._impl_.stepvalue_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_train_net(from._internal_train_net());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_lr_policy(from._internal_lr_policy());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_snapshot_prefix(from._internal_snapshot_prefix());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_set_net(from._internal_net());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_set_regularization_type(from._internal_regularization_type());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_set_type(from._internal_type());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_train_net_param()->::opencv_caffe::NetParameter::MergeFrom(
          from._internal_train_net_param());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_net_param()->::opencv_caffe::NetParameter::MergeFrom(
          from._internal_net_param());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_internal_mutable_train_state()->::opencv_caffe::NetState::MergeFrom(
          from._internal_train_state());
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.test_interval_ = from._impl_.test_interval_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.base_lr_ = from._impl_.base_lr_;
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_impl_.display_ = from._impl_.display_;
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_impl_.max_iter_ = from._impl_.max_iter_;
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_impl_.gamma_ = from._impl_.gamma_;
    }
    if (cached_has_bits & 0x00004000u) {
      _this->_impl_.power_ = from._impl_.power_;
    }
    if (cached_has_bits & 0x00008000u) {
      _this->_impl_.momentum_ = from._impl_.momentum_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      _this->_impl_.weight_decay_ = from._impl_.weight_decay_;
    }
    if (cached_has_bits & 0x00020000u) {
      _this->_impl_.stepsize_ = from._impl_.stepsize_;
    }
    if (cached_has_bits & 0x00040000u) {
      _this->_impl_.snapshot_ = from._impl_.snapshot_;
    }
    if (cached_has_bits & 0x00080000u) {
      _this->_impl_.device_id_ = from._impl_.device_id_;
    }
    if (cached_has_bits & 0x00100000u) {
      _this->_impl_.test_compute_loss_ = from._impl_.test_compute_loss_;
    }
    if (cached_has_bits & 0x00200000u) {
      _this->_impl_.snapshot_diff_ = from._impl_.snapshot_diff_;
    }
    if (cached_has_bits & 0x00400000u) {
      _this->_impl_.debug_info_ = from._impl_.debug_info_;
    }
    if (cached_has_bits & 0x00800000u) {
      _this->_impl_.solver_type_ = from._impl_.solver_type_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      _this->_impl_.momentum2_ = from._impl_.momentum2_;
    }
    if (cached_has_bits & 0x02000000u) {
      _this->_impl_.random_seed_ = from._impl_.random_seed_;
    }
    if (cached_has_bits & 0x04000000u) {
      _this->_impl_.solver_mode_ = from._impl_.solver_mode_;
    }
    if (cached_has_bits & 0x08000000u) {
      _this->_impl_.test_initialization_ = from._impl_.test_initialization_;
    }
    if (cached_has_bits & 0x10000000u) {
      _this->_impl_.snapshot_after_train_ = from._impl_.snapshot_after_train_;
    }
    if (cached_has_bits & 0x20000000u) {
      _this->_impl_.delta_ = from._impl_.delta_;
    }
    if (cached_has_bits & 0x40000000u) {
      _this->_impl_.average_loss_ = from._impl_.average_loss_;
    }
    if (cached_has_bits & 0x80000000u) {
      _this->_impl_.clip_gradients_ = from._impl_.clip_gradients_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  cached_has_bits = from._impl_._has_bits_[1];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.iter_size_ = from._impl_.iter_size_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.snapshot_format_ = from._impl_.snapshot_format_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.rms_decay_ = from._impl_.rms_decay_;
    }
    _this->_impl_._has_bits_[1] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool SolverParameter::IsInitialized() const {
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(_impl_.test_net_param_))
    return false;
  if (_internal_has_train_net_param()) {
    if (!_impl_.train_net_param_->IsInitialized()) return false;
  }
  if (_internal_has_net_param()) {
    if (!_impl_.net_param_->IsInitialized()) return false;
  }
  return true;
}

void SolverParameter::InternalSwap(SolverParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_._has_bits_[1], other->_impl_._has_bits_[1]);
  _impl_.test_net_.InternalSwap(&other->_impl_.test_net_);
  _impl_.test_iter_.InternalSwap(&other->_impl_.test_iter_);
  _impl_.test_net_param_.InternalSwap(&other->_impl_.test_net_param_);
  _impl_.test_state_.InternalSwap(&other->_impl_.test_state_);
  _impl_.stepvalue_.InternalSwap(&other->_impl_.stepvalue_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.train_net_, lhs_arena,
      &other->_impl_.train_net_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.lr_policy_, lhs_arena,
      &other->_impl_.lr_policy_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.snapshot_prefix_, lhs_arena,
      &other->_impl_.snapshot_prefix_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.net_, lhs_arena,
      &other->_impl_.net_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.regularization_type_, lhs_arena,
      &other->_impl_.regularization_type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.type_, lhs_arena,
      &other->_impl_.type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SolverParameter, _impl_.solver_type_)
      + sizeof(SolverParameter::_impl_.solver_type_)
      - PROTOBUF_FIELD_OFFSET(SolverParameter, _impl_.train_net_param_)>(
          reinterpret_cast<char*>(&_impl_.train_net_param_),
          reinterpret_cast<char*>(&other->_impl_.train_net_param_));
  swap(_impl_.momentum2_, other->_impl_.momentum2_);
  swap(_impl_.random_seed_, other->_impl_.random_seed_);
  swap(_impl_.solver_mode_, other->_impl_.solver_mode_);
  swap(_impl_.test_initialization_, other->_impl_.test_initialization_);
  swap(_impl_.snapshot_after_train_, other->_impl_.snapshot_after_train_);
  swap(_impl_.delta_, other->_impl_.delta_);
  swap(_impl_.average_loss_, other->_impl_.average_loss_);
  swap(_impl_.clip_gradients_, other->_impl_.clip_gradients_);
  swap(_impl_.iter_size_, other->_impl_.iter_size_);
  swap(_impl_.snapshot_format_, other->_impl_.snapshot_format_);
  swap(_impl_.rms_decay_, other->_impl_.rms_decay_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SolverParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[10]);
}

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

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

SolverState::SolverState(::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:opencv_caffe.SolverState)
}
SolverState::SolverState(const SolverState& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  SolverState* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.history_){from._impl_.history_}
    , decltype(_impl_.learned_net_){}
    , decltype(_impl_.iter_){}
    , decltype(_impl_.current_step_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.learned_net_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.learned_net_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_learned_net()) {
    _this->_impl_.learned_net_.Set(from._internal_learned_net(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.iter_, &from._impl_.iter_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.current_step_) -
    reinterpret_cast<char*>(&_impl_.iter_)) + sizeof(_impl_.current_step_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.SolverState)
}

inline void SolverState::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_.history_){arena}
    , decltype(_impl_.learned_net_){}
    , decltype(_impl_.iter_){0}
    , decltype(_impl_.current_step_){0}
  };
  _impl_.learned_net_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.learned_net_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void SolverState::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.history_.~RepeatedPtrField();
  _impl_.learned_net_.Destroy();
}

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

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

  _impl_.history_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    _impl_.learned_net_.ClearNonDefaultToEmpty();
  }
  if (cached_has_bits & 0x00000006u) {
    ::memset(&_impl_.iter_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.current_step_) -
        reinterpret_cast<char*>(&_impl_.iter_)) + sizeof(_impl_.current_step_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SolverState::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 iter = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_iter(&has_bits);
          _impl_.iter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string learned_net = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_learned_net();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SolverState.learned_net");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.BlobProto history = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_history(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional int32 current_step = 4 [default = 0];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_current_step(&has_bits);
          _impl_.current_step_ = ::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* SolverState::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SolverState)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional int32 iter = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_iter(), target);
  }

  // optional string learned_net = 2;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_learned_net().data(), static_cast<int>(this->_internal_learned_net().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SolverState.learned_net");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_learned_net(), target);
  }

  // repeated .opencv_caffe.BlobProto history = 3;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_history_size()); i < n; i++) {
    const auto& repfield = this->_internal_history(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
  }

  // optional int32 current_step = 4 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_current_step(), 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:opencv_caffe.SolverState)
  return target;
}

size_t SolverState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SolverState)
  size_t total_size = 0;

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

  // repeated .opencv_caffe.BlobProto history = 3;
  total_size += 1UL * this->_internal_history_size();
  for (const auto& msg : this->_impl_.history_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional string learned_net = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_learned_net());
    }

    // optional int32 iter = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_iter());
    }

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

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

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


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

  _this->_impl_.history_.MergeFrom(from._impl_.history_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_learned_net(from._internal_learned_net());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.iter_ = from._impl_.iter_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.current_step_ = from._impl_.current_step_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void SolverState::InternalSwap(SolverState* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.history_.InternalSwap(&other->_impl_.history_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.learned_net_, lhs_arena,
      &other->_impl_.learned_net_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SolverState, _impl_.current_step_)
      + sizeof(SolverState::_impl_.current_step_)
      - PROTOBUF_FIELD_OFFSET(SolverState, _impl_.iter_)>(
          reinterpret_cast<char*>(&_impl_.iter_),
          reinterpret_cast<char*>(&other->_impl_.iter_));
}

::PROTOBUF_NAMESPACE_ID::Metadata SolverState::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[11]);
}

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

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

NetState::NetState(::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:opencv_caffe.NetState)
}
NetState::NetState(const NetState& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  NetState* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.stage_){from._impl_.stage_}
    , decltype(_impl_.level_){}
    , decltype(_impl_.phase_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.level_, &from._impl_.level_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.phase_) -
    reinterpret_cast<char*>(&_impl_.level_)) + sizeof(_impl_.phase_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.NetState)
}

inline void NetState::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_.stage_){arena}
    , decltype(_impl_.level_){0}
    , decltype(_impl_.phase_){1}
  };
}

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

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

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

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

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

const char* NetState::_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 .opencv_caffe.Phase phase = 1 [default = TEST];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::Phase_IsValid(val))) {
            _internal_set_phase(static_cast<::opencv_caffe::Phase>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int32 level = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_level(&has_bits);
          _impl_.level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated string stage = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_stage();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_caffe.NetState.stage");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(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* NetState::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NetState)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.Phase phase = 1 [default = TEST];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_phase(), target);
  }

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

  // repeated string stage = 3;
  for (int i = 0, n = this->_internal_stage_size(); i < n; i++) {
    const auto& s = this->_internal_stage(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.NetState.stage");
    target = stream->WriteString(3, s, target);
  }

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

size_t NetState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NetState)
  size_t total_size = 0;

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional int32 level = 2 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_level());
    }

    // optional .opencv_caffe.Phase phase = 1 [default = TEST];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_phase());
    }

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

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


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

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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata NetState::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[12]);
}

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

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

NetStateRule::NetStateRule(::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:opencv_caffe.NetStateRule)
}
NetStateRule::NetStateRule(const NetStateRule& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  NetStateRule* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.stage_){from._impl_.stage_}
    , decltype(_impl_.not_stage_){from._impl_.not_stage_}
    , decltype(_impl_.phase_){}
    , decltype(_impl_.min_level_){}
    , decltype(_impl_.max_level_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.phase_, &from._impl_.phase_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.max_level_) -
    reinterpret_cast<char*>(&_impl_.phase_)) + sizeof(_impl_.max_level_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.NetStateRule)
}

inline void NetStateRule::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_.stage_){arena}
    , decltype(_impl_.not_stage_){arena}
    , decltype(_impl_.phase_){0}
    , decltype(_impl_.min_level_){0}
    , decltype(_impl_.max_level_){0}
  };
}

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

inline void NetStateRule::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.stage_.~RepeatedPtrField();
  _impl_.not_stage_.~RepeatedPtrField();
}

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

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

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

const char* NetStateRule::_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 .opencv_caffe.Phase phase = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::Phase_IsValid(val))) {
            _internal_set_phase(static_cast<::opencv_caffe::Phase>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int32 min_level = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_min_level(&has_bits);
          _impl_.min_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 max_level = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_max_level(&has_bits);
          _impl_.max_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated string stage = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_stage();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_caffe.NetStateRule.stage");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated string not_stage = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_not_stage();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_caffe.NetStateRule.not_stage");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(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* NetStateRule::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NetStateRule)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.Phase phase = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_phase(), target);
  }

  // optional int32 min_level = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_min_level(), target);
  }

  // optional int32 max_level = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_max_level(), target);
  }

  // repeated string stage = 4;
  for (int i = 0, n = this->_internal_stage_size(); i < n; i++) {
    const auto& s = this->_internal_stage(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.NetStateRule.stage");
    target = stream->WriteString(4, s, target);
  }

  // repeated string not_stage = 5;
  for (int i = 0, n = this->_internal_not_stage_size(); i < n; i++) {
    const auto& s = this->_internal_not_stage(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.NetStateRule.not_stage");
    target = stream->WriteString(5, s, target);
  }

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

size_t NetStateRule::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NetStateRule)
  size_t total_size = 0;

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional .opencv_caffe.Phase phase = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_phase());
    }

    // optional int32 min_level = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_min_level());
    }

    // optional int32 max_level = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_level());
    }

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

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


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

  _this->_impl_.stage_.MergeFrom(from._impl_.stage_);
  _this->_impl_.not_stage_.MergeFrom(from._impl_.not_stage_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.phase_ = from._impl_.phase_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.min_level_ = from._impl_.min_level_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.max_level_ = from._impl_.max_level_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata NetStateRule::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[13]);
}

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

class ParamSpec::_Internal {
 public:
  using HasBits = decltype(std::declval<ParamSpec>()._impl_._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_share_mode(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_lr_mult(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_decay_mult(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

ParamSpec::ParamSpec(::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:opencv_caffe.ParamSpec)
}
ParamSpec::ParamSpec(const ParamSpec& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ParamSpec* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.name_){}
    , decltype(_impl_.share_mode_){}
    , decltype(_impl_.lr_mult_){}
    , decltype(_impl_.decay_mult_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.share_mode_, &from._impl_.share_mode_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.decay_mult_) -
    reinterpret_cast<char*>(&_impl_.share_mode_)) + sizeof(_impl_.decay_mult_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ParamSpec)
}

inline void ParamSpec::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_.name_){}
    , decltype(_impl_.share_mode_){0}
    , decltype(_impl_.lr_mult_){1}
    , decltype(_impl_.decay_mult_){1}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void ParamSpec::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.name_.Destroy();
}

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

void ParamSpec::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ParamSpec)
  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 & 0x00000001u) {
    _impl_.name_.ClearNonDefaultToEmpty();
  }
  if (cached_has_bits & 0x0000000eu) {
    _impl_.share_mode_ = 0;
    _impl_.lr_mult_ = 1;
    _impl_.decay_mult_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ParamSpec::_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 string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.ParamSpec.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ParamSpec.DimCheckMode share_mode = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::ParamSpec_DimCheckMode_IsValid(val))) {
            _internal_set_share_mode(static_cast<::opencv_caffe::ParamSpec_DimCheckMode>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional float lr_mult = 3 [default = 1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_lr_mult(&has_bits);
          _impl_.lr_mult_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float decay_mult = 4 [default = 1];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          _Internal::set_has_decay_mult(&has_bits);
          _impl_.decay_mult_ = ::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* ParamSpec::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ParamSpec)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.ParamSpec.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // optional .opencv_caffe.ParamSpec.DimCheckMode share_mode = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      2, this->_internal_share_mode(), target);
  }

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

  // optional float decay_mult = 4 [default = 1];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_decay_mult(), 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:opencv_caffe.ParamSpec)
  return target;
}

size_t ParamSpec::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ParamSpec)
  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 & 0x0000000fu) {
    // optional string name = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional .opencv_caffe.ParamSpec.DimCheckMode share_mode = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_share_mode());
    }

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

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

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

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


void ParamSpec::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ParamSpec*>(&to_msg);
  auto& from = static_cast<const ParamSpec&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ParamSpec)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.share_mode_ = from._impl_.share_mode_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.lr_mult_ = from._impl_.lr_mult_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.decay_mult_ = from._impl_.decay_mult_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ParamSpec::InternalSwap(ParamSpec* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  swap(_impl_.share_mode_, other->_impl_.share_mode_);
  swap(_impl_.lr_mult_, other->_impl_.lr_mult_);
  swap(_impl_.decay_mult_, other->_impl_.decay_mult_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ParamSpec::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[14]);
}

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

class LayerParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<LayerParameter>()._impl_._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_type(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_phase(HasBits* has_bits) {
    (*has_bits)[1] |= 16777216u;
  }
  static const ::opencv_caffe::TransformationParameter& transform_param(const LayerParameter* msg);
  static void set_has_transform_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::opencv_caffe::LossParameter& loss_param(const LayerParameter* msg);
  static void set_has_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::opencv_caffe::AccuracyParameter& accuracy_param(const LayerParameter* msg);
  static void set_has_accuracy_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::opencv_caffe::ArgMaxParameter& argmax_param(const LayerParameter* msg);
  static void set_has_argmax_param(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::opencv_caffe::BatchNormParameter& batch_norm_param(const LayerParameter* msg);
  static void set_has_batch_norm_param(HasBits* has_bits) {
    (*has_bits)[1] |= 512u;
  }
  static const ::opencv_caffe::BiasParameter& bias_param(const LayerParameter* msg);
  static void set_has_bias_param(HasBits* has_bits) {
    (*has_bits)[1] |= 2048u;
  }
  static const ::opencv_caffe::ConcatParameter& concat_param(const LayerParameter* msg);
  static void set_has_concat_param(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::opencv_caffe::ContrastiveLossParameter& contrastive_loss_param(const LayerParameter* msg);
  static void set_has_contrastive_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::opencv_caffe::ConvolutionParameter& convolution_param(const LayerParameter* msg);
  static void set_has_convolution_param(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::opencv_caffe::CropParameter& crop_param(const LayerParameter* msg);
  static void set_has_crop_param(HasBits* has_bits) {
    (*has_bits)[1] |= 16384u;
  }
  static const ::opencv_caffe::DataParameter& data_param(const LayerParameter* msg);
  static void set_has_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::opencv_caffe::DetectionOutputParameter& detection_output_param(const LayerParameter* msg);
  static void set_has_detection_output_param(HasBits* has_bits) {
    (*has_bits)[1] |= 131072u;
  }
  static const ::opencv_caffe::DropoutParameter& dropout_param(const LayerParameter* msg);
  static void set_has_dropout_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static const ::opencv_caffe::DummyDataParameter& dummy_data_param(const LayerParameter* msg);
  static void set_has_dummy_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static const ::opencv_caffe::EltwiseParameter& eltwise_param(const LayerParameter* msg);
  static void set_has_eltwise_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static const ::opencv_caffe::ELUParameter& elu_param(const LayerParameter* msg);
  static void set_has_elu_param(HasBits* has_bits) {
    (*has_bits)[1] |= 1024u;
  }
  static const ::opencv_caffe::EmbedParameter& embed_param(const LayerParameter* msg);
  static void set_has_embed_param(HasBits* has_bits) {
    (*has_bits)[1] |= 128u;
  }
  static const ::opencv_caffe::ExpParameter& exp_param(const LayerParameter* msg);
  static void set_has_exp_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static const ::opencv_caffe::FlattenParameter& flatten_param(const LayerParameter* msg);
  static void set_has_flatten_param(HasBits* has_bits) {
    (*has_bits)[1] |= 32u;
  }
  static const ::opencv_caffe::HDF5DataParameter& hdf5_data_param(const LayerParameter* msg);
  static void set_has_hdf5_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static const ::opencv_caffe::HDF5OutputParameter& hdf5_output_param(const LayerParameter* msg);
  static void set_has_hdf5_output_param(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static const ::opencv_caffe::HingeLossParameter& hinge_loss_param(const LayerParameter* msg);
  static void set_has_hinge_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static const ::opencv_caffe::ImageDataParameter& image_data_param(const LayerParameter* msg);
  static void set_has_image_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static const ::opencv_caffe::InfogainLossParameter& infogain_loss_param(const LayerParameter* msg);
  static void set_has_infogain_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static const ::opencv_caffe::InnerProductParameter& inner_product_param(const LayerParameter* msg);
  static void set_has_inner_product_param(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static const ::opencv_caffe::InputParameter& input_param(const LayerParameter* msg);
  static void set_has_input_param(HasBits* has_bits) {
    (*has_bits)[1] |= 8192u;
  }
  static const ::opencv_caffe::LogParameter& log_param(const LayerParameter* msg);
  static void set_has_log_param(HasBits* has_bits) {
    (*has_bits)[1] |= 16u;
  }
  static const ::opencv_caffe::LRNParameter& lrn_param(const LayerParameter* msg);
  static void set_has_lrn_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static const ::opencv_caffe::MemoryDataParameter& memory_data_param(const LayerParameter* msg);
  static void set_has_memory_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
  static const ::opencv_caffe::MVNParameter& mvn_param(const LayerParameter* msg);
  static void set_has_mvn_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4194304u;
  }
  static const ::opencv_caffe::NormalizeBBoxParameter& norm_param(const LayerParameter* msg);
  static void set_has_norm_param(HasBits* has_bits) {
    (*has_bits)[1] |= 524288u;
  }
  static const ::opencv_caffe::PermuteParameter& permute_param(const LayerParameter* msg);
  static void set_has_permute_param(HasBits* has_bits) {
    (*has_bits)[1] |= 262144u;
  }
  static const ::opencv_caffe::ParameterParameter& parameter_param(const LayerParameter* msg);
  static void set_has_parameter_param(HasBits* has_bits) {
    (*has_bits)[1] |= 32768u;
  }
  static const ::opencv_caffe::PoolingParameter& pooling_param(const LayerParameter* msg);
  static void set_has_pooling_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8388608u;
  }
  static const ::opencv_caffe::PowerParameter& power_param(const LayerParameter* msg);
  static void set_has_power_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16777216u;
  }
  static const ::opencv_caffe::PReLUParameter& prelu_param(const LayerParameter* msg);
  static void set_has_prelu_param(HasBits* has_bits) {
    (*has_bits)[1] |= 2u;
  }
  static const ::opencv_caffe::PriorBoxParameter& prior_box_param(const LayerParameter* msg);
  static void set_has_prior_box_param(HasBits* has_bits) {
    (*has_bits)[1] |= 1048576u;
  }
  static const ::opencv_caffe::ProposalParameter& proposal_param(const LayerParameter* msg);
  static void set_has_proposal_param(HasBits* has_bits) {
    (*has_bits)[1] |= 2097152u;
  }
  static const ::opencv_caffe::PSROIPoolingParameter& psroi_pooling_param(const LayerParameter* msg);
  static void set_has_psroi_pooling_param(HasBits* has_bits) {
    (*has_bits)[1] |= 4194304u;
  }
  static const ::opencv_caffe::PythonParameter& python_param(const LayerParameter* msg);
  static void set_has_python_param(HasBits* has_bits) {
    (*has_bits)[1] |= 1u;
  }
  static const ::opencv_caffe::RecurrentParameter& recurrent_param(const LayerParameter* msg);
  static void set_has_recurrent_param(HasBits* has_bits) {
    (*has_bits)[1] |= 65536u;
  }
  static const ::opencv_caffe::ReductionParameter& reduction_param(const LayerParameter* msg);
  static void set_has_reduction_param(HasBits* has_bits) {
    (*has_bits)[1] |= 64u;
  }
  static const ::opencv_caffe::ReLUParameter& relu_param(const LayerParameter* msg);
  static void set_has_relu_param(HasBits* has_bits) {
    (*has_bits)[0] |= 33554432u;
  }
  static const ::opencv_caffe::ReshapeParameter& reshape_param(const LayerParameter* msg);
  static void set_has_reshape_param(HasBits* has_bits) {
    (*has_bits)[1] |= 8u;
  }
  static const ::opencv_caffe::ROIPoolingParameter& roi_pooling_param(const LayerParameter* msg);
  static void set_has_roi_pooling_param(HasBits* has_bits) {
    (*has_bits)[1] |= 8388608u;
  }
  static const ::opencv_caffe::ScaleParameter& scale_param(const LayerParameter* msg);
  static void set_has_scale_param(HasBits* has_bits) {
    (*has_bits)[1] |= 4096u;
  }
  static const ::opencv_caffe::SigmoidParameter& sigmoid_param(const LayerParameter* msg);
  static void set_has_sigmoid_param(HasBits* has_bits) {
    (*has_bits)[0] |= 67108864u;
  }
  static const ::opencv_caffe::SoftmaxParameter& softmax_param(const LayerParameter* msg);
  static void set_has_softmax_param(HasBits* has_bits) {
    (*has_bits)[0] |= 134217728u;
  }
  static const ::opencv_caffe::SPPParameter& spp_param(const LayerParameter* msg);
  static void set_has_spp_param(HasBits* has_bits) {
    (*has_bits)[1] |= 4u;
  }
  static const ::opencv_caffe::SliceParameter& slice_param(const LayerParameter* msg);
  static void set_has_slice_param(HasBits* has_bits) {
    (*has_bits)[0] |= 268435456u;
  }
  static const ::opencv_caffe::TanHParameter& tanh_param(const LayerParameter* msg);
  static void set_has_tanh_param(HasBits* has_bits) {
    (*has_bits)[0] |= 536870912u;
  }
  static const ::opencv_caffe::ThresholdParameter& threshold_param(const LayerParameter* msg);
  static void set_has_threshold_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1073741824u;
  }
  static const ::opencv_caffe::TileParameter& tile_param(const LayerParameter* msg);
  static void set_has_tile_param(HasBits* has_bits) {
    (*has_bits)[1] |= 256u;
  }
  static const ::opencv_caffe::WindowDataParameter& window_data_param(const LayerParameter* msg);
  static void set_has_window_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2147483648u;
  }
};

const ::opencv_caffe::TransformationParameter&
LayerParameter::_Internal::transform_param(const LayerParameter* msg) {
  return *msg->_impl_.transform_param_;
}
const ::opencv_caffe::LossParameter&
LayerParameter::_Internal::loss_param(const LayerParameter* msg) {
  return *msg->_impl_.loss_param_;
}
const ::opencv_caffe::AccuracyParameter&
LayerParameter::_Internal::accuracy_param(const LayerParameter* msg) {
  return *msg->_impl_.accuracy_param_;
}
const ::opencv_caffe::ArgMaxParameter&
LayerParameter::_Internal::argmax_param(const LayerParameter* msg) {
  return *msg->_impl_.argmax_param_;
}
const ::opencv_caffe::BatchNormParameter&
LayerParameter::_Internal::batch_norm_param(const LayerParameter* msg) {
  return *msg->_impl_.batch_norm_param_;
}
const ::opencv_caffe::BiasParameter&
LayerParameter::_Internal::bias_param(const LayerParameter* msg) {
  return *msg->_impl_.bias_param_;
}
const ::opencv_caffe::ConcatParameter&
LayerParameter::_Internal::concat_param(const LayerParameter* msg) {
  return *msg->_impl_.concat_param_;
}
const ::opencv_caffe::ContrastiveLossParameter&
LayerParameter::_Internal::contrastive_loss_param(const LayerParameter* msg) {
  return *msg->_impl_.contrastive_loss_param_;
}
const ::opencv_caffe::ConvolutionParameter&
LayerParameter::_Internal::convolution_param(const LayerParameter* msg) {
  return *msg->_impl_.convolution_param_;
}
const ::opencv_caffe::CropParameter&
LayerParameter::_Internal::crop_param(const LayerParameter* msg) {
  return *msg->_impl_.crop_param_;
}
const ::opencv_caffe::DataParameter&
LayerParameter::_Internal::data_param(const LayerParameter* msg) {
  return *msg->_impl_.data_param_;
}
const ::opencv_caffe::DetectionOutputParameter&
LayerParameter::_Internal::detection_output_param(const LayerParameter* msg) {
  return *msg->_impl_.detection_output_param_;
}
const ::opencv_caffe::DropoutParameter&
LayerParameter::_Internal::dropout_param(const LayerParameter* msg) {
  return *msg->_impl_.dropout_param_;
}
const ::opencv_caffe::DummyDataParameter&
LayerParameter::_Internal::dummy_data_param(const LayerParameter* msg) {
  return *msg->_impl_.dummy_data_param_;
}
const ::opencv_caffe::EltwiseParameter&
LayerParameter::_Internal::eltwise_param(const LayerParameter* msg) {
  return *msg->_impl_.eltwise_param_;
}
const ::opencv_caffe::ELUParameter&
LayerParameter::_Internal::elu_param(const LayerParameter* msg) {
  return *msg->_impl_.elu_param_;
}
const ::opencv_caffe::EmbedParameter&
LayerParameter::_Internal::embed_param(const LayerParameter* msg) {
  return *msg->_impl_.embed_param_;
}
const ::opencv_caffe::ExpParameter&
LayerParameter::_Internal::exp_param(const LayerParameter* msg) {
  return *msg->_impl_.exp_param_;
}
const ::opencv_caffe::FlattenParameter&
LayerParameter::_Internal::flatten_param(const LayerParameter* msg) {
  return *msg->_impl_.flatten_param_;
}
const ::opencv_caffe::HDF5DataParameter&
LayerParameter::_Internal::hdf5_data_param(const LayerParameter* msg) {
  return *msg->_impl_.hdf5_data_param_;
}
const ::opencv_caffe::HDF5OutputParameter&
LayerParameter::_Internal::hdf5_output_param(const LayerParameter* msg) {
  return *msg->_impl_.hdf5_output_param_;
}
const ::opencv_caffe::HingeLossParameter&
LayerParameter::_Internal::hinge_loss_param(const LayerParameter* msg) {
  return *msg->_impl_.hinge_loss_param_;
}
const ::opencv_caffe::ImageDataParameter&
LayerParameter::_Internal::image_data_param(const LayerParameter* msg) {
  return *msg->_impl_.image_data_param_;
}
const ::opencv_caffe::InfogainLossParameter&
LayerParameter::_Internal::infogain_loss_param(const LayerParameter* msg) {
  return *msg->_impl_.infogain_loss_param_;
}
const ::opencv_caffe::InnerProductParameter&
LayerParameter::_Internal::inner_product_param(const LayerParameter* msg) {
  return *msg->_impl_.inner_product_param_;
}
const ::opencv_caffe::InputParameter&
LayerParameter::_Internal::input_param(const LayerParameter* msg) {
  return *msg->_impl_.input_param_;
}
const ::opencv_caffe::LogParameter&
LayerParameter::_Internal::log_param(const LayerParameter* msg) {
  return *msg->_impl_.log_param_;
}
const ::opencv_caffe::LRNParameter&
LayerParameter::_Internal::lrn_param(const LayerParameter* msg) {
  return *msg->_impl_.lrn_param_;
}
const ::opencv_caffe::MemoryDataParameter&
LayerParameter::_Internal::memory_data_param(const LayerParameter* msg) {
  return *msg->_impl_.memory_data_param_;
}
const ::opencv_caffe::MVNParameter&
LayerParameter::_Internal::mvn_param(const LayerParameter* msg) {
  return *msg->_impl_.mvn_param_;
}
const ::opencv_caffe::NormalizeBBoxParameter&
LayerParameter::_Internal::norm_param(const LayerParameter* msg) {
  return *msg->_impl_.norm_param_;
}
const ::opencv_caffe::PermuteParameter&
LayerParameter::_Internal::permute_param(const LayerParameter* msg) {
  return *msg->_impl_.permute_param_;
}
const ::opencv_caffe::ParameterParameter&
LayerParameter::_Internal::parameter_param(const LayerParameter* msg) {
  return *msg->_impl_.parameter_param_;
}
const ::opencv_caffe::PoolingParameter&
LayerParameter::_Internal::pooling_param(const LayerParameter* msg) {
  return *msg->_impl_.pooling_param_;
}
const ::opencv_caffe::PowerParameter&
LayerParameter::_Internal::power_param(const LayerParameter* msg) {
  return *msg->_impl_.power_param_;
}
const ::opencv_caffe::PReLUParameter&
LayerParameter::_Internal::prelu_param(const LayerParameter* msg) {
  return *msg->_impl_.prelu_param_;
}
const ::opencv_caffe::PriorBoxParameter&
LayerParameter::_Internal::prior_box_param(const LayerParameter* msg) {
  return *msg->_impl_.prior_box_param_;
}
const ::opencv_caffe::ProposalParameter&
LayerParameter::_Internal::proposal_param(const LayerParameter* msg) {
  return *msg->_impl_.proposal_param_;
}
const ::opencv_caffe::PSROIPoolingParameter&
LayerParameter::_Internal::psroi_pooling_param(const LayerParameter* msg) {
  return *msg->_impl_.psroi_pooling_param_;
}
const ::opencv_caffe::PythonParameter&
LayerParameter::_Internal::python_param(const LayerParameter* msg) {
  return *msg->_impl_.python_param_;
}
const ::opencv_caffe::RecurrentParameter&
LayerParameter::_Internal::recurrent_param(const LayerParameter* msg) {
  return *msg->_impl_.recurrent_param_;
}
const ::opencv_caffe::ReductionParameter&
LayerParameter::_Internal::reduction_param(const LayerParameter* msg) {
  return *msg->_impl_.reduction_param_;
}
const ::opencv_caffe::ReLUParameter&
LayerParameter::_Internal::relu_param(const LayerParameter* msg) {
  return *msg->_impl_.relu_param_;
}
const ::opencv_caffe::ReshapeParameter&
LayerParameter::_Internal::reshape_param(const LayerParameter* msg) {
  return *msg->_impl_.reshape_param_;
}
const ::opencv_caffe::ROIPoolingParameter&
LayerParameter::_Internal::roi_pooling_param(const LayerParameter* msg) {
  return *msg->_impl_.roi_pooling_param_;
}
const ::opencv_caffe::ScaleParameter&
LayerParameter::_Internal::scale_param(const LayerParameter* msg) {
  return *msg->_impl_.scale_param_;
}
const ::opencv_caffe::SigmoidParameter&
LayerParameter::_Internal::sigmoid_param(const LayerParameter* msg) {
  return *msg->_impl_.sigmoid_param_;
}
const ::opencv_caffe::SoftmaxParameter&
LayerParameter::_Internal::softmax_param(const LayerParameter* msg) {
  return *msg->_impl_.softmax_param_;
}
const ::opencv_caffe::SPPParameter&
LayerParameter::_Internal::spp_param(const LayerParameter* msg) {
  return *msg->_impl_.spp_param_;
}
const ::opencv_caffe::SliceParameter&
LayerParameter::_Internal::slice_param(const LayerParameter* msg) {
  return *msg->_impl_.slice_param_;
}
const ::opencv_caffe::TanHParameter&
LayerParameter::_Internal::tanh_param(const LayerParameter* msg) {
  return *msg->_impl_.tanh_param_;
}
const ::opencv_caffe::ThresholdParameter&
LayerParameter::_Internal::threshold_param(const LayerParameter* msg) {
  return *msg->_impl_.threshold_param_;
}
const ::opencv_caffe::TileParameter&
LayerParameter::_Internal::tile_param(const LayerParameter* msg) {
  return *msg->_impl_.tile_param_;
}
const ::opencv_caffe::WindowDataParameter&
LayerParameter::_Internal::window_data_param(const LayerParameter* msg) {
  return *msg->_impl_.window_data_param_;
}
LayerParameter::LayerParameter(::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:opencv_caffe.LayerParameter)
}
LayerParameter::LayerParameter(const LayerParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  LayerParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.bottom_){from._impl_.bottom_}
    , decltype(_impl_.top_){from._impl_.top_}
    , decltype(_impl_.loss_weight_){from._impl_.loss_weight_}
    , decltype(_impl_.param_){from._impl_.param_}
    , decltype(_impl_.blobs_){from._impl_.blobs_}
    , decltype(_impl_.include_){from._impl_.include_}
    , decltype(_impl_.exclude_){from._impl_.exclude_}
    , decltype(_impl_.propagate_down_){from._impl_.propagate_down_}
    , decltype(_impl_.name_){}
    , decltype(_impl_.type_){}
    , decltype(_impl_.transform_param_){nullptr}
    , decltype(_impl_.loss_param_){nullptr}
    , decltype(_impl_.accuracy_param_){nullptr}
    , decltype(_impl_.argmax_param_){nullptr}
    , decltype(_impl_.concat_param_){nullptr}
    , decltype(_impl_.contrastive_loss_param_){nullptr}
    , decltype(_impl_.convolution_param_){nullptr}
    , decltype(_impl_.data_param_){nullptr}
    , decltype(_impl_.dropout_param_){nullptr}
    , decltype(_impl_.dummy_data_param_){nullptr}
    , decltype(_impl_.eltwise_param_){nullptr}
    , decltype(_impl_.exp_param_){nullptr}
    , decltype(_impl_.hdf5_data_param_){nullptr}
    , decltype(_impl_.hdf5_output_param_){nullptr}
    , decltype(_impl_.hinge_loss_param_){nullptr}
    , decltype(_impl_.image_data_param_){nullptr}
    , decltype(_impl_.infogain_loss_param_){nullptr}
    , decltype(_impl_.inner_product_param_){nullptr}
    , decltype(_impl_.lrn_param_){nullptr}
    , decltype(_impl_.memory_data_param_){nullptr}
    , decltype(_impl_.mvn_param_){nullptr}
    , decltype(_impl_.pooling_param_){nullptr}
    , decltype(_impl_.power_param_){nullptr}
    , decltype(_impl_.relu_param_){nullptr}
    , decltype(_impl_.sigmoid_param_){nullptr}
    , decltype(_impl_.softmax_param_){nullptr}
    , decltype(_impl_.slice_param_){nullptr}
    , decltype(_impl_.tanh_param_){nullptr}
    , decltype(_impl_.threshold_param_){nullptr}
    , decltype(_impl_.window_data_param_){nullptr}
    , decltype(_impl_.python_param_){nullptr}
    , decltype(_impl_.prelu_param_){nullptr}
    , decltype(_impl_.spp_param_){nullptr}
    , decltype(_impl_.reshape_param_){nullptr}
    , decltype(_impl_.log_param_){nullptr}
    , decltype(_impl_.flatten_param_){nullptr}
    , decltype(_impl_.reduction_param_){nullptr}
    , decltype(_impl_.embed_param_){nullptr}
    , decltype(_impl_.tile_param_){nullptr}
    , decltype(_impl_.batch_norm_param_){nullptr}
    , decltype(_impl_.elu_param_){nullptr}
    , decltype(_impl_.bias_param_){nullptr}
    , decltype(_impl_.scale_param_){nullptr}
    , decltype(_impl_.input_param_){nullptr}
    , decltype(_impl_.crop_param_){nullptr}
    , decltype(_impl_.parameter_param_){nullptr}
    , decltype(_impl_.recurrent_param_){nullptr}
    , decltype(_impl_.detection_output_param_){nullptr}
    , decltype(_impl_.permute_param_){nullptr}
    , decltype(_impl_.norm_param_){nullptr}
    , decltype(_impl_.prior_box_param_){nullptr}
    , decltype(_impl_.proposal_param_){nullptr}
    , decltype(_impl_.psroi_pooling_param_){nullptr}
    , decltype(_impl_.roi_pooling_param_){nullptr}
    , decltype(_impl_.phase_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.type_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.type_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_type()) {
    _this->_impl_.type_.Set(from._internal_type(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_transform_param()) {
    _this->_impl_.transform_param_ = new ::opencv_caffe::TransformationParameter(*from._impl_.transform_param_);
  }
  if (from._internal_has_loss_param()) {
    _this->_impl_.loss_param_ = new ::opencv_caffe::LossParameter(*from._impl_.loss_param_);
  }
  if (from._internal_has_accuracy_param()) {
    _this->_impl_.accuracy_param_ = new ::opencv_caffe::AccuracyParameter(*from._impl_.accuracy_param_);
  }
  if (from._internal_has_argmax_param()) {
    _this->_impl_.argmax_param_ = new ::opencv_caffe::ArgMaxParameter(*from._impl_.argmax_param_);
  }
  if (from._internal_has_concat_param()) {
    _this->_impl_.concat_param_ = new ::opencv_caffe::ConcatParameter(*from._impl_.concat_param_);
  }
  if (from._internal_has_contrastive_loss_param()) {
    _this->_impl_.contrastive_loss_param_ = new ::opencv_caffe::ContrastiveLossParameter(*from._impl_.contrastive_loss_param_);
  }
  if (from._internal_has_convolution_param()) {
    _this->_impl_.convolution_param_ = new ::opencv_caffe::ConvolutionParameter(*from._impl_.convolution_param_);
  }
  if (from._internal_has_data_param()) {
    _this->_impl_.data_param_ = new ::opencv_caffe::DataParameter(*from._impl_.data_param_);
  }
  if (from._internal_has_dropout_param()) {
    _this->_impl_.dropout_param_ = new ::opencv_caffe::DropoutParameter(*from._impl_.dropout_param_);
  }
  if (from._internal_has_dummy_data_param()) {
    _this->_impl_.dummy_data_param_ = new ::opencv_caffe::DummyDataParameter(*from._impl_.dummy_data_param_);
  }
  if (from._internal_has_eltwise_param()) {
    _this->_impl_.eltwise_param_ = new ::opencv_caffe::EltwiseParameter(*from._impl_.eltwise_param_);
  }
  if (from._internal_has_exp_param()) {
    _this->_impl_.exp_param_ = new ::opencv_caffe::ExpParameter(*from._impl_.exp_param_);
  }
  if (from._internal_has_hdf5_data_param()) {
    _this->_impl_.hdf5_data_param_ = new ::opencv_caffe::HDF5DataParameter(*from._impl_.hdf5_data_param_);
  }
  if (from._internal_has_hdf5_output_param()) {
    _this->_impl_.hdf5_output_param_ = new ::opencv_caffe::HDF5OutputParameter(*from._impl_.hdf5_output_param_);
  }
  if (from._internal_has_hinge_loss_param()) {
    _this->_impl_.hinge_loss_param_ = new ::opencv_caffe::HingeLossParameter(*from._impl_.hinge_loss_param_);
  }
  if (from._internal_has_image_data_param()) {
    _this->_impl_.image_data_param_ = new ::opencv_caffe::ImageDataParameter(*from._impl_.image_data_param_);
  }
  if (from._internal_has_infogain_loss_param()) {
    _this->_impl_.infogain_loss_param_ = new ::opencv_caffe::InfogainLossParameter(*from._impl_.infogain_loss_param_);
  }
  if (from._internal_has_inner_product_param()) {
    _this->_impl_.inner_product_param_ = new ::opencv_caffe::InnerProductParameter(*from._impl_.inner_product_param_);
  }
  if (from._internal_has_lrn_param()) {
    _this->_impl_.lrn_param_ = new ::opencv_caffe::LRNParameter(*from._impl_.lrn_param_);
  }
  if (from._internal_has_memory_data_param()) {
    _this->_impl_.memory_data_param_ = new ::opencv_caffe::MemoryDataParameter(*from._impl_.memory_data_param_);
  }
  if (from._internal_has_mvn_param()) {
    _this->_impl_.mvn_param_ = new ::opencv_caffe::MVNParameter(*from._impl_.mvn_param_);
  }
  if (from._internal_has_pooling_param()) {
    _this->_impl_.pooling_param_ = new ::opencv_caffe::PoolingParameter(*from._impl_.pooling_param_);
  }
  if (from._internal_has_power_param()) {
    _this->_impl_.power_param_ = new ::opencv_caffe::PowerParameter(*from._impl_.power_param_);
  }
  if (from._internal_has_relu_param()) {
    _this->_impl_.relu_param_ = new ::opencv_caffe::ReLUParameter(*from._impl_.relu_param_);
  }
  if (from._internal_has_sigmoid_param()) {
    _this->_impl_.sigmoid_param_ = new ::opencv_caffe::SigmoidParameter(*from._impl_.sigmoid_param_);
  }
  if (from._internal_has_softmax_param()) {
    _this->_impl_.softmax_param_ = new ::opencv_caffe::SoftmaxParameter(*from._impl_.softmax_param_);
  }
  if (from._internal_has_slice_param()) {
    _this->_impl_.slice_param_ = new ::opencv_caffe::SliceParameter(*from._impl_.slice_param_);
  }
  if (from._internal_has_tanh_param()) {
    _this->_impl_.tanh_param_ = new ::opencv_caffe::TanHParameter(*from._impl_.tanh_param_);
  }
  if (from._internal_has_threshold_param()) {
    _this->_impl_.threshold_param_ = new ::opencv_caffe::ThresholdParameter(*from._impl_.threshold_param_);
  }
  if (from._internal_has_window_data_param()) {
    _this->_impl_.window_data_param_ = new ::opencv_caffe::WindowDataParameter(*from._impl_.window_data_param_);
  }
  if (from._internal_has_python_param()) {
    _this->_impl_.python_param_ = new ::opencv_caffe::PythonParameter(*from._impl_.python_param_);
  }
  if (from._internal_has_prelu_param()) {
    _this->_impl_.prelu_param_ = new ::opencv_caffe::PReLUParameter(*from._impl_.prelu_param_);
  }
  if (from._internal_has_spp_param()) {
    _this->_impl_.spp_param_ = new ::opencv_caffe::SPPParameter(*from._impl_.spp_param_);
  }
  if (from._internal_has_reshape_param()) {
    _this->_impl_.reshape_param_ = new ::opencv_caffe::ReshapeParameter(*from._impl_.reshape_param_);
  }
  if (from._internal_has_log_param()) {
    _this->_impl_.log_param_ = new ::opencv_caffe::LogParameter(*from._impl_.log_param_);
  }
  if (from._internal_has_flatten_param()) {
    _this->_impl_.flatten_param_ = new ::opencv_caffe::FlattenParameter(*from._impl_.flatten_param_);
  }
  if (from._internal_has_reduction_param()) {
    _this->_impl_.reduction_param_ = new ::opencv_caffe::ReductionParameter(*from._impl_.reduction_param_);
  }
  if (from._internal_has_embed_param()) {
    _this->_impl_.embed_param_ = new ::opencv_caffe::EmbedParameter(*from._impl_.embed_param_);
  }
  if (from._internal_has_tile_param()) {
    _this->_impl_.tile_param_ = new ::opencv_caffe::TileParameter(*from._impl_.tile_param_);
  }
  if (from._internal_has_batch_norm_param()) {
    _this->_impl_.batch_norm_param_ = new ::opencv_caffe::BatchNormParameter(*from._impl_.batch_norm_param_);
  }
  if (from._internal_has_elu_param()) {
    _this->_impl_.elu_param_ = new ::opencv_caffe::ELUParameter(*from._impl_.elu_param_);
  }
  if (from._internal_has_bias_param()) {
    _this->_impl_.bias_param_ = new ::opencv_caffe::BiasParameter(*from._impl_.bias_param_);
  }
  if (from._internal_has_scale_param()) {
    _this->_impl_.scale_param_ = new ::opencv_caffe::ScaleParameter(*from._impl_.scale_param_);
  }
  if (from._internal_has_input_param()) {
    _this->_impl_.input_param_ = new ::opencv_caffe::InputParameter(*from._impl_.input_param_);
  }
  if (from._internal_has_crop_param()) {
    _this->_impl_.crop_param_ = new ::opencv_caffe::CropParameter(*from._impl_.crop_param_);
  }
  if (from._internal_has_parameter_param()) {
    _this->_impl_.parameter_param_ = new ::opencv_caffe::ParameterParameter(*from._impl_.parameter_param_);
  }
  if (from._internal_has_recurrent_param()) {
    _this->_impl_.recurrent_param_ = new ::opencv_caffe::RecurrentParameter(*from._impl_.recurrent_param_);
  }
  if (from._internal_has_detection_output_param()) {
    _this->_impl_.detection_output_param_ = new ::opencv_caffe::DetectionOutputParameter(*from._impl_.detection_output_param_);
  }
  if (from._internal_has_permute_param()) {
    _this->_impl_.permute_param_ = new ::opencv_caffe::PermuteParameter(*from._impl_.permute_param_);
  }
  if (from._internal_has_norm_param()) {
    _this->_impl_.norm_param_ = new ::opencv_caffe::NormalizeBBoxParameter(*from._impl_.norm_param_);
  }
  if (from._internal_has_prior_box_param()) {
    _this->_impl_.prior_box_param_ = new ::opencv_caffe::PriorBoxParameter(*from._impl_.prior_box_param_);
  }
  if (from._internal_has_proposal_param()) {
    _this->_impl_.proposal_param_ = new ::opencv_caffe::ProposalParameter(*from._impl_.proposal_param_);
  }
  if (from._internal_has_psroi_pooling_param()) {
    _this->_impl_.psroi_pooling_param_ = new ::opencv_caffe::PSROIPoolingParameter(*from._impl_.psroi_pooling_param_);
  }
  if (from._internal_has_roi_pooling_param()) {
    _this->_impl_.roi_pooling_param_ = new ::opencv_caffe::ROIPoolingParameter(*from._impl_.roi_pooling_param_);
  }
  _this->_impl_.phase_ = from._impl_.phase_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.LayerParameter)
}

inline void LayerParameter::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_.bottom_){arena}
    , decltype(_impl_.top_){arena}
    , decltype(_impl_.loss_weight_){arena}
    , decltype(_impl_.param_){arena}
    , decltype(_impl_.blobs_){arena}
    , decltype(_impl_.include_){arena}
    , decltype(_impl_.exclude_){arena}
    , decltype(_impl_.propagate_down_){arena}
    , decltype(_impl_.name_){}
    , decltype(_impl_.type_){}
    , decltype(_impl_.transform_param_){nullptr}
    , decltype(_impl_.loss_param_){nullptr}
    , decltype(_impl_.accuracy_param_){nullptr}
    , decltype(_impl_.argmax_param_){nullptr}
    , decltype(_impl_.concat_param_){nullptr}
    , decltype(_impl_.contrastive_loss_param_){nullptr}
    , decltype(_impl_.convolution_param_){nullptr}
    , decltype(_impl_.data_param_){nullptr}
    , decltype(_impl_.dropout_param_){nullptr}
    , decltype(_impl_.dummy_data_param_){nullptr}
    , decltype(_impl_.eltwise_param_){nullptr}
    , decltype(_impl_.exp_param_){nullptr}
    , decltype(_impl_.hdf5_data_param_){nullptr}
    , decltype(_impl_.hdf5_output_param_){nullptr}
    , decltype(_impl_.hinge_loss_param_){nullptr}
    , decltype(_impl_.image_data_param_){nullptr}
    , decltype(_impl_.infogain_loss_param_){nullptr}
    , decltype(_impl_.inner_product_param_){nullptr}
    , decltype(_impl_.lrn_param_){nullptr}
    , decltype(_impl_.memory_data_param_){nullptr}
    , decltype(_impl_.mvn_param_){nullptr}
    , decltype(_impl_.pooling_param_){nullptr}
    , decltype(_impl_.power_param_){nullptr}
    , decltype(_impl_.relu_param_){nullptr}
    , decltype(_impl_.sigmoid_param_){nullptr}
    , decltype(_impl_.softmax_param_){nullptr}
    , decltype(_impl_.slice_param_){nullptr}
    , decltype(_impl_.tanh_param_){nullptr}
    , decltype(_impl_.threshold_param_){nullptr}
    , decltype(_impl_.window_data_param_){nullptr}
    , decltype(_impl_.python_param_){nullptr}
    , decltype(_impl_.prelu_param_){nullptr}
    , decltype(_impl_.spp_param_){nullptr}
    , decltype(_impl_.reshape_param_){nullptr}
    , decltype(_impl_.log_param_){nullptr}
    , decltype(_impl_.flatten_param_){nullptr}
    , decltype(_impl_.reduction_param_){nullptr}
    , decltype(_impl_.embed_param_){nullptr}
    , decltype(_impl_.tile_param_){nullptr}
    , decltype(_impl_.batch_norm_param_){nullptr}
    , decltype(_impl_.elu_param_){nullptr}
    , decltype(_impl_.bias_param_){nullptr}
    , decltype(_impl_.scale_param_){nullptr}
    , decltype(_impl_.input_param_){nullptr}
    , decltype(_impl_.crop_param_){nullptr}
    , decltype(_impl_.parameter_param_){nullptr}
    , decltype(_impl_.recurrent_param_){nullptr}
    , decltype(_impl_.detection_output_param_){nullptr}
    , decltype(_impl_.permute_param_){nullptr}
    , decltype(_impl_.norm_param_){nullptr}
    , decltype(_impl_.prior_box_param_){nullptr}
    , decltype(_impl_.proposal_param_){nullptr}
    , decltype(_impl_.psroi_pooling_param_){nullptr}
    , decltype(_impl_.roi_pooling_param_){nullptr}
    , decltype(_impl_.phase_){0}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.type_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.type_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void LayerParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.bottom_.~RepeatedPtrField();
  _impl_.top_.~RepeatedPtrField();
  _impl_.loss_weight_.~RepeatedField();
  _impl_.param_.~RepeatedPtrField();
  _impl_.blobs_.~RepeatedPtrField();
  _impl_.include_.~RepeatedPtrField();
  _impl_.exclude_.~RepeatedPtrField();
  _impl_.propagate_down_.~RepeatedField();
  _impl_.name_.Destroy();
  _impl_.type_.Destroy();
  if (this != internal_default_instance()) delete _impl_.transform_param_;
  if (this != internal_default_instance()) delete _impl_.loss_param_;
  if (this != internal_default_instance()) delete _impl_.accuracy_param_;
  if (this != internal_default_instance()) delete _impl_.argmax_param_;
  if (this != internal_default_instance()) delete _impl_.concat_param_;
  if (this != internal_default_instance()) delete _impl_.contrastive_loss_param_;
  if (this != internal_default_instance()) delete _impl_.convolution_param_;
  if (this != internal_default_instance()) delete _impl_.data_param_;
  if (this != internal_default_instance()) delete _impl_.dropout_param_;
  if (this != internal_default_instance()) delete _impl_.dummy_data_param_;
  if (this != internal_default_instance()) delete _impl_.eltwise_param_;
  if (this != internal_default_instance()) delete _impl_.exp_param_;
  if (this != internal_default_instance()) delete _impl_.hdf5_data_param_;
  if (this != internal_default_instance()) delete _impl_.hdf5_output_param_;
  if (this != internal_default_instance()) delete _impl_.hinge_loss_param_;
  if (this != internal_default_instance()) delete _impl_.image_data_param_;
  if (this != internal_default_instance()) delete _impl_.infogain_loss_param_;
  if (this != internal_default_instance()) delete _impl_.inner_product_param_;
  if (this != internal_default_instance()) delete _impl_.lrn_param_;
  if (this != internal_default_instance()) delete _impl_.memory_data_param_;
  if (this != internal_default_instance()) delete _impl_.mvn_param_;
  if (this != internal_default_instance()) delete _impl_.pooling_param_;
  if (this != internal_default_instance()) delete _impl_.power_param_;
  if (this != internal_default_instance()) delete _impl_.relu_param_;
  if (this != internal_default_instance()) delete _impl_.sigmoid_param_;
  if (this != internal_default_instance()) delete _impl_.softmax_param_;
  if (this != internal_default_instance()) delete _impl_.slice_param_;
  if (this != internal_default_instance()) delete _impl_.tanh_param_;
  if (this != internal_default_instance()) delete _impl_.threshold_param_;
  if (this != internal_default_instance()) delete _impl_.window_data_param_;
  if (this != internal_default_instance()) delete _impl_.python_param_;
  if (this != internal_default_instance()) delete _impl_.prelu_param_;
  if (this != internal_default_instance()) delete _impl_.spp_param_;
  if (this != internal_default_instance()) delete _impl_.reshape_param_;
  if (this != internal_default_instance()) delete _impl_.log_param_;
  if (this != internal_default_instance()) delete _impl_.flatten_param_;
  if (this != internal_default_instance()) delete _impl_.reduction_param_;
  if (this != internal_default_instance()) delete _impl_.embed_param_;
  if (this != internal_default_instance()) delete _impl_.tile_param_;
  if (this != internal_default_instance()) delete _impl_.batch_norm_param_;
  if (this != internal_default_instance()) delete _impl_.elu_param_;
  if (this != internal_default_instance()) delete _impl_.bias_param_;
  if (this != internal_default_instance()) delete _impl_.scale_param_;
  if (this != internal_default_instance()) delete _impl_.input_param_;
  if (this != internal_default_instance()) delete _impl_.crop_param_;
  if (this != internal_default_instance()) delete _impl_.parameter_param_;
  if (this != internal_default_instance()) delete _impl_.recurrent_param_;
  if (this != internal_default_instance()) delete _impl_.detection_output_param_;
  if (this != internal_default_instance()) delete _impl_.permute_param_;
  if (this != internal_default_instance()) delete _impl_.norm_param_;
  if (this != internal_default_instance()) delete _impl_.prior_box_param_;
  if (this != internal_default_instance()) delete _impl_.proposal_param_;
  if (this != internal_default_instance()) delete _impl_.psroi_pooling_param_;
  if (this != internal_default_instance()) delete _impl_.roi_pooling_param_;
}

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

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

  _impl_.bottom_.Clear();
  _impl_.top_.Clear();
  _impl_.loss_weight_.Clear();
  _impl_.param_.Clear();
  _impl_.blobs_.Clear();
  _impl_.include_.Clear();
  _impl_.exclude_.Clear();
  _impl_.propagate_down_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.type_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(_impl_.transform_param_ != nullptr);
      _impl_.transform_param_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(_impl_.loss_param_ != nullptr);
      _impl_.loss_param_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      GOOGLE_DCHECK(_impl_.accuracy_param_ != nullptr);
      _impl_.accuracy_param_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      GOOGLE_DCHECK(_impl_.argmax_param_ != nullptr);
      _impl_.argmax_param_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      GOOGLE_DCHECK(_impl_.concat_param_ != nullptr);
      _impl_.concat_param_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      GOOGLE_DCHECK(_impl_.contrastive_loss_param_ != nullptr);
      _impl_.contrastive_loss_param_->Clear();
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      GOOGLE_DCHECK(_impl_.convolution_param_ != nullptr);
      _impl_.convolution_param_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      GOOGLE_DCHECK(_impl_.data_param_ != nullptr);
      _impl_.data_param_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      GOOGLE_DCHECK(_impl_.dropout_param_ != nullptr);
      _impl_.dropout_param_->Clear();
    }
    if (cached_has_bits & 0x00000800u) {
      GOOGLE_DCHECK(_impl_.dummy_data_param_ != nullptr);
      _impl_.dummy_data_param_->Clear();
    }
    if (cached_has_bits & 0x00001000u) {
      GOOGLE_DCHECK(_impl_.eltwise_param_ != nullptr);
      _impl_.eltwise_param_->Clear();
    }
    if (cached_has_bits & 0x00002000u) {
      GOOGLE_DCHECK(_impl_.exp_param_ != nullptr);
      _impl_.exp_param_->Clear();
    }
    if (cached_has_bits & 0x00004000u) {
      GOOGLE_DCHECK(_impl_.hdf5_data_param_ != nullptr);
      _impl_.hdf5_data_param_->Clear();
    }
    if (cached_has_bits & 0x00008000u) {
      GOOGLE_DCHECK(_impl_.hdf5_output_param_ != nullptr);
      _impl_.hdf5_output_param_->Clear();
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      GOOGLE_DCHECK(_impl_.hinge_loss_param_ != nullptr);
      _impl_.hinge_loss_param_->Clear();
    }
    if (cached_has_bits & 0x00020000u) {
      GOOGLE_DCHECK(_impl_.image_data_param_ != nullptr);
      _impl_.image_data_param_->Clear();
    }
    if (cached_has_bits & 0x00040000u) {
      GOOGLE_DCHECK(_impl_.infogain_loss_param_ != nullptr);
      _impl_.infogain_loss_param_->Clear();
    }
    if (cached_has_bits & 0x00080000u) {
      GOOGLE_DCHECK(_impl_.inner_product_param_ != nullptr);
      _impl_.inner_product_param_->Clear();
    }
    if (cached_has_bits & 0x00100000u) {
      GOOGLE_DCHECK(_impl_.lrn_param_ != nullptr);
      _impl_.lrn_param_->Clear();
    }
    if (cached_has_bits & 0x00200000u) {
      GOOGLE_DCHECK(_impl_.memory_data_param_ != nullptr);
      _impl_.memory_data_param_->Clear();
    }
    if (cached_has_bits & 0x00400000u) {
      GOOGLE_DCHECK(_impl_.mvn_param_ != nullptr);
      _impl_.mvn_param_->Clear();
    }
    if (cached_has_bits & 0x00800000u) {
      GOOGLE_DCHECK(_impl_.pooling_param_ != nullptr);
      _impl_.pooling_param_->Clear();
    }
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      GOOGLE_DCHECK(_impl_.power_param_ != nullptr);
      _impl_.power_param_->Clear();
    }
    if (cached_has_bits & 0x02000000u) {
      GOOGLE_DCHECK(_impl_.relu_param_ != nullptr);
      _impl_.relu_param_->Clear();
    }
    if (cached_has_bits & 0x04000000u) {
      GOOGLE_DCHECK(_impl_.sigmoid_param_ != nullptr);
      _impl_.sigmoid_param_->Clear();
    }
    if (cached_has_bits & 0x08000000u) {
      GOOGLE_DCHECK(_impl_.softmax_param_ != nullptr);
      _impl_.softmax_param_->Clear();
    }
    if (cached_has_bits & 0x10000000u) {
      GOOGLE_DCHECK(_impl_.slice_param_ != nullptr);
      _impl_.slice_param_->Clear();
    }
    if (cached_has_bits & 0x20000000u) {
      GOOGLE_DCHECK(_impl_.tanh_param_ != nullptr);
      _impl_.tanh_param_->Clear();
    }
    if (cached_has_bits & 0x40000000u) {
      GOOGLE_DCHECK(_impl_.threshold_param_ != nullptr);
      _impl_.threshold_param_->Clear();
    }
    if (cached_has_bits & 0x80000000u) {
      GOOGLE_DCHECK(_impl_.window_data_param_ != nullptr);
      _impl_.window_data_param_->Clear();
    }
  }
  cached_has_bits = _impl_._has_bits_[1];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(_impl_.python_param_ != nullptr);
      _impl_.python_param_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.prelu_param_ != nullptr);
      _impl_.prelu_param_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(_impl_.spp_param_ != nullptr);
      _impl_.spp_param_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(_impl_.reshape_param_ != nullptr);
      _impl_.reshape_param_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      GOOGLE_DCHECK(_impl_.log_param_ != nullptr);
      _impl_.log_param_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      GOOGLE_DCHECK(_impl_.flatten_param_ != nullptr);
      _impl_.flatten_param_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      GOOGLE_DCHECK(_impl_.reduction_param_ != nullptr);
      _impl_.reduction_param_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      GOOGLE_DCHECK(_impl_.embed_param_ != nullptr);
      _impl_.embed_param_->Clear();
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      GOOGLE_DCHECK(_impl_.tile_param_ != nullptr);
      _impl_.tile_param_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      GOOGLE_DCHECK(_impl_.batch_norm_param_ != nullptr);
      _impl_.batch_norm_param_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      GOOGLE_DCHECK(_impl_.elu_param_ != nullptr);
      _impl_.elu_param_->Clear();
    }
    if (cached_has_bits & 0x00000800u) {
      GOOGLE_DCHECK(_impl_.bias_param_ != nullptr);
      _impl_.bias_param_->Clear();
    }
    if (cached_has_bits & 0x00001000u) {
      GOOGLE_DCHECK(_impl_.scale_param_ != nullptr);
      _impl_.scale_param_->Clear();
    }
    if (cached_has_bits & 0x00002000u) {
      GOOGLE_DCHECK(_impl_.input_param_ != nullptr);
      _impl_.input_param_->Clear();
    }
    if (cached_has_bits & 0x00004000u) {
      GOOGLE_DCHECK(_impl_.crop_param_ != nullptr);
      _impl_.crop_param_->Clear();
    }
    if (cached_has_bits & 0x00008000u) {
      GOOGLE_DCHECK(_impl_.parameter_param_ != nullptr);
      _impl_.parameter_param_->Clear();
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      GOOGLE_DCHECK(_impl_.recurrent_param_ != nullptr);
      _impl_.recurrent_param_->Clear();
    }
    if (cached_has_bits & 0x00020000u) {
      GOOGLE_DCHECK(_impl_.detection_output_param_ != nullptr);
      _impl_.detection_output_param_->Clear();
    }
    if (cached_has_bits & 0x00040000u) {
      GOOGLE_DCHECK(_impl_.permute_param_ != nullptr);
      _impl_.permute_param_->Clear();
    }
    if (cached_has_bits & 0x00080000u) {
      GOOGLE_DCHECK(_impl_.norm_param_ != nullptr);
      _impl_.norm_param_->Clear();
    }
    if (cached_has_bits & 0x00100000u) {
      GOOGLE_DCHECK(_impl_.prior_box_param_ != nullptr);
      _impl_.prior_box_param_->Clear();
    }
    if (cached_has_bits & 0x00200000u) {
      GOOGLE_DCHECK(_impl_.proposal_param_ != nullptr);
      _impl_.proposal_param_->Clear();
    }
    if (cached_has_bits & 0x00400000u) {
      GOOGLE_DCHECK(_impl_.psroi_pooling_param_ != nullptr);
      _impl_.psroi_pooling_param_->Clear();
    }
    if (cached_has_bits & 0x00800000u) {
      GOOGLE_DCHECK(_impl_.roi_pooling_param_ != nullptr);
      _impl_.roi_pooling_param_->Clear();
    }
  }
  _impl_.phase_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* LayerParameter::_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) {
      // optional string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.LayerParameter.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_type();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.LayerParameter.type");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // repeated string bottom = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_bottom();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_caffe.LayerParameter.bottom");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated string top = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_top();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_caffe.LayerParameter.top");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated float loss_weight = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_loss_weight(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<45>(ptr));
        } else if (static_cast<uint8_t>(tag) == 42) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_loss_weight(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.ParamSpec param = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_param(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.BlobProto blobs = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_blobs(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.NetStateRule include = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_include(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.NetStateRule exclude = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_exclude(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.Phase phase = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::Phase_IsValid(val))) {
            _internal_set_phase(static_cast<::opencv_caffe::Phase>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(10, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // repeated bool propagate_down = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_propagate_down(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<88>(ptr));
        } else if (static_cast<uint8_t>(tag) == 90) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedBoolParser(_internal_mutable_propagate_down(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.TransformationParameter transform_param = 100;
      case 100:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_transform_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.LossParameter loss_param = 101;
      case 101:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_loss_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.AccuracyParameter accuracy_param = 102;
      case 102:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_accuracy_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ArgMaxParameter argmax_param = 103;
      case 103:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_argmax_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ConcatParameter concat_param = 104;
      case 104:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_concat_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 105;
      case 105:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_contrastive_loss_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ConvolutionParameter convolution_param = 106;
      case 106:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_convolution_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.DataParameter data_param = 107;
      case 107:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.DropoutParameter dropout_param = 108;
      case 108:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_dropout_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.DummyDataParameter dummy_data_param = 109;
      case 109:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_dummy_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.EltwiseParameter eltwise_param = 110;
      case 110:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
          ptr = ctx->ParseMessage(_internal_mutable_eltwise_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ExpParameter exp_param = 111;
      case 111:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_exp_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 112;
      case 112:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
          ptr = ctx->ParseMessage(_internal_mutable_hdf5_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 113;
      case 113:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_hdf5_output_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.HingeLossParameter hinge_loss_param = 114;
      case 114:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
          ptr = ctx->ParseMessage(_internal_mutable_hinge_loss_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ImageDataParameter image_data_param = 115;
      case 115:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 154)) {
          ptr = ctx->ParseMessage(_internal_mutable_image_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 116;
      case 116:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
          ptr = ctx->ParseMessage(_internal_mutable_infogain_loss_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.InnerProductParameter inner_product_param = 117;
      case 117:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
          ptr = ctx->ParseMessage(_internal_mutable_inner_product_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.LRNParameter lrn_param = 118;
      case 118:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 178)) {
          ptr = ctx->ParseMessage(_internal_mutable_lrn_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.MemoryDataParameter memory_data_param = 119;
      case 119:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 186)) {
          ptr = ctx->ParseMessage(_internal_mutable_memory_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.MVNParameter mvn_param = 120;
      case 120:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 194)) {
          ptr = ctx->ParseMessage(_internal_mutable_mvn_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PoolingParameter pooling_param = 121;
      case 121:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 202)) {
          ptr = ctx->ParseMessage(_internal_mutable_pooling_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PowerParameter power_param = 122;
      case 122:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 210)) {
          ptr = ctx->ParseMessage(_internal_mutable_power_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ReLUParameter relu_param = 123;
      case 123:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 218)) {
          ptr = ctx->ParseMessage(_internal_mutable_relu_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SigmoidParameter sigmoid_param = 124;
      case 124:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 226)) {
          ptr = ctx->ParseMessage(_internal_mutable_sigmoid_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SoftmaxParameter softmax_param = 125;
      case 125:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 234)) {
          ptr = ctx->ParseMessage(_internal_mutable_softmax_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SliceParameter slice_param = 126;
      case 126:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 242)) {
          ptr = ctx->ParseMessage(_internal_mutable_slice_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.TanHParameter tanh_param = 127;
      case 127:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 250)) {
          ptr = ctx->ParseMessage(_internal_mutable_tanh_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ThresholdParameter threshold_param = 128;
      case 128:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 2)) {
          ptr = ctx->ParseMessage(_internal_mutable_threshold_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.WindowDataParameter window_data_param = 129;
      case 129:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_window_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PythonParameter python_param = 130;
      case 130:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_python_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PReLUParameter prelu_param = 131;
      case 131:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_prelu_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SPPParameter spp_param = 132;
      case 132:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_spp_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ReshapeParameter reshape_param = 133;
      case 133:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_reshape_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.LogParameter log_param = 134;
      case 134:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_log_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FlattenParameter flatten_param = 135;
      case 135:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_flatten_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ReductionParameter reduction_param = 136;
      case 136:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_reduction_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.EmbedParameter embed_param = 137;
      case 137:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_embed_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.TileParameter tile_param = 138;
      case 138:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_tile_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.BatchNormParameter batch_norm_param = 139;
      case 139:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_batch_norm_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ELUParameter elu_param = 140;
      case 140:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_elu_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.BiasParameter bias_param = 141;
      case 141:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_bias_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ScaleParameter scale_param = 142;
      case 142:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
          ptr = ctx->ParseMessage(_internal_mutable_scale_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.InputParameter input_param = 143;
      case 143:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_input_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.CropParameter crop_param = 144;
      case 144:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
          ptr = ctx->ParseMessage(_internal_mutable_crop_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ParameterParameter parameter_param = 145;
      case 145:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_parameter_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.RecurrentParameter recurrent_param = 146;
      case 146:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
          ptr = ctx->ParseMessage(_internal_mutable_recurrent_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.DetectionOutputParameter detection_output_param = 147;
      case 147:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 154)) {
          ptr = ctx->ParseMessage(_internal_mutable_detection_output_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PermuteParameter permute_param = 148;
      case 148:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
          ptr = ctx->ParseMessage(_internal_mutable_permute_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.NormalizeBBoxParameter norm_param = 149;
      case 149:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
          ptr = ctx->ParseMessage(_internal_mutable_norm_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PriorBoxParameter prior_box_param = 150;
      case 150:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 178)) {
          ptr = ctx->ParseMessage(_internal_mutable_prior_box_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ProposalParameter proposal_param = 201;
      case 201:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_proposal_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PSROIPoolingParameter psroi_pooling_param = 10002;
      case 10002:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
          ptr = ctx->ParseMessage(_internal_mutable_psroi_pooling_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ROIPoolingParameter roi_pooling_param = 8266711;
      case 8266711:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 186)) {
          ptr = ctx->ParseMessage(_internal_mutable_roi_pooling_param(), 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* LayerParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.LayerParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.LayerParameter.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // optional string type = 2;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_type().data(), static_cast<int>(this->_internal_type().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.LayerParameter.type");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_type(), target);
  }

  // repeated string bottom = 3;
  for (int i = 0, n = this->_internal_bottom_size(); i < n; i++) {
    const auto& s = this->_internal_bottom(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.LayerParameter.bottom");
    target = stream->WriteString(3, s, target);
  }

  // repeated string top = 4;
  for (int i = 0, n = this->_internal_top_size(); i < n; i++) {
    const auto& s = this->_internal_top(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.LayerParameter.top");
    target = stream->WriteString(4, s, target);
  }

  // repeated float loss_weight = 5;
  for (int i = 0, n = this->_internal_loss_weight_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(5, this->_internal_loss_weight(i), target);
  }

  // repeated .opencv_caffe.ParamSpec param = 6;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_param_size()); i < n; i++) {
    const auto& repfield = this->_internal_param(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .opencv_caffe.BlobProto blobs = 7;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_blobs_size()); i < n; i++) {
    const auto& repfield = this->_internal_blobs(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .opencv_caffe.NetStateRule include = 8;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_include_size()); i < n; i++) {
    const auto& repfield = this->_internal_include(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(8, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .opencv_caffe.NetStateRule exclude = 9;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_exclude_size()); i < n; i++) {
    const auto& repfield = this->_internal_exclude(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(9, repfield, repfield.GetCachedSize(), target, stream);
  }

  cached_has_bits = _impl_._has_bits_[1];
  // optional .opencv_caffe.Phase phase = 10;
  if (cached_has_bits & 0x01000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      10, this->_internal_phase(), target);
  }

  // repeated bool propagate_down = 11;
  for (int i = 0, n = this->_internal_propagate_down_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_propagate_down(i), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.TransformationParameter transform_param = 100;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(100, _Internal::transform_param(this),
        _Internal::transform_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.LossParameter loss_param = 101;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(101, _Internal::loss_param(this),
        _Internal::loss_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.AccuracyParameter accuracy_param = 102;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(102, _Internal::accuracy_param(this),
        _Internal::accuracy_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ArgMaxParameter argmax_param = 103;
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(103, _Internal::argmax_param(this),
        _Internal::argmax_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ConcatParameter concat_param = 104;
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(104, _Internal::concat_param(this),
        _Internal::concat_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 105;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(105, _Internal::contrastive_loss_param(this),
        _Internal::contrastive_loss_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ConvolutionParameter convolution_param = 106;
  if (cached_has_bits & 0x00000100u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(106, _Internal::convolution_param(this),
        _Internal::convolution_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.DataParameter data_param = 107;
  if (cached_has_bits & 0x00000200u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(107, _Internal::data_param(this),
        _Internal::data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.DropoutParameter dropout_param = 108;
  if (cached_has_bits & 0x00000400u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(108, _Internal::dropout_param(this),
        _Internal::dropout_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.DummyDataParameter dummy_data_param = 109;
  if (cached_has_bits & 0x00000800u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(109, _Internal::dummy_data_param(this),
        _Internal::dummy_data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.EltwiseParameter eltwise_param = 110;
  if (cached_has_bits & 0x00001000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(110, _Internal::eltwise_param(this),
        _Internal::eltwise_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ExpParameter exp_param = 111;
  if (cached_has_bits & 0x00002000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(111, _Internal::exp_param(this),
        _Internal::exp_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 112;
  if (cached_has_bits & 0x00004000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(112, _Internal::hdf5_data_param(this),
        _Internal::hdf5_data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 113;
  if (cached_has_bits & 0x00008000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(113, _Internal::hdf5_output_param(this),
        _Internal::hdf5_output_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.HingeLossParameter hinge_loss_param = 114;
  if (cached_has_bits & 0x00010000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(114, _Internal::hinge_loss_param(this),
        _Internal::hinge_loss_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ImageDataParameter image_data_param = 115;
  if (cached_has_bits & 0x00020000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(115, _Internal::image_data_param(this),
        _Internal::image_data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 116;
  if (cached_has_bits & 0x00040000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(116, _Internal::infogain_loss_param(this),
        _Internal::infogain_loss_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.InnerProductParameter inner_product_param = 117;
  if (cached_has_bits & 0x00080000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(117, _Internal::inner_product_param(this),
        _Internal::inner_product_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.LRNParameter lrn_param = 118;
  if (cached_has_bits & 0x00100000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(118, _Internal::lrn_param(this),
        _Internal::lrn_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.MemoryDataParameter memory_data_param = 119;
  if (cached_has_bits & 0x00200000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(119, _Internal::memory_data_param(this),
        _Internal::memory_data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.MVNParameter mvn_param = 120;
  if (cached_has_bits & 0x00400000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(120, _Internal::mvn_param(this),
        _Internal::mvn_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.PoolingParameter pooling_param = 121;
  if (cached_has_bits & 0x00800000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(121, _Internal::pooling_param(this),
        _Internal::pooling_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.PowerParameter power_param = 122;
  if (cached_has_bits & 0x01000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(122, _Internal::power_param(this),
        _Internal::power_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ReLUParameter relu_param = 123;
  if (cached_has_bits & 0x02000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(123, _Internal::relu_param(this),
        _Internal::relu_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.SigmoidParameter sigmoid_param = 124;
  if (cached_has_bits & 0x04000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(124, _Internal::sigmoid_param(this),
        _Internal::sigmoid_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.SoftmaxParameter softmax_param = 125;
  if (cached_has_bits & 0x08000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(125, _Internal::softmax_param(this),
        _Internal::softmax_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.SliceParameter slice_param = 126;
  if (cached_has_bits & 0x10000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(126, _Internal::slice_param(this),
        _Internal::slice_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.TanHParameter tanh_param = 127;
  if (cached_has_bits & 0x20000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(127, _Internal::tanh_param(this),
        _Internal::tanh_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ThresholdParameter threshold_param = 128;
  if (cached_has_bits & 0x40000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(128, _Internal::threshold_param(this),
        _Internal::threshold_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.WindowDataParameter window_data_param = 129;
  if (cached_has_bits & 0x80000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(129, _Internal::window_data_param(this),
        _Internal::window_data_param(this).GetCachedSize(), target, stream);
  }

  cached_has_bits = _impl_._has_bits_[1];
  // optional .opencv_caffe.PythonParameter python_param = 130;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(130, _Internal::python_param(this),
        _Internal::python_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.PReLUParameter prelu_param = 131;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(131, _Internal::prelu_param(this),
        _Internal::prelu_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.SPPParameter spp_param = 132;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(132, _Internal::spp_param(this),
        _Internal::spp_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ReshapeParameter reshape_param = 133;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(133, _Internal::reshape_param(this),
        _Internal::reshape_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.LogParameter log_param = 134;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(134, _Internal::log_param(this),
        _Internal::log_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.FlattenParameter flatten_param = 135;
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(135, _Internal::flatten_param(this),
        _Internal::flatten_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ReductionParameter reduction_param = 136;
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(136, _Internal::reduction_param(this),
        _Internal::reduction_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.EmbedParameter embed_param = 137;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(137, _Internal::embed_param(this),
        _Internal::embed_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.TileParameter tile_param = 138;
  if (cached_has_bits & 0x00000100u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(138, _Internal::tile_param(this),
        _Internal::tile_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.BatchNormParameter batch_norm_param = 139;
  if (cached_has_bits & 0x00000200u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(139, _Internal::batch_norm_param(this),
        _Internal::batch_norm_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ELUParameter elu_param = 140;
  if (cached_has_bits & 0x00000400u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(140, _Internal::elu_param(this),
        _Internal::elu_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.BiasParameter bias_param = 141;
  if (cached_has_bits & 0x00000800u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(141, _Internal::bias_param(this),
        _Internal::bias_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ScaleParameter scale_param = 142;
  if (cached_has_bits & 0x00001000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(142, _Internal::scale_param(this),
        _Internal::scale_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.InputParameter input_param = 143;
  if (cached_has_bits & 0x00002000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(143, _Internal::input_param(this),
        _Internal::input_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.CropParameter crop_param = 144;
  if (cached_has_bits & 0x00004000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(144, _Internal::crop_param(this),
        _Internal::crop_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ParameterParameter parameter_param = 145;
  if (cached_has_bits & 0x00008000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(145, _Internal::parameter_param(this),
        _Internal::parameter_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.RecurrentParameter recurrent_param = 146;
  if (cached_has_bits & 0x00010000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(146, _Internal::recurrent_param(this),
        _Internal::recurrent_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.DetectionOutputParameter detection_output_param = 147;
  if (cached_has_bits & 0x00020000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(147, _Internal::detection_output_param(this),
        _Internal::detection_output_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.PermuteParameter permute_param = 148;
  if (cached_has_bits & 0x00040000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(148, _Internal::permute_param(this),
        _Internal::permute_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.NormalizeBBoxParameter norm_param = 149;
  if (cached_has_bits & 0x00080000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(149, _Internal::norm_param(this),
        _Internal::norm_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.PriorBoxParameter prior_box_param = 150;
  if (cached_has_bits & 0x00100000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(150, _Internal::prior_box_param(this),
        _Internal::prior_box_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ProposalParameter proposal_param = 201;
  if (cached_has_bits & 0x00200000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(201, _Internal::proposal_param(this),
        _Internal::proposal_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.PSROIPoolingParameter psroi_pooling_param = 10002;
  if (cached_has_bits & 0x00400000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(10002, _Internal::psroi_pooling_param(this),
        _Internal::psroi_pooling_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ROIPoolingParameter roi_pooling_param = 8266711;
  if (cached_has_bits & 0x00800000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8266711, _Internal::roi_pooling_param(this),
        _Internal::roi_pooling_param(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:opencv_caffe.LayerParameter)
  return target;
}

size_t LayerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.LayerParameter)
  size_t total_size = 0;

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

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

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

  // repeated float loss_weight = 5;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_loss_weight_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_loss_weight_size());
    total_size += data_size;
  }

  // repeated .opencv_caffe.ParamSpec param = 6;
  total_size += 1UL * this->_internal_param_size();
  for (const auto& msg : this->_impl_.param_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_caffe.BlobProto blobs = 7;
  total_size += 1UL * this->_internal_blobs_size();
  for (const auto& msg : this->_impl_.blobs_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_caffe.NetStateRule include = 8;
  total_size += 1UL * this->_internal_include_size();
  for (const auto& msg : this->_impl_.include_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_caffe.NetStateRule exclude = 9;
  total_size += 1UL * this->_internal_exclude_size();
  for (const auto& msg : this->_impl_.exclude_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated bool propagate_down = 11;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_propagate_down_size());
    size_t data_size = 1UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_propagate_down_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional string name = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional string type = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_type());
    }

    // optional .opencv_caffe.TransformationParameter transform_param = 100;
    if (cached_has_bits & 0x00000004u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.transform_param_);
    }

    // optional .opencv_caffe.LossParameter loss_param = 101;
    if (cached_has_bits & 0x00000008u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.loss_param_);
    }

    // optional .opencv_caffe.AccuracyParameter accuracy_param = 102;
    if (cached_has_bits & 0x00000010u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.accuracy_param_);
    }

    // optional .opencv_caffe.ArgMaxParameter argmax_param = 103;
    if (cached_has_bits & 0x00000020u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.argmax_param_);
    }

    // optional .opencv_caffe.ConcatParameter concat_param = 104;
    if (cached_has_bits & 0x00000040u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.concat_param_);
    }

    // optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 105;
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.contrastive_loss_param_);
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // optional .opencv_caffe.ConvolutionParameter convolution_param = 106;
    if (cached_has_bits & 0x00000100u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.convolution_param_);
    }

    // optional .opencv_caffe.DataParameter data_param = 107;
    if (cached_has_bits & 0x00000200u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.data_param_);
    }

    // optional .opencv_caffe.DropoutParameter dropout_param = 108;
    if (cached_has_bits & 0x00000400u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.dropout_param_);
    }

    // optional .opencv_caffe.DummyDataParameter dummy_data_param = 109;
    if (cached_has_bits & 0x00000800u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.dummy_data_param_);
    }

    // optional .opencv_caffe.EltwiseParameter eltwise_param = 110;
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.eltwise_param_);
    }

    // optional .opencv_caffe.ExpParameter exp_param = 111;
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.exp_param_);
    }

    // optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 112;
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.hdf5_data_param_);
    }

    // optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 113;
    if (cached_has_bits & 0x00008000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.hdf5_output_param_);
    }

  }
  if (cached_has_bits & 0x00ff0000u) {
    // optional .opencv_caffe.HingeLossParameter hinge_loss_param = 114;
    if (cached_has_bits & 0x00010000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.hinge_loss_param_);
    }

    // optional .opencv_caffe.ImageDataParameter image_data_param = 115;
    if (cached_has_bits & 0x00020000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.image_data_param_);
    }

    // optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 116;
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.infogain_loss_param_);
    }

    // optional .opencv_caffe.InnerProductParameter inner_product_param = 117;
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.inner_product_param_);
    }

    // optional .opencv_caffe.LRNParameter lrn_param = 118;
    if (cached_has_bits & 0x00100000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.lrn_param_);
    }

    // optional .opencv_caffe.MemoryDataParameter memory_data_param = 119;
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.memory_data_param_);
    }

    // optional .opencv_caffe.MVNParameter mvn_param = 120;
    if (cached_has_bits & 0x00400000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.mvn_param_);
    }

    // optional .opencv_caffe.PoolingParameter pooling_param = 121;
    if (cached_has_bits & 0x00800000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.pooling_param_);
    }

  }
  if (cached_has_bits & 0xff000000u) {
    // optional .opencv_caffe.PowerParameter power_param = 122;
    if (cached_has_bits & 0x01000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.power_param_);
    }

    // optional .opencv_caffe.ReLUParameter relu_param = 123;
    if (cached_has_bits & 0x02000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.relu_param_);
    }

    // optional .opencv_caffe.SigmoidParameter sigmoid_param = 124;
    if (cached_has_bits & 0x04000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sigmoid_param_);
    }

    // optional .opencv_caffe.SoftmaxParameter softmax_param = 125;
    if (cached_has_bits & 0x08000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.softmax_param_);
    }

    // optional .opencv_caffe.SliceParameter slice_param = 126;
    if (cached_has_bits & 0x10000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.slice_param_);
    }

    // optional .opencv_caffe.TanHParameter tanh_param = 127;
    if (cached_has_bits & 0x20000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.tanh_param_);
    }

    // optional .opencv_caffe.ThresholdParameter threshold_param = 128;
    if (cached_has_bits & 0x40000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.threshold_param_);
    }

    // optional .opencv_caffe.WindowDataParameter window_data_param = 129;
    if (cached_has_bits & 0x80000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.window_data_param_);
    }

  }
  cached_has_bits = _impl_._has_bits_[1];
  if (cached_has_bits & 0x000000ffu) {
    // optional .opencv_caffe.PythonParameter python_param = 130;
    if (cached_has_bits & 0x00000001u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.python_param_);
    }

    // optional .opencv_caffe.PReLUParameter prelu_param = 131;
    if (cached_has_bits & 0x00000002u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.prelu_param_);
    }

    // optional .opencv_caffe.SPPParameter spp_param = 132;
    if (cached_has_bits & 0x00000004u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.spp_param_);
    }

    // optional .opencv_caffe.ReshapeParameter reshape_param = 133;
    if (cached_has_bits & 0x00000008u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reshape_param_);
    }

    // optional .opencv_caffe.LogParameter log_param = 134;
    if (cached_has_bits & 0x00000010u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.log_param_);
    }

    // optional .opencv_caffe.FlattenParameter flatten_param = 135;
    if (cached_has_bits & 0x00000020u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.flatten_param_);
    }

    // optional .opencv_caffe.ReductionParameter reduction_param = 136;
    if (cached_has_bits & 0x00000040u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.reduction_param_);
    }

    // optional .opencv_caffe.EmbedParameter embed_param = 137;
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.embed_param_);
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // optional .opencv_caffe.TileParameter tile_param = 138;
    if (cached_has_bits & 0x00000100u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.tile_param_);
    }

    // optional .opencv_caffe.BatchNormParameter batch_norm_param = 139;
    if (cached_has_bits & 0x00000200u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.batch_norm_param_);
    }

    // optional .opencv_caffe.ELUParameter elu_param = 140;
    if (cached_has_bits & 0x00000400u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.elu_param_);
    }

    // optional .opencv_caffe.BiasParameter bias_param = 141;
    if (cached_has_bits & 0x00000800u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.bias_param_);
    }

    // optional .opencv_caffe.ScaleParameter scale_param = 142;
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.scale_param_);
    }

    // optional .opencv_caffe.InputParameter input_param = 143;
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.input_param_);
    }

    // optional .opencv_caffe.CropParameter crop_param = 144;
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.crop_param_);
    }

    // optional .opencv_caffe.ParameterParameter parameter_param = 145;
    if (cached_has_bits & 0x00008000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.parameter_param_);
    }

  }
  if (cached_has_bits & 0x00ff0000u) {
    // optional .opencv_caffe.RecurrentParameter recurrent_param = 146;
    if (cached_has_bits & 0x00010000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.recurrent_param_);
    }

    // optional .opencv_caffe.DetectionOutputParameter detection_output_param = 147;
    if (cached_has_bits & 0x00020000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.detection_output_param_);
    }

    // optional .opencv_caffe.PermuteParameter permute_param = 148;
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.permute_param_);
    }

    // optional .opencv_caffe.NormalizeBBoxParameter norm_param = 149;
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.norm_param_);
    }

    // optional .opencv_caffe.PriorBoxParameter prior_box_param = 150;
    if (cached_has_bits & 0x00100000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.prior_box_param_);
    }

    // optional .opencv_caffe.ProposalParameter proposal_param = 201;
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.proposal_param_);
    }

    // optional .opencv_caffe.PSROIPoolingParameter psroi_pooling_param = 10002;
    if (cached_has_bits & 0x00400000u) {
      total_size += 3 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.psroi_pooling_param_);
    }

    // optional .opencv_caffe.ROIPoolingParameter roi_pooling_param = 8266711;
    if (cached_has_bits & 0x00800000u) {
      total_size += 4 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.roi_pooling_param_);
    }

  }
  // optional .opencv_caffe.Phase phase = 10;
  if (cached_has_bits & 0x01000000u) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_phase());
  }

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

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


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

  _this->_impl_.bottom_.MergeFrom(from._impl_.bottom_);
  _this->_impl_.top_.MergeFrom(from._impl_.top_);
  _this->_impl_.loss_weight_.MergeFrom(from._impl_.loss_weight_);
  _this->_impl_.param_.MergeFrom(from._impl_.param_);
  _this->_impl_.blobs_.MergeFrom(from._impl_.blobs_);
  _this->_impl_.include_.MergeFrom(from._impl_.include_);
  _this->_impl_.exclude_.MergeFrom(from._impl_.exclude_);
  _this->_impl_.propagate_down_.MergeFrom(from._impl_.propagate_down_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_type(from._internal_type());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_transform_param()->::opencv_caffe::TransformationParameter::MergeFrom(
          from._internal_transform_param());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_loss_param()->::opencv_caffe::LossParameter::MergeFrom(
          from._internal_loss_param());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_accuracy_param()->::opencv_caffe::AccuracyParameter::MergeFrom(
          from._internal_accuracy_param());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_argmax_param()->::opencv_caffe::ArgMaxParameter::MergeFrom(
          from._internal_argmax_param());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_concat_param()->::opencv_caffe::ConcatParameter::MergeFrom(
          from._internal_concat_param());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_contrastive_loss_param()->::opencv_caffe::ContrastiveLossParameter::MergeFrom(
          from._internal_contrastive_loss_param());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_internal_mutable_convolution_param()->::opencv_caffe::ConvolutionParameter::MergeFrom(
          from._internal_convolution_param());
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_internal_mutable_data_param()->::opencv_caffe::DataParameter::MergeFrom(
          from._internal_data_param());
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_internal_mutable_dropout_param()->::opencv_caffe::DropoutParameter::MergeFrom(
          from._internal_dropout_param());
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_internal_mutable_dummy_data_param()->::opencv_caffe::DummyDataParameter::MergeFrom(
          from._internal_dummy_data_param());
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_internal_mutable_eltwise_param()->::opencv_caffe::EltwiseParameter::MergeFrom(
          from._internal_eltwise_param());
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_internal_mutable_exp_param()->::opencv_caffe::ExpParameter::MergeFrom(
          from._internal_exp_param());
    }
    if (cached_has_bits & 0x00004000u) {
      _this->_internal_mutable_hdf5_data_param()->::opencv_caffe::HDF5DataParameter::MergeFrom(
          from._internal_hdf5_data_param());
    }
    if (cached_has_bits & 0x00008000u) {
      _this->_internal_mutable_hdf5_output_param()->::opencv_caffe::HDF5OutputParameter::MergeFrom(
          from._internal_hdf5_output_param());
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      _this->_internal_mutable_hinge_loss_param()->::opencv_caffe::HingeLossParameter::MergeFrom(
          from._internal_hinge_loss_param());
    }
    if (cached_has_bits & 0x00020000u) {
      _this->_internal_mutable_image_data_param()->::opencv_caffe::ImageDataParameter::MergeFrom(
          from._internal_image_data_param());
    }
    if (cached_has_bits & 0x00040000u) {
      _this->_internal_mutable_infogain_loss_param()->::opencv_caffe::InfogainLossParameter::MergeFrom(
          from._internal_infogain_loss_param());
    }
    if (cached_has_bits & 0x00080000u) {
      _this->_internal_mutable_inner_product_param()->::opencv_caffe::InnerProductParameter::MergeFrom(
          from._internal_inner_product_param());
    }
    if (cached_has_bits & 0x00100000u) {
      _this->_internal_mutable_lrn_param()->::opencv_caffe::LRNParameter::MergeFrom(
          from._internal_lrn_param());
    }
    if (cached_has_bits & 0x00200000u) {
      _this->_internal_mutable_memory_data_param()->::opencv_caffe::MemoryDataParameter::MergeFrom(
          from._internal_memory_data_param());
    }
    if (cached_has_bits & 0x00400000u) {
      _this->_internal_mutable_mvn_param()->::opencv_caffe::MVNParameter::MergeFrom(
          from._internal_mvn_param());
    }
    if (cached_has_bits & 0x00800000u) {
      _this->_internal_mutable_pooling_param()->::opencv_caffe::PoolingParameter::MergeFrom(
          from._internal_pooling_param());
    }
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      _this->_internal_mutable_power_param()->::opencv_caffe::PowerParameter::MergeFrom(
          from._internal_power_param());
    }
    if (cached_has_bits & 0x02000000u) {
      _this->_internal_mutable_relu_param()->::opencv_caffe::ReLUParameter::MergeFrom(
          from._internal_relu_param());
    }
    if (cached_has_bits & 0x04000000u) {
      _this->_internal_mutable_sigmoid_param()->::opencv_caffe::SigmoidParameter::MergeFrom(
          from._internal_sigmoid_param());
    }
    if (cached_has_bits & 0x08000000u) {
      _this->_internal_mutable_softmax_param()->::opencv_caffe::SoftmaxParameter::MergeFrom(
          from._internal_softmax_param());
    }
    if (cached_has_bits & 0x10000000u) {
      _this->_internal_mutable_slice_param()->::opencv_caffe::SliceParameter::MergeFrom(
          from._internal_slice_param());
    }
    if (cached_has_bits & 0x20000000u) {
      _this->_internal_mutable_tanh_param()->::opencv_caffe::TanHParameter::MergeFrom(
          from._internal_tanh_param());
    }
    if (cached_has_bits & 0x40000000u) {
      _this->_internal_mutable_threshold_param()->::opencv_caffe::ThresholdParameter::MergeFrom(
          from._internal_threshold_param());
    }
    if (cached_has_bits & 0x80000000u) {
      _this->_internal_mutable_window_data_param()->::opencv_caffe::WindowDataParameter::MergeFrom(
          from._internal_window_data_param());
    }
  }
  cached_has_bits = from._impl_._has_bits_[1];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_python_param()->::opencv_caffe::PythonParameter::MergeFrom(
          from._internal_python_param());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_prelu_param()->::opencv_caffe::PReLUParameter::MergeFrom(
          from._internal_prelu_param());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_spp_param()->::opencv_caffe::SPPParameter::MergeFrom(
          from._internal_spp_param());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_reshape_param()->::opencv_caffe::ReshapeParameter::MergeFrom(
          from._internal_reshape_param());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_log_param()->::opencv_caffe::LogParameter::MergeFrom(
          from._internal_log_param());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_flatten_param()->::opencv_caffe::FlattenParameter::MergeFrom(
          from._internal_flatten_param());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_reduction_param()->::opencv_caffe::ReductionParameter::MergeFrom(
          from._internal_reduction_param());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_embed_param()->::opencv_caffe::EmbedParameter::MergeFrom(
          from._internal_embed_param());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_internal_mutable_tile_param()->::opencv_caffe::TileParameter::MergeFrom(
          from._internal_tile_param());
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_internal_mutable_batch_norm_param()->::opencv_caffe::BatchNormParameter::MergeFrom(
          from._internal_batch_norm_param());
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_internal_mutable_elu_param()->::opencv_caffe::ELUParameter::MergeFrom(
          from._internal_elu_param());
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_internal_mutable_bias_param()->::opencv_caffe::BiasParameter::MergeFrom(
          from._internal_bias_param());
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_internal_mutable_scale_param()->::opencv_caffe::ScaleParameter::MergeFrom(
          from._internal_scale_param());
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_internal_mutable_input_param()->::opencv_caffe::InputParameter::MergeFrom(
          from._internal_input_param());
    }
    if (cached_has_bits & 0x00004000u) {
      _this->_internal_mutable_crop_param()->::opencv_caffe::CropParameter::MergeFrom(
          from._internal_crop_param());
    }
    if (cached_has_bits & 0x00008000u) {
      _this->_internal_mutable_parameter_param()->::opencv_caffe::ParameterParameter::MergeFrom(
          from._internal_parameter_param());
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      _this->_internal_mutable_recurrent_param()->::opencv_caffe::RecurrentParameter::MergeFrom(
          from._internal_recurrent_param());
    }
    if (cached_has_bits & 0x00020000u) {
      _this->_internal_mutable_detection_output_param()->::opencv_caffe::DetectionOutputParameter::MergeFrom(
          from._internal_detection_output_param());
    }
    if (cached_has_bits & 0x00040000u) {
      _this->_internal_mutable_permute_param()->::opencv_caffe::PermuteParameter::MergeFrom(
          from._internal_permute_param());
    }
    if (cached_has_bits & 0x00080000u) {
      _this->_internal_mutable_norm_param()->::opencv_caffe::NormalizeBBoxParameter::MergeFrom(
          from._internal_norm_param());
    }
    if (cached_has_bits & 0x00100000u) {
      _this->_internal_mutable_prior_box_param()->::opencv_caffe::PriorBoxParameter::MergeFrom(
          from._internal_prior_box_param());
    }
    if (cached_has_bits & 0x00200000u) {
      _this->_internal_mutable_proposal_param()->::opencv_caffe::ProposalParameter::MergeFrom(
          from._internal_proposal_param());
    }
    if (cached_has_bits & 0x00400000u) {
      _this->_internal_mutable_psroi_pooling_param()->::opencv_caffe::PSROIPoolingParameter::MergeFrom(
          from._internal_psroi_pooling_param());
    }
    if (cached_has_bits & 0x00800000u) {
      _this->_internal_mutable_roi_pooling_param()->::opencv_caffe::ROIPoolingParameter::MergeFrom(
          from._internal_roi_pooling_param());
    }
  }
  if (cached_has_bits & 0x01000000u) {
    _this->_internal_set_phase(from._internal_phase());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool LayerParameter::IsInitialized() const {
  if (_internal_has_psroi_pooling_param()) {
    if (!_impl_.psroi_pooling_param_->IsInitialized()) return false;
  }
  return true;
}

void LayerParameter::InternalSwap(LayerParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_._has_bits_[1], other->_impl_._has_bits_[1]);
  _impl_.bottom_.InternalSwap(&other->_impl_.bottom_);
  _impl_.top_.InternalSwap(&other->_impl_.top_);
  _impl_.loss_weight_.InternalSwap(&other->_impl_.loss_weight_);
  _impl_.param_.InternalSwap(&other->_impl_.param_);
  _impl_.blobs_.InternalSwap(&other->_impl_.blobs_);
  _impl_.include_.InternalSwap(&other->_impl_.include_);
  _impl_.exclude_.InternalSwap(&other->_impl_.exclude_);
  _impl_.propagate_down_.InternalSwap(&other->_impl_.propagate_down_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.type_, lhs_arena,
      &other->_impl_.type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(LayerParameter, _impl_.phase_)
      + sizeof(LayerParameter::_impl_.phase_)
      - PROTOBUF_FIELD_OFFSET(LayerParameter, _impl_.transform_param_)>(
          reinterpret_cast<char*>(&_impl_.transform_param_),
          reinterpret_cast<char*>(&other->_impl_.transform_param_));
}

::PROTOBUF_NAMESPACE_ID::Metadata LayerParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[15]);
}

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

class TransformationParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<TransformationParameter>()._impl_._has_bits_);
  static void set_has_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_mirror(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_crop_size(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_mean_file(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_force_color(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_force_gray(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
};

TransformationParameter::TransformationParameter(::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:opencv_caffe.TransformationParameter)
}
TransformationParameter::TransformationParameter(const TransformationParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TransformationParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.mean_value_){from._impl_.mean_value_}
    , decltype(_impl_.mean_file_){}
    , decltype(_impl_.crop_size_){}
    , decltype(_impl_.mirror_){}
    , decltype(_impl_.force_color_){}
    , decltype(_impl_.force_gray_){}
    , decltype(_impl_.scale_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.mean_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.mean_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_mean_file()) {
    _this->_impl_.mean_file_.Set(from._internal_mean_file(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.crop_size_, &from._impl_.crop_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.scale_) -
    reinterpret_cast<char*>(&_impl_.crop_size_)) + sizeof(_impl_.scale_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.TransformationParameter)
}

inline void TransformationParameter::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_.mean_value_){arena}
    , decltype(_impl_.mean_file_){}
    , decltype(_impl_.crop_size_){0u}
    , decltype(_impl_.mirror_){false}
    , decltype(_impl_.force_color_){false}
    , decltype(_impl_.force_gray_){false}
    , decltype(_impl_.scale_){1}
  };
  _impl_.mean_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.mean_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void TransformationParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.mean_value_.~RepeatedField();
  _impl_.mean_file_.Destroy();
}

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

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

  _impl_.mean_value_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    _impl_.mean_file_.ClearNonDefaultToEmpty();
  }
  if (cached_has_bits & 0x0000003eu) {
    ::memset(&_impl_.crop_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.force_gray_) -
        reinterpret_cast<char*>(&_impl_.crop_size_)) + sizeof(_impl_.force_gray_));
    _impl_.scale_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TransformationParameter::_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 scale = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_scale(&has_bits);
          _impl_.scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool mirror = 2 [default = false];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_mirror(&has_bits);
          _impl_.mirror_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 crop_size = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_crop_size(&has_bits);
          _impl_.crop_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string mean_file = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_mean_file();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.TransformationParameter.mean_file");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // repeated float mean_value = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_mean_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<45>(ptr));
        } else if (static_cast<uint8_t>(tag) == 42) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_mean_value(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool force_color = 6 [default = false];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_force_color(&has_bits);
          _impl_.force_color_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool force_gray = 7 [default = false];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_force_gray(&has_bits);
          _impl_.force_gray_ = ::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* TransformationParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.TransformationParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional uint32 crop_size = 3 [default = 0];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_crop_size(), target);
  }

  // optional string mean_file = 4;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_mean_file().data(), static_cast<int>(this->_internal_mean_file().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.TransformationParameter.mean_file");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_mean_file(), target);
  }

  // repeated float mean_value = 5;
  for (int i = 0, n = this->_internal_mean_value_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(5, this->_internal_mean_value(i), target);
  }

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

  // optional bool force_gray = 7 [default = false];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_force_gray(), 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:opencv_caffe.TransformationParameter)
  return target;
}

size_t TransformationParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.TransformationParameter)
  size_t total_size = 0;

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

  // repeated float mean_value = 5;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_mean_value_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_mean_value_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional string mean_file = 4;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_mean_file());
    }

    // optional uint32 crop_size = 3 [default = 0];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_size());
    }

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

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

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

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

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

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


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

  _this->_impl_.mean_value_.MergeFrom(from._impl_.mean_value_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_mean_file(from._internal_mean_file());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.crop_size_ = from._impl_.crop_size_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.mirror_ = from._impl_.mirror_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.force_color_ = from._impl_.force_color_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.force_gray_ = from._impl_.force_gray_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.scale_ = from._impl_.scale_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void TransformationParameter::InternalSwap(TransformationParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.mean_value_.InternalSwap(&other->_impl_.mean_value_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.mean_file_, lhs_arena,
      &other->_impl_.mean_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TransformationParameter, _impl_.force_gray_)
      + sizeof(TransformationParameter::_impl_.force_gray_)
      - PROTOBUF_FIELD_OFFSET(TransformationParameter, _impl_.crop_size_)>(
          reinterpret_cast<char*>(&_impl_.crop_size_),
          reinterpret_cast<char*>(&other->_impl_.crop_size_));
  swap(_impl_.scale_, other->_impl_.scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata TransformationParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[16]);
}

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

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

LossParameter::LossParameter(::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:opencv_caffe.LossParameter)
}
LossParameter::LossParameter(const LossParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  LossParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.ignore_label_){}
    , decltype(_impl_.normalize_){}
    , decltype(_impl_.normalization_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.ignore_label_, &from._impl_.ignore_label_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.normalization_) -
    reinterpret_cast<char*>(&_impl_.ignore_label_)) + sizeof(_impl_.normalization_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.LossParameter)
}

inline void LossParameter::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_.ignore_label_){0}
    , decltype(_impl_.normalize_){false}
    , decltype(_impl_.normalization_){1}
  };
}

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

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

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

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

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

const char* LossParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 ignore_label = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_ignore_label(&has_bits);
          _impl_.ignore_label_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool normalize = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_normalize(&has_bits);
          _impl_.normalize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::LossParameter_NormalizationMode_IsValid(val))) {
            _internal_set_normalization(static_cast<::opencv_caffe::LossParameter_NormalizationMode>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
          }
        } 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* LossParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.LossParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional int32 ignore_label = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_ignore_label(), target);
  }

  // optional bool normalize = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_normalize(), target);
  }

  // optional .opencv_caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      3, this->_internal_normalization(), 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:opencv_caffe.LossParameter)
  return target;
}

size_t LossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.LossParameter)
  size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional int32 ignore_label = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_ignore_label());
    }

    // optional bool normalize = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 1;
    }

    // optional .opencv_caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_normalization());
    }

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

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


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

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

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

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

void LossParameter::InternalSwap(LossParameter* 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(LossParameter, _impl_.normalize_)
      + sizeof(LossParameter::_impl_.normalize_)
      - PROTOBUF_FIELD_OFFSET(LossParameter, _impl_.ignore_label_)>(
          reinterpret_cast<char*>(&_impl_.ignore_label_),
          reinterpret_cast<char*>(&other->_impl_.ignore_label_));
  swap(_impl_.normalization_, other->_impl_.normalization_);
}

::PROTOBUF_NAMESPACE_ID::Metadata LossParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[17]);
}

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

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

AccuracyParameter::AccuracyParameter(::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:opencv_caffe.AccuracyParameter)
}
AccuracyParameter::AccuracyParameter(const AccuracyParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  AccuracyParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.ignore_label_){}
    , decltype(_impl_.top_k_){}
    , decltype(_impl_.axis_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.ignore_label_, &from._impl_.ignore_label_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.axis_) -
    reinterpret_cast<char*>(&_impl_.ignore_label_)) + sizeof(_impl_.axis_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.AccuracyParameter)
}

inline void AccuracyParameter::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_.ignore_label_){0}
    , decltype(_impl_.top_k_){1u}
    , decltype(_impl_.axis_){1}
  };
}

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

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    _impl_.ignore_label_ = 0;
    _impl_.top_k_ = 1u;
    _impl_.axis_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* AccuracyParameter::_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 uint32 top_k = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_top_k(&has_bits);
          _impl_.top_k_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 axis = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 ignore_label = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_ignore_label(&has_bits);
          _impl_.ignore_label_ = ::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* AccuracyParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.AccuracyParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 top_k = 1 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_top_k(), target);
  }

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

  // optional int32 ignore_label = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_ignore_label(), 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:opencv_caffe.AccuracyParameter)
  return target;
}

size_t AccuracyParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.AccuracyParameter)
  size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional int32 ignore_label = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_ignore_label());
    }

    // optional uint32 top_k = 1 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_top_k());
    }

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

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

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


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

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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata AccuracyParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[18]);
}

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

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

ArgMaxParameter::ArgMaxParameter(::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:opencv_caffe.ArgMaxParameter)
}
ArgMaxParameter::ArgMaxParameter(const ArgMaxParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ArgMaxParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.out_max_val_){}
    , decltype(_impl_.axis_){}
    , decltype(_impl_.top_k_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.out_max_val_, &from._impl_.out_max_val_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.top_k_) -
    reinterpret_cast<char*>(&_impl_.out_max_val_)) + sizeof(_impl_.top_k_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ArgMaxParameter)
}

inline void ArgMaxParameter::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_.out_max_val_){false}
    , decltype(_impl_.axis_){0}
    , decltype(_impl_.top_k_){1u}
  };
}

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

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

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

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

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

const char* ArgMaxParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool out_max_val = 1 [default = false];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_out_max_val(&has_bits);
          _impl_.out_max_val_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 top_k = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_top_k(&has_bits);
          _impl_.top_k_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 axis = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::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* ArgMaxParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ArgMaxParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional uint32 top_k = 2 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_top_k(), target);
  }

  // optional int32 axis = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_axis(), 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:opencv_caffe.ArgMaxParameter)
  return target;
}

size_t ArgMaxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ArgMaxParameter)
  size_t total_size = 0;

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

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

    // optional int32 axis = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

    // optional uint32 top_k = 2 [default = 1];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_top_k());
    }

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

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


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

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

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

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

void ArgMaxParameter::InternalSwap(ArgMaxParameter* 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(ArgMaxParameter, _impl_.axis_)
      + sizeof(ArgMaxParameter::_impl_.axis_)
      - PROTOBUF_FIELD_OFFSET(ArgMaxParameter, _impl_.out_max_val_)>(
          reinterpret_cast<char*>(&_impl_.out_max_val_),
          reinterpret_cast<char*>(&other->_impl_.out_max_val_));
  swap(_impl_.top_k_, other->_impl_.top_k_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ArgMaxParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[19]);
}

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

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

ConcatParameter::ConcatParameter(::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:opencv_caffe.ConcatParameter)
}
ConcatParameter::ConcatParameter(const ConcatParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ConcatParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.concat_dim_){}
    , decltype(_impl_.axis_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.concat_dim_, &from._impl_.concat_dim_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.axis_) -
    reinterpret_cast<char*>(&_impl_.concat_dim_)) + sizeof(_impl_.axis_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ConcatParameter)
}

inline void ConcatParameter::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_.concat_dim_){1u}
    , decltype(_impl_.axis_){1}
  };
}

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

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

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

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

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

const char* ConcatParameter::_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 uint32 concat_dim = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_concat_dim(&has_bits);
          _impl_.concat_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 axis = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::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* ConcatParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ConcatParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 concat_dim = 1 [default = 1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_concat_dim(), target);
  }

  // optional int32 axis = 2 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), 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:opencv_caffe.ConcatParameter)
  return target;
}

size_t ConcatParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ConcatParameter)
  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 uint32 concat_dim = 1 [default = 1];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_concat_dim());
    }

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

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

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


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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata ConcatParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[20]);
}

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

class BatchNormParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<BatchNormParameter>()._impl_._has_bits_);
  static void set_has_use_global_stats(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_moving_average_fraction(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_eps(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_scale_bias(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

BatchNormParameter::BatchNormParameter(::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:opencv_caffe.BatchNormParameter)
}
BatchNormParameter::BatchNormParameter(const BatchNormParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BatchNormParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.use_global_stats_){}
    , decltype(_impl_.scale_bias_){}
    , decltype(_impl_.moving_average_fraction_){}
    , decltype(_impl_.eps_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.use_global_stats_, &from._impl_.use_global_stats_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.eps_) -
    reinterpret_cast<char*>(&_impl_.use_global_stats_)) + sizeof(_impl_.eps_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.BatchNormParameter)
}

inline void BatchNormParameter::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_.use_global_stats_){false}
    , decltype(_impl_.scale_bias_){false}
    , decltype(_impl_.moving_average_fraction_){0.999f}
    , decltype(_impl_.eps_){1e-05f}
  };
}

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

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

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

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

  ::memset(&_impl_.use_global_stats_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&_impl_.scale_bias_) -
      reinterpret_cast<char*>(&_impl_.use_global_stats_)) + sizeof(_impl_.scale_bias_));
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000000cu) {
    _impl_.moving_average_fraction_ = 0.999f;
    _impl_.eps_ = 1e-05f;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BatchNormParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool use_global_stats = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_use_global_stats(&has_bits);
          _impl_.use_global_stats_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float moving_average_fraction = 2 [default = 0.999];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_moving_average_fraction(&has_bits);
          _impl_.moving_average_fraction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float eps = 3 [default = 1e-05];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_eps(&has_bits);
          _impl_.eps_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool scale_bias = 7 [default = false];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_scale_bias(&has_bits);
          _impl_.scale_bias_ = ::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* BatchNormParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.BatchNormParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional float eps = 3 [default = 1e-05];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_eps(), target);
  }

  // optional bool scale_bias = 7 [default = false];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_scale_bias(), 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:opencv_caffe.BatchNormParameter)
  return target;
}

size_t BatchNormParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.BatchNormParameter)
  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 & 0x0000000fu) {
    // optional bool use_global_stats = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 1;
    }

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

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

    // optional float eps = 3 [default = 1e-05];
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 4;
    }

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

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


void BatchNormParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<BatchNormParameter*>(&to_msg);
  auto& from = static_cast<const BatchNormParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.BatchNormParameter)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.use_global_stats_ = from._impl_.use_global_stats_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.scale_bias_ = from._impl_.scale_bias_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.moving_average_fraction_ = from._impl_.moving_average_fraction_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.eps_ = from._impl_.eps_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void BatchNormParameter::InternalSwap(BatchNormParameter* 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(BatchNormParameter, _impl_.scale_bias_)
      + sizeof(BatchNormParameter::_impl_.scale_bias_)
      - PROTOBUF_FIELD_OFFSET(BatchNormParameter, _impl_.use_global_stats_)>(
          reinterpret_cast<char*>(&_impl_.use_global_stats_),
          reinterpret_cast<char*>(&other->_impl_.use_global_stats_));
  swap(_impl_.moving_average_fraction_, other->_impl_.moving_average_fraction_);
  swap(_impl_.eps_, other->_impl_.eps_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BatchNormParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[21]);
}

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

class BiasParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<BiasParameter>()._impl_._has_bits_);
  static void set_has_axis(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_num_axes(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::opencv_caffe::FillerParameter& filler(const BiasParameter* msg);
  static void set_has_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::opencv_caffe::FillerParameter&
BiasParameter::_Internal::filler(const BiasParameter* msg) {
  return *msg->_impl_.filler_;
}
BiasParameter::BiasParameter(::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:opencv_caffe.BiasParameter)
}
BiasParameter::BiasParameter(const BiasParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  BiasParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filler_){nullptr}
    , decltype(_impl_.axis_){}
    , decltype(_impl_.num_axes_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_filler()) {
    _this->_impl_.filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.filler_);
  }
  ::memcpy(&_impl_.axis_, &from._impl_.axis_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.num_axes_) -
    reinterpret_cast<char*>(&_impl_.axis_)) + sizeof(_impl_.num_axes_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.BiasParameter)
}

inline void BiasParameter::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_.filler_){nullptr}
    , decltype(_impl_.axis_){1}
    , decltype(_impl_.num_axes_){1}
  };
}

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

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(_impl_.filler_ != nullptr);
      _impl_.filler_->Clear();
    }
    _impl_.axis_ = 1;
    _impl_.num_axes_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BiasParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 axis = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 num_axes = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_num_axes(&has_bits);
          _impl_.num_axes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter filler = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_filler(), 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* BiasParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.BiasParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional .opencv_caffe.FillerParameter filler = 3;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::filler(this),
        _Internal::filler(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:opencv_caffe.BiasParameter)
  return target;
}

size_t BiasParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.BiasParameter)
  size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional .opencv_caffe.FillerParameter filler = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.filler_);
    }

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

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

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

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


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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.axis_ = from._impl_.axis_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.num_axes_ = from._impl_.num_axes_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata BiasParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[22]);
}

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

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

ContrastiveLossParameter::ContrastiveLossParameter(::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:opencv_caffe.ContrastiveLossParameter)
}
ContrastiveLossParameter::ContrastiveLossParameter(const ContrastiveLossParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ContrastiveLossParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.legacy_version_){}
    , decltype(_impl_.margin_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.legacy_version_, &from._impl_.legacy_version_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.margin_) -
    reinterpret_cast<char*>(&_impl_.legacy_version_)) + sizeof(_impl_.margin_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ContrastiveLossParameter)
}

inline void ContrastiveLossParameter::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_.legacy_version_){false}
    , decltype(_impl_.margin_){1}
  };
}

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

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

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

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

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

const char* ContrastiveLossParameter::_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 margin = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_margin(&has_bits);
          _impl_.margin_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool legacy_version = 2 [default = false];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_legacy_version(&has_bits);
          _impl_.legacy_version_ = ::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* ContrastiveLossParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ContrastiveLossParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional bool legacy_version = 2 [default = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_legacy_version(), 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:opencv_caffe.ContrastiveLossParameter)
  return target;
}

size_t ContrastiveLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ContrastiveLossParameter)
  size_t total_size = 0;

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

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

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

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

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


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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata ContrastiveLossParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[23]);
}

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

class ConvolutionParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ConvolutionParameter>()._impl_._has_bits_);
  static void set_has_num_output(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_bias_term(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_pad_h(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_pad_w(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_kernel_h(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_kernel_w(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_stride_h(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_stride_w(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_group(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static const ::opencv_caffe::FillerParameter& weight_filler(const ConvolutionParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::opencv_caffe::FillerParameter& bias_filler(const ConvolutionParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_engine(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_axis(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_force_nd_im2col(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
};

const ::opencv_caffe::FillerParameter&
ConvolutionParameter::_Internal::weight_filler(const ConvolutionParameter* msg) {
  return *msg->_impl_.weight_filler_;
}
const ::opencv_caffe::FillerParameter&
ConvolutionParameter::_Internal::bias_filler(const ConvolutionParameter* msg) {
  return *msg->_impl_.bias_filler_;
}
ConvolutionParameter::ConvolutionParameter(::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:opencv_caffe.ConvolutionParameter)
}
ConvolutionParameter::ConvolutionParameter(const ConvolutionParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ConvolutionParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.pad_){from._impl_.pad_}
    , decltype(_impl_.kernel_size_){from._impl_.kernel_size_}
    , decltype(_impl_.stride_){from._impl_.stride_}
    , decltype(_impl_.dilation_){from._impl_.dilation_}
    , decltype(_impl_.weight_filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.num_output_){}
    , decltype(_impl_.pad_h_){}
    , decltype(_impl_.pad_w_){}
    , decltype(_impl_.kernel_h_){}
    , decltype(_impl_.kernel_w_){}
    , decltype(_impl_.stride_h_){}
    , decltype(_impl_.stride_w_){}
    , decltype(_impl_.engine_){}
    , decltype(_impl_.force_nd_im2col_){}
    , decltype(_impl_.axis_){}
    , decltype(_impl_.bias_term_){}
    , decltype(_impl_.group_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_weight_filler()) {
    _this->_impl_.weight_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.weight_filler_);
  }
  if (from._internal_has_bias_filler()) {
    _this->_impl_.bias_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.bias_filler_);
  }
  ::memcpy(&_impl_.num_output_, &from._impl_.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.group_) -
    reinterpret_cast<char*>(&_impl_.num_output_)) + sizeof(_impl_.group_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ConvolutionParameter)
}

inline void ConvolutionParameter::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_.pad_){arena}
    , decltype(_impl_.kernel_size_){arena}
    , decltype(_impl_.stride_){arena}
    , decltype(_impl_.dilation_){arena}
    , decltype(_impl_.weight_filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.num_output_){0u}
    , decltype(_impl_.pad_h_){0u}
    , decltype(_impl_.pad_w_){0u}
    , decltype(_impl_.kernel_h_){0u}
    , decltype(_impl_.kernel_w_){0u}
    , decltype(_impl_.stride_h_){0u}
    , decltype(_impl_.stride_w_){0u}
    , decltype(_impl_.engine_){0}
    , decltype(_impl_.force_nd_im2col_){false}
    , decltype(_impl_.axis_){1}
    , decltype(_impl_.bias_term_){true}
    , decltype(_impl_.group_){1u}
  };
}

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

inline void ConvolutionParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.pad_.~RepeatedField();
  _impl_.kernel_size_.~RepeatedField();
  _impl_.stride_.~RepeatedField();
  _impl_.dilation_.~RepeatedField();
  if (this != internal_default_instance()) delete _impl_.weight_filler_;
  if (this != internal_default_instance()) delete _impl_.bias_filler_;
}

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

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

  _impl_.pad_.Clear();
  _impl_.kernel_size_.Clear();
  _impl_.stride_.Clear();
  _impl_.dilation_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(_impl_.weight_filler_ != nullptr);
      _impl_.weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.bias_filler_ != nullptr);
      _impl_.bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&_impl_.num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.stride_h_) -
        reinterpret_cast<char*>(&_impl_.num_output_)) + sizeof(_impl_.stride_h_));
  }
  if (cached_has_bits & 0x00003f00u) {
    ::memset(&_impl_.stride_w_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.force_nd_im2col_) -
        reinterpret_cast<char*>(&_impl_.stride_w_)) + sizeof(_impl_.force_nd_im2col_));
    _impl_.axis_ = 1;
    _impl_.bias_term_ = true;
    _impl_.group_ = 1u;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ConvolutionParameter::_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 uint32 num_output = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_num_output(&has_bits);
          _impl_.num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool bias_term = 2 [default = true];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_bias_term(&has_bits);
          _impl_.bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated uint32 pad = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_pad(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
        } else if (static_cast<uint8_t>(tag) == 26) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_pad(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated uint32 kernel_size = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_kernel_size(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
        } else if (static_cast<uint8_t>(tag) == 34) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_kernel_size(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 group = 5 [default = 1];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_group(&has_bits);
          _impl_.group_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated uint32 stride = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_stride(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<48>(ptr));
        } else if (static_cast<uint8_t>(tag) == 50) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_stride(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter weight_filler = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter bias_filler = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 pad_h = 9 [default = 0];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_pad_h(&has_bits);
          _impl_.pad_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 pad_w = 10 [default = 0];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_pad_w(&has_bits);
          _impl_.pad_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 kernel_h = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_kernel_h(&has_bits);
          _impl_.kernel_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 kernel_w = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_kernel_w(&has_bits);
          _impl_.kernel_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 stride_h = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_stride_h(&has_bits);
          _impl_.stride_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 stride_w = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
          _Internal::set_has_stride_w(&has_bits);
          _impl_.stride_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::ConvolutionParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::opencv_caffe::ConvolutionParameter_Engine>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(15, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int32 axis = 16 [default = 1];
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool force_nd_im2col = 17 [default = false];
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
          _Internal::set_has_force_nd_im2col(&has_bits);
          _impl_.force_nd_im2col_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated uint32 dilation = 18;
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
          ptr -= 2;
          do {
            ptr += 2;
            _internal_add_dilation(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<144>(ptr));
        } else if (static_cast<uint8_t>(tag) == 146) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_dilation(), ptr, ctx);
          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* ConvolutionParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ConvolutionParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 num_output = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional bool bias_term = 2 [default = true];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_bias_term(), target);
  }

  // repeated uint32 pad = 3;
  for (int i = 0, n = this->_internal_pad_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_pad(i), target);
  }

  // repeated uint32 kernel_size = 4;
  for (int i = 0, n = this->_internal_kernel_size_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_kernel_size(i), target);
  }

  // optional uint32 group = 5 [default = 1];
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_group(), target);
  }

  // repeated uint32 stride = 6;
  for (int i = 0, n = this->_internal_stride_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_stride(i), target);
  }

  // optional .opencv_caffe.FillerParameter weight_filler = 7;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, _Internal::weight_filler(this),
        _Internal::weight_filler(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.FillerParameter bias_filler = 8;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8, _Internal::bias_filler(this),
        _Internal::bias_filler(this).GetCachedSize(), target, stream);
  }

  // optional uint32 pad_h = 9 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_pad_h(), target);
  }

  // optional uint32 pad_w = 10 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(10, this->_internal_pad_w(), target);
  }

  // optional uint32 kernel_h = 11;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(11, this->_internal_kernel_h(), target);
  }

  // optional uint32 kernel_w = 12;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(12, this->_internal_kernel_w(), target);
  }

  // optional uint32 stride_h = 13;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(13, this->_internal_stride_h(), target);
  }

  // optional uint32 stride_w = 14;
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(14, this->_internal_stride_w(), target);
  }

  // optional .opencv_caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      15, this->_internal_engine(), target);
  }

  // optional int32 axis = 16 [default = 1];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(16, this->_internal_axis(), target);
  }

  // optional bool force_nd_im2col = 17 [default = false];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(17, this->_internal_force_nd_im2col(), target);
  }

  // repeated uint32 dilation = 18;
  for (int i = 0, n = this->_internal_dilation_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(18, this->_internal_dilation(i), 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:opencv_caffe.ConvolutionParameter)
  return target;
}

size_t ConvolutionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ConvolutionParameter)
  size_t total_size = 0;

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

  // repeated uint32 pad = 3;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.pad_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_pad_size());
    total_size += data_size;
  }

  // repeated uint32 kernel_size = 4;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.kernel_size_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_kernel_size_size());
    total_size += data_size;
  }

  // repeated uint32 stride = 6;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.stride_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_stride_size());
    total_size += data_size;
  }

  // repeated uint32 dilation = 18;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.dilation_);
    total_size += 2 *
                  ::_pbi::FromIntSize(this->_internal_dilation_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .opencv_caffe.FillerParameter weight_filler = 7;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.weight_filler_);
    }

    // optional .opencv_caffe.FillerParameter bias_filler = 8;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.bias_filler_);
    }

    // optional uint32 num_output = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

    // optional uint32 pad_h = 9 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_h());
    }

    // optional uint32 pad_w = 10 [default = 0];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_w());
    }

    // optional uint32 kernel_h = 11;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_h());
    }

    // optional uint32 kernel_w = 12;
    if (cached_has_bits & 0x00000040u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_w());
    }

    // optional uint32 stride_h = 13;
    if (cached_has_bits & 0x00000080u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_h());
    }

  }
  if (cached_has_bits & 0x00003f00u) {
    // optional uint32 stride_w = 14;
    if (cached_has_bits & 0x00000100u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_w());
    }

    // optional .opencv_caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_engine());
    }

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

    // optional int32 axis = 16 [default = 1];
    if (cached_has_bits & 0x00000800u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_axis());
    }

    // optional bool bias_term = 2 [default = true];
    if (cached_has_bits & 0x00001000u) {
      total_size += 1 + 1;
    }

    // optional uint32 group = 5 [default = 1];
    if (cached_has_bits & 0x00002000u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_group());
    }

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

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


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

  _this->_impl_.pad_.MergeFrom(from._impl_.pad_);
  _this->_impl_.kernel_size_.MergeFrom(from._impl_.kernel_size_);
  _this->_impl_.stride_.MergeFrom(from._impl_.stride_);
  _this->_impl_.dilation_.MergeFrom(from._impl_.dilation_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_weight_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.num_output_ = from._impl_.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.pad_h_ = from._impl_.pad_h_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.pad_w_ = from._impl_.pad_w_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.kernel_h_ = from._impl_.kernel_h_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.kernel_w_ = from._impl_.kernel_w_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.stride_h_ = from._impl_.stride_h_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00003f00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.stride_w_ = from._impl_.stride_w_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.engine_ = from._impl_.engine_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.force_nd_im2col_ = from._impl_.force_nd_im2col_;
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_impl_.axis_ = from._impl_.axis_;
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_impl_.bias_term_ = from._impl_.bias_term_;
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_impl_.group_ = from._impl_.group_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ConvolutionParameter::InternalSwap(ConvolutionParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.pad_.InternalSwap(&other->_impl_.pad_);
  _impl_.kernel_size_.InternalSwap(&other->_impl_.kernel_size_);
  _impl_.stride_.InternalSwap(&other->_impl_.stride_);
  _impl_.dilation_.InternalSwap(&other->_impl_.dilation_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ConvolutionParameter, _impl_.force_nd_im2col_)
      + sizeof(ConvolutionParameter::_impl_.force_nd_im2col_)
      - PROTOBUF_FIELD_OFFSET(ConvolutionParameter, _impl_.weight_filler_)>(
          reinterpret_cast<char*>(&_impl_.weight_filler_),
          reinterpret_cast<char*>(&other->_impl_.weight_filler_));
  swap(_impl_.axis_, other->_impl_.axis_);
  swap(_impl_.bias_term_, other->_impl_.bias_term_);
  swap(_impl_.group_, other->_impl_.group_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ConvolutionParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[24]);
}

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

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

CropParameter::CropParameter(::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:opencv_caffe.CropParameter)
}
CropParameter::CropParameter(const CropParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  CropParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.offset_){from._impl_.offset_}
    , decltype(_impl_.axis_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.axis_ = from._impl_.axis_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.CropParameter)
}

inline void CropParameter::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_.offset_){arena}
    , decltype(_impl_.axis_){2}
  };
}

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

inline void CropParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.offset_.~RepeatedField();
}

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

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

  _impl_.offset_.Clear();
  _impl_.axis_ = 2;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* CropParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 axis = 1 [default = 2];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated uint32 offset = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_offset(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
        } else if (static_cast<uint8_t>(tag) == 18) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_offset(), ptr, ctx);
          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* CropParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.CropParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional int32 axis = 1 [default = 2];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
  }

  // repeated uint32 offset = 2;
  for (int i = 0, n = this->_internal_offset_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_offset(i), 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:opencv_caffe.CropParameter)
  return target;
}

size_t CropParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.CropParameter)
  size_t total_size = 0;

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

  // repeated uint32 offset = 2;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.offset_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_offset_size());
    total_size += data_size;
  }

  // optional int32 axis = 1 [default = 2];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
  }

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

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


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

  _this->_impl_.offset_.MergeFrom(from._impl_.offset_);
  if (from._internal_has_axis()) {
    _this->_internal_set_axis(from._internal_axis());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata CropParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[25]);
}

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

class DataParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<DataParameter>()._impl_._has_bits_);
  static void set_has_source(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_batch_size(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_rand_skip(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_backend(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_mean_file(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_crop_size(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_mirror(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_force_encoded_color(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_prefetch(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
};

DataParameter::DataParameter(::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:opencv_caffe.DataParameter)
}
DataParameter::DataParameter(const DataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  DataParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.source_){}
    , decltype(_impl_.mean_file_){}
    , decltype(_impl_.batch_size_){}
    , decltype(_impl_.crop_size_){}
    , decltype(_impl_.rand_skip_){}
    , decltype(_impl_.mirror_){}
    , decltype(_impl_.force_encoded_color_){}
    , decltype(_impl_.backend_){}
    , decltype(_impl_.scale_){}
    , decltype(_impl_.prefetch_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    _this->_impl_.source_.Set(from._internal_source(), 
      _this->GetArenaForAllocation());
  }
  _impl_.mean_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.mean_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_mean_file()) {
    _this->_impl_.mean_file_.Set(from._internal_mean_file(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.batch_size_, &from._impl_.batch_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.prefetch_) -
    reinterpret_cast<char*>(&_impl_.batch_size_)) + sizeof(_impl_.prefetch_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.DataParameter)
}

inline void DataParameter::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_.source_){}
    , decltype(_impl_.mean_file_){}
    , decltype(_impl_.batch_size_){0u}
    , decltype(_impl_.crop_size_){0u}
    , decltype(_impl_.rand_skip_){0u}
    , decltype(_impl_.mirror_){false}
    , decltype(_impl_.force_encoded_color_){false}
    , decltype(_impl_.backend_){0}
    , decltype(_impl_.scale_){1}
    , decltype(_impl_.prefetch_){4u}
  };
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.mean_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.mean_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void DataParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.source_.Destroy();
  _impl_.mean_file_.Destroy();
}

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

void DataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.DataParameter)
  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) {
      _impl_.source_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.mean_file_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&_impl_.batch_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.backend_) -
        reinterpret_cast<char*>(&_impl_.batch_size_)) + sizeof(_impl_.backend_));
  }
  if (cached_has_bits & 0x00000300u) {
    _impl_.scale_ = 1;
    _impl_.prefetch_ = 4u;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DataParameter::_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 string source = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_source();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.DataParameter.source");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional float scale = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_scale(&has_bits);
          _impl_.scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional string mean_file = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_mean_file();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.DataParameter.mean_file");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional uint32 batch_size = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_batch_size(&has_bits);
          _impl_.batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 crop_size = 5 [default = 0];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_crop_size(&has_bits);
          _impl_.crop_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool mirror = 6 [default = false];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_mirror(&has_bits);
          _impl_.mirror_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 rand_skip = 7 [default = 0];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_rand_skip(&has_bits);
          _impl_.rand_skip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.DataParameter.DB backend = 8 [default = LEVELDB];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::DataParameter_DB_IsValid(val))) {
            _internal_set_backend(static_cast<::opencv_caffe::DataParameter_DB>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(8, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional bool force_encoded_color = 9 [default = false];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_force_encoded_color(&has_bits);
          _impl_.force_encoded_color_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 prefetch = 10 [default = 4];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_prefetch(&has_bits);
          _impl_.prefetch_ = ::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* DataParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.DataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string source = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.DataParameter.source");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_source(), target);
  }

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

  // optional string mean_file = 3;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_mean_file().data(), static_cast<int>(this->_internal_mean_file().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.DataParameter.mean_file");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_mean_file(), target);
  }

  // optional uint32 batch_size = 4;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_batch_size(), target);
  }

  // optional uint32 crop_size = 5 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_crop_size(), target);
  }

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

  // optional uint32 rand_skip = 7 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_rand_skip(), target);
  }

  // optional .opencv_caffe.DataParameter.DB backend = 8 [default = LEVELDB];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      8, this->_internal_backend(), target);
  }

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

  // optional uint32 prefetch = 10 [default = 4];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(10, this->_internal_prefetch(), 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:opencv_caffe.DataParameter)
  return target;
}

size_t DataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.DataParameter)
  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 string source = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_source());
    }

    // optional string mean_file = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_mean_file());
    }

    // optional uint32 batch_size = 4;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
    }

    // optional uint32 crop_size = 5 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_size());
    }

    // optional uint32 rand_skip = 7 [default = 0];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_rand_skip());
    }

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

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

    // optional .opencv_caffe.DataParameter.DB backend = 8 [default = LEVELDB];
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_backend());
    }

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

    // optional uint32 prefetch = 10 [default = 4];
    if (cached_has_bits & 0x00000200u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_prefetch());
    }

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

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


void DataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<DataParameter*>(&to_msg);
  auto& from = static_cast<const DataParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.DataParameter)
  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_set_source(from._internal_source());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_mean_file(from._internal_mean_file());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.batch_size_ = from._impl_.batch_size_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.crop_size_ = from._impl_.crop_size_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.rand_skip_ = from._impl_.rand_skip_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.mirror_ = from._impl_.mirror_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.force_encoded_color_ = from._impl_.force_encoded_color_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.backend_ = from._impl_.backend_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000300u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.scale_ = from._impl_.scale_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.prefetch_ = from._impl_.prefetch_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void DataParameter::InternalSwap(DataParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.source_, lhs_arena,
      &other->_impl_.source_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.mean_file_, lhs_arena,
      &other->_impl_.mean_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DataParameter, _impl_.backend_)
      + sizeof(DataParameter::_impl_.backend_)
      - PROTOBUF_FIELD_OFFSET(DataParameter, _impl_.batch_size_)>(
          reinterpret_cast<char*>(&_impl_.batch_size_),
          reinterpret_cast<char*>(&other->_impl_.batch_size_));
  swap(_impl_.scale_, other->_impl_.scale_);
  swap(_impl_.prefetch_, other->_impl_.prefetch_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DataParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[26]);
}

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

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

NonMaximumSuppressionParameter::NonMaximumSuppressionParameter(::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:opencv_caffe.NonMaximumSuppressionParameter)
}
NonMaximumSuppressionParameter::NonMaximumSuppressionParameter(const NonMaximumSuppressionParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  NonMaximumSuppressionParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.top_k_){}
    , decltype(_impl_.nms_threshold_){}
    , decltype(_impl_.eta_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.top_k_, &from._impl_.top_k_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.eta_) -
    reinterpret_cast<char*>(&_impl_.top_k_)) + sizeof(_impl_.eta_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.NonMaximumSuppressionParameter)
}

inline void NonMaximumSuppressionParameter::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_.top_k_){0}
    , decltype(_impl_.nms_threshold_){0.3f}
    , decltype(_impl_.eta_){1}
  };
}

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

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    _impl_.top_k_ = 0;
    _impl_.nms_threshold_ = 0.3f;
    _impl_.eta_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* NonMaximumSuppressionParameter::_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 nms_threshold = 1 [default = 0.3];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_nms_threshold(&has_bits);
          _impl_.nms_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 top_k = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_top_k(&has_bits);
          _impl_.top_k_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float eta = 3 [default = 1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_eta(&has_bits);
          _impl_.eta_ = ::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* NonMaximumSuppressionParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NonMaximumSuppressionParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional int32 top_k = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_top_k(), target);
  }

  // optional float eta = 3 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_eta(), 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:opencv_caffe.NonMaximumSuppressionParameter)
  return target;
}

size_t NonMaximumSuppressionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NonMaximumSuppressionParameter)
  size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional int32 top_k = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_top_k());
    }

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

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

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

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


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

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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata NonMaximumSuppressionParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[27]);
}

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

class SaveOutputParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<SaveOutputParameter>()._impl_._has_bits_);
  static void set_has_output_directory(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_output_name_prefix(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_output_format(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_label_map_file(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_name_size_file(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_num_test_image(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

SaveOutputParameter::SaveOutputParameter(::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:opencv_caffe.SaveOutputParameter)
}
SaveOutputParameter::SaveOutputParameter(const SaveOutputParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  SaveOutputParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.output_directory_){}
    , decltype(_impl_.output_name_prefix_){}
    , decltype(_impl_.output_format_){}
    , decltype(_impl_.label_map_file_){}
    , decltype(_impl_.name_size_file_){}
    , decltype(_impl_.num_test_image_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.output_directory_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.output_directory_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_output_directory()) {
    _this->_impl_.output_directory_.Set(from._internal_output_directory(), 
      _this->GetArenaForAllocation());
  }
  _impl_.output_name_prefix_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.output_name_prefix_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_output_name_prefix()) {
    _this->_impl_.output_name_prefix_.Set(from._internal_output_name_prefix(), 
      _this->GetArenaForAllocation());
  }
  _impl_.output_format_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.output_format_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_output_format()) {
    _this->_impl_.output_format_.Set(from._internal_output_format(), 
      _this->GetArenaForAllocation());
  }
  _impl_.label_map_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.label_map_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_label_map_file()) {
    _this->_impl_.label_map_file_.Set(from._internal_label_map_file(), 
      _this->GetArenaForAllocation());
  }
  _impl_.name_size_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_size_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name_size_file()) {
    _this->_impl_.name_size_file_.Set(from._internal_name_size_file(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.num_test_image_ = from._impl_.num_test_image_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.SaveOutputParameter)
}

inline void SaveOutputParameter::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_.output_directory_){}
    , decltype(_impl_.output_name_prefix_){}
    , decltype(_impl_.output_format_){}
    , decltype(_impl_.label_map_file_){}
    , decltype(_impl_.name_size_file_){}
    , decltype(_impl_.num_test_image_){0u}
  };
  _impl_.output_directory_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.output_directory_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.output_name_prefix_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.output_name_prefix_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.output_format_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.output_format_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.label_map_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.label_map_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.name_size_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_size_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void SaveOutputParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.output_directory_.Destroy();
  _impl_.output_name_prefix_.Destroy();
  _impl_.output_format_.Destroy();
  _impl_.label_map_file_.Destroy();
  _impl_.name_size_file_.Destroy();
}

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.output_directory_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.output_name_prefix_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.output_format_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      _impl_.label_map_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      _impl_.name_size_file_.ClearNonDefaultToEmpty();
    }
  }
  _impl_.num_test_image_ = 0u;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SaveOutputParameter::_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 string output_directory = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_output_directory();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SaveOutputParameter.output_directory");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string output_name_prefix = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_output_name_prefix();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SaveOutputParameter.output_name_prefix");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string output_format = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_output_format();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SaveOutputParameter.output_format");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string label_map_file = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_label_map_file();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SaveOutputParameter.label_map_file");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string name_size_file = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          auto str = _internal_mutable_name_size_file();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.SaveOutputParameter.name_size_file");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional uint32 num_test_image = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_num_test_image(&has_bits);
          _impl_.num_test_image_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _impl_._has_bits_[0];
  // optional string output_directory = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_output_directory().data(), static_cast<int>(this->_internal_output_directory().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SaveOutputParameter.output_directory");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_output_directory(), target);
  }

  // optional string output_name_prefix = 2;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_output_name_prefix().data(), static_cast<int>(this->_internal_output_name_prefix().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SaveOutputParameter.output_name_prefix");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_output_name_prefix(), target);
  }

  // optional string output_format = 3;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_output_format().data(), static_cast<int>(this->_internal_output_format().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SaveOutputParameter.output_format");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_output_format(), target);
  }

  // optional string label_map_file = 4;
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_label_map_file().data(), static_cast<int>(this->_internal_label_map_file().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SaveOutputParameter.label_map_file");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_label_map_file(), target);
  }

  // optional string name_size_file = 5;
  if (cached_has_bits & 0x00000010u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name_size_file().data(), static_cast<int>(this->_internal_name_size_file().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.SaveOutputParameter.name_size_file");
    target = stream->WriteStringMaybeAliased(
        5, this->_internal_name_size_file(), target);
  }

  // optional uint32 num_test_image = 6;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_num_test_image(), target);
  }

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

size_t SaveOutputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SaveOutputParameter)
  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 & 0x0000003fu) {
    // optional string output_directory = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_output_directory());
    }

    // optional string output_name_prefix = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_output_name_prefix());
    }

    // optional string output_format = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_output_format());
    }

    // optional string label_map_file = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_label_map_file());
    }

    // optional string name_size_file = 5;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name_size_file());
    }

    // optional uint32 num_test_image = 6;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_test_image());
    }

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

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


void SaveOutputParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<SaveOutputParameter*>(&to_msg);
  auto& from = static_cast<const SaveOutputParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.SaveOutputParameter)
  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 & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_output_directory(from._internal_output_directory());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_output_name_prefix(from._internal_output_name_prefix());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_output_format(from._internal_output_format());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_set_label_map_file(from._internal_label_map_file());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_set_name_size_file(from._internal_name_size_file());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.num_test_image_ = from._impl_.num_test_image_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void SaveOutputParameter::InternalSwap(SaveOutputParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.output_directory_, lhs_arena,
      &other->_impl_.output_directory_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.output_name_prefix_, lhs_arena,
      &other->_impl_.output_name_prefix_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.output_format_, lhs_arena,
      &other->_impl_.output_format_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.label_map_file_, lhs_arena,
      &other->_impl_.label_map_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_size_file_, lhs_arena,
      &other->_impl_.name_size_file_, rhs_arena
  );
  swap(_impl_.num_test_image_, other->_impl_.num_test_image_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SaveOutputParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[28]);
}

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

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

DropoutParameter::DropoutParameter(::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:opencv_caffe.DropoutParameter)
}
DropoutParameter::DropoutParameter(const DropoutParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  DropoutParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.dropout_ratio_){}
    , decltype(_impl_.scale_train_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.dropout_ratio_, &from._impl_.dropout_ratio_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.scale_train_) -
    reinterpret_cast<char*>(&_impl_.dropout_ratio_)) + sizeof(_impl_.scale_train_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.DropoutParameter)
}

inline void DropoutParameter::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_.dropout_ratio_){0.5f}
    , decltype(_impl_.scale_train_){true}
  };
}

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

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    _impl_.dropout_ratio_ = 0.5f;
    _impl_.scale_train_ = true;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DropoutParameter::_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 dropout_ratio = 1 [default = 0.5];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_dropout_ratio(&has_bits);
          _impl_.dropout_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool scale_train = 2 [default = true];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_scale_train(&has_bits);
          _impl_.scale_train_ = ::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* DropoutParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.DropoutParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional bool scale_train = 2 [default = true];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_scale_train(), 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:opencv_caffe.DropoutParameter)
  return target;
}

size_t DropoutParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.DropoutParameter)
  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 dropout_ratio = 1 [default = 0.5];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

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

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

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


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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata DropoutParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[29]);
}

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

class DummyDataParameter::_Internal {
 public:
};

DummyDataParameter::DummyDataParameter(::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:opencv_caffe.DummyDataParameter)
}
DummyDataParameter::DummyDataParameter(const DummyDataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  DummyDataParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.data_filler_){from._impl_.data_filler_}
    , decltype(_impl_.num_){from._impl_.num_}
    , decltype(_impl_.channels_){from._impl_.channels_}
    , decltype(_impl_.height_){from._impl_.height_}
    , decltype(_impl_.width_){from._impl_.width_}
    , decltype(_impl_.shape_){from._impl_.shape_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.DummyDataParameter)
}

inline void DummyDataParameter::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_.data_filler_){arena}
    , decltype(_impl_.num_){arena}
    , decltype(_impl_.channels_){arena}
    , decltype(_impl_.height_){arena}
    , decltype(_impl_.width_){arena}
    , decltype(_impl_.shape_){arena}
    , /*decltype(_impl_._cached_size_)*/{}
  };
}

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

inline void DummyDataParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.data_filler_.~RepeatedPtrField();
  _impl_.num_.~RepeatedField();
  _impl_.channels_.~RepeatedField();
  _impl_.height_.~RepeatedField();
  _impl_.width_.~RepeatedField();
  _impl_.shape_.~RepeatedPtrField();
}

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

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

  _impl_.data_filler_.Clear();
  _impl_.num_.Clear();
  _impl_.channels_.Clear();
  _impl_.height_.Clear();
  _impl_.width_.Clear();
  _impl_.shape_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DummyDataParameter::_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) {
      // repeated .opencv_caffe.FillerParameter data_filler = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_data_filler(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated uint32 num = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_num(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
        } else if (static_cast<uint8_t>(tag) == 18) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_num(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated uint32 channels = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_channels(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
        } else if (static_cast<uint8_t>(tag) == 26) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_channels(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated uint32 height = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_height(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
        } else if (static_cast<uint8_t>(tag) == 34) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_height(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated uint32 width = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_width(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<40>(ptr));
        } else if (static_cast<uint8_t>(tag) == 42) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_width(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.BlobShape shape = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_shape(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(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* DummyDataParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.DummyDataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .opencv_caffe.FillerParameter data_filler = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_data_filler_size()); i < n; i++) {
    const auto& repfield = this->_internal_data_filler(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated uint32 num = 2;
  for (int i = 0, n = this->_internal_num_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_num(i), target);
  }

  // repeated uint32 channels = 3;
  for (int i = 0, n = this->_internal_channels_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_channels(i), target);
  }

  // repeated uint32 height = 4;
  for (int i = 0, n = this->_internal_height_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_height(i), target);
  }

  // repeated uint32 width = 5;
  for (int i = 0, n = this->_internal_width_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_width(i), target);
  }

  // repeated .opencv_caffe.BlobShape shape = 6;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_shape_size()); i < n; i++) {
    const auto& repfield = this->_internal_shape(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(6, repfield, repfield.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:opencv_caffe.DummyDataParameter)
  return target;
}

size_t DummyDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.DummyDataParameter)
  size_t total_size = 0;

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

  // repeated .opencv_caffe.FillerParameter data_filler = 1;
  total_size += 1UL * this->_internal_data_filler_size();
  for (const auto& msg : this->_impl_.data_filler_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated uint32 num = 2;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.num_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_num_size());
    total_size += data_size;
  }

  // repeated uint32 channels = 3;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.channels_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_channels_size());
    total_size += data_size;
  }

  // repeated uint32 height = 4;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.height_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_height_size());
    total_size += data_size;
  }

  // repeated uint32 width = 5;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.width_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_width_size());
    total_size += data_size;
  }

  // repeated .opencv_caffe.BlobShape shape = 6;
  total_size += 1UL * this->_internal_shape_size();
  for (const auto& msg : this->_impl_.shape_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

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


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

  _this->_impl_.data_filler_.MergeFrom(from._impl_.data_filler_);
  _this->_impl_.num_.MergeFrom(from._impl_.num_);
  _this->_impl_.channels_.MergeFrom(from._impl_.channels_);
  _this->_impl_.height_.MergeFrom(from._impl_.height_);
  _this->_impl_.width_.MergeFrom(from._impl_.width_);
  _this->_impl_.shape_.MergeFrom(from._impl_.shape_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void DummyDataParameter::InternalSwap(DummyDataParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.data_filler_.InternalSwap(&other->_impl_.data_filler_);
  _impl_.num_.InternalSwap(&other->_impl_.num_);
  _impl_.channels_.InternalSwap(&other->_impl_.channels_);
  _impl_.height_.InternalSwap(&other->_impl_.height_);
  _impl_.width_.InternalSwap(&other->_impl_.width_);
  _impl_.shape_.InternalSwap(&other->_impl_.shape_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DummyDataParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[30]);
}

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

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

EltwiseParameter::EltwiseParameter(::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:opencv_caffe.EltwiseParameter)
}
EltwiseParameter::EltwiseParameter(const EltwiseParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  EltwiseParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.coeff_){from._impl_.coeff_}
    , decltype(_impl_.operation_){}
    , decltype(_impl_.stable_prod_grad_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.operation_, &from._impl_.operation_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.stable_prod_grad_) -
    reinterpret_cast<char*>(&_impl_.operation_)) + sizeof(_impl_.stable_prod_grad_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.EltwiseParameter)
}

inline void EltwiseParameter::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_.coeff_){arena}
    , decltype(_impl_.operation_){1}
    , decltype(_impl_.stable_prod_grad_){true}
  };
}

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

inline void EltwiseParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.coeff_.~RepeatedField();
}

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

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

  _impl_.coeff_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    _impl_.operation_ = 1;
    _impl_.stable_prod_grad_ = true;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* EltwiseParameter::_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 .opencv_caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::EltwiseParameter_EltwiseOp_IsValid(val))) {
            _internal_set_operation(static_cast<::opencv_caffe::EltwiseParameter_EltwiseOp>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // repeated float coeff = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_coeff(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<21>(ptr));
        } else if (static_cast<uint8_t>(tag) == 18) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_coeff(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool stable_prod_grad = 3 [default = true];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_stable_prod_grad(&has_bits);
          _impl_.stable_prod_grad_ = ::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* EltwiseParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.EltwiseParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_operation(), target);
  }

  // repeated float coeff = 2;
  for (int i = 0, n = this->_internal_coeff_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_coeff(i), target);
  }

  // optional bool stable_prod_grad = 3 [default = true];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_stable_prod_grad(), 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:opencv_caffe.EltwiseParameter)
  return target;
}

size_t EltwiseParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.EltwiseParameter)
  size_t total_size = 0;

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

  // repeated float coeff = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_coeff_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_coeff_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .opencv_caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_operation());
    }

    // optional bool stable_prod_grad = 3 [default = true];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 1;
    }

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

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


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

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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata EltwiseParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[31]);
}

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

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

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

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.alpha_ = from._impl_.alpha_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ELUParameter)
}

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

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

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

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

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

  _impl_.alpha_ = 1;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ELUParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float alpha = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_alpha(&has_bits);
          _impl_.alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      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* ELUParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ELUParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

size_t ELUParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ELUParameter)
  size_t total_size = 0;

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

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

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

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


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

  if (from._internal_has_alpha()) {
    _this->_internal_set_alpha(from._internal_alpha());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata ELUParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[32]);
}

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

class EmbedParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<EmbedParameter>()._impl_._has_bits_);
  static void set_has_num_output(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_input_dim(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_bias_term(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::opencv_caffe::FillerParameter& weight_filler(const EmbedParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::opencv_caffe::FillerParameter& bias_filler(const EmbedParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::opencv_caffe::FillerParameter&
EmbedParameter::_Internal::weight_filler(const EmbedParameter* msg) {
  return *msg->_impl_.weight_filler_;
}
const ::opencv_caffe::FillerParameter&
EmbedParameter::_Internal::bias_filler(const EmbedParameter* msg) {
  return *msg->_impl_.bias_filler_;
}
EmbedParameter::EmbedParameter(::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:opencv_caffe.EmbedParameter)
}
EmbedParameter::EmbedParameter(const EmbedParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  EmbedParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.weight_filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.num_output_){}
    , decltype(_impl_.input_dim_){}
    , decltype(_impl_.bias_term_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_weight_filler()) {
    _this->_impl_.weight_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.weight_filler_);
  }
  if (from._internal_has_bias_filler()) {
    _this->_impl_.bias_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.bias_filler_);
  }
  ::memcpy(&_impl_.num_output_, &from._impl_.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.bias_term_) -
    reinterpret_cast<char*>(&_impl_.num_output_)) + sizeof(_impl_.bias_term_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.EmbedParameter)
}

inline void EmbedParameter::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_.weight_filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.num_output_){0u}
    , decltype(_impl_.input_dim_){0u}
    , decltype(_impl_.bias_term_){true}
  };
}

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

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

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

void EmbedParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.EmbedParameter)
  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_.weight_filler_ != nullptr);
      _impl_.weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.bias_filler_ != nullptr);
      _impl_.bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x0000001cu) {
    ::memset(&_impl_.num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.input_dim_) -
        reinterpret_cast<char*>(&_impl_.num_output_)) + sizeof(_impl_.input_dim_));
    _impl_.bias_term_ = true;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* EmbedParameter::_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 uint32 num_output = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_num_output(&has_bits);
          _impl_.num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 input_dim = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_input_dim(&has_bits);
          _impl_.input_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool bias_term = 3 [default = true];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_bias_term(&has_bits);
          _impl_.bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter weight_filler = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter bias_filler = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), 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* EmbedParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.EmbedParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 num_output = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional uint32 input_dim = 2;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_input_dim(), target);
  }

  // optional bool bias_term = 3 [default = true];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_bias_term(), target);
  }

  // optional .opencv_caffe.FillerParameter weight_filler = 4;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::weight_filler(this),
        _Internal::weight_filler(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.FillerParameter bias_filler = 5;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::bias_filler(this),
        _Internal::bias_filler(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:opencv_caffe.EmbedParameter)
  return target;
}

size_t EmbedParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.EmbedParameter)
  size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional .opencv_caffe.FillerParameter weight_filler = 4;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.weight_filler_);
    }

    // optional .opencv_caffe.FillerParameter bias_filler = 5;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.bias_filler_);
    }

    // optional uint32 num_output = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

    // optional uint32 input_dim = 2;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_input_dim());
    }

    // optional bool bias_term = 3 [default = true];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 1;
    }

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

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


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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_weight_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.num_output_ = from._impl_.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.input_dim_ = from._impl_.input_dim_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.bias_term_ = from._impl_.bias_term_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void EmbedParameter::InternalSwap(EmbedParameter* 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(EmbedParameter, _impl_.input_dim_)
      + sizeof(EmbedParameter::_impl_.input_dim_)
      - PROTOBUF_FIELD_OFFSET(EmbedParameter, _impl_.weight_filler_)>(
          reinterpret_cast<char*>(&_impl_.weight_filler_),
          reinterpret_cast<char*>(&other->_impl_.weight_filler_));
  swap(_impl_.bias_term_, other->_impl_.bias_term_);
}

::PROTOBUF_NAMESPACE_ID::Metadata EmbedParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[33]);
}

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

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

ExpParameter::ExpParameter(::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:opencv_caffe.ExpParameter)
}
ExpParameter::ExpParameter(const ExpParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ExpParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.shift_){}
    , decltype(_impl_.base_){}
    , decltype(_impl_.scale_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.shift_, &from._impl_.shift_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.scale_) -
    reinterpret_cast<char*>(&_impl_.shift_)) + sizeof(_impl_.scale_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ExpParameter)
}

inline void ExpParameter::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_.shift_){0}
    , decltype(_impl_.base_){-1}
    , decltype(_impl_.scale_){1}
  };
}

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

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    _impl_.shift_ = 0;
    _impl_.base_ = -1;
    _impl_.scale_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ExpParameter::_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 base = 1 [default = -1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_base(&has_bits);
          _impl_.base_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float scale = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_scale(&has_bits);
          _impl_.scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float shift = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_shift(&has_bits);
          _impl_.shift_ = ::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* ExpParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ExpParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional float shift = 3 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_shift(), 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:opencv_caffe.ExpParameter)
  return target;
}

size_t ExpParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ExpParameter)
  size_t total_size = 0;

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

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

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

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

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

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


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

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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata ExpParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[34]);
}

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

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

FlattenParameter::FlattenParameter(::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:opencv_caffe.FlattenParameter)
}
FlattenParameter::FlattenParameter(const FlattenParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  FlattenParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.axis_){}
    , decltype(_impl_.end_axis_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.axis_, &from._impl_.axis_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.end_axis_) -
    reinterpret_cast<char*>(&_impl_.axis_)) + sizeof(_impl_.end_axis_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.FlattenParameter)
}

inline void FlattenParameter::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_.axis_){1}
    , decltype(_impl_.end_axis_){-1}
  };
}

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

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

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

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

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

const char* FlattenParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 axis = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 end_axis = 2 [default = -1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_end_axis(&has_bits);
          _impl_.end_axis_ = ::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* FlattenParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.FlattenParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional int32 end_axis = 2 [default = -1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_end_axis(), 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:opencv_caffe.FlattenParameter)
  return target;
}

size_t FlattenParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.FlattenParameter)
  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 int32 axis = 1 [default = 1];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

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

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

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


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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata FlattenParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[35]);
}

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

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

HDF5DataParameter::HDF5DataParameter(::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:opencv_caffe.HDF5DataParameter)
}
HDF5DataParameter::HDF5DataParameter(const HDF5DataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  HDF5DataParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.source_){}
    , decltype(_impl_.batch_size_){}
    , decltype(_impl_.shuffle_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    _this->_impl_.source_.Set(from._internal_source(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.batch_size_, &from._impl_.batch_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.shuffle_) -
    reinterpret_cast<char*>(&_impl_.batch_size_)) + sizeof(_impl_.shuffle_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.HDF5DataParameter)
}

inline void HDF5DataParameter::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_.source_){}
    , decltype(_impl_.batch_size_){0u}
    , decltype(_impl_.shuffle_){false}
  };
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void HDF5DataParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.source_.Destroy();
}

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

void HDF5DataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.HDF5DataParameter)
  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 & 0x00000001u) {
    _impl_.source_.ClearNonDefaultToEmpty();
  }
  if (cached_has_bits & 0x00000006u) {
    ::memset(&_impl_.batch_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.shuffle_) -
        reinterpret_cast<char*>(&_impl_.batch_size_)) + sizeof(_impl_.shuffle_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* HDF5DataParameter::_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 string source = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_source();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.HDF5DataParameter.source");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional uint32 batch_size = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_batch_size(&has_bits);
          _impl_.batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool shuffle = 3 [default = false];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_shuffle(&has_bits);
          _impl_.shuffle_ = ::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* HDF5DataParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.HDF5DataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string source = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.HDF5DataParameter.source");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_source(), target);
  }

  // optional uint32 batch_size = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_batch_size(), target);
  }

  // optional bool shuffle = 3 [default = false];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_shuffle(), 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:opencv_caffe.HDF5DataParameter)
  return target;
}

size_t HDF5DataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.HDF5DataParameter)
  size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional string source = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_source());
    }

    // optional uint32 batch_size = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
    }

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

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

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


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

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

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

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

void HDF5DataParameter::InternalSwap(HDF5DataParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.source_, lhs_arena,
      &other->_impl_.source_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(HDF5DataParameter, _impl_.shuffle_)
      + sizeof(HDF5DataParameter::_impl_.shuffle_)
      - PROTOBUF_FIELD_OFFSET(HDF5DataParameter, _impl_.batch_size_)>(
          reinterpret_cast<char*>(&_impl_.batch_size_),
          reinterpret_cast<char*>(&other->_impl_.batch_size_));
}

::PROTOBUF_NAMESPACE_ID::Metadata HDF5DataParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[36]);
}

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

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

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

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.file_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.file_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_file_name()) {
    _this->_impl_.file_name_.Set(from._internal_file_name(), 
      _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.HDF5OutputParameter)
}

inline void HDF5OutputParameter::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_.file_name_){}
  };
  _impl_.file_name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.file_name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void HDF5OutputParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.file_name_.Destroy();
}

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

void HDF5OutputParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.HDF5OutputParameter)
  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 & 0x00000001u) {
    _impl_.file_name_.ClearNonDefaultToEmpty();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* HDF5OutputParameter::_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 string file_name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_file_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.HDF5OutputParameter.file_name");
          #endif  // !NDEBUG
        } 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* HDF5OutputParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.HDF5OutputParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string file_name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_file_name().data(), static_cast<int>(this->_internal_file_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.HDF5OutputParameter.file_name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_file_name(), 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:opencv_caffe.HDF5OutputParameter)
  return target;
}

size_t HDF5OutputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.HDF5OutputParameter)
  size_t total_size = 0;

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

  // optional string file_name = 1;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_file_name());
  }

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

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


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

  if (from._internal_has_file_name()) {
    _this->_internal_set_file_name(from._internal_file_name());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void HDF5OutputParameter::InternalSwap(HDF5OutputParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.file_name_, lhs_arena,
      &other->_impl_.file_name_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata HDF5OutputParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[37]);
}

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

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

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

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.norm_ = from._impl_.norm_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.HingeLossParameter)
}

inline void HingeLossParameter::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_.norm_){1}
  };
}

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

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

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

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

  _impl_.norm_ = 1;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* HingeLossParameter::_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 .opencv_caffe.HingeLossParameter.Norm norm = 1 [default = L1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::HingeLossParameter_Norm_IsValid(val))) {
            _internal_set_norm(static_cast<::opencv_caffe::HingeLossParameter_Norm>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } 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* HingeLossParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.HingeLossParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.HingeLossParameter.Norm norm = 1 [default = L1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_norm(), 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:opencv_caffe.HingeLossParameter)
  return target;
}

size_t HingeLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.HingeLossParameter)
  size_t total_size = 0;

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

  // optional .opencv_caffe.HingeLossParameter.Norm norm = 1 [default = L1];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_norm());
  }

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

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


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

  if (from._internal_has_norm()) {
    _this->_internal_set_norm(from._internal_norm());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata HingeLossParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[38]);
}

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

class ImageDataParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ImageDataParameter>()._impl_._has_bits_);
  static void set_has_source(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_batch_size(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_rand_skip(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_shuffle(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_new_height(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_new_width(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_is_color(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_mean_file(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_crop_size(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_mirror(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_root_folder(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

ImageDataParameter::ImageDataParameter(::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:opencv_caffe.ImageDataParameter)
}
ImageDataParameter::ImageDataParameter(const ImageDataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ImageDataParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.source_){}
    , decltype(_impl_.mean_file_){}
    , decltype(_impl_.root_folder_){}
    , decltype(_impl_.crop_size_){}
    , decltype(_impl_.rand_skip_){}
    , decltype(_impl_.shuffle_){}
    , decltype(_impl_.mirror_){}
    , decltype(_impl_.new_height_){}
    , decltype(_impl_.new_width_){}
    , decltype(_impl_.is_color_){}
    , decltype(_impl_.scale_){}
    , decltype(_impl_.batch_size_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    _this->_impl_.source_.Set(from._internal_source(), 
      _this->GetArenaForAllocation());
  }
  _impl_.mean_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.mean_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_mean_file()) {
    _this->_impl_.mean_file_.Set(from._internal_mean_file(), 
      _this->GetArenaForAllocation());
  }
  _impl_.root_folder_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.root_folder_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_root_folder()) {
    _this->_impl_.root_folder_.Set(from._internal_root_folder(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.crop_size_, &from._impl_.crop_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.batch_size_) -
    reinterpret_cast<char*>(&_impl_.crop_size_)) + sizeof(_impl_.batch_size_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ImageDataParameter)
}

inline void ImageDataParameter::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_.source_){}
    , decltype(_impl_.mean_file_){}
    , decltype(_impl_.root_folder_){}
    , decltype(_impl_.crop_size_){0u}
    , decltype(_impl_.rand_skip_){0u}
    , decltype(_impl_.shuffle_){false}
    , decltype(_impl_.mirror_){false}
    , decltype(_impl_.new_height_){0u}
    , decltype(_impl_.new_width_){0u}
    , decltype(_impl_.is_color_){true}
    , decltype(_impl_.scale_){1}
    , decltype(_impl_.batch_size_){1u}
  };
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.mean_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.mean_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.root_folder_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.root_folder_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void ImageDataParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.source_.Destroy();
  _impl_.mean_file_.Destroy();
  _impl_.root_folder_.Destroy();
}

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.source_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.mean_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.root_folder_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x000000f8u) {
    ::memset(&_impl_.crop_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.new_height_) -
        reinterpret_cast<char*>(&_impl_.crop_size_)) + sizeof(_impl_.new_height_));
  }
  if (cached_has_bits & 0x00000f00u) {
    _impl_.new_width_ = 0u;
    _impl_.is_color_ = true;
    _impl_.scale_ = 1;
    _impl_.batch_size_ = 1u;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ImageDataParameter::_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 string source = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_source();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.ImageDataParameter.source");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional float scale = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_scale(&has_bits);
          _impl_.scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional string mean_file = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_mean_file();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.ImageDataParameter.mean_file");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional uint32 batch_size = 4 [default = 1];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_batch_size(&has_bits);
          _impl_.batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 crop_size = 5 [default = 0];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_crop_size(&has_bits);
          _impl_.crop_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool mirror = 6 [default = false];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_mirror(&has_bits);
          _impl_.mirror_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 rand_skip = 7 [default = 0];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_rand_skip(&has_bits);
          _impl_.rand_skip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool shuffle = 8 [default = false];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_shuffle(&has_bits);
          _impl_.shuffle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 new_height = 9 [default = 0];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_new_height(&has_bits);
          _impl_.new_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 new_width = 10 [default = 0];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_new_width(&has_bits);
          _impl_.new_width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool is_color = 11 [default = true];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_is_color(&has_bits);
          _impl_.is_color_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string root_folder = 12 [default = ""];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          auto str = _internal_mutable_root_folder();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.ImageDataParameter.root_folder");
          #endif  // !NDEBUG
        } 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* ImageDataParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ImageDataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string source = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.ImageDataParameter.source");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_source(), target);
  }

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

  // optional string mean_file = 3;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_mean_file().data(), static_cast<int>(this->_internal_mean_file().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.ImageDataParameter.mean_file");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_mean_file(), target);
  }

  // optional uint32 batch_size = 4 [default = 1];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_batch_size(), target);
  }

  // optional uint32 crop_size = 5 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_crop_size(), target);
  }

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

  // optional uint32 rand_skip = 7 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_rand_skip(), target);
  }

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

  // optional uint32 new_height = 9 [default = 0];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_new_height(), target);
  }

  // optional uint32 new_width = 10 [default = 0];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(10, this->_internal_new_width(), target);
  }

  // optional bool is_color = 11 [default = true];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_is_color(), target);
  }

  // optional string root_folder = 12 [default = ""];
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_root_folder().data(), static_cast<int>(this->_internal_root_folder().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.ImageDataParameter.root_folder");
    target = stream->WriteStringMaybeAliased(
        12, this->_internal_root_folder(), 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:opencv_caffe.ImageDataParameter)
  return target;
}

size_t ImageDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ImageDataParameter)
  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 string source = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_source());
    }

    // optional string mean_file = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_mean_file());
    }

    // optional string root_folder = 12 [default = ""];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_root_folder());
    }

    // optional uint32 crop_size = 5 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_size());
    }

    // optional uint32 rand_skip = 7 [default = 0];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_rand_skip());
    }

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

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

    // optional uint32 new_height = 9 [default = 0];
    if (cached_has_bits & 0x00000080u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_new_height());
    }

  }
  if (cached_has_bits & 0x00000f00u) {
    // optional uint32 new_width = 10 [default = 0];
    if (cached_has_bits & 0x00000100u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_new_width());
    }

    // optional bool is_color = 11 [default = true];
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 + 1;
    }

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

    // optional uint32 batch_size = 4 [default = 1];
    if (cached_has_bits & 0x00000800u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
    }

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

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


void ImageDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ImageDataParameter*>(&to_msg);
  auto& from = static_cast<const ImageDataParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ImageDataParameter)
  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_set_source(from._internal_source());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_mean_file(from._internal_mean_file());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_root_folder(from._internal_root_folder());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.crop_size_ = from._impl_.crop_size_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.rand_skip_ = from._impl_.rand_skip_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.shuffle_ = from._impl_.shuffle_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.mirror_ = from._impl_.mirror_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.new_height_ = from._impl_.new_height_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000f00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.new_width_ = from._impl_.new_width_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.is_color_ = from._impl_.is_color_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.scale_ = from._impl_.scale_;
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_impl_.batch_size_ = from._impl_.batch_size_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ImageDataParameter::InternalSwap(ImageDataParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.source_, lhs_arena,
      &other->_impl_.source_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.mean_file_, lhs_arena,
      &other->_impl_.mean_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.root_folder_, lhs_arena,
      &other->_impl_.root_folder_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ImageDataParameter, _impl_.new_width_)
      + sizeof(ImageDataParameter::_impl_.new_width_)
      - PROTOBUF_FIELD_OFFSET(ImageDataParameter, _impl_.crop_size_)>(
          reinterpret_cast<char*>(&_impl_.crop_size_),
          reinterpret_cast<char*>(&other->_impl_.crop_size_));
  swap(_impl_.is_color_, other->_impl_.is_color_);
  swap(_impl_.scale_, other->_impl_.scale_);
  swap(_impl_.batch_size_, other->_impl_.batch_size_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ImageDataParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[39]);
}

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

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

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

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    _this->_impl_.source_.Set(from._internal_source(), 
      _this->GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.InfogainLossParameter)
}

inline void InfogainLossParameter::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_.source_){}
  };
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void InfogainLossParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.source_.Destroy();
}

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

void InfogainLossParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.InfogainLossParameter)
  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 & 0x00000001u) {
    _impl_.source_.ClearNonDefaultToEmpty();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* InfogainLossParameter::_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 string source = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_source();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.InfogainLossParameter.source");
          #endif  // !NDEBUG
        } 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* InfogainLossParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.InfogainLossParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string source = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.InfogainLossParameter.source");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_source(), 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:opencv_caffe.InfogainLossParameter)
  return target;
}

size_t InfogainLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.InfogainLossParameter)
  size_t total_size = 0;

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

  // optional string source = 1;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_source());
  }

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

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


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

  if (from._internal_has_source()) {
    _this->_internal_set_source(from._internal_source());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void InfogainLossParameter::InternalSwap(InfogainLossParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.source_, lhs_arena,
      &other->_impl_.source_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata InfogainLossParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[40]);
}

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

class InnerProductParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<InnerProductParameter>()._impl_._has_bits_);
  static void set_has_num_output(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_bias_term(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::opencv_caffe::FillerParameter& weight_filler(const InnerProductParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::opencv_caffe::FillerParameter& bias_filler(const InnerProductParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_axis(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_transpose(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

const ::opencv_caffe::FillerParameter&
InnerProductParameter::_Internal::weight_filler(const InnerProductParameter* msg) {
  return *msg->_impl_.weight_filler_;
}
const ::opencv_caffe::FillerParameter&
InnerProductParameter::_Internal::bias_filler(const InnerProductParameter* msg) {
  return *msg->_impl_.bias_filler_;
}
InnerProductParameter::InnerProductParameter(::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:opencv_caffe.InnerProductParameter)
}
InnerProductParameter::InnerProductParameter(const InnerProductParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  InnerProductParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.weight_filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.num_output_){}
    , decltype(_impl_.transpose_){}
    , decltype(_impl_.bias_term_){}
    , decltype(_impl_.axis_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_weight_filler()) {
    _this->_impl_.weight_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.weight_filler_);
  }
  if (from._internal_has_bias_filler()) {
    _this->_impl_.bias_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.bias_filler_);
  }
  ::memcpy(&_impl_.num_output_, &from._impl_.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.axis_) -
    reinterpret_cast<char*>(&_impl_.num_output_)) + sizeof(_impl_.axis_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.InnerProductParameter)
}

inline void InnerProductParameter::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_.weight_filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.num_output_){0u}
    , decltype(_impl_.transpose_){false}
    , decltype(_impl_.bias_term_){true}
    , decltype(_impl_.axis_){1}
  };
}

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

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

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

void InnerProductParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.InnerProductParameter)
  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_.weight_filler_ != nullptr);
      _impl_.weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.bias_filler_ != nullptr);
      _impl_.bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x0000003cu) {
    ::memset(&_impl_.num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.transpose_) -
        reinterpret_cast<char*>(&_impl_.num_output_)) + sizeof(_impl_.transpose_));
    _impl_.bias_term_ = true;
    _impl_.axis_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* InnerProductParameter::_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 uint32 num_output = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_num_output(&has_bits);
          _impl_.num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool bias_term = 2 [default = true];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_bias_term(&has_bits);
          _impl_.bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter weight_filler = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter bias_filler = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 axis = 5 [default = 1];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool transpose = 6 [default = false];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_transpose(&has_bits);
          _impl_.transpose_ = ::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* InnerProductParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.InnerProductParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 num_output = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional bool bias_term = 2 [default = true];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_bias_term(), target);
  }

  // optional .opencv_caffe.FillerParameter weight_filler = 3;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::weight_filler(this),
        _Internal::weight_filler(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.FillerParameter bias_filler = 4;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(4, _Internal::bias_filler(this),
        _Internal::bias_filler(this).GetCachedSize(), target, stream);
  }

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

  // optional bool transpose = 6 [default = false];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_transpose(), 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:opencv_caffe.InnerProductParameter)
  return target;
}

size_t InnerProductParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.InnerProductParameter)
  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 & 0x0000003fu) {
    // optional .opencv_caffe.FillerParameter weight_filler = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.weight_filler_);
    }

    // optional .opencv_caffe.FillerParameter bias_filler = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.bias_filler_);
    }

    // optional uint32 num_output = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

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

    // optional bool bias_term = 2 [default = true];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 1;
    }

    // optional int32 axis = 5 [default = 1];
    if (cached_has_bits & 0x00000020u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

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

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


void InnerProductParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<InnerProductParameter*>(&to_msg);
  auto& from = static_cast<const InnerProductParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.InnerProductParameter)
  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 & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_weight_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.num_output_ = from._impl_.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.transpose_ = from._impl_.transpose_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.bias_term_ = from._impl_.bias_term_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.axis_ = from._impl_.axis_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void InnerProductParameter::InternalSwap(InnerProductParameter* 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(InnerProductParameter, _impl_.transpose_)
      + sizeof(InnerProductParameter::_impl_.transpose_)
      - PROTOBUF_FIELD_OFFSET(InnerProductParameter, _impl_.weight_filler_)>(
          reinterpret_cast<char*>(&_impl_.weight_filler_),
          reinterpret_cast<char*>(&other->_impl_.weight_filler_));
  swap(_impl_.bias_term_, other->_impl_.bias_term_);
  swap(_impl_.axis_, other->_impl_.axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata InnerProductParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[41]);
}

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

class InputParameter::_Internal {
 public:
};

InputParameter::InputParameter(::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:opencv_caffe.InputParameter)
}
InputParameter::InputParameter(const InputParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  InputParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_.shape_){from._impl_.shape_}
    , /*decltype(_impl_._cached_size_)*/{}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.InputParameter)
}

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

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

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

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

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

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

const char* InputParameter::_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) {
      // repeated .opencv_caffe.BlobShape shape = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_shape(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(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* InputParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.InputParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .opencv_caffe.BlobShape shape = 1;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_shape_size()); i < n; i++) {
    const auto& repfield = this->_internal_shape(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(1, repfield, repfield.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:opencv_caffe.InputParameter)
  return target;
}

size_t InputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.InputParameter)
  size_t total_size = 0;

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

  // repeated .opencv_caffe.BlobShape shape = 1;
  total_size += 1UL * this->_internal_shape_size();
  for (const auto& msg : this->_impl_.shape_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

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


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

  _this->_impl_.shape_.MergeFrom(from._impl_.shape_);
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void InputParameter::InternalSwap(InputParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  _impl_.shape_.InternalSwap(&other->_impl_.shape_);
}

::PROTOBUF_NAMESPACE_ID::Metadata InputParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[42]);
}

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

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

LogParameter::LogParameter(::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:opencv_caffe.LogParameter)
}
LogParameter::LogParameter(const LogParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  LogParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.shift_){}
    , decltype(_impl_.base_){}
    , decltype(_impl_.scale_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.shift_, &from._impl_.shift_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.scale_) -
    reinterpret_cast<char*>(&_impl_.shift_)) + sizeof(_impl_.scale_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.LogParameter)
}

inline void LogParameter::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_.shift_){0}
    , decltype(_impl_.base_){-1}
    , decltype(_impl_.scale_){1}
  };
}

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

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    _impl_.shift_ = 0;
    _impl_.base_ = -1;
    _impl_.scale_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* LogParameter::_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 base = 1 [default = -1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_base(&has_bits);
          _impl_.base_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float scale = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_scale(&has_bits);
          _impl_.scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float shift = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_shift(&has_bits);
          _impl_.shift_ = ::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* LogParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.LogParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional float shift = 3 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_shift(), 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:opencv_caffe.LogParameter)
  return target;
}

size_t LogParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.LogParameter)
  size_t total_size = 0;

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

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

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

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

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

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


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

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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata LogParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[43]);
}

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

class LRNParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<LRNParameter>()._impl_._has_bits_);
  static void set_has_local_size(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_alpha(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_beta(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_norm_region(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_k(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_engine(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

LRNParameter::LRNParameter(::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:opencv_caffe.LRNParameter)
}
LRNParameter::LRNParameter(const LRNParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  LRNParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.norm_region_){}
    , decltype(_impl_.engine_){}
    , decltype(_impl_.local_size_){}
    , decltype(_impl_.alpha_){}
    , decltype(_impl_.beta_){}
    , decltype(_impl_.k_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.norm_region_, &from._impl_.norm_region_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.k_) -
    reinterpret_cast<char*>(&_impl_.norm_region_)) + sizeof(_impl_.k_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.LRNParameter)
}

inline void LRNParameter::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_.norm_region_){0}
    , decltype(_impl_.engine_){0}
    , decltype(_impl_.local_size_){5u}
    , decltype(_impl_.alpha_){1}
    , decltype(_impl_.beta_){0.75f}
    , decltype(_impl_.k_){1}
  };
}

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

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

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

void LRNParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.LRNParameter)
  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 & 0x0000003fu) {
    ::memset(&_impl_.norm_region_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.engine_) -
        reinterpret_cast<char*>(&_impl_.norm_region_)) + sizeof(_impl_.engine_));
    _impl_.local_size_ = 5u;
    _impl_.alpha_ = 1;
    _impl_.beta_ = 0.75f;
    _impl_.k_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* LRNParameter::_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 uint32 local_size = 1 [default = 5];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_local_size(&has_bits);
          _impl_.local_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float alpha = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_alpha(&has_bits);
          _impl_.alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float beta = 3 [default = 0.75];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_beta(&has_bits);
          _impl_.beta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::LRNParameter_NormRegion_IsValid(val))) {
            _internal_set_norm_region(static_cast<::opencv_caffe::LRNParameter_NormRegion>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional float k = 5 [default = 1];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
          _Internal::set_has_k(&has_bits);
          _impl_.k_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.LRNParameter.Engine engine = 6 [default = DEFAULT];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::LRNParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::opencv_caffe::LRNParameter_Engine>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
          }
        } 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* LRNParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.LRNParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 local_size = 1 [default = 5];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_local_size(), target);
  }

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

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

  // optional .opencv_caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      4, this->_internal_norm_region(), target);
  }

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

  // optional .opencv_caffe.LRNParameter.Engine engine = 6 [default = DEFAULT];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      6, this->_internal_engine(), 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:opencv_caffe.LRNParameter)
  return target;
}

size_t LRNParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.LRNParameter)
  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 & 0x0000003fu) {
    // optional .opencv_caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_norm_region());
    }

    // optional .opencv_caffe.LRNParameter.Engine engine = 6 [default = DEFAULT];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_engine());
    }

    // optional uint32 local_size = 1 [default = 5];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_local_size());
    }

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

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

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

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

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


void LRNParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<LRNParameter*>(&to_msg);
  auto& from = static_cast<const LRNParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.LRNParameter)
  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 & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.norm_region_ = from._impl_.norm_region_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.engine_ = from._impl_.engine_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.local_size_ = from._impl_.local_size_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.alpha_ = from._impl_.alpha_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.beta_ = from._impl_.beta_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.k_ = from._impl_.k_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void LRNParameter::InternalSwap(LRNParameter* 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(LRNParameter, _impl_.engine_)
      + sizeof(LRNParameter::_impl_.engine_)
      - PROTOBUF_FIELD_OFFSET(LRNParameter, _impl_.norm_region_)>(
          reinterpret_cast<char*>(&_impl_.norm_region_),
          reinterpret_cast<char*>(&other->_impl_.norm_region_));
  swap(_impl_.local_size_, other->_impl_.local_size_);
  swap(_impl_.alpha_, other->_impl_.alpha_);
  swap(_impl_.beta_, other->_impl_.beta_);
  swap(_impl_.k_, other->_impl_.k_);
}

::PROTOBUF_NAMESPACE_ID::Metadata LRNParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[44]);
}

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

class MemoryDataParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<MemoryDataParameter>()._impl_._has_bits_);
  static void set_has_batch_size(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_channels(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_height(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_width(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

MemoryDataParameter::MemoryDataParameter(::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:opencv_caffe.MemoryDataParameter)
}
MemoryDataParameter::MemoryDataParameter(const MemoryDataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  MemoryDataParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.batch_size_){}
    , decltype(_impl_.channels_){}
    , decltype(_impl_.height_){}
    , decltype(_impl_.width_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.batch_size_, &from._impl_.batch_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.width_) -
    reinterpret_cast<char*>(&_impl_.batch_size_)) + sizeof(_impl_.width_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.MemoryDataParameter)
}

inline void MemoryDataParameter::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_.batch_size_){0u}
    , decltype(_impl_.channels_){0u}
    , decltype(_impl_.height_){0u}
    , decltype(_impl_.width_){0u}
  };
}

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

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

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

void MemoryDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.MemoryDataParameter)
  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 & 0x0000000fu) {
    ::memset(&_impl_.batch_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.width_) -
        reinterpret_cast<char*>(&_impl_.batch_size_)) + sizeof(_impl_.width_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* MemoryDataParameter::_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 uint32 batch_size = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_batch_size(&has_bits);
          _impl_.batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 channels = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_channels(&has_bits);
          _impl_.channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 height = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_height(&has_bits);
          _impl_.height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 width = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_width(&has_bits);
          _impl_.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* MemoryDataParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.MemoryDataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 batch_size = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_batch_size(), target);
  }

  // optional uint32 channels = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_channels(), target);
  }

  // optional uint32 height = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_height(), target);
  }

  // optional uint32 width = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_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:opencv_caffe.MemoryDataParameter)
  return target;
}

size_t MemoryDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.MemoryDataParameter)
  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 & 0x0000000fu) {
    // optional uint32 batch_size = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
    }

    // optional uint32 channels = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_channels());
    }

    // optional uint32 height = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_height());
    }

    // optional uint32 width = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_width());
    }

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

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


void MemoryDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<MemoryDataParameter*>(&to_msg);
  auto& from = static_cast<const MemoryDataParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.MemoryDataParameter)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.batch_size_ = from._impl_.batch_size_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.channels_ = from._impl_.channels_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.height_ = from._impl_.height_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.width_ = from._impl_.width_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata MemoryDataParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[45]);
}

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

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

MVNParameter::MVNParameter(::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:opencv_caffe.MVNParameter)
}
MVNParameter::MVNParameter(const MVNParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  MVNParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.across_channels_){}
    , decltype(_impl_.normalize_variance_){}
    , decltype(_impl_.eps_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.across_channels_, &from._impl_.across_channels_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.eps_) -
    reinterpret_cast<char*>(&_impl_.across_channels_)) + sizeof(_impl_.eps_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.MVNParameter)
}

inline void MVNParameter::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_.across_channels_){false}
    , decltype(_impl_.normalize_variance_){true}
    , decltype(_impl_.eps_){1e-09f}
  };
}

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

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    _impl_.across_channels_ = false;
    _impl_.normalize_variance_ = true;
    _impl_.eps_ = 1e-09f;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* MVNParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool normalize_variance = 1 [default = true];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_normalize_variance(&has_bits);
          _impl_.normalize_variance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool across_channels = 2 [default = false];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_across_channels(&has_bits);
          _impl_.across_channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float eps = 3 [default = 1e-09];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_eps(&has_bits);
          _impl_.eps_ = ::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* MVNParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.MVNParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional bool normalize_variance = 1 [default = true];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_normalize_variance(), target);
  }

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

  // optional float eps = 3 [default = 1e-09];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_eps(), 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:opencv_caffe.MVNParameter)
  return target;
}

size_t MVNParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.MVNParameter)
  size_t total_size = 0;

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

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

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

    // optional float eps = 3 [default = 1e-09];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 + 4;
    }

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

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


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

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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata MVNParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[46]);
}

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

class ParameterParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ParameterParameter>()._impl_._has_bits_);
  static const ::opencv_caffe::BlobShape& shape(const ParameterParameter* msg);
  static void set_has_shape(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::opencv_caffe::BlobShape&
ParameterParameter::_Internal::shape(const ParameterParameter* msg) {
  return *msg->_impl_.shape_;
}
ParameterParameter::ParameterParameter(::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:opencv_caffe.ParameterParameter)
}
ParameterParameter::ParameterParameter(const ParameterParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ParameterParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.shape_){nullptr}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_shape()) {
    _this->_impl_.shape_ = new ::opencv_caffe::BlobShape(*from._impl_.shape_);
  }
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ParameterParameter)
}

inline void ParameterParameter::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_.shape_){nullptr}
  };
}

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

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

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

void ParameterParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ParameterParameter)
  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 & 0x00000001u) {
    GOOGLE_DCHECK(_impl_.shape_ != nullptr);
    _impl_.shape_->Clear();
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ParameterParameter::_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 .opencv_caffe.BlobShape shape = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_shape(), 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* ParameterParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ParameterParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.BlobShape shape = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::shape(this),
        _Internal::shape(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:opencv_caffe.ParameterParameter)
  return target;
}

size_t ParameterParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ParameterParameter)
  size_t total_size = 0;

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

  // optional .opencv_caffe.BlobShape shape = 1;
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *_impl_.shape_);
  }

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

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


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

  if (from._internal_has_shape()) {
    _this->_internal_mutable_shape()->::opencv_caffe::BlobShape::MergeFrom(
        from._internal_shape());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata ParameterParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[47]);
}

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

class PoolingParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<PoolingParameter>()._impl_._has_bits_);
  static void set_has_pool(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_pad(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_pad_h(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_pad_w(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_kernel_size(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_kernel_h(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_kernel_w(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_stride(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_stride_h(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_stride_w(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_engine(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_global_pooling(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_ceil_mode(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
};

PoolingParameter::PoolingParameter(::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:opencv_caffe.PoolingParameter)
}
PoolingParameter::PoolingParameter(const PoolingParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  PoolingParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.pool_){}
    , decltype(_impl_.kernel_size_){}
    , decltype(_impl_.pad_){}
    , decltype(_impl_.kernel_h_){}
    , decltype(_impl_.kernel_w_){}
    , decltype(_impl_.stride_h_){}
    , decltype(_impl_.stride_w_){}
    , decltype(_impl_.pad_h_){}
    , decltype(_impl_.pad_w_){}
    , decltype(_impl_.engine_){}
    , decltype(_impl_.global_pooling_){}
    , decltype(_impl_.stride_){}
    , decltype(_impl_.ceil_mode_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.pool_, &from._impl_.pool_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.ceil_mode_) -
    reinterpret_cast<char*>(&_impl_.pool_)) + sizeof(_impl_.ceil_mode_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.PoolingParameter)
}

inline void PoolingParameter::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_.pool_){0}
    , decltype(_impl_.kernel_size_){0u}
    , decltype(_impl_.pad_){0u}
    , decltype(_impl_.kernel_h_){0u}
    , decltype(_impl_.kernel_w_){0u}
    , decltype(_impl_.stride_h_){0u}
    , decltype(_impl_.stride_w_){0u}
    , decltype(_impl_.pad_h_){0u}
    , decltype(_impl_.pad_w_){0u}
    , decltype(_impl_.engine_){0}
    , decltype(_impl_.global_pooling_){false}
    , decltype(_impl_.stride_){1u}
    , decltype(_impl_.ceil_mode_){true}
  };
}

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

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

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

void PoolingParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.PoolingParameter)
  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) {
    ::memset(&_impl_.pool_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.pad_h_) -
        reinterpret_cast<char*>(&_impl_.pool_)) + sizeof(_impl_.pad_h_));
  }
  if (cached_has_bits & 0x00001f00u) {
    ::memset(&_impl_.pad_w_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.global_pooling_) -
        reinterpret_cast<char*>(&_impl_.pad_w_)) + sizeof(_impl_.global_pooling_));
    _impl_.stride_ = 1u;
    _impl_.ceil_mode_ = true;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PoolingParameter::_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 .opencv_caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::PoolingParameter_PoolMethod_IsValid(val))) {
            _internal_set_pool(static_cast<::opencv_caffe::PoolingParameter_PoolMethod>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional uint32 kernel_size = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_kernel_size(&has_bits);
          _impl_.kernel_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 stride = 3 [default = 1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_stride(&has_bits);
          _impl_.stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 pad = 4 [default = 0];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_pad(&has_bits);
          _impl_.pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 kernel_h = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_kernel_h(&has_bits);
          _impl_.kernel_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 kernel_w = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_kernel_w(&has_bits);
          _impl_.kernel_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 stride_h = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_stride_h(&has_bits);
          _impl_.stride_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 stride_w = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_stride_w(&has_bits);
          _impl_.stride_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 pad_h = 9 [default = 0];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_pad_h(&has_bits);
          _impl_.pad_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 pad_w = 10 [default = 0];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_pad_w(&has_bits);
          _impl_.pad_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::PoolingParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::opencv_caffe::PoolingParameter_Engine>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(11, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional bool global_pooling = 12 [default = false];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_global_pooling(&has_bits);
          _impl_.global_pooling_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool ceil_mode = 13 [default = true];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_ceil_mode(&has_bits);
          _impl_.ceil_mode_ = ::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* PoolingParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PoolingParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_pool(), target);
  }

  // optional uint32 kernel_size = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_kernel_size(), target);
  }

  // optional uint32 stride = 3 [default = 1];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_stride(), target);
  }

  // optional uint32 pad = 4 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_pad(), target);
  }

  // optional uint32 kernel_h = 5;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_kernel_h(), target);
  }

  // optional uint32 kernel_w = 6;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_kernel_w(), target);
  }

  // optional uint32 stride_h = 7;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_stride_h(), target);
  }

  // optional uint32 stride_w = 8;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_stride_w(), target);
  }

  // optional uint32 pad_h = 9 [default = 0];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_pad_h(), target);
  }

  // optional uint32 pad_w = 10 [default = 0];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(10, this->_internal_pad_w(), target);
  }

  // optional .opencv_caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      11, this->_internal_engine(), target);
  }

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

  // optional bool ceil_mode = 13 [default = true];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(13, this->_internal_ceil_mode(), 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:opencv_caffe.PoolingParameter)
  return target;
}

size_t PoolingParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PoolingParameter)
  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 .opencv_caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_pool());
    }

    // optional uint32 kernel_size = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_size());
    }

    // optional uint32 pad = 4 [default = 0];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pad());
    }

    // optional uint32 kernel_h = 5;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_h());
    }

    // optional uint32 kernel_w = 6;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_w());
    }

    // optional uint32 stride_h = 7;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_h());
    }

    // optional uint32 stride_w = 8;
    if (cached_has_bits & 0x00000040u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_w());
    }

    // optional uint32 pad_h = 9 [default = 0];
    if (cached_has_bits & 0x00000080u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_h());
    }

  }
  if (cached_has_bits & 0x00001f00u) {
    // optional uint32 pad_w = 10 [default = 0];
    if (cached_has_bits & 0x00000100u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_w());
    }

    // optional .opencv_caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_engine());
    }

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

    // optional uint32 stride = 3 [default = 1];
    if (cached_has_bits & 0x00000800u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_stride());
    }

    // optional bool ceil_mode = 13 [default = true];
    if (cached_has_bits & 0x00001000u) {
      total_size += 1 + 1;
    }

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

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


void PoolingParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<PoolingParameter*>(&to_msg);
  auto& from = static_cast<const PoolingParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PoolingParameter)
  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->_impl_.pool_ = from._impl_.pool_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.kernel_size_ = from._impl_.kernel_size_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.pad_ = from._impl_.pad_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.kernel_h_ = from._impl_.kernel_h_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.kernel_w_ = from._impl_.kernel_w_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.stride_h_ = from._impl_.stride_h_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.stride_w_ = from._impl_.stride_w_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.pad_h_ = from._impl_.pad_h_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00001f00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.pad_w_ = from._impl_.pad_w_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.engine_ = from._impl_.engine_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.global_pooling_ = from._impl_.global_pooling_;
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_impl_.stride_ = from._impl_.stride_;
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_impl_.ceil_mode_ = from._impl_.ceil_mode_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void PoolingParameter::InternalSwap(PoolingParameter* 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(PoolingParameter, _impl_.global_pooling_)
      + sizeof(PoolingParameter::_impl_.global_pooling_)
      - PROTOBUF_FIELD_OFFSET(PoolingParameter, _impl_.pool_)>(
          reinterpret_cast<char*>(&_impl_.pool_),
          reinterpret_cast<char*>(&other->_impl_.pool_));
  swap(_impl_.stride_, other->_impl_.stride_);
  swap(_impl_.ceil_mode_, other->_impl_.ceil_mode_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PoolingParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[48]);
}

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

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

PowerParameter::PowerParameter(::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:opencv_caffe.PowerParameter)
}
PowerParameter::PowerParameter(const PowerParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  PowerParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.shift_){}
    , decltype(_impl_.power_){}
    , decltype(_impl_.scale_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.shift_, &from._impl_.shift_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.scale_) -
    reinterpret_cast<char*>(&_impl_.shift_)) + sizeof(_impl_.scale_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.PowerParameter)
}

inline void PowerParameter::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_.shift_){0}
    , decltype(_impl_.power_){1}
    , decltype(_impl_.scale_){1}
  };
}

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

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    _impl_.shift_ = 0;
    _impl_.power_ = 1;
    _impl_.scale_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PowerParameter::_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 power = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_power(&has_bits);
          _impl_.power_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float scale = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_scale(&has_bits);
          _impl_.scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float shift = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_shift(&has_bits);
          _impl_.shift_ = ::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* PowerParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PowerParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional float shift = 3 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_shift(), 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:opencv_caffe.PowerParameter)
  return target;
}

size_t PowerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PowerParameter)
  size_t total_size = 0;

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

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

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

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

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

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


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

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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata PowerParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[49]);
}

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

class PythonParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<PythonParameter>()._impl_._has_bits_);
  static void set_has_module(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_layer(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_param_str(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_share_in_parallel(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

PythonParameter::PythonParameter(::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:opencv_caffe.PythonParameter)
}
PythonParameter::PythonParameter(const PythonParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  PythonParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.module_){}
    , decltype(_impl_.layer_){}
    , decltype(_impl_.param_str_){}
    , decltype(_impl_.share_in_parallel_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.module_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.module_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_module()) {
    _this->_impl_.module_.Set(from._internal_module(), 
      _this->GetArenaForAllocation());
  }
  _impl_.layer_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.layer_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_layer()) {
    _this->_impl_.layer_.Set(from._internal_layer(), 
      _this->GetArenaForAllocation());
  }
  _impl_.param_str_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.param_str_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_param_str()) {
    _this->_impl_.param_str_.Set(from._internal_param_str(), 
      _this->GetArenaForAllocation());
  }
  _this->_impl_.share_in_parallel_ = from._impl_.share_in_parallel_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.PythonParameter)
}

inline void PythonParameter::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_.module_){}
    , decltype(_impl_.layer_){}
    , decltype(_impl_.param_str_){}
    , decltype(_impl_.share_in_parallel_){false}
  };
  _impl_.module_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.module_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.layer_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.layer_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.param_str_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.param_str_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

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

inline void PythonParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.module_.Destroy();
  _impl_.layer_.Destroy();
  _impl_.param_str_.Destroy();
}

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.module_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.layer_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.param_str_.ClearNonDefaultToEmpty();
    }
  }
  _impl_.share_in_parallel_ = false;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PythonParameter::_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 string module = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_module();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.PythonParameter.module");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string layer = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_layer();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.PythonParameter.layer");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string param_str = 3 [default = ""];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_param_str();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.PythonParameter.param_str");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional bool share_in_parallel = 4 [default = false];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_share_in_parallel(&has_bits);
          _impl_.share_in_parallel_ = ::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* PythonParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PythonParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string module = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_module().data(), static_cast<int>(this->_internal_module().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.PythonParameter.module");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_module(), target);
  }

  // optional string layer = 2;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_layer().data(), static_cast<int>(this->_internal_layer().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.PythonParameter.layer");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_layer(), target);
  }

  // optional string param_str = 3 [default = ""];
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_param_str().data(), static_cast<int>(this->_internal_param_str().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.PythonParameter.param_str");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_param_str(), target);
  }

  // optional bool share_in_parallel = 4 [default = false];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_share_in_parallel(), 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:opencv_caffe.PythonParameter)
  return target;
}

size_t PythonParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PythonParameter)
  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 & 0x0000000fu) {
    // optional string module = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_module());
    }

    // optional string layer = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_layer());
    }

    // optional string param_str = 3 [default = ""];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_param_str());
    }

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

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

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


void PythonParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<PythonParameter*>(&to_msg);
  auto& from = static_cast<const PythonParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PythonParameter)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_module(from._internal_module());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_layer(from._internal_layer());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_param_str(from._internal_param_str());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.share_in_parallel_ = from._impl_.share_in_parallel_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void PythonParameter::InternalSwap(PythonParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.module_, lhs_arena,
      &other->_impl_.module_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.layer_, lhs_arena,
      &other->_impl_.layer_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.param_str_, lhs_arena,
      &other->_impl_.param_str_, rhs_arena
  );
  swap(_impl_.share_in_parallel_, other->_impl_.share_in_parallel_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PythonParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[50]);
}

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

class RecurrentParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<RecurrentParameter>()._impl_._has_bits_);
  static void set_has_num_output(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::opencv_caffe::FillerParameter& weight_filler(const RecurrentParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::opencv_caffe::FillerParameter& bias_filler(const RecurrentParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_debug_info(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_expose_hidden(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
};

const ::opencv_caffe::FillerParameter&
RecurrentParameter::_Internal::weight_filler(const RecurrentParameter* msg) {
  return *msg->_impl_.weight_filler_;
}
const ::opencv_caffe::FillerParameter&
RecurrentParameter::_Internal::bias_filler(const RecurrentParameter* msg) {
  return *msg->_impl_.bias_filler_;
}
RecurrentParameter::RecurrentParameter(::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:opencv_caffe.RecurrentParameter)
}
RecurrentParameter::RecurrentParameter(const RecurrentParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  RecurrentParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.weight_filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.num_output_){}
    , decltype(_impl_.debug_info_){}
    , decltype(_impl_.expose_hidden_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_weight_filler()) {
    _this->_impl_.weight_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.weight_filler_);
  }
  if (from._internal_has_bias_filler()) {
    _this->_impl_.bias_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.bias_filler_);
  }
  ::memcpy(&_impl_.num_output_, &from._impl_.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.expose_hidden_) -
    reinterpret_cast<char*>(&_impl_.num_output_)) + sizeof(_impl_.expose_hidden_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.RecurrentParameter)
}

inline void RecurrentParameter::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_.weight_filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.num_output_){0u}
    , decltype(_impl_.debug_info_){false}
    , decltype(_impl_.expose_hidden_){false}
  };
}

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

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

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

void RecurrentParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.RecurrentParameter)
  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_.weight_filler_ != nullptr);
      _impl_.weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.bias_filler_ != nullptr);
      _impl_.bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x0000001cu) {
    ::memset(&_impl_.num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.expose_hidden_) -
        reinterpret_cast<char*>(&_impl_.num_output_)) + sizeof(_impl_.expose_hidden_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* RecurrentParameter::_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 uint32 num_output = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_num_output(&has_bits);
          _impl_.num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter weight_filler = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter bias_filler = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool debug_info = 4 [default = false];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_debug_info(&has_bits);
          _impl_.debug_info_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool expose_hidden = 5 [default = false];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_expose_hidden(&has_bits);
          _impl_.expose_hidden_ = ::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* RecurrentParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.RecurrentParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 num_output = 1 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional .opencv_caffe.FillerParameter weight_filler = 2;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, _Internal::weight_filler(this),
        _Internal::weight_filler(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.FillerParameter bias_filler = 3;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::bias_filler(this),
        _Internal::bias_filler(this).GetCachedSize(), target, stream);
  }

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

  // optional bool expose_hidden = 5 [default = false];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_expose_hidden(), 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:opencv_caffe.RecurrentParameter)
  return target;
}

size_t RecurrentParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.RecurrentParameter)
  size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional .opencv_caffe.FillerParameter weight_filler = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.weight_filler_);
    }

    // optional .opencv_caffe.FillerParameter bias_filler = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.bias_filler_);
    }

    // optional uint32 num_output = 1 [default = 0];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

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

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

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

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


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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_weight_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.num_output_ = from._impl_.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.debug_info_ = from._impl_.debug_info_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.expose_hidden_ = from._impl_.expose_hidden_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata RecurrentParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[51]);
}

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

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

ReductionParameter::ReductionParameter(::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:opencv_caffe.ReductionParameter)
}
ReductionParameter::ReductionParameter(const ReductionParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ReductionParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.axis_){}
    , decltype(_impl_.operation_){}
    , decltype(_impl_.coeff_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.axis_, &from._impl_.axis_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.coeff_) -
    reinterpret_cast<char*>(&_impl_.axis_)) + sizeof(_impl_.coeff_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ReductionParameter)
}

inline void ReductionParameter::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_.axis_){0}
    , decltype(_impl_.operation_){1}
    , decltype(_impl_.coeff_){1}
  };
}

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

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

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

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    _impl_.axis_ = 0;
    _impl_.operation_ = 1;
    _impl_.coeff_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ReductionParameter::_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 .opencv_caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::ReductionParameter_ReductionOp_IsValid(val))) {
            _internal_set_operation(static_cast<::opencv_caffe::ReductionParameter_ReductionOp>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int32 axis = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float coeff = 3 [default = 1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_coeff(&has_bits);
          _impl_.coeff_ = ::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* ReductionParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ReductionParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_operation(), target);
  }

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

  // optional float coeff = 3 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_coeff(), 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:opencv_caffe.ReductionParameter)
  return target;
}

size_t ReductionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ReductionParameter)
  size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional int32 axis = 2 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

    // optional .opencv_caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_operation());
    }

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

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

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


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

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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata ReductionParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[52]);
}

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

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

ReLUParameter::ReLUParameter(::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:opencv_caffe.ReLUParameter)
}
ReLUParameter::ReLUParameter(const ReLUParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ReLUParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.negative_slope_){}
    , decltype(_impl_.engine_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.negative_slope_, &from._impl_.negative_slope_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.engine_) -
    reinterpret_cast<char*>(&_impl_.negative_slope_)) + sizeof(_impl_.engine_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ReLUParameter)
}

inline void ReLUParameter::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_.negative_slope_){0}
    , decltype(_impl_.engine_){0}
  };
}

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

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

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

void ReLUParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ReLUParameter)
  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_.negative_slope_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.engine_) -
        reinterpret_cast<char*>(&_impl_.negative_slope_)) + sizeof(_impl_.engine_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ReLUParameter::_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 negative_slope = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_negative_slope(&has_bits);
          _impl_.negative_slope_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::ReLUParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::opencv_caffe::ReLUParameter_Engine>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
          }
        } 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* ReLUParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ReLUParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional .opencv_caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      2, this->_internal_engine(), 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:opencv_caffe.ReLUParameter)
  return target;
}

size_t ReLUParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ReLUParameter)
  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 negative_slope = 1 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

    // optional .opencv_caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_engine());
    }

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

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


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

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata ReLUParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[53]);
}

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

class ReshapeParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ReshapeParameter>()._impl_._has_bits_);
  static const ::opencv_caffe::BlobShape& shape(const ReshapeParameter* msg);
  static void set_has_shape(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_axis(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_num_axes(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

const ::opencv_caffe::BlobShape&
ReshapeParameter::_Internal::shape(const ReshapeParameter* msg) {
  return *msg->_impl_.shape_;
}
ReshapeParameter::ReshapeParameter(::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:opencv_caffe.ReshapeParameter)
}
ReshapeParameter::ReshapeParameter(const ReshapeParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ReshapeParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.shape_){nullptr}
    , decltype(_impl_.axis_){}
    , decltype(_impl_.num_axes_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_shape()) {
    _this->_impl_.shape_ = new ::opencv_caffe::BlobShape(*from._impl_.shape_);
  }
  ::memcpy(&_impl_.axis_, &from._impl_.axis_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.num_axes_) -
    reinterpret_cast<char*>(&_impl_.axis_)) + sizeof(_impl_.num_axes_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ReshapeParameter)
}

inline void ReshapeParameter::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_.shape_){nullptr}
    , decltype(_impl_.axis_){0}
    , decltype(_impl_.num_axes_){-1}
  };
}

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

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

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

void ReshapeParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ReshapeParameter)
  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 & 0x00000001u) {
    GOOGLE_DCHECK(_impl_.shape_ != nullptr);
    _impl_.shape_->Clear();
  }
  if (cached_has_bits & 0x00000006u) {
    _impl_.axis_ = 0;
    _impl_.num_axes_ = -1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ReshapeParameter::_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 .opencv_caffe.BlobShape shape = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 axis = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 num_axes = 3 [default = -1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_num_axes(&has_bits);
          _impl_.num_axes_ = ::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* ReshapeParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ReshapeParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional int32 num_axes = 3 [default = -1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_axes(), 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:opencv_caffe.ReshapeParameter)
  return target;
}

size_t ReshapeParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ReshapeParameter)
  size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional .opencv_caffe.BlobShape shape = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.shape_);
    }

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

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

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

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


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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_shape()->::opencv_caffe::BlobShape::MergeFrom(
          from._internal_shape());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.axis_ = from._impl_.axis_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.num_axes_ = from._impl_.num_axes_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ReshapeParameter::InternalSwap(ReshapeParameter* 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(ReshapeParameter, _impl_.axis_)
      + sizeof(ReshapeParameter::_impl_.axis_)
      - PROTOBUF_FIELD_OFFSET(ReshapeParameter, _impl_.shape_)>(
          reinterpret_cast<char*>(&_impl_.shape_),
          reinterpret_cast<char*>(&other->_impl_.shape_));
  swap(_impl_.num_axes_, other->_impl_.num_axes_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ReshapeParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[54]);
}

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

class ScaleParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ScaleParameter>()._impl_._has_bits_);
  static void set_has_axis(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_num_axes(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::opencv_caffe::FillerParameter& filler(const ScaleParameter* msg);
  static void set_has_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_bias_term(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::opencv_caffe::FillerParameter& bias_filler(const ScaleParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::opencv_caffe::FillerParameter&
ScaleParameter::_Internal::filler(const ScaleParameter* msg) {
  return *msg->_impl_.filler_;
}
const ::opencv_caffe::FillerParameter&
ScaleParameter::_Internal::bias_filler(const ScaleParameter* msg) {
  return *msg->_impl_.bias_filler_;
}
ScaleParameter::ScaleParameter(::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:opencv_caffe.ScaleParameter)
}
ScaleParameter::ScaleParameter(const ScaleParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ScaleParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.bias_term_){}
    , decltype(_impl_.axis_){}
    , decltype(_impl_.num_axes_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_filler()) {
    _this->_impl_.filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.filler_);
  }
  if (from._internal_has_bias_filler()) {
    _this->_impl_.bias_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.bias_filler_);
  }
  ::memcpy(&_impl_.bias_term_, &from._impl_.bias_term_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.num_axes_) -
    reinterpret_cast<char*>(&_impl_.bias_term_)) + sizeof(_impl_.num_axes_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ScaleParameter)
}

inline void ScaleParameter::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_.filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.bias_term_){false}
    , decltype(_impl_.axis_){1}
    , decltype(_impl_.num_axes_){1}
  };
}

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

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

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

void ScaleParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ScaleParameter)
  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_.filler_ != nullptr);
      _impl_.filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.bias_filler_ != nullptr);
      _impl_.bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x0000001cu) {
    _impl_.bias_term_ = false;
    _impl_.axis_ = 1;
    _impl_.num_axes_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ScaleParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 axis = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 num_axes = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_num_axes(&has_bits);
          _impl_.num_axes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter filler = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool bias_term = 4 [default = false];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_bias_term(&has_bits);
          _impl_.bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter bias_filler = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), 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* ScaleParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ScaleParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional .opencv_caffe.FillerParameter filler = 3;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, _Internal::filler(this),
        _Internal::filler(this).GetCachedSize(), target, stream);
  }

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

  // optional .opencv_caffe.FillerParameter bias_filler = 5;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::bias_filler(this),
        _Internal::bias_filler(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:opencv_caffe.ScaleParameter)
  return target;
}

size_t ScaleParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ScaleParameter)
  size_t total_size = 0;

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

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional .opencv_caffe.FillerParameter filler = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.filler_);
    }

    // optional .opencv_caffe.FillerParameter bias_filler = 5;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.bias_filler_);
    }

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

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

    // optional int32 num_axes = 2 [default = 1];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_axes());
    }

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

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


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

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_mutable_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.bias_term_ = from._impl_.bias_term_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.axis_ = from._impl_.axis_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.num_axes_ = from._impl_.num_axes_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ScaleParameter::InternalSwap(ScaleParameter* 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(ScaleParameter, _impl_.bias_term_)
      + sizeof(ScaleParameter::_impl_.bias_term_)
      - PROTOBUF_FIELD_OFFSET(ScaleParameter, _impl_.filler_)>(
          reinterpret_cast<char*>(&_impl_.filler_),
          reinterpret_cast<char*>(&other->_impl_.filler_));
  swap(_impl_.axis_, other->_impl_.axis_);
  swap(_impl_.num_axes_, other->_impl_.num_axes_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ScaleParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[55]);
}

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

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

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

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.engine_ = from._impl_.engine_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.SigmoidParameter)
}

inline void SigmoidParameter::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_.engine_){0}
  };
}

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

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

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

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

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

const char* SigmoidParameter::_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 .opencv_caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SigmoidParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::opencv_caffe::SigmoidParameter_Engine>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } 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* SigmoidParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SigmoidParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_engine(), 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:opencv_caffe.SigmoidParameter)
  return target;
}

size_t SigmoidParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SigmoidParameter)
  size_t total_size = 0;

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

  // optional .opencv_caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_engine());
  }

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

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


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

  if (from._internal_has_engine()) {
    _this->_internal_set_engine(from._internal_engine());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata SigmoidParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[56]);
}

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

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

SliceParameter::SliceParameter(::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:opencv_caffe.SliceParameter)
}
SliceParameter::SliceParameter(const SliceParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  SliceParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.slice_point_){from._impl_.slice_point_}
    , decltype(_impl_.slice_dim_){}
    , decltype(_impl_.axis_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.slice_dim_, &from._impl_.slice_dim_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.axis_) -
    reinterpret_cast<char*>(&_impl_.slice_dim_)) + sizeof(_impl_.axis_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.SliceParameter)
}

inline void SliceParameter::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_.slice_point_){arena}
    , decltype(_impl_.slice_dim_){1u}
    , decltype(_impl_.axis_){1}
  };
}

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

inline void SliceParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.slice_point_.~RepeatedField();
}

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

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

  _impl_.slice_point_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    _impl_.slice_dim_ = 1u;
    _impl_.axis_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SliceParameter::_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 uint32 slice_dim = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_slice_dim(&has_bits);
          _impl_.slice_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated uint32 slice_point = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_slice_point(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
        } else if (static_cast<uint8_t>(tag) == 18) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_slice_point(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 axis = 3 [default = 1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::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* SliceParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SliceParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 slice_dim = 1 [default = 1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_slice_dim(), target);
  }

  // repeated uint32 slice_point = 2;
  for (int i = 0, n = this->_internal_slice_point_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_slice_point(i), target);
  }

  // optional int32 axis = 3 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_axis(), 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:opencv_caffe.SliceParameter)
  return target;
}

size_t SliceParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SliceParameter)
  size_t total_size = 0;

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

  // repeated uint32 slice_point = 2;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      UInt32Size(this->_impl_.slice_point_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_slice_point_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional uint32 slice_dim = 1 [default = 1];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_slice_dim());
    }

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

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

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


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

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

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

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

void SliceParameter::InternalSwap(SliceParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.slice_point_.InternalSwap(&other->_impl_.slice_point_);
  swap(_impl_.slice_dim_, other->_impl_.slice_dim_);
  swap(_impl_.axis_, other->_impl_.axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SliceParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[57]);
}

// ===================================================================

class SoftmaxParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<SoftmaxParameter>()._impl_._has_bits_);
  static void set_has_engine(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_axis(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

SoftmaxParameter::SoftmaxParameter(::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:opencv_caffe.SoftmaxParameter)
}
SoftmaxParameter::SoftmaxParameter(const SoftmaxParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  SoftmaxParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.engine_){}
    , decltype(_impl_.axis_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.engine_, &from._impl_.engine_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.axis_) -
    reinterpret_cast<char*>(&_impl_.engine_)) + sizeof(_impl_.axis_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.SoftmaxParameter)
}

inline void SoftmaxParameter::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_.engine_){0}
    , decltype(_impl_.axis_){1}
  };
}

SoftmaxParameter::~SoftmaxParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.SoftmaxParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void SoftmaxParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void SoftmaxParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void SoftmaxParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.SoftmaxParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    _impl_.engine_ = 0;
    _impl_.axis_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SoftmaxParameter::_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 .opencv_caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SoftmaxParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::opencv_caffe::SoftmaxParameter_Engine>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional int32 axis = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::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* SoftmaxParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SoftmaxParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_engine(), target);
  }

  // optional int32 axis = 2 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), 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:opencv_caffe.SoftmaxParameter)
  return target;
}

size_t SoftmaxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SoftmaxParameter)
  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 .opencv_caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_engine());
    }

    // optional int32 axis = 2 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SoftmaxParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    SoftmaxParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SoftmaxParameter::GetClassData() const { return &_class_data_; }


void SoftmaxParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<SoftmaxParameter*>(&to_msg);
  auto& from = static_cast<const SoftmaxParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.SoftmaxParameter)
  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_.engine_ = from._impl_.engine_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.axis_ = from._impl_.axis_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SoftmaxParameter::CopyFrom(const SoftmaxParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.SoftmaxParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SoftmaxParameter::IsInitialized() const {
  return true;
}

void SoftmaxParameter::InternalSwap(SoftmaxParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.engine_, other->_impl_.engine_);
  swap(_impl_.axis_, other->_impl_.axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SoftmaxParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[58]);
}

// ===================================================================

class TanHParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<TanHParameter>()._impl_._has_bits_);
  static void set_has_engine(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

TanHParameter::TanHParameter(::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:opencv_caffe.TanHParameter)
}
TanHParameter::TanHParameter(const TanHParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TanHParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.engine_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.engine_ = from._impl_.engine_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.TanHParameter)
}

inline void TanHParameter::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_.engine_){0}
  };
}

TanHParameter::~TanHParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.TanHParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TanHParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void TanHParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void TanHParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.TanHParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.engine_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TanHParameter::_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 .opencv_caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::TanHParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::opencv_caffe::TanHParameter_Engine>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } 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* TanHParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.TanHParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      1, this->_internal_engine(), 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:opencv_caffe.TanHParameter)
  return target;
}

size_t TanHParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.TanHParameter)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // optional .opencv_caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_engine());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TanHParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    TanHParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TanHParameter::GetClassData() const { return &_class_data_; }


void TanHParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<TanHParameter*>(&to_msg);
  auto& from = static_cast<const TanHParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.TanHParameter)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_engine()) {
    _this->_internal_set_engine(from._internal_engine());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TanHParameter::CopyFrom(const TanHParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.TanHParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TanHParameter::IsInitialized() const {
  return true;
}

void TanHParameter::InternalSwap(TanHParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.engine_, other->_impl_.engine_);
}

::PROTOBUF_NAMESPACE_ID::Metadata TanHParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[59]);
}

// ===================================================================

class TileParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<TileParameter>()._impl_._has_bits_);
  static void set_has_axis(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_tiles(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

TileParameter::TileParameter(::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:opencv_caffe.TileParameter)
}
TileParameter::TileParameter(const TileParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  TileParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.tiles_){}
    , decltype(_impl_.axis_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.tiles_, &from._impl_.tiles_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.axis_) -
    reinterpret_cast<char*>(&_impl_.tiles_)) + sizeof(_impl_.axis_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.TileParameter)
}

inline void TileParameter::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_.tiles_){0}
    , decltype(_impl_.axis_){1}
  };
}

TileParameter::~TileParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.TileParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void TileParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void TileParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void TileParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.TileParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    _impl_.tiles_ = 0;
    _impl_.axis_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TileParameter::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::_pbi::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 axis = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_axis(&has_bits);
          _impl_.axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 tiles = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_tiles(&has_bits);
          _impl_.tiles_ = ::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* TileParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.TileParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional int32 axis = 1 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
  }

  // optional int32 tiles = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_tiles(), 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:opencv_caffe.TileParameter)
  return target;
}

size_t TileParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.TileParameter)
  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 int32 tiles = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_tiles());
    }

    // optional int32 axis = 1 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TileParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    TileParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TileParameter::GetClassData() const { return &_class_data_; }


void TileParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<TileParameter*>(&to_msg);
  auto& from = static_cast<const TileParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.TileParameter)
  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_.tiles_ = from._impl_.tiles_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.axis_ = from._impl_.axis_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TileParameter::CopyFrom(const TileParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.TileParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool TileParameter::IsInitialized() const {
  return true;
}

void TileParameter::InternalSwap(TileParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.tiles_, other->_impl_.tiles_);
  swap(_impl_.axis_, other->_impl_.axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata TileParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[60]);
}

// ===================================================================

class ThresholdParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ThresholdParameter>()._impl_._has_bits_);
  static void set_has_threshold(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

ThresholdParameter::ThresholdParameter(::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:opencv_caffe.ThresholdParameter)
}
ThresholdParameter::ThresholdParameter(const ThresholdParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ThresholdParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.threshold_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _this->_impl_.threshold_ = from._impl_.threshold_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ThresholdParameter)
}

inline void ThresholdParameter::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_.threshold_){0}
  };
}

ThresholdParameter::~ThresholdParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.ThresholdParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ThresholdParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void ThresholdParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ThresholdParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ThresholdParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.threshold_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ThresholdParameter::_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 threshold = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_threshold(&has_bits);
          _impl_.threshold_ = ::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* ThresholdParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ThresholdParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional float threshold = 1 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_threshold(), 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:opencv_caffe.ThresholdParameter)
  return target;
}

size_t ThresholdParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ThresholdParameter)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // optional float threshold = 1 [default = 0];
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 + 4;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ThresholdParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    ThresholdParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ThresholdParameter::GetClassData() const { return &_class_data_; }


void ThresholdParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ThresholdParameter*>(&to_msg);
  auto& from = static_cast<const ThresholdParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ThresholdParameter)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_threshold()) {
    _this->_internal_set_threshold(from._internal_threshold());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ThresholdParameter::CopyFrom(const ThresholdParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ThresholdParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ThresholdParameter::IsInitialized() const {
  return true;
}

void ThresholdParameter::InternalSwap(ThresholdParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_.threshold_, other->_impl_.threshold_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ThresholdParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[61]);
}

// ===================================================================

class WindowDataParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<WindowDataParameter>()._impl_._has_bits_);
  static void set_has_source(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_mean_file(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_batch_size(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_crop_size(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_mirror(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_fg_threshold(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_bg_threshold(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_fg_fraction(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_context_pad(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_crop_mode(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_cache_images(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_root_folder(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

const ::PROTOBUF_NAMESPACE_ID::internal::LazyString WindowDataParameter::Impl_::_i_give_permission_to_break_this_code_default_crop_mode_{{{"warp", 4}}, {nullptr}};
WindowDataParameter::WindowDataParameter(::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:opencv_caffe.WindowDataParameter)
}
WindowDataParameter::WindowDataParameter(const WindowDataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  WindowDataParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.source_){}
    , decltype(_impl_.mean_file_){}
    , decltype(_impl_.crop_mode_){}
    , decltype(_impl_.root_folder_){}
    , decltype(_impl_.batch_size_){}
    , decltype(_impl_.crop_size_){}
    , decltype(_impl_.mirror_){}
    , decltype(_impl_.cache_images_){}
    , decltype(_impl_.context_pad_){}
    , decltype(_impl_.scale_){}
    , decltype(_impl_.fg_threshold_){}
    , decltype(_impl_.bg_threshold_){}
    , decltype(_impl_.fg_fraction_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    _this->_impl_.source_.Set(from._internal_source(), 
      _this->GetArenaForAllocation());
  }
  _impl_.mean_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.mean_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_mean_file()) {
    _this->_impl_.mean_file_.Set(from._internal_mean_file(), 
      _this->GetArenaForAllocation());
  }
  _impl_.crop_mode_.InitDefault();
  if (from._internal_has_crop_mode()) {
    _this->_impl_.crop_mode_.Set(from._internal_crop_mode(), 
      _this->GetArenaForAllocation());
  }
  _impl_.root_folder_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.root_folder_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_root_folder()) {
    _this->_impl_.root_folder_.Set(from._internal_root_folder(), 
      _this->GetArenaForAllocation());
  }
  ::memcpy(&_impl_.batch_size_, &from._impl_.batch_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.fg_fraction_) -
    reinterpret_cast<char*>(&_impl_.batch_size_)) + sizeof(_impl_.fg_fraction_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.WindowDataParameter)
}

inline void WindowDataParameter::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_.source_){}
    , decltype(_impl_.mean_file_){}
    , decltype(_impl_.crop_mode_){}
    , decltype(_impl_.root_folder_){}
    , decltype(_impl_.batch_size_){0u}
    , decltype(_impl_.crop_size_){0u}
    , decltype(_impl_.mirror_){false}
    , decltype(_impl_.cache_images_){false}
    , decltype(_impl_.context_pad_){0u}
    , decltype(_impl_.scale_){1}
    , decltype(_impl_.fg_threshold_){0.5f}
    , decltype(_impl_.bg_threshold_){0.5f}
    , decltype(_impl_.fg_fraction_){0.25f}
  };
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.mean_file_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.mean_file_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.crop_mode_.InitDefault();
  _impl_.root_folder_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.root_folder_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

WindowDataParameter::~WindowDataParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.WindowDataParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void WindowDataParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.source_.Destroy();
  _impl_.mean_file_.Destroy();
  _impl_.crop_mode_.Destroy();
  _impl_.root_folder_.Destroy();
}

void WindowDataParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void WindowDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.WindowDataParameter)
  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 & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.source_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.mean_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.crop_mode_.ClearToDefault(::opencv_caffe::WindowDataParameter::Impl_::_i_give_permission_to_break_this_code_default_crop_mode_, GetArenaForAllocation());
       }
    if (cached_has_bits & 0x00000008u) {
      _impl_.root_folder_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x000000f0u) {
    ::memset(&_impl_.batch_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.cache_images_) -
        reinterpret_cast<char*>(&_impl_.batch_size_)) + sizeof(_impl_.cache_images_));
  }
  if (cached_has_bits & 0x00001f00u) {
    _impl_.context_pad_ = 0u;
    _impl_.scale_ = 1;
    _impl_.fg_threshold_ = 0.5f;
    _impl_.bg_threshold_ = 0.5f;
    _impl_.fg_fraction_ = 0.25f;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* WindowDataParameter::_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 string source = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_source();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.WindowDataParameter.source");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional float scale = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_scale(&has_bits);
          _impl_.scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional string mean_file = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_mean_file();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.WindowDataParameter.mean_file");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional uint32 batch_size = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_batch_size(&has_bits);
          _impl_.batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 crop_size = 5 [default = 0];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_crop_size(&has_bits);
          _impl_.crop_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool mirror = 6 [default = false];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_mirror(&has_bits);
          _impl_.mirror_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float fg_threshold = 7 [default = 0.5];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
          _Internal::set_has_fg_threshold(&has_bits);
          _impl_.fg_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float bg_threshold = 8 [default = 0.5];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
          _Internal::set_has_bg_threshold(&has_bits);
          _impl_.bg_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float fg_fraction = 9 [default = 0.25];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 77)) {
          _Internal::set_has_fg_fraction(&has_bits);
          _impl_.fg_fraction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 context_pad = 10 [default = 0];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_context_pad(&has_bits);
          _impl_.context_pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string crop_mode = 11 [default = "warp"];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          auto str = _internal_mutable_crop_mode();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.WindowDataParameter.crop_mode");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional bool cache_images = 12 [default = false];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_cache_images(&has_bits);
          _impl_.cache_images_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string root_folder = 13 [default = ""];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          auto str = _internal_mutable_root_folder();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.WindowDataParameter.root_folder");
          #endif  // !NDEBUG
        } 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* WindowDataParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.WindowDataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string source = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.WindowDataParameter.source");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_source(), target);
  }

  // optional float scale = 2 [default = 1];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_scale(), target);
  }

  // optional string mean_file = 3;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_mean_file().data(), static_cast<int>(this->_internal_mean_file().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.WindowDataParameter.mean_file");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_mean_file(), target);
  }

  // optional uint32 batch_size = 4;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_batch_size(), target);
  }

  // optional uint32 crop_size = 5 [default = 0];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(5, this->_internal_crop_size(), target);
  }

  // optional bool mirror = 6 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_mirror(), target);
  }

  // optional float fg_threshold = 7 [default = 0.5];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(7, this->_internal_fg_threshold(), target);
  }

  // optional float bg_threshold = 8 [default = 0.5];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(8, this->_internal_bg_threshold(), target);
  }

  // optional float fg_fraction = 9 [default = 0.25];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(9, this->_internal_fg_fraction(), target);
  }

  // optional uint32 context_pad = 10 [default = 0];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(10, this->_internal_context_pad(), target);
  }

  // optional string crop_mode = 11 [default = "warp"];
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_crop_mode().data(), static_cast<int>(this->_internal_crop_mode().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.WindowDataParameter.crop_mode");
    target = stream->WriteStringMaybeAliased(
        11, this->_internal_crop_mode(), target);
  }

  // optional bool cache_images = 12 [default = false];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_cache_images(), target);
  }

  // optional string root_folder = 13 [default = ""];
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_root_folder().data(), static_cast<int>(this->_internal_root_folder().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.WindowDataParameter.root_folder");
    target = stream->WriteStringMaybeAliased(
        13, this->_internal_root_folder(), 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:opencv_caffe.WindowDataParameter)
  return target;
}

size_t WindowDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.WindowDataParameter)
  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 string source = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_source());
    }

    // optional string mean_file = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_mean_file());
    }

    // optional string crop_mode = 11 [default = "warp"];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_crop_mode());
    }

    // optional string root_folder = 13 [default = ""];
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_root_folder());
    }

    // optional uint32 batch_size = 4;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
    }

    // optional uint32 crop_size = 5 [default = 0];
    if (cached_has_bits & 0x00000020u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_size());
    }

    // optional bool mirror = 6 [default = false];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 1;
    }

    // optional bool cache_images = 12 [default = false];
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 + 1;
    }

  }
  if (cached_has_bits & 0x00001f00u) {
    // optional uint32 context_pad = 10 [default = 0];
    if (cached_has_bits & 0x00000100u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_context_pad());
    }

    // optional float scale = 2 [default = 1];
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 + 4;
    }

    // optional float fg_threshold = 7 [default = 0.5];
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 + 4;
    }

    // optional float bg_threshold = 8 [default = 0.5];
    if (cached_has_bits & 0x00000800u) {
      total_size += 1 + 4;
    }

    // optional float fg_fraction = 9 [default = 0.25];
    if (cached_has_bits & 0x00001000u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WindowDataParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    WindowDataParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WindowDataParameter::GetClassData() const { return &_class_data_; }


void WindowDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<WindowDataParameter*>(&to_msg);
  auto& from = static_cast<const WindowDataParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.WindowDataParameter)
  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_set_source(from._internal_source());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_mean_file(from._internal_mean_file());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_crop_mode(from._internal_crop_mode());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_set_root_folder(from._internal_root_folder());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.batch_size_ = from._impl_.batch_size_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.crop_size_ = from._impl_.crop_size_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.mirror_ = from._impl_.mirror_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.cache_images_ = from._impl_.cache_images_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00001f00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.context_pad_ = from._impl_.context_pad_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.scale_ = from._impl_.scale_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.fg_threshold_ = from._impl_.fg_threshold_;
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_impl_.bg_threshold_ = from._impl_.bg_threshold_;
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_impl_.fg_fraction_ = from._impl_.fg_fraction_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void WindowDataParameter::CopyFrom(const WindowDataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.WindowDataParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WindowDataParameter::IsInitialized() const {
  return true;
}

void WindowDataParameter::InternalSwap(WindowDataParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.source_, lhs_arena,
      &other->_impl_.source_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.mean_file_, lhs_arena,
      &other->_impl_.mean_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.crop_mode_, lhs_arena,
      &other->_impl_.crop_mode_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.root_folder_, lhs_arena,
      &other->_impl_.root_folder_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(WindowDataParameter, _impl_.context_pad_)
      + sizeof(WindowDataParameter::_impl_.context_pad_)
      - PROTOBUF_FIELD_OFFSET(WindowDataParameter, _impl_.batch_size_)>(
          reinterpret_cast<char*>(&_impl_.batch_size_),
          reinterpret_cast<char*>(&other->_impl_.batch_size_));
  swap(_impl_.scale_, other->_impl_.scale_);
  swap(_impl_.fg_threshold_, other->_impl_.fg_threshold_);
  swap(_impl_.bg_threshold_, other->_impl_.bg_threshold_);
  swap(_impl_.fg_fraction_, other->_impl_.fg_fraction_);
}

::PROTOBUF_NAMESPACE_ID::Metadata WindowDataParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[62]);
}

// ===================================================================

class SPPParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<SPPParameter>()._impl_._has_bits_);
  static void set_has_pyramid_height(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_pool(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_engine(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

SPPParameter::SPPParameter(::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:opencv_caffe.SPPParameter)
}
SPPParameter::SPPParameter(const SPPParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  SPPParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.pyramid_height_){}
    , decltype(_impl_.pool_){}
    , decltype(_impl_.engine_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.pyramid_height_, &from._impl_.pyramid_height_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.engine_) -
    reinterpret_cast<char*>(&_impl_.pyramid_height_)) + sizeof(_impl_.engine_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.SPPParameter)
}

inline void SPPParameter::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_.pyramid_height_){0u}
    , decltype(_impl_.pool_){0}
    , decltype(_impl_.engine_){0}
  };
}

SPPParameter::~SPPParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.SPPParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void SPPParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void SPPParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void SPPParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.SPPParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    ::memset(&_impl_.pyramid_height_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.engine_) -
        reinterpret_cast<char*>(&_impl_.pyramid_height_)) + sizeof(_impl_.engine_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SPPParameter::_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 uint32 pyramid_height = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_pyramid_height(&has_bits);
          _impl_.pyramid_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SPPParameter_PoolMethod_IsValid(val))) {
            _internal_set_pool(static_cast<::opencv_caffe::SPPParameter_PoolMethod>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SPPParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::opencv_caffe::SPPParameter_Engine>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
          }
        } 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* SPPParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SPPParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 pyramid_height = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_pyramid_height(), target);
  }

  // optional .opencv_caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      2, this->_internal_pool(), target);
  }

  // optional .opencv_caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      6, this->_internal_engine(), 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:opencv_caffe.SPPParameter)
  return target;
}

size_t SPPParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SPPParameter)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional uint32 pyramid_height = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pyramid_height());
    }

    // optional .opencv_caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_pool());
    }

    // optional .opencv_caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_engine());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SPPParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    SPPParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SPPParameter::GetClassData() const { return &_class_data_; }


void SPPParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<SPPParameter*>(&to_msg);
  auto& from = static_cast<const SPPParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.SPPParameter)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.pyramid_height_ = from._impl_.pyramid_height_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.pool_ = from._impl_.pool_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.engine_ = from._impl_.engine_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SPPParameter::CopyFrom(const SPPParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.SPPParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SPPParameter::IsInitialized() const {
  return true;
}

void SPPParameter::InternalSwap(SPPParameter* 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(SPPParameter, _impl_.engine_)
      + sizeof(SPPParameter::_impl_.engine_)
      - PROTOBUF_FIELD_OFFSET(SPPParameter, _impl_.pyramid_height_)>(
          reinterpret_cast<char*>(&_impl_.pyramid_height_),
          reinterpret_cast<char*>(&other->_impl_.pyramid_height_));
}

::PROTOBUF_NAMESPACE_ID::Metadata SPPParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[63]);
}

// ===================================================================

class V1LayerParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<V1LayerParameter>()._impl_._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_type(HasBits* has_bits) {
    (*has_bits)[1] |= 1u;
  }
  static const ::opencv_caffe::AccuracyParameter& accuracy_param(const V1LayerParameter* msg);
  static void set_has_accuracy_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static const ::opencv_caffe::ArgMaxParameter& argmax_param(const V1LayerParameter* msg);
  static void set_has_argmax_param(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static const ::opencv_caffe::ConcatParameter& concat_param(const V1LayerParameter* msg);
  static void set_has_concat_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::opencv_caffe::ContrastiveLossParameter& contrastive_loss_param(const V1LayerParameter* msg);
  static void set_has_contrastive_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 536870912u;
  }
  static const ::opencv_caffe::ConvolutionParameter& convolution_param(const V1LayerParameter* msg);
  static void set_has_convolution_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::opencv_caffe::DataParameter& data_param(const V1LayerParameter* msg);
  static void set_has_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::opencv_caffe::DropoutParameter& dropout_param(const V1LayerParameter* msg);
  static void set_has_dropout_param(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::opencv_caffe::DummyDataParameter& dummy_data_param(const V1LayerParameter* msg);
  static void set_has_dummy_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static const ::opencv_caffe::EltwiseParameter& eltwise_param(const V1LayerParameter* msg);
  static void set_has_eltwise_param(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static const ::opencv_caffe::ExpParameter& exp_param(const V1LayerParameter* msg);
  static void set_has_exp_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1073741824u;
  }
  static const ::opencv_caffe::HDF5DataParameter& hdf5_data_param(const V1LayerParameter* msg);
  static void set_has_hdf5_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::opencv_caffe::HDF5OutputParameter& hdf5_output_param(const V1LayerParameter* msg);
  static void set_has_hdf5_output_param(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::opencv_caffe::HingeLossParameter& hinge_loss_param(const V1LayerParameter* msg);
  static void set_has_hinge_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
  static const ::opencv_caffe::ImageDataParameter& image_data_param(const V1LayerParameter* msg);
  static void set_has_image_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::opencv_caffe::InfogainLossParameter& infogain_loss_param(const V1LayerParameter* msg);
  static void set_has_infogain_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::opencv_caffe::InnerProductParameter& inner_product_param(const V1LayerParameter* msg);
  static void set_has_inner_product_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static const ::opencv_caffe::LRNParameter& lrn_param(const V1LayerParameter* msg);
  static void set_has_lrn_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static const ::opencv_caffe::MemoryDataParameter& memory_data_param(const V1LayerParameter* msg);
  static void set_has_memory_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static const ::opencv_caffe::MVNParameter& mvn_param(const V1LayerParameter* msg);
  static void set_has_mvn_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16777216u;
  }
  static const ::opencv_caffe::PoolingParameter& pooling_param(const V1LayerParameter* msg);
  static void set_has_pooling_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static const ::opencv_caffe::PowerParameter& power_param(const V1LayerParameter* msg);
  static void set_has_power_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static const ::opencv_caffe::ReLUParameter& relu_param(const V1LayerParameter* msg);
  static void set_has_relu_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4194304u;
  }
  static const ::opencv_caffe::SigmoidParameter& sigmoid_param(const V1LayerParameter* msg);
  static void set_has_sigmoid_param(HasBits* has_bits) {
    (*has_bits)[0] |= 134217728u;
  }
  static const ::opencv_caffe::SoftmaxParameter& softmax_param(const V1LayerParameter* msg);
  static void set_has_softmax_param(HasBits* has_bits) {
    (*has_bits)[0] |= 268435456u;
  }
  static const ::opencv_caffe::SliceParameter& slice_param(const V1LayerParameter* msg);
  static void set_has_slice_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8388608u;
  }
  static const ::opencv_caffe::TanHParameter& tanh_param(const V1LayerParameter* msg);
  static void set_has_tanh_param(HasBits* has_bits) {
    (*has_bits)[0] |= 67108864u;
  }
  static const ::opencv_caffe::ThresholdParameter& threshold_param(const V1LayerParameter* msg);
  static void set_has_threshold_param(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static const ::opencv_caffe::WindowDataParameter& window_data_param(const V1LayerParameter* msg);
  static void set_has_window_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static const ::opencv_caffe::TransformationParameter& transform_param(const V1LayerParameter* msg);
  static void set_has_transform_param(HasBits* has_bits) {
    (*has_bits)[0] |= 33554432u;
  }
  static const ::opencv_caffe::LossParameter& loss_param(const V1LayerParameter* msg);
  static void set_has_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2147483648u;
  }
  static const ::opencv_caffe::V0LayerParameter& layer(const V1LayerParameter* msg);
  static void set_has_layer(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::opencv_caffe::AccuracyParameter&
V1LayerParameter::_Internal::accuracy_param(const V1LayerParameter* msg) {
  return *msg->_impl_.accuracy_param_;
}
const ::opencv_caffe::ArgMaxParameter&
V1LayerParameter::_Internal::argmax_param(const V1LayerParameter* msg) {
  return *msg->_impl_.argmax_param_;
}
const ::opencv_caffe::ConcatParameter&
V1LayerParameter::_Internal::concat_param(const V1LayerParameter* msg) {
  return *msg->_impl_.concat_param_;
}
const ::opencv_caffe::ContrastiveLossParameter&
V1LayerParameter::_Internal::contrastive_loss_param(const V1LayerParameter* msg) {
  return *msg->_impl_.contrastive_loss_param_;
}
const ::opencv_caffe::ConvolutionParameter&
V1LayerParameter::_Internal::convolution_param(const V1LayerParameter* msg) {
  return *msg->_impl_.convolution_param_;
}
const ::opencv_caffe::DataParameter&
V1LayerParameter::_Internal::data_param(const V1LayerParameter* msg) {
  return *msg->_impl_.data_param_;
}
const ::opencv_caffe::DropoutParameter&
V1LayerParameter::_Internal::dropout_param(const V1LayerParameter* msg) {
  return *msg->_impl_.dropout_param_;
}
const ::opencv_caffe::DummyDataParameter&
V1LayerParameter::_Internal::dummy_data_param(const V1LayerParameter* msg) {
  return *msg->_impl_.dummy_data_param_;
}
const ::opencv_caffe::EltwiseParameter&
V1LayerParameter::_Internal::eltwise_param(const V1LayerParameter* msg) {
  return *msg->_impl_.eltwise_param_;
}
const ::opencv_caffe::ExpParameter&
V1LayerParameter::_Internal::exp_param(const V1LayerParameter* msg) {
  return *msg->_impl_.exp_param_;
}
const ::opencv_caffe::HDF5DataParameter&
V1LayerParameter::_Internal::hdf5_data_param(const V1LayerParameter* msg) {
  return *msg->_impl_.hdf5_data_param_;
}
const ::opencv_caffe::HDF5OutputParameter&
V1LayerParameter::_Internal::hdf5_output_param(const V1LayerParameter* msg) {
  return *msg->_impl_.hdf5_output_param_;
}
const ::opencv_caffe::HingeLossParameter&
V1LayerParameter::_Internal::hinge_loss_param(const V1LayerParameter* msg) {
  return *msg->_impl_.hinge_loss_param_;
}
const ::opencv_caffe::ImageDataParameter&
V1LayerParameter::_Internal::image_data_param(const V1LayerParameter* msg) {
  return *msg->_impl_.image_data_param_;
}
const ::opencv_caffe::InfogainLossParameter&
V1LayerParameter::_Internal::infogain_loss_param(const V1LayerParameter* msg) {
  return *msg->_impl_.infogain_loss_param_;
}
const ::opencv_caffe::InnerProductParameter&
V1LayerParameter::_Internal::inner_product_param(const V1LayerParameter* msg) {
  return *msg->_impl_.inner_product_param_;
}
const ::opencv_caffe::LRNParameter&
V1LayerParameter::_Internal::lrn_param(const V1LayerParameter* msg) {
  return *msg->_impl_.lrn_param_;
}
const ::opencv_caffe::MemoryDataParameter&
V1LayerParameter::_Internal::memory_data_param(const V1LayerParameter* msg) {
  return *msg->_impl_.memory_data_param_;
}
const ::opencv_caffe::MVNParameter&
V1LayerParameter::_Internal::mvn_param(const V1LayerParameter* msg) {
  return *msg->_impl_.mvn_param_;
}
const ::opencv_caffe::PoolingParameter&
V1LayerParameter::_Internal::pooling_param(const V1LayerParameter* msg) {
  return *msg->_impl_.pooling_param_;
}
const ::opencv_caffe::PowerParameter&
V1LayerParameter::_Internal::power_param(const V1LayerParameter* msg) {
  return *msg->_impl_.power_param_;
}
const ::opencv_caffe::ReLUParameter&
V1LayerParameter::_Internal::relu_param(const V1LayerParameter* msg) {
  return *msg->_impl_.relu_param_;
}
const ::opencv_caffe::SigmoidParameter&
V1LayerParameter::_Internal::sigmoid_param(const V1LayerParameter* msg) {
  return *msg->_impl_.sigmoid_param_;
}
const ::opencv_caffe::SoftmaxParameter&
V1LayerParameter::_Internal::softmax_param(const V1LayerParameter* msg) {
  return *msg->_impl_.softmax_param_;
}
const ::opencv_caffe::SliceParameter&
V1LayerParameter::_Internal::slice_param(const V1LayerParameter* msg) {
  return *msg->_impl_.slice_param_;
}
const ::opencv_caffe::TanHParameter&
V1LayerParameter::_Internal::tanh_param(const V1LayerParameter* msg) {
  return *msg->_impl_.tanh_param_;
}
const ::opencv_caffe::ThresholdParameter&
V1LayerParameter::_Internal::threshold_param(const V1LayerParameter* msg) {
  return *msg->_impl_.threshold_param_;
}
const ::opencv_caffe::WindowDataParameter&
V1LayerParameter::_Internal::window_data_param(const V1LayerParameter* msg) {
  return *msg->_impl_.window_data_param_;
}
const ::opencv_caffe::TransformationParameter&
V1LayerParameter::_Internal::transform_param(const V1LayerParameter* msg) {
  return *msg->_impl_.transform_param_;
}
const ::opencv_caffe::LossParameter&
V1LayerParameter::_Internal::loss_param(const V1LayerParameter* msg) {
  return *msg->_impl_.loss_param_;
}
const ::opencv_caffe::V0LayerParameter&
V1LayerParameter::_Internal::layer(const V1LayerParameter* msg) {
  return *msg->_impl_.layer_;
}
V1LayerParameter::V1LayerParameter(::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:opencv_caffe.V1LayerParameter)
}
V1LayerParameter::V1LayerParameter(const V1LayerParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  V1LayerParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.bottom_){from._impl_.bottom_}
    , decltype(_impl_.top_){from._impl_.top_}
    , decltype(_impl_.blobs_){from._impl_.blobs_}
    , decltype(_impl_.blobs_lr_){from._impl_.blobs_lr_}
    , decltype(_impl_.weight_decay_){from._impl_.weight_decay_}
    , decltype(_impl_.include_){from._impl_.include_}
    , decltype(_impl_.exclude_){from._impl_.exclude_}
    , decltype(_impl_.loss_weight_){from._impl_.loss_weight_}
    , decltype(_impl_.param_){from._impl_.param_}
    , decltype(_impl_.blob_share_mode_){from._impl_.blob_share_mode_}
    , decltype(_impl_.name_){}
    , decltype(_impl_.layer_){nullptr}
    , decltype(_impl_.concat_param_){nullptr}
    , decltype(_impl_.convolution_param_){nullptr}
    , decltype(_impl_.data_param_){nullptr}
    , decltype(_impl_.dropout_param_){nullptr}
    , decltype(_impl_.hdf5_data_param_){nullptr}
    , decltype(_impl_.hdf5_output_param_){nullptr}
    , decltype(_impl_.image_data_param_){nullptr}
    , decltype(_impl_.infogain_loss_param_){nullptr}
    , decltype(_impl_.inner_product_param_){nullptr}
    , decltype(_impl_.lrn_param_){nullptr}
    , decltype(_impl_.pooling_param_){nullptr}
    , decltype(_impl_.window_data_param_){nullptr}
    , decltype(_impl_.power_param_){nullptr}
    , decltype(_impl_.memory_data_param_){nullptr}
    , decltype(_impl_.argmax_param_){nullptr}
    , decltype(_impl_.eltwise_param_){nullptr}
    , decltype(_impl_.threshold_param_){nullptr}
    , decltype(_impl_.dummy_data_param_){nullptr}
    , decltype(_impl_.accuracy_param_){nullptr}
    , decltype(_impl_.hinge_loss_param_){nullptr}
    , decltype(_impl_.relu_param_){nullptr}
    , decltype(_impl_.slice_param_){nullptr}
    , decltype(_impl_.mvn_param_){nullptr}
    , decltype(_impl_.transform_param_){nullptr}
    , decltype(_impl_.tanh_param_){nullptr}
    , decltype(_impl_.sigmoid_param_){nullptr}
    , decltype(_impl_.softmax_param_){nullptr}
    , decltype(_impl_.contrastive_loss_param_){nullptr}
    , decltype(_impl_.exp_param_){nullptr}
    , decltype(_impl_.loss_param_){nullptr}
    , decltype(_impl_.type_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_layer()) {
    _this->_impl_.layer_ = new ::opencv_caffe::V0LayerParameter(*from._impl_.layer_);
  }
  if (from._internal_has_concat_param()) {
    _this->_impl_.concat_param_ = new ::opencv_caffe::ConcatParameter(*from._impl_.concat_param_);
  }
  if (from._internal_has_convolution_param()) {
    _this->_impl_.convolution_param_ = new ::opencv_caffe::ConvolutionParameter(*from._impl_.convolution_param_);
  }
  if (from._internal_has_data_param()) {
    _this->_impl_.data_param_ = new ::opencv_caffe::DataParameter(*from._impl_.data_param_);
  }
  if (from._internal_has_dropout_param()) {
    _this->_impl_.dropout_param_ = new ::opencv_caffe::DropoutParameter(*from._impl_.dropout_param_);
  }
  if (from._internal_has_hdf5_data_param()) {
    _this->_impl_.hdf5_data_param_ = new ::opencv_caffe::HDF5DataParameter(*from._impl_.hdf5_data_param_);
  }
  if (from._internal_has_hdf5_output_param()) {
    _this->_impl_.hdf5_output_param_ = new ::opencv_caffe::HDF5OutputParameter(*from._impl_.hdf5_output_param_);
  }
  if (from._internal_has_image_data_param()) {
    _this->_impl_.image_data_param_ = new ::opencv_caffe::ImageDataParameter(*from._impl_.image_data_param_);
  }
  if (from._internal_has_infogain_loss_param()) {
    _this->_impl_.infogain_loss_param_ = new ::opencv_caffe::InfogainLossParameter(*from._impl_.infogain_loss_param_);
  }
  if (from._internal_has_inner_product_param()) {
    _this->_impl_.inner_product_param_ = new ::opencv_caffe::InnerProductParameter(*from._impl_.inner_product_param_);
  }
  if (from._internal_has_lrn_param()) {
    _this->_impl_.lrn_param_ = new ::opencv_caffe::LRNParameter(*from._impl_.lrn_param_);
  }
  if (from._internal_has_pooling_param()) {
    _this->_impl_.pooling_param_ = new ::opencv_caffe::PoolingParameter(*from._impl_.pooling_param_);
  }
  if (from._internal_has_window_data_param()) {
    _this->_impl_.window_data_param_ = new ::opencv_caffe::WindowDataParameter(*from._impl_.window_data_param_);
  }
  if (from._internal_has_power_param()) {
    _this->_impl_.power_param_ = new ::opencv_caffe::PowerParameter(*from._impl_.power_param_);
  }
  if (from._internal_has_memory_data_param()) {
    _this->_impl_.memory_data_param_ = new ::opencv_caffe::MemoryDataParameter(*from._impl_.memory_data_param_);
  }
  if (from._internal_has_argmax_param()) {
    _this->_impl_.argmax_param_ = new ::opencv_caffe::ArgMaxParameter(*from._impl_.argmax_param_);
  }
  if (from._internal_has_eltwise_param()) {
    _this->_impl_.eltwise_param_ = new ::opencv_caffe::EltwiseParameter(*from._impl_.eltwise_param_);
  }
  if (from._internal_has_threshold_param()) {
    _this->_impl_.threshold_param_ = new ::opencv_caffe::ThresholdParameter(*from._impl_.threshold_param_);
  }
  if (from._internal_has_dummy_data_param()) {
    _this->_impl_.dummy_data_param_ = new ::opencv_caffe::DummyDataParameter(*from._impl_.dummy_data_param_);
  }
  if (from._internal_has_accuracy_param()) {
    _this->_impl_.accuracy_param_ = new ::opencv_caffe::AccuracyParameter(*from._impl_.accuracy_param_);
  }
  if (from._internal_has_hinge_loss_param()) {
    _this->_impl_.hinge_loss_param_ = new ::opencv_caffe::HingeLossParameter(*from._impl_.hinge_loss_param_);
  }
  if (from._internal_has_relu_param()) {
    _this->_impl_.relu_param_ = new ::opencv_caffe::ReLUParameter(*from._impl_.relu_param_);
  }
  if (from._internal_has_slice_param()) {
    _this->_impl_.slice_param_ = new ::opencv_caffe::SliceParameter(*from._impl_.slice_param_);
  }
  if (from._internal_has_mvn_param()) {
    _this->_impl_.mvn_param_ = new ::opencv_caffe::MVNParameter(*from._impl_.mvn_param_);
  }
  if (from._internal_has_transform_param()) {
    _this->_impl_.transform_param_ = new ::opencv_caffe::TransformationParameter(*from._impl_.transform_param_);
  }
  if (from._internal_has_tanh_param()) {
    _this->_impl_.tanh_param_ = new ::opencv_caffe::TanHParameter(*from._impl_.tanh_param_);
  }
  if (from._internal_has_sigmoid_param()) {
    _this->_impl_.sigmoid_param_ = new ::opencv_caffe::SigmoidParameter(*from._impl_.sigmoid_param_);
  }
  if (from._internal_has_softmax_param()) {
    _this->_impl_.softmax_param_ = new ::opencv_caffe::SoftmaxParameter(*from._impl_.softmax_param_);
  }
  if (from._internal_has_contrastive_loss_param()) {
    _this->_impl_.contrastive_loss_param_ = new ::opencv_caffe::ContrastiveLossParameter(*from._impl_.contrastive_loss_param_);
  }
  if (from._internal_has_exp_param()) {
    _this->_impl_.exp_param_ = new ::opencv_caffe::ExpParameter(*from._impl_.exp_param_);
  }
  if (from._internal_has_loss_param()) {
    _this->_impl_.loss_param_ = new ::opencv_caffe::LossParameter(*from._impl_.loss_param_);
  }
  _this->_impl_.type_ = from._impl_.type_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.V1LayerParameter)
}

inline void V1LayerParameter::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_.bottom_){arena}
    , decltype(_impl_.top_){arena}
    , decltype(_impl_.blobs_){arena}
    , decltype(_impl_.blobs_lr_){arena}
    , decltype(_impl_.weight_decay_){arena}
    , decltype(_impl_.include_){arena}
    , decltype(_impl_.exclude_){arena}
    , decltype(_impl_.loss_weight_){arena}
    , decltype(_impl_.param_){arena}
    , decltype(_impl_.blob_share_mode_){arena}
    , decltype(_impl_.name_){}
    , decltype(_impl_.layer_){nullptr}
    , decltype(_impl_.concat_param_){nullptr}
    , decltype(_impl_.convolution_param_){nullptr}
    , decltype(_impl_.data_param_){nullptr}
    , decltype(_impl_.dropout_param_){nullptr}
    , decltype(_impl_.hdf5_data_param_){nullptr}
    , decltype(_impl_.hdf5_output_param_){nullptr}
    , decltype(_impl_.image_data_param_){nullptr}
    , decltype(_impl_.infogain_loss_param_){nullptr}
    , decltype(_impl_.inner_product_param_){nullptr}
    , decltype(_impl_.lrn_param_){nullptr}
    , decltype(_impl_.pooling_param_){nullptr}
    , decltype(_impl_.window_data_param_){nullptr}
    , decltype(_impl_.power_param_){nullptr}
    , decltype(_impl_.memory_data_param_){nullptr}
    , decltype(_impl_.argmax_param_){nullptr}
    , decltype(_impl_.eltwise_param_){nullptr}
    , decltype(_impl_.threshold_param_){nullptr}
    , decltype(_impl_.dummy_data_param_){nullptr}
    , decltype(_impl_.accuracy_param_){nullptr}
    , decltype(_impl_.hinge_loss_param_){nullptr}
    , decltype(_impl_.relu_param_){nullptr}
    , decltype(_impl_.slice_param_){nullptr}
    , decltype(_impl_.mvn_param_){nullptr}
    , decltype(_impl_.transform_param_){nullptr}
    , decltype(_impl_.tanh_param_){nullptr}
    , decltype(_impl_.sigmoid_param_){nullptr}
    , decltype(_impl_.softmax_param_){nullptr}
    , decltype(_impl_.contrastive_loss_param_){nullptr}
    , decltype(_impl_.exp_param_){nullptr}
    , decltype(_impl_.loss_param_){nullptr}
    , decltype(_impl_.type_){0}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

V1LayerParameter::~V1LayerParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.V1LayerParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void V1LayerParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.bottom_.~RepeatedPtrField();
  _impl_.top_.~RepeatedPtrField();
  _impl_.blobs_.~RepeatedPtrField();
  _impl_.blobs_lr_.~RepeatedField();
  _impl_.weight_decay_.~RepeatedField();
  _impl_.include_.~RepeatedPtrField();
  _impl_.exclude_.~RepeatedPtrField();
  _impl_.loss_weight_.~RepeatedField();
  _impl_.param_.~RepeatedPtrField();
  _impl_.blob_share_mode_.~RepeatedField();
  _impl_.name_.Destroy();
  if (this != internal_default_instance()) delete _impl_.layer_;
  if (this != internal_default_instance()) delete _impl_.concat_param_;
  if (this != internal_default_instance()) delete _impl_.convolution_param_;
  if (this != internal_default_instance()) delete _impl_.data_param_;
  if (this != internal_default_instance()) delete _impl_.dropout_param_;
  if (this != internal_default_instance()) delete _impl_.hdf5_data_param_;
  if (this != internal_default_instance()) delete _impl_.hdf5_output_param_;
  if (this != internal_default_instance()) delete _impl_.image_data_param_;
  if (this != internal_default_instance()) delete _impl_.infogain_loss_param_;
  if (this != internal_default_instance()) delete _impl_.inner_product_param_;
  if (this != internal_default_instance()) delete _impl_.lrn_param_;
  if (this != internal_default_instance()) delete _impl_.pooling_param_;
  if (this != internal_default_instance()) delete _impl_.window_data_param_;
  if (this != internal_default_instance()) delete _impl_.power_param_;
  if (this != internal_default_instance()) delete _impl_.memory_data_param_;
  if (this != internal_default_instance()) delete _impl_.argmax_param_;
  if (this != internal_default_instance()) delete _impl_.eltwise_param_;
  if (this != internal_default_instance()) delete _impl_.threshold_param_;
  if (this != internal_default_instance()) delete _impl_.dummy_data_param_;
  if (this != internal_default_instance()) delete _impl_.accuracy_param_;
  if (this != internal_default_instance()) delete _impl_.hinge_loss_param_;
  if (this != internal_default_instance()) delete _impl_.relu_param_;
  if (this != internal_default_instance()) delete _impl_.slice_param_;
  if (this != internal_default_instance()) delete _impl_.mvn_param_;
  if (this != internal_default_instance()) delete _impl_.transform_param_;
  if (this != internal_default_instance()) delete _impl_.tanh_param_;
  if (this != internal_default_instance()) delete _impl_.sigmoid_param_;
  if (this != internal_default_instance()) delete _impl_.softmax_param_;
  if (this != internal_default_instance()) delete _impl_.contrastive_loss_param_;
  if (this != internal_default_instance()) delete _impl_.exp_param_;
  if (this != internal_default_instance()) delete _impl_.loss_param_;
}

void V1LayerParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void V1LayerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.V1LayerParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.bottom_.Clear();
  _impl_.top_.Clear();
  _impl_.blobs_.Clear();
  _impl_.blobs_lr_.Clear();
  _impl_.weight_decay_.Clear();
  _impl_.include_.Clear();
  _impl_.exclude_.Clear();
  _impl_.loss_weight_.Clear();
  _impl_.param_.Clear();
  _impl_.blob_share_mode_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(_impl_.layer_ != nullptr);
      _impl_.layer_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(_impl_.concat_param_ != nullptr);
      _impl_.concat_param_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(_impl_.convolution_param_ != nullptr);
      _impl_.convolution_param_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      GOOGLE_DCHECK(_impl_.data_param_ != nullptr);
      _impl_.data_param_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      GOOGLE_DCHECK(_impl_.dropout_param_ != nullptr);
      _impl_.dropout_param_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      GOOGLE_DCHECK(_impl_.hdf5_data_param_ != nullptr);
      _impl_.hdf5_data_param_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      GOOGLE_DCHECK(_impl_.hdf5_output_param_ != nullptr);
      _impl_.hdf5_output_param_->Clear();
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      GOOGLE_DCHECK(_impl_.image_data_param_ != nullptr);
      _impl_.image_data_param_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      GOOGLE_DCHECK(_impl_.infogain_loss_param_ != nullptr);
      _impl_.infogain_loss_param_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      GOOGLE_DCHECK(_impl_.inner_product_param_ != nullptr);
      _impl_.inner_product_param_->Clear();
    }
    if (cached_has_bits & 0x00000800u) {
      GOOGLE_DCHECK(_impl_.lrn_param_ != nullptr);
      _impl_.lrn_param_->Clear();
    }
    if (cached_has_bits & 0x00001000u) {
      GOOGLE_DCHECK(_impl_.pooling_param_ != nullptr);
      _impl_.pooling_param_->Clear();
    }
    if (cached_has_bits & 0x00002000u) {
      GOOGLE_DCHECK(_impl_.window_data_param_ != nullptr);
      _impl_.window_data_param_->Clear();
    }
    if (cached_has_bits & 0x00004000u) {
      GOOGLE_DCHECK(_impl_.power_param_ != nullptr);
      _impl_.power_param_->Clear();
    }
    if (cached_has_bits & 0x00008000u) {
      GOOGLE_DCHECK(_impl_.memory_data_param_ != nullptr);
      _impl_.memory_data_param_->Clear();
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      GOOGLE_DCHECK(_impl_.argmax_param_ != nullptr);
      _impl_.argmax_param_->Clear();
    }
    if (cached_has_bits & 0x00020000u) {
      GOOGLE_DCHECK(_impl_.eltwise_param_ != nullptr);
      _impl_.eltwise_param_->Clear();
    }
    if (cached_has_bits & 0x00040000u) {
      GOOGLE_DCHECK(_impl_.threshold_param_ != nullptr);
      _impl_.threshold_param_->Clear();
    }
    if (cached_has_bits & 0x00080000u) {
      GOOGLE_DCHECK(_impl_.dummy_data_param_ != nullptr);
      _impl_.dummy_data_param_->Clear();
    }
    if (cached_has_bits & 0x00100000u) {
      GOOGLE_DCHECK(_impl_.accuracy_param_ != nullptr);
      _impl_.accuracy_param_->Clear();
    }
    if (cached_has_bits & 0x00200000u) {
      GOOGLE_DCHECK(_impl_.hinge_loss_param_ != nullptr);
      _impl_.hinge_loss_param_->Clear();
    }
    if (cached_has_bits & 0x00400000u) {
      GOOGLE_DCHECK(_impl_.relu_param_ != nullptr);
      _impl_.relu_param_->Clear();
    }
    if (cached_has_bits & 0x00800000u) {
      GOOGLE_DCHECK(_impl_.slice_param_ != nullptr);
      _impl_.slice_param_->Clear();
    }
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      GOOGLE_DCHECK(_impl_.mvn_param_ != nullptr);
      _impl_.mvn_param_->Clear();
    }
    if (cached_has_bits & 0x02000000u) {
      GOOGLE_DCHECK(_impl_.transform_param_ != nullptr);
      _impl_.transform_param_->Clear();
    }
    if (cached_has_bits & 0x04000000u) {
      GOOGLE_DCHECK(_impl_.tanh_param_ != nullptr);
      _impl_.tanh_param_->Clear();
    }
    if (cached_has_bits & 0x08000000u) {
      GOOGLE_DCHECK(_impl_.sigmoid_param_ != nullptr);
      _impl_.sigmoid_param_->Clear();
    }
    if (cached_has_bits & 0x10000000u) {
      GOOGLE_DCHECK(_impl_.softmax_param_ != nullptr);
      _impl_.softmax_param_->Clear();
    }
    if (cached_has_bits & 0x20000000u) {
      GOOGLE_DCHECK(_impl_.contrastive_loss_param_ != nullptr);
      _impl_.contrastive_loss_param_->Clear();
    }
    if (cached_has_bits & 0x40000000u) {
      GOOGLE_DCHECK(_impl_.exp_param_ != nullptr);
      _impl_.exp_param_->Clear();
    }
    if (cached_has_bits & 0x80000000u) {
      GOOGLE_DCHECK(_impl_.loss_param_ != nullptr);
      _impl_.loss_param_->Clear();
    }
  }
  _impl_.type_ = 0;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* V1LayerParameter::_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) {
      // optional .opencv_caffe.V0LayerParameter layer = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_layer(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated string bottom = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_bottom();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_caffe.V1LayerParameter.bottom");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated string top = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            auto str = _internal_add_top();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_caffe.V1LayerParameter.top");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional string name = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.V1LayerParameter.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.V1LayerParameter.LayerType type = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::V1LayerParameter_LayerType_IsValid(val))) {
            _internal_set_type(static_cast<::opencv_caffe::V1LayerParameter_LayerType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.BlobProto blobs = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_blobs(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated float blobs_lr = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_blobs_lr(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<61>(ptr));
        } else if (static_cast<uint8_t>(tag) == 58) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_blobs_lr(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float weight_decay = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_weight_decay(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<69>(ptr));
        } else if (static_cast<uint8_t>(tag) == 66) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_weight_decay(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ConcatParameter concat_param = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_concat_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ConvolutionParameter convolution_param = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_convolution_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.DataParameter data_param = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.DropoutParameter dropout_param = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_dropout_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_hdf5_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
          ptr = ctx->ParseMessage(_internal_mutable_hdf5_output_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ImageDataParameter image_data_param = 15;
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_image_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
          ptr = ctx->ParseMessage(_internal_mutable_infogain_loss_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.InnerProductParameter inner_product_param = 17;
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_inner_product_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.LRNParameter lrn_param = 18;
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
          ptr = ctx->ParseMessage(_internal_mutable_lrn_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PoolingParameter pooling_param = 19;
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 154)) {
          ptr = ctx->ParseMessage(_internal_mutable_pooling_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.WindowDataParameter window_data_param = 20;
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
          ptr = ctx->ParseMessage(_internal_mutable_window_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.PowerParameter power_param = 21;
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
          ptr = ctx->ParseMessage(_internal_mutable_power_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.MemoryDataParameter memory_data_param = 22;
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 178)) {
          ptr = ctx->ParseMessage(_internal_mutable_memory_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ArgMaxParameter argmax_param = 23;
      case 23:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 186)) {
          ptr = ctx->ParseMessage(_internal_mutable_argmax_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.EltwiseParameter eltwise_param = 24;
      case 24:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 194)) {
          ptr = ctx->ParseMessage(_internal_mutable_eltwise_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ThresholdParameter threshold_param = 25;
      case 25:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 202)) {
          ptr = ctx->ParseMessage(_internal_mutable_threshold_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.DummyDataParameter dummy_data_param = 26;
      case 26:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 210)) {
          ptr = ctx->ParseMessage(_internal_mutable_dummy_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.AccuracyParameter accuracy_param = 27;
      case 27:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 218)) {
          ptr = ctx->ParseMessage(_internal_mutable_accuracy_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.HingeLossParameter hinge_loss_param = 29;
      case 29:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 234)) {
          ptr = ctx->ParseMessage(_internal_mutable_hinge_loss_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ReLUParameter relu_param = 30;
      case 30:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 242)) {
          ptr = ctx->ParseMessage(_internal_mutable_relu_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SliceParameter slice_param = 31;
      case 31:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 250)) {
          ptr = ctx->ParseMessage(_internal_mutable_slice_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.NetStateRule include = 32;
      case 32:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 2)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_include(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<258>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.NetStateRule exclude = 33;
      case 33:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_exclude(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<266>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.MVNParameter mvn_param = 34;
      case 34:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_mvn_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float loss_weight = 35;
      case 35:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          ptr -= 2;
          do {
            ptr += 2;
            _internal_add_loss_weight(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<285>(ptr));
        } else if (static_cast<uint8_t>(tag) == 26) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_loss_weight(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.TransformationParameter transform_param = 36;
      case 36:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_transform_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.TanHParameter tanh_param = 37;
      case 37:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_tanh_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SigmoidParameter sigmoid_param = 38;
      case 38:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_sigmoid_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.SoftmaxParameter softmax_param = 39;
      case 39:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_softmax_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 40;
      case 40:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_contrastive_loss_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.ExpParameter exp_param = 41;
      case 41:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_exp_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.LossParameter loss_param = 42;
      case 42:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_loss_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated string param = 1001;
      case 1001:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr -= 2;
          do {
            ptr += 2;
            auto str = _internal_add_param();
            ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
            CHK_(ptr);
            #ifndef NDEBUG
            ::_pbi::VerifyUTF8(str, "opencv_caffe.V1LayerParameter.param");
            #endif  // !NDEBUG
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8010>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
      case 1002:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          ptr -= 2;
          do {
            ptr += 2;
            uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
            CHK_(ptr);
            if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::V1LayerParameter_DimCheckMode_IsValid(val))) {
              _internal_add_blob_share_mode(static_cast<::opencv_caffe::V1LayerParameter_DimCheckMode>(val));
            } else {
              ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1002, val, mutable_unknown_fields());
            }
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8016>(ptr));
        } else if (static_cast<uint8_t>(tag) == 82) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(_internal_mutable_blob_share_mode(), ptr, ctx, ::opencv_caffe::V1LayerParameter_DimCheckMode_IsValid, &_internal_metadata_, 1002);
          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* V1LayerParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.V1LayerParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.V0LayerParameter layer = 1;
  if (cached_has_bits & 0x00000002u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::layer(this),
        _Internal::layer(this).GetCachedSize(), target, stream);
  }

  // repeated string bottom = 2;
  for (int i = 0, n = this->_internal_bottom_size(); i < n; i++) {
    const auto& s = this->_internal_bottom(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.V1LayerParameter.bottom");
    target = stream->WriteString(2, s, target);
  }

  // repeated string top = 3;
  for (int i = 0, n = this->_internal_top_size(); i < n; i++) {
    const auto& s = this->_internal_top(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.V1LayerParameter.top");
    target = stream->WriteString(3, s, target);
  }

  // optional string name = 4;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.V1LayerParameter.name");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_name(), target);
  }

  cached_has_bits = _impl_._has_bits_[1];
  // optional .opencv_caffe.V1LayerParameter.LayerType type = 5;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      5, this->_internal_type(), target);
  }

  // repeated .opencv_caffe.BlobProto blobs = 6;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_blobs_size()); i < n; i++) {
    const auto& repfield = this->_internal_blobs(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated float blobs_lr = 7;
  for (int i = 0, n = this->_internal_blobs_lr_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(7, this->_internal_blobs_lr(i), target);
  }

  // repeated float weight_decay = 8;
  for (int i = 0, n = this->_internal_weight_decay_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(8, this->_internal_weight_decay(i), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.ConcatParameter concat_param = 9;
  if (cached_has_bits & 0x00000004u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, _Internal::concat_param(this),
        _Internal::concat_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ConvolutionParameter convolution_param = 10;
  if (cached_has_bits & 0x00000008u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(10, _Internal::convolution_param(this),
        _Internal::convolution_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.DataParameter data_param = 11;
  if (cached_has_bits & 0x00000010u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(11, _Internal::data_param(this),
        _Internal::data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.DropoutParameter dropout_param = 12;
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(12, _Internal::dropout_param(this),
        _Internal::dropout_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 13;
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(13, _Internal::hdf5_data_param(this),
        _Internal::hdf5_data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 14;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(14, _Internal::hdf5_output_param(this),
        _Internal::hdf5_output_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ImageDataParameter image_data_param = 15;
  if (cached_has_bits & 0x00000100u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(15, _Internal::image_data_param(this),
        _Internal::image_data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 16;
  if (cached_has_bits & 0x00000200u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(16, _Internal::infogain_loss_param(this),
        _Internal::infogain_loss_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.InnerProductParameter inner_product_param = 17;
  if (cached_has_bits & 0x00000400u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(17, _Internal::inner_product_param(this),
        _Internal::inner_product_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.LRNParameter lrn_param = 18;
  if (cached_has_bits & 0x00000800u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(18, _Internal::lrn_param(this),
        _Internal::lrn_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.PoolingParameter pooling_param = 19;
  if (cached_has_bits & 0x00001000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(19, _Internal::pooling_param(this),
        _Internal::pooling_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.WindowDataParameter window_data_param = 20;
  if (cached_has_bits & 0x00002000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(20, _Internal::window_data_param(this),
        _Internal::window_data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.PowerParameter power_param = 21;
  if (cached_has_bits & 0x00004000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(21, _Internal::power_param(this),
        _Internal::power_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.MemoryDataParameter memory_data_param = 22;
  if (cached_has_bits & 0x00008000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(22, _Internal::memory_data_param(this),
        _Internal::memory_data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ArgMaxParameter argmax_param = 23;
  if (cached_has_bits & 0x00010000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(23, _Internal::argmax_param(this),
        _Internal::argmax_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.EltwiseParameter eltwise_param = 24;
  if (cached_has_bits & 0x00020000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(24, _Internal::eltwise_param(this),
        _Internal::eltwise_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ThresholdParameter threshold_param = 25;
  if (cached_has_bits & 0x00040000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(25, _Internal::threshold_param(this),
        _Internal::threshold_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.DummyDataParameter dummy_data_param = 26;
  if (cached_has_bits & 0x00080000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(26, _Internal::dummy_data_param(this),
        _Internal::dummy_data_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.AccuracyParameter accuracy_param = 27;
  if (cached_has_bits & 0x00100000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(27, _Internal::accuracy_param(this),
        _Internal::accuracy_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.HingeLossParameter hinge_loss_param = 29;
  if (cached_has_bits & 0x00200000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(29, _Internal::hinge_loss_param(this),
        _Internal::hinge_loss_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ReLUParameter relu_param = 30;
  if (cached_has_bits & 0x00400000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(30, _Internal::relu_param(this),
        _Internal::relu_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.SliceParameter slice_param = 31;
  if (cached_has_bits & 0x00800000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(31, _Internal::slice_param(this),
        _Internal::slice_param(this).GetCachedSize(), target, stream);
  }

  // repeated .opencv_caffe.NetStateRule include = 32;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_include_size()); i < n; i++) {
    const auto& repfield = this->_internal_include(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(32, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated .opencv_caffe.NetStateRule exclude = 33;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_exclude_size()); i < n; i++) {
    const auto& repfield = this->_internal_exclude(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(33, repfield, repfield.GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.MVNParameter mvn_param = 34;
  if (cached_has_bits & 0x01000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(34, _Internal::mvn_param(this),
        _Internal::mvn_param(this).GetCachedSize(), target, stream);
  }

  // repeated float loss_weight = 35;
  for (int i = 0, n = this->_internal_loss_weight_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(35, this->_internal_loss_weight(i), target);
  }

  // optional .opencv_caffe.TransformationParameter transform_param = 36;
  if (cached_has_bits & 0x02000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(36, _Internal::transform_param(this),
        _Internal::transform_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.TanHParameter tanh_param = 37;
  if (cached_has_bits & 0x04000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(37, _Internal::tanh_param(this),
        _Internal::tanh_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.SigmoidParameter sigmoid_param = 38;
  if (cached_has_bits & 0x08000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(38, _Internal::sigmoid_param(this),
        _Internal::sigmoid_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.SoftmaxParameter softmax_param = 39;
  if (cached_has_bits & 0x10000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(39, _Internal::softmax_param(this),
        _Internal::softmax_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 40;
  if (cached_has_bits & 0x20000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(40, _Internal::contrastive_loss_param(this),
        _Internal::contrastive_loss_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.ExpParameter exp_param = 41;
  if (cached_has_bits & 0x40000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(41, _Internal::exp_param(this),
        _Internal::exp_param(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.LossParameter loss_param = 42;
  if (cached_has_bits & 0x80000000u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(42, _Internal::loss_param(this),
        _Internal::loss_param(this).GetCachedSize(), target, stream);
  }

  // repeated string param = 1001;
  for (int i = 0, n = this->_internal_param_size(); i < n; i++) {
    const auto& s = this->_internal_param(i);
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      s.data(), static_cast<int>(s.length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.V1LayerParameter.param");
    target = stream->WriteString(1001, s, target);
  }

  // repeated .opencv_caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
  for (int i = 0, n = this->_internal_blob_share_mode_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
        1002, this->_internal_blob_share_mode(i), 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:opencv_caffe.V1LayerParameter)
  return target;
}

size_t V1LayerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.V1LayerParameter)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated string bottom = 2;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.bottom_.size());
  for (int i = 0, n = _impl_.bottom_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      _impl_.bottom_.Get(i));
  }

  // repeated string top = 3;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.top_.size());
  for (int i = 0, n = _impl_.top_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      _impl_.top_.Get(i));
  }

  // repeated .opencv_caffe.BlobProto blobs = 6;
  total_size += 1UL * this->_internal_blobs_size();
  for (const auto& msg : this->_impl_.blobs_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated float blobs_lr = 7;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_blobs_lr_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_blobs_lr_size());
    total_size += data_size;
  }

  // repeated float weight_decay = 8;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_weight_decay_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_weight_decay_size());
    total_size += data_size;
  }

  // repeated .opencv_caffe.NetStateRule include = 32;
  total_size += 2UL * this->_internal_include_size();
  for (const auto& msg : this->_impl_.include_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .opencv_caffe.NetStateRule exclude = 33;
  total_size += 2UL * this->_internal_exclude_size();
  for (const auto& msg : this->_impl_.exclude_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated float loss_weight = 35;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_loss_weight_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::_pbi::FromIntSize(this->_internal_loss_weight_size());
    total_size += data_size;
  }

  // repeated string param = 1001;
  total_size += 2 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.param_.size());
  for (int i = 0, n = _impl_.param_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      _impl_.param_.Get(i));
  }

  // repeated .opencv_caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
  {
    size_t data_size = 0;
    unsigned int count = static_cast<unsigned int>(this->_internal_blob_share_mode_size());for (unsigned int i = 0; i < count; i++) {
      data_size += ::_pbi::WireFormatLite::EnumSize(
        this->_internal_blob_share_mode(static_cast<int>(i)));
    }
    total_size += (2UL * count) + data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional string name = 4;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional .opencv_caffe.V0LayerParameter layer = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.layer_);
    }

    // optional .opencv_caffe.ConcatParameter concat_param = 9;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.concat_param_);
    }

    // optional .opencv_caffe.ConvolutionParameter convolution_param = 10;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.convolution_param_);
    }

    // optional .opencv_caffe.DataParameter data_param = 11;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.data_param_);
    }

    // optional .opencv_caffe.DropoutParameter dropout_param = 12;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.dropout_param_);
    }

    // optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 13;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.hdf5_data_param_);
    }

    // optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 14;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.hdf5_output_param_);
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // optional .opencv_caffe.ImageDataParameter image_data_param = 15;
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.image_data_param_);
    }

    // optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 16;
    if (cached_has_bits & 0x00000200u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.infogain_loss_param_);
    }

    // optional .opencv_caffe.InnerProductParameter inner_product_param = 17;
    if (cached_has_bits & 0x00000400u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.inner_product_param_);
    }

    // optional .opencv_caffe.LRNParameter lrn_param = 18;
    if (cached_has_bits & 0x00000800u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.lrn_param_);
    }

    // optional .opencv_caffe.PoolingParameter pooling_param = 19;
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.pooling_param_);
    }

    // optional .opencv_caffe.WindowDataParameter window_data_param = 20;
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.window_data_param_);
    }

    // optional .opencv_caffe.PowerParameter power_param = 21;
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.power_param_);
    }

    // optional .opencv_caffe.MemoryDataParameter memory_data_param = 22;
    if (cached_has_bits & 0x00008000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.memory_data_param_);
    }

  }
  if (cached_has_bits & 0x00ff0000u) {
    // optional .opencv_caffe.ArgMaxParameter argmax_param = 23;
    if (cached_has_bits & 0x00010000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.argmax_param_);
    }

    // optional .opencv_caffe.EltwiseParameter eltwise_param = 24;
    if (cached_has_bits & 0x00020000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.eltwise_param_);
    }

    // optional .opencv_caffe.ThresholdParameter threshold_param = 25;
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.threshold_param_);
    }

    // optional .opencv_caffe.DummyDataParameter dummy_data_param = 26;
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.dummy_data_param_);
    }

    // optional .opencv_caffe.AccuracyParameter accuracy_param = 27;
    if (cached_has_bits & 0x00100000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.accuracy_param_);
    }

    // optional .opencv_caffe.HingeLossParameter hinge_loss_param = 29;
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.hinge_loss_param_);
    }

    // optional .opencv_caffe.ReLUParameter relu_param = 30;
    if (cached_has_bits & 0x00400000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.relu_param_);
    }

    // optional .opencv_caffe.SliceParameter slice_param = 31;
    if (cached_has_bits & 0x00800000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.slice_param_);
    }

  }
  if (cached_has_bits & 0xff000000u) {
    // optional .opencv_caffe.MVNParameter mvn_param = 34;
    if (cached_has_bits & 0x01000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.mvn_param_);
    }

    // optional .opencv_caffe.TransformationParameter transform_param = 36;
    if (cached_has_bits & 0x02000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.transform_param_);
    }

    // optional .opencv_caffe.TanHParameter tanh_param = 37;
    if (cached_has_bits & 0x04000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.tanh_param_);
    }

    // optional .opencv_caffe.SigmoidParameter sigmoid_param = 38;
    if (cached_has_bits & 0x08000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.sigmoid_param_);
    }

    // optional .opencv_caffe.SoftmaxParameter softmax_param = 39;
    if (cached_has_bits & 0x10000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.softmax_param_);
    }

    // optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 40;
    if (cached_has_bits & 0x20000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.contrastive_loss_param_);
    }

    // optional .opencv_caffe.ExpParameter exp_param = 41;
    if (cached_has_bits & 0x40000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.exp_param_);
    }

    // optional .opencv_caffe.LossParameter loss_param = 42;
    if (cached_has_bits & 0x80000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.loss_param_);
    }

  }
  // optional .opencv_caffe.V1LayerParameter.LayerType type = 5;
  cached_has_bits = _impl_._has_bits_[1];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData V1LayerParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    V1LayerParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*V1LayerParameter::GetClassData() const { return &_class_data_; }


void V1LayerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<V1LayerParameter*>(&to_msg);
  auto& from = static_cast<const V1LayerParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.V1LayerParameter)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.bottom_.MergeFrom(from._impl_.bottom_);
  _this->_impl_.top_.MergeFrom(from._impl_.top_);
  _this->_impl_.blobs_.MergeFrom(from._impl_.blobs_);
  _this->_impl_.blobs_lr_.MergeFrom(from._impl_.blobs_lr_);
  _this->_impl_.weight_decay_.MergeFrom(from._impl_.weight_decay_);
  _this->_impl_.include_.MergeFrom(from._impl_.include_);
  _this->_impl_.exclude_.MergeFrom(from._impl_.exclude_);
  _this->_impl_.loss_weight_.MergeFrom(from._impl_.loss_weight_);
  _this->_impl_.param_.MergeFrom(from._impl_.param_);
  _this->_impl_.blob_share_mode_.MergeFrom(from._impl_.blob_share_mode_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_mutable_layer()->::opencv_caffe::V0LayerParameter::MergeFrom(
          from._internal_layer());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_mutable_concat_param()->::opencv_caffe::ConcatParameter::MergeFrom(
          from._internal_concat_param());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_mutable_convolution_param()->::opencv_caffe::ConvolutionParameter::MergeFrom(
          from._internal_convolution_param());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_mutable_data_param()->::opencv_caffe::DataParameter::MergeFrom(
          from._internal_data_param());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_dropout_param()->::opencv_caffe::DropoutParameter::MergeFrom(
          from._internal_dropout_param());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_hdf5_data_param()->::opencv_caffe::HDF5DataParameter::MergeFrom(
          from._internal_hdf5_data_param());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_hdf5_output_param()->::opencv_caffe::HDF5OutputParameter::MergeFrom(
          from._internal_hdf5_output_param());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_internal_mutable_image_data_param()->::opencv_caffe::ImageDataParameter::MergeFrom(
          from._internal_image_data_param());
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_internal_mutable_infogain_loss_param()->::opencv_caffe::InfogainLossParameter::MergeFrom(
          from._internal_infogain_loss_param());
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_internal_mutable_inner_product_param()->::opencv_caffe::InnerProductParameter::MergeFrom(
          from._internal_inner_product_param());
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_internal_mutable_lrn_param()->::opencv_caffe::LRNParameter::MergeFrom(
          from._internal_lrn_param());
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_internal_mutable_pooling_param()->::opencv_caffe::PoolingParameter::MergeFrom(
          from._internal_pooling_param());
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_internal_mutable_window_data_param()->::opencv_caffe::WindowDataParameter::MergeFrom(
          from._internal_window_data_param());
    }
    if (cached_has_bits & 0x00004000u) {
      _this->_internal_mutable_power_param()->::opencv_caffe::PowerParameter::MergeFrom(
          from._internal_power_param());
    }
    if (cached_has_bits & 0x00008000u) {
      _this->_internal_mutable_memory_data_param()->::opencv_caffe::MemoryDataParameter::MergeFrom(
          from._internal_memory_data_param());
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      _this->_internal_mutable_argmax_param()->::opencv_caffe::ArgMaxParameter::MergeFrom(
          from._internal_argmax_param());
    }
    if (cached_has_bits & 0x00020000u) {
      _this->_internal_mutable_eltwise_param()->::opencv_caffe::EltwiseParameter::MergeFrom(
          from._internal_eltwise_param());
    }
    if (cached_has_bits & 0x00040000u) {
      _this->_internal_mutable_threshold_param()->::opencv_caffe::ThresholdParameter::MergeFrom(
          from._internal_threshold_param());
    }
    if (cached_has_bits & 0x00080000u) {
      _this->_internal_mutable_dummy_data_param()->::opencv_caffe::DummyDataParameter::MergeFrom(
          from._internal_dummy_data_param());
    }
    if (cached_has_bits & 0x00100000u) {
      _this->_internal_mutable_accuracy_param()->::opencv_caffe::AccuracyParameter::MergeFrom(
          from._internal_accuracy_param());
    }
    if (cached_has_bits & 0x00200000u) {
      _this->_internal_mutable_hinge_loss_param()->::opencv_caffe::HingeLossParameter::MergeFrom(
          from._internal_hinge_loss_param());
    }
    if (cached_has_bits & 0x00400000u) {
      _this->_internal_mutable_relu_param()->::opencv_caffe::ReLUParameter::MergeFrom(
          from._internal_relu_param());
    }
    if (cached_has_bits & 0x00800000u) {
      _this->_internal_mutable_slice_param()->::opencv_caffe::SliceParameter::MergeFrom(
          from._internal_slice_param());
    }
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      _this->_internal_mutable_mvn_param()->::opencv_caffe::MVNParameter::MergeFrom(
          from._internal_mvn_param());
    }
    if (cached_has_bits & 0x02000000u) {
      _this->_internal_mutable_transform_param()->::opencv_caffe::TransformationParameter::MergeFrom(
          from._internal_transform_param());
    }
    if (cached_has_bits & 0x04000000u) {
      _this->_internal_mutable_tanh_param()->::opencv_caffe::TanHParameter::MergeFrom(
          from._internal_tanh_param());
    }
    if (cached_has_bits & 0x08000000u) {
      _this->_internal_mutable_sigmoid_param()->::opencv_caffe::SigmoidParameter::MergeFrom(
          from._internal_sigmoid_param());
    }
    if (cached_has_bits & 0x10000000u) {
      _this->_internal_mutable_softmax_param()->::opencv_caffe::SoftmaxParameter::MergeFrom(
          from._internal_softmax_param());
    }
    if (cached_has_bits & 0x20000000u) {
      _this->_internal_mutable_contrastive_loss_param()->::opencv_caffe::ContrastiveLossParameter::MergeFrom(
          from._internal_contrastive_loss_param());
    }
    if (cached_has_bits & 0x40000000u) {
      _this->_internal_mutable_exp_param()->::opencv_caffe::ExpParameter::MergeFrom(
          from._internal_exp_param());
    }
    if (cached_has_bits & 0x80000000u) {
      _this->_internal_mutable_loss_param()->::opencv_caffe::LossParameter::MergeFrom(
          from._internal_loss_param());
    }
  }
  if (from._internal_has_type()) {
    _this->_internal_set_type(from._internal_type());
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void V1LayerParameter::CopyFrom(const V1LayerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.V1LayerParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool V1LayerParameter::IsInitialized() const {
  return true;
}

void V1LayerParameter::InternalSwap(V1LayerParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_._has_bits_[1], other->_impl_._has_bits_[1]);
  _impl_.bottom_.InternalSwap(&other->_impl_.bottom_);
  _impl_.top_.InternalSwap(&other->_impl_.top_);
  _impl_.blobs_.InternalSwap(&other->_impl_.blobs_);
  _impl_.blobs_lr_.InternalSwap(&other->_impl_.blobs_lr_);
  _impl_.weight_decay_.InternalSwap(&other->_impl_.weight_decay_);
  _impl_.include_.InternalSwap(&other->_impl_.include_);
  _impl_.exclude_.InternalSwap(&other->_impl_.exclude_);
  _impl_.loss_weight_.InternalSwap(&other->_impl_.loss_weight_);
  _impl_.param_.InternalSwap(&other->_impl_.param_);
  _impl_.blob_share_mode_.InternalSwap(&other->_impl_.blob_share_mode_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(V1LayerParameter, _impl_.type_)
      + sizeof(V1LayerParameter::_impl_.type_)
      - PROTOBUF_FIELD_OFFSET(V1LayerParameter, _impl_.layer_)>(
          reinterpret_cast<char*>(&_impl_.layer_),
          reinterpret_cast<char*>(&other->_impl_.layer_));
}

::PROTOBUF_NAMESPACE_ID::Metadata V1LayerParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[64]);
}

// ===================================================================

class V0LayerParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<V0LayerParameter>()._impl_._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_type(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_num_output(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_biasterm(HasBits* has_bits) {
    (*has_bits)[0] |= 8388608u;
  }
  static const ::opencv_caffe::FillerParameter& weight_filler(const V0LayerParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::opencv_caffe::FillerParameter& bias_filler(const V0LayerParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_pad(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_kernelsize(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_group(HasBits* has_bits) {
    (*has_bits)[0] |= 16777216u;
  }
  static void set_has_stride(HasBits* has_bits) {
    (*has_bits)[0] |= 33554432u;
  }
  static void set_has_pool(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_dropout_ratio(HasBits* has_bits) {
    (*has_bits)[0] |= 67108864u;
  }
  static void set_has_local_size(HasBits* has_bits) {
    (*has_bits)[0] |= 134217728u;
  }
  static void set_has_alpha(HasBits* has_bits) {
    (*has_bits)[0] |= 268435456u;
  }
  static void set_has_beta(HasBits* has_bits) {
    (*has_bits)[0] |= 536870912u;
  }
  static void set_has_k(HasBits* has_bits) {
    (*has_bits)[0] |= 2147483648u;
  }
  static void set_has_source(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 1073741824u;
  }
  static void set_has_meanfile(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_batchsize(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_cropsize(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static void set_has_mirror(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static void set_has_rand_skip(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static void set_has_det_fg_threshold(HasBits* has_bits) {
    (*has_bits)[1] |= 1u;
  }
  static void set_has_det_bg_threshold(HasBits* has_bits) {
    (*has_bits)[1] |= 2u;
  }
  static void set_has_det_fg_fraction(HasBits* has_bits) {
    (*has_bits)[1] |= 4u;
  }
  static void set_has_det_context_pad(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static void set_has_det_crop_mode(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_new_num(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static void set_has_new_channels(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static void set_has_new_height(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static void set_has_new_width(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
  static void set_has_shuffle_images(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static void set_has_concat_dim(HasBits* has_bits) {
    (*has_bits)[0] |= 4194304u;
  }
  static const ::opencv_caffe::HDF5OutputParameter& hdf5_output_param(const V0LayerParameter* msg);
  static void set_has_hdf5_output_param(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
};

const ::opencv_caffe::FillerParameter&
V0LayerParameter::_Internal::weight_filler(const V0LayerParameter* msg) {
  return *msg->_impl_.weight_filler_;
}
const ::opencv_caffe::FillerParameter&
V0LayerParameter::_Internal::bias_filler(const V0LayerParameter* msg) {
  return *msg->_impl_.bias_filler_;
}
const ::opencv_caffe::HDF5OutputParameter&
V0LayerParameter::_Internal::hdf5_output_param(const V0LayerParameter* msg) {
  return *msg->_impl_.hdf5_output_param_;
}
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString V0LayerParameter::Impl_::_i_give_permission_to_break_this_code_default_det_crop_mode_{{{"warp", 4}}, {nullptr}};
V0LayerParameter::V0LayerParameter(::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:opencv_caffe.V0LayerParameter)
}
V0LayerParameter::V0LayerParameter(const V0LayerParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  V0LayerParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.blobs_){from._impl_.blobs_}
    , decltype(_impl_.blobs_lr_){from._impl_.blobs_lr_}
    , decltype(_impl_.weight_decay_){from._impl_.weight_decay_}
    , decltype(_impl_.name_){}
    , decltype(_impl_.type_){}
    , decltype(_impl_.source_){}
    , decltype(_impl_.meanfile_){}
    , decltype(_impl_.det_crop_mode_){}
    , decltype(_impl_.weight_filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.hdf5_output_param_){nullptr}
    , decltype(_impl_.num_output_){}
    , decltype(_impl_.pad_){}
    , decltype(_impl_.kernelsize_){}
    , decltype(_impl_.pool_){}
    , decltype(_impl_.batchsize_){}
    , decltype(_impl_.cropsize_){}
    , decltype(_impl_.mirror_){}
    , decltype(_impl_.shuffle_images_){}
    , decltype(_impl_.rand_skip_){}
    , decltype(_impl_.det_context_pad_){}
    , decltype(_impl_.new_num_){}
    , decltype(_impl_.new_channels_){}
    , decltype(_impl_.new_height_){}
    , decltype(_impl_.new_width_){}
    , decltype(_impl_.concat_dim_){}
    , decltype(_impl_.biasterm_){}
    , decltype(_impl_.group_){}
    , decltype(_impl_.stride_){}
    , decltype(_impl_.dropout_ratio_){}
    , decltype(_impl_.local_size_){}
    , decltype(_impl_.alpha_){}
    , decltype(_impl_.beta_){}
    , decltype(_impl_.scale_){}
    , decltype(_impl_.k_){}
    , decltype(_impl_.det_fg_threshold_){}
    , decltype(_impl_.det_bg_threshold_){}
    , decltype(_impl_.det_fg_fraction_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    _this->_impl_.name_.Set(from._internal_name(), 
      _this->GetArenaForAllocation());
  }
  _impl_.type_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.type_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_type()) {
    _this->_impl_.type_.Set(from._internal_type(), 
      _this->GetArenaForAllocation());
  }
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    _this->_impl_.source_.Set(from._internal_source(), 
      _this->GetArenaForAllocation());
  }
  _impl_.meanfile_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.meanfile_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_meanfile()) {
    _this->_impl_.meanfile_.Set(from._internal_meanfile(), 
      _this->GetArenaForAllocation());
  }
  _impl_.det_crop_mode_.InitDefault();
  if (from._internal_has_det_crop_mode()) {
    _this->_impl_.det_crop_mode_.Set(from._internal_det_crop_mode(), 
      _this->GetArenaForAllocation());
  }
  if (from._internal_has_weight_filler()) {
    _this->_impl_.weight_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.weight_filler_);
  }
  if (from._internal_has_bias_filler()) {
    _this->_impl_.bias_filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.bias_filler_);
  }
  if (from._internal_has_hdf5_output_param()) {
    _this->_impl_.hdf5_output_param_ = new ::opencv_caffe::HDF5OutputParameter(*from._impl_.hdf5_output_param_);
  }
  ::memcpy(&_impl_.num_output_, &from._impl_.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.det_fg_fraction_) -
    reinterpret_cast<char*>(&_impl_.num_output_)) + sizeof(_impl_.det_fg_fraction_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.V0LayerParameter)
}

inline void V0LayerParameter::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_.blobs_){arena}
    , decltype(_impl_.blobs_lr_){arena}
    , decltype(_impl_.weight_decay_){arena}
    , decltype(_impl_.name_){}
    , decltype(_impl_.type_){}
    , decltype(_impl_.source_){}
    , decltype(_impl_.meanfile_){}
    , decltype(_impl_.det_crop_mode_){}
    , decltype(_impl_.weight_filler_){nullptr}
    , decltype(_impl_.bias_filler_){nullptr}
    , decltype(_impl_.hdf5_output_param_){nullptr}
    , decltype(_impl_.num_output_){0u}
    , decltype(_impl_.pad_){0u}
    , decltype(_impl_.kernelsize_){0u}
    , decltype(_impl_.pool_){0}
    , decltype(_impl_.batchsize_){0u}
    , decltype(_impl_.cropsize_){0u}
    , decltype(_impl_.mirror_){false}
    , decltype(_impl_.shuffle_images_){false}
    , decltype(_impl_.rand_skip_){0u}
    , decltype(_impl_.det_context_pad_){0u}
    , decltype(_impl_.new_num_){0}
    , decltype(_impl_.new_channels_){0}
    , decltype(_impl_.new_height_){0}
    , decltype(_impl_.new_width_){0}
    , decltype(_impl_.concat_dim_){1u}
    , decltype(_impl_.biasterm_){true}
    , decltype(_impl_.group_){1u}
    , decltype(_impl_.stride_){1u}
    , decltype(_impl_.dropout_ratio_){0.5f}
    , decltype(_impl_.local_size_){5u}
    , decltype(_impl_.alpha_){1}
    , decltype(_impl_.beta_){0.75f}
    , decltype(_impl_.scale_){1}
    , decltype(_impl_.k_){1}
    , decltype(_impl_.det_fg_threshold_){0.5f}
    , decltype(_impl_.det_bg_threshold_){0.5f}
    , decltype(_impl_.det_fg_fraction_){0.25f}
  };
  _impl_.name_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.name_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.type_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.type_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.source_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.source_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.meanfile_.InitDefault();
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    _impl_.meanfile_.Set("", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  _impl_.det_crop_mode_.InitDefault();
}

V0LayerParameter::~V0LayerParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.V0LayerParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void V0LayerParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.blobs_.~RepeatedPtrField();
  _impl_.blobs_lr_.~RepeatedField();
  _impl_.weight_decay_.~RepeatedField();
  _impl_.name_.Destroy();
  _impl_.type_.Destroy();
  _impl_.source_.Destroy();
  _impl_.meanfile_.Destroy();
  _impl_.det_crop_mode_.Destroy();
  if (this != internal_default_instance()) delete _impl_.weight_filler_;
  if (this != internal_default_instance()) delete _impl_.bias_filler_;
  if (this != internal_default_instance()) delete _impl_.hdf5_output_param_;
}

void V0LayerParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void V0LayerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.V0LayerParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.blobs_.Clear();
  _impl_.blobs_lr_.Clear();
  _impl_.weight_decay_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _impl_.name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      _impl_.type_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      _impl_.source_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      _impl_.meanfile_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      _impl_.det_crop_mode_.ClearToDefault(::opencv_caffe::V0LayerParameter::Impl_::_i_give_permission_to_break_this_code_default_det_crop_mode_, GetArenaForAllocation());
       }
    if (cached_has_bits & 0x00000020u) {
      GOOGLE_DCHECK(_impl_.weight_filler_ != nullptr);
      _impl_.weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      GOOGLE_DCHECK(_impl_.bias_filler_ != nullptr);
      _impl_.bias_filler_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      GOOGLE_DCHECK(_impl_.hdf5_output_param_ != nullptr);
      _impl_.hdf5_output_param_->Clear();
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    ::memset(&_impl_.num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.shuffle_images_) -
        reinterpret_cast<char*>(&_impl_.num_output_)) + sizeof(_impl_.shuffle_images_));
  }
  if (cached_has_bits & 0x00ff0000u) {
    ::memset(&_impl_.rand_skip_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.new_width_) -
        reinterpret_cast<char*>(&_impl_.rand_skip_)) + sizeof(_impl_.new_width_));
    _impl_.concat_dim_ = 1u;
    _impl_.biasterm_ = true;
  }
  if (cached_has_bits & 0xff000000u) {
    _impl_.group_ = 1u;
    _impl_.stride_ = 1u;
    _impl_.dropout_ratio_ = 0.5f;
    _impl_.local_size_ = 5u;
    _impl_.alpha_ = 1;
    _impl_.beta_ = 0.75f;
    _impl_.scale_ = 1;
    _impl_.k_ = 1;
  }
  cached_has_bits = _impl_._has_bits_[1];
  if (cached_has_bits & 0x00000007u) {
    _impl_.det_fg_threshold_ = 0.5f;
    _impl_.det_bg_threshold_ = 0.5f;
    _impl_.det_fg_fraction_ = 0.25f;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* V0LayerParameter::_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) {
      // optional string name = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          auto str = _internal_mutable_name();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.V0LayerParameter.name");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional string type = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_type();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.V0LayerParameter.type");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional uint32 num_output = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_num_output(&_impl_._has_bits_);
          _impl_.num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool biasterm = 4 [default = true];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_biasterm(&_impl_._has_bits_);
          _impl_.biasterm_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter weight_filler = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.FillerParameter bias_filler = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 pad = 7 [default = 0];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_pad(&_impl_._has_bits_);
          _impl_.pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 kernelsize = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_kernelsize(&_impl_._has_bits_);
          _impl_.kernelsize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 group = 9 [default = 1];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_group(&_impl_._has_bits_);
          _impl_.group_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 stride = 10 [default = 1];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_stride(&_impl_._has_bits_);
          _impl_.stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::V0LayerParameter_PoolMethod_IsValid(val))) {
            _internal_set_pool(static_cast<::opencv_caffe::V0LayerParameter_PoolMethod>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(11, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional float dropout_ratio = 12 [default = 0.5];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 101)) {
          _Internal::set_has_dropout_ratio(&_impl_._has_bits_);
          _impl_.dropout_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 local_size = 13 [default = 5];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_local_size(&_impl_._has_bits_);
          _impl_.local_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float alpha = 14 [default = 1];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 117)) {
          _Internal::set_has_alpha(&_impl_._has_bits_);
          _impl_.alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float beta = 15 [default = 0.75];
      case 15:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 125)) {
          _Internal::set_has_beta(&_impl_._has_bits_);
          _impl_.beta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional string source = 16;
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
          auto str = _internal_mutable_source();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.V0LayerParameter.source");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional float scale = 17 [default = 1];
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 141)) {
          _Internal::set_has_scale(&_impl_._has_bits_);
          _impl_.scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional string meanfile = 18;
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
          auto str = _internal_mutable_meanfile();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.V0LayerParameter.meanfile");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional uint32 batchsize = 19;
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
          _Internal::set_has_batchsize(&_impl_._has_bits_);
          _impl_.batchsize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 cropsize = 20 [default = 0];
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
          _Internal::set_has_cropsize(&_impl_._has_bits_);
          _impl_.cropsize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool mirror = 21 [default = false];
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 168)) {
          _Internal::set_has_mirror(&_impl_._has_bits_);
          _impl_.mirror_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float k = 22 [default = 1];
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 181)) {
          _Internal::set_has_k(&_impl_._has_bits_);
          _impl_.k_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated .opencv_caffe.BlobProto blobs = 50;
      case 50:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
          ptr -= 2;
          do {
            ptr += 2;
            ptr = ctx->ParseMessage(_internal_add_blobs(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<402>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated float blobs_lr = 51;
      case 51:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 157)) {
          ptr -= 2;
          do {
            ptr += 2;
            _internal_add_blobs_lr(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<413>(ptr));
        } else if (static_cast<uint8_t>(tag) == 154) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_blobs_lr(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float weight_decay = 52;
      case 52:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 165)) {
          ptr -= 2;
          do {
            ptr += 2;
            _internal_add_weight_decay(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<421>(ptr));
        } else if (static_cast<uint8_t>(tag) == 162) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_weight_decay(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 rand_skip = 53 [default = 0];
      case 53:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 168)) {
          _Internal::set_has_rand_skip(&_impl_._has_bits_);
          _impl_.rand_skip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float det_fg_threshold = 54 [default = 0.5];
      case 54:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 181)) {
          _Internal::set_has_det_fg_threshold(&_impl_._has_bits_);
          _impl_.det_fg_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float det_bg_threshold = 55 [default = 0.5];
      case 55:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 189)) {
          _Internal::set_has_det_bg_threshold(&_impl_._has_bits_);
          _impl_.det_bg_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float det_fg_fraction = 56 [default = 0.25];
      case 56:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 197)) {
          _Internal::set_has_det_fg_fraction(&_impl_._has_bits_);
          _impl_.det_fg_fraction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 det_context_pad = 58 [default = 0];
      case 58:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 208)) {
          _Internal::set_has_det_context_pad(&_impl_._has_bits_);
          _impl_.det_context_pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string det_crop_mode = 59 [default = "warp"];
      case 59:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 218)) {
          auto str = _internal_mutable_det_crop_mode();
          ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(ptr);
          #ifndef NDEBUG
          ::_pbi::VerifyUTF8(str, "opencv_caffe.V0LayerParameter.det_crop_mode");
          #endif  // !NDEBUG
        } else
          goto handle_unusual;
        continue;
      // optional int32 new_num = 60 [default = 0];
      case 60:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 224)) {
          _Internal::set_has_new_num(&_impl_._has_bits_);
          _impl_.new_num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 new_channels = 61 [default = 0];
      case 61:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 232)) {
          _Internal::set_has_new_channels(&_impl_._has_bits_);
          _impl_.new_channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 new_height = 62 [default = 0];
      case 62:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 240)) {
          _Internal::set_has_new_height(&_impl_._has_bits_);
          _impl_.new_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 new_width = 63 [default = 0];
      case 63:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 248)) {
          _Internal::set_has_new_width(&_impl_._has_bits_);
          _impl_.new_width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool shuffle_images = 64 [default = false];
      case 64:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 0)) {
          _Internal::set_has_shuffle_images(&_impl_._has_bits_);
          _impl_.shuffle_images_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 concat_dim = 65 [default = 1];
      case 65:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_concat_dim(&_impl_._has_bits_);
          _impl_.concat_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 1001;
      case 1001:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_hdf5_output_param(), 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* V0LayerParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.V0LayerParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.V0LayerParameter.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // optional string type = 2;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_type().data(), static_cast<int>(this->_internal_type().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.V0LayerParameter.type");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_type(), target);
  }

  // optional uint32 num_output = 3;
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_num_output(), target);
  }

  // optional bool biasterm = 4 [default = true];
  if (cached_has_bits & 0x00800000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_biasterm(), target);
  }

  // optional .opencv_caffe.FillerParameter weight_filler = 5;
  if (cached_has_bits & 0x00000020u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(5, _Internal::weight_filler(this),
        _Internal::weight_filler(this).GetCachedSize(), target, stream);
  }

  // optional .opencv_caffe.FillerParameter bias_filler = 6;
  if (cached_has_bits & 0x00000040u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, _Internal::bias_filler(this),
        _Internal::bias_filler(this).GetCachedSize(), target, stream);
  }

  // optional uint32 pad = 7 [default = 0];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_pad(), target);
  }

  // optional uint32 kernelsize = 8;
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_kernelsize(), target);
  }

  // optional uint32 group = 9 [default = 1];
  if (cached_has_bits & 0x01000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, this->_internal_group(), target);
  }

  // optional uint32 stride = 10 [default = 1];
  if (cached_has_bits & 0x02000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(10, this->_internal_stride(), target);
  }

  // optional .opencv_caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteEnumToArray(
      11, this->_internal_pool(), target);
  }

  // optional float dropout_ratio = 12 [default = 0.5];
  if (cached_has_bits & 0x04000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(12, this->_internal_dropout_ratio(), target);
  }

  // optional uint32 local_size = 13 [default = 5];
  if (cached_has_bits & 0x08000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(13, this->_internal_local_size(), target);
  }

  // optional float alpha = 14 [default = 1];
  if (cached_has_bits & 0x10000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(14, this->_internal_alpha(), target);
  }

  // optional float beta = 15 [default = 0.75];
  if (cached_has_bits & 0x20000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(15, this->_internal_beta(), target);
  }

  // optional string source = 16;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.V0LayerParameter.source");
    target = stream->WriteStringMaybeAliased(
        16, this->_internal_source(), target);
  }

  // optional float scale = 17 [default = 1];
  if (cached_has_bits & 0x40000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(17, this->_internal_scale(), target);
  }

  // optional string meanfile = 18;
  if (cached_has_bits & 0x00000008u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_meanfile().data(), static_cast<int>(this->_internal_meanfile().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.V0LayerParameter.meanfile");
    target = stream->WriteStringMaybeAliased(
        18, this->_internal_meanfile(), target);
  }

  // optional uint32 batchsize = 19;
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(19, this->_internal_batchsize(), target);
  }

  // optional uint32 cropsize = 20 [default = 0];
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(20, this->_internal_cropsize(), target);
  }

  // optional bool mirror = 21 [default = false];
  if (cached_has_bits & 0x00004000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(21, this->_internal_mirror(), target);
  }

  // optional float k = 22 [default = 1];
  if (cached_has_bits & 0x80000000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(22, this->_internal_k(), target);
  }

  // repeated .opencv_caffe.BlobProto blobs = 50;
  for (unsigned i = 0,
      n = static_cast<unsigned>(this->_internal_blobs_size()); i < n; i++) {
    const auto& repfield = this->_internal_blobs(i);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
        InternalWriteMessage(50, repfield, repfield.GetCachedSize(), target, stream);
  }

  // repeated float blobs_lr = 51;
  for (int i = 0, n = this->_internal_blobs_lr_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(51, this->_internal_blobs_lr(i), target);
  }

  // repeated float weight_decay = 52;
  for (int i = 0, n = this->_internal_weight_decay_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(52, this->_internal_weight_decay(i), target);
  }

  // optional uint32 rand_skip = 53 [default = 0];
  if (cached_has_bits & 0x00010000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(53, this->_internal_rand_skip(), target);
  }

  cached_has_bits = _impl_._has_bits_[1];
  // optional float det_fg_threshold = 54 [default = 0.5];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(54, this->_internal_det_fg_threshold(), target);
  }

  // optional float det_bg_threshold = 55 [default = 0.5];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(55, this->_internal_det_bg_threshold(), target);
  }

  // optional float det_fg_fraction = 56 [default = 0.25];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(56, this->_internal_det_fg_fraction(), target);
  }

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 det_context_pad = 58 [default = 0];
  if (cached_has_bits & 0x00020000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(58, this->_internal_det_context_pad(), target);
  }

  // optional string det_crop_mode = 59 [default = "warp"];
  if (cached_has_bits & 0x00000010u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_det_crop_mode().data(), static_cast<int>(this->_internal_det_crop_mode().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "opencv_caffe.V0LayerParameter.det_crop_mode");
    target = stream->WriteStringMaybeAliased(
        59, this->_internal_det_crop_mode(), target);
  }

  // optional int32 new_num = 60 [default = 0];
  if (cached_has_bits & 0x00040000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(60, this->_internal_new_num(), target);
  }

  // optional int32 new_channels = 61 [default = 0];
  if (cached_has_bits & 0x00080000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(61, this->_internal_new_channels(), target);
  }

  // optional int32 new_height = 62 [default = 0];
  if (cached_has_bits & 0x00100000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(62, this->_internal_new_height(), target);
  }

  // optional int32 new_width = 63 [default = 0];
  if (cached_has_bits & 0x00200000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(63, this->_internal_new_width(), target);
  }

  // optional bool shuffle_images = 64 [default = false];
  if (cached_has_bits & 0x00008000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(64, this->_internal_shuffle_images(), target);
  }

  // optional uint32 concat_dim = 65 [default = 1];
  if (cached_has_bits & 0x00400000u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(65, this->_internal_concat_dim(), target);
  }

  // optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 1001;
  if (cached_has_bits & 0x00000080u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1001, _Internal::hdf5_output_param(this),
        _Internal::hdf5_output_param(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:opencv_caffe.V0LayerParameter)
  return target;
}

size_t V0LayerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.V0LayerParameter)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .opencv_caffe.BlobProto blobs = 50;
  total_size += 2UL * this->_internal_blobs_size();
  for (const auto& msg : this->_impl_.blobs_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated float blobs_lr = 51;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_blobs_lr_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::_pbi::FromIntSize(this->_internal_blobs_lr_size());
    total_size += data_size;
  }

  // repeated float weight_decay = 52;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_weight_decay_size());
    size_t data_size = 4UL * count;
    total_size += 2 *
                  ::_pbi::FromIntSize(this->_internal_weight_decay_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional string name = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name());
    }

    // optional string type = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_type());
    }

    // optional string source = 16;
    if (cached_has_bits & 0x00000004u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_source());
    }

    // optional string meanfile = 18;
    if (cached_has_bits & 0x00000008u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_meanfile());
    }

    // optional string det_crop_mode = 59 [default = "warp"];
    if (cached_has_bits & 0x00000010u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_det_crop_mode());
    }

    // optional .opencv_caffe.FillerParameter weight_filler = 5;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.weight_filler_);
    }

    // optional .opencv_caffe.FillerParameter bias_filler = 6;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.bias_filler_);
    }

    // optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 1001;
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.hdf5_output_param_);
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // optional uint32 num_output = 3;
    if (cached_has_bits & 0x00000100u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

    // optional uint32 pad = 7 [default = 0];
    if (cached_has_bits & 0x00000200u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pad());
    }

    // optional uint32 kernelsize = 8;
    if (cached_has_bits & 0x00000400u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_kernelsize());
    }

    // optional .opencv_caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
    if (cached_has_bits & 0x00000800u) {
      total_size += 1 +
        ::_pbi::WireFormatLite::EnumSize(this->_internal_pool());
    }

    // optional uint32 batchsize = 19;
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::UInt32Size(
          this->_internal_batchsize());
    }

    // optional uint32 cropsize = 20 [default = 0];
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::UInt32Size(
          this->_internal_cropsize());
    }

    // optional bool mirror = 21 [default = false];
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 + 1;
    }

    // optional bool shuffle_images = 64 [default = false];
    if (cached_has_bits & 0x00008000u) {
      total_size += 2 + 1;
    }

  }
  if (cached_has_bits & 0x00ff0000u) {
    // optional uint32 rand_skip = 53 [default = 0];
    if (cached_has_bits & 0x00010000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::UInt32Size(
          this->_internal_rand_skip());
    }

    // optional uint32 det_context_pad = 58 [default = 0];
    if (cached_has_bits & 0x00020000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::UInt32Size(
          this->_internal_det_context_pad());
    }

    // optional int32 new_num = 60 [default = 0];
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_new_num());
    }

    // optional int32 new_channels = 61 [default = 0];
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_new_channels());
    }

    // optional int32 new_height = 62 [default = 0];
    if (cached_has_bits & 0x00100000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_new_height());
    }

    // optional int32 new_width = 63 [default = 0];
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::Int32Size(
          this->_internal_new_width());
    }

    // optional uint32 concat_dim = 65 [default = 1];
    if (cached_has_bits & 0x00400000u) {
      total_size += 2 +
        ::_pbi::WireFormatLite::UInt32Size(
          this->_internal_concat_dim());
    }

    // optional bool biasterm = 4 [default = true];
    if (cached_has_bits & 0x00800000u) {
      total_size += 1 + 1;
    }

  }
  if (cached_has_bits & 0xff000000u) {
    // optional uint32 group = 9 [default = 1];
    if (cached_has_bits & 0x01000000u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_group());
    }

    // optional uint32 stride = 10 [default = 1];
    if (cached_has_bits & 0x02000000u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_stride());
    }

    // optional float dropout_ratio = 12 [default = 0.5];
    if (cached_has_bits & 0x04000000u) {
      total_size += 1 + 4;
    }

    // optional uint32 local_size = 13 [default = 5];
    if (cached_has_bits & 0x08000000u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_local_size());
    }

    // optional float alpha = 14 [default = 1];
    if (cached_has_bits & 0x10000000u) {
      total_size += 1 + 4;
    }

    // optional float beta = 15 [default = 0.75];
    if (cached_has_bits & 0x20000000u) {
      total_size += 1 + 4;
    }

    // optional float scale = 17 [default = 1];
    if (cached_has_bits & 0x40000000u) {
      total_size += 2 + 4;
    }

    // optional float k = 22 [default = 1];
    if (cached_has_bits & 0x80000000u) {
      total_size += 2 + 4;
    }

  }
  cached_has_bits = _impl_._has_bits_[1];
  if (cached_has_bits & 0x00000007u) {
    // optional float det_fg_threshold = 54 [default = 0.5];
    if (cached_has_bits & 0x00000001u) {
      total_size += 2 + 4;
    }

    // optional float det_bg_threshold = 55 [default = 0.5];
    if (cached_has_bits & 0x00000002u) {
      total_size += 2 + 4;
    }

    // optional float det_fg_fraction = 56 [default = 0.25];
    if (cached_has_bits & 0x00000004u) {
      total_size += 2 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData V0LayerParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    V0LayerParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*V0LayerParameter::GetClassData() const { return &_class_data_; }


void V0LayerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<V0LayerParameter*>(&to_msg);
  auto& from = static_cast<const V0LayerParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.V0LayerParameter)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.blobs_.MergeFrom(from._impl_.blobs_);
  _this->_impl_.blobs_lr_.MergeFrom(from._impl_.blobs_lr_);
  _this->_impl_.weight_decay_.MergeFrom(from._impl_.weight_decay_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_internal_set_type(from._internal_type());
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_internal_set_source(from._internal_source());
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_internal_set_meanfile(from._internal_meanfile());
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_internal_set_det_crop_mode(from._internal_det_crop_mode());
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_internal_mutable_weight_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_internal_mutable_hdf5_output_param()->::opencv_caffe::HDF5OutputParameter::MergeFrom(
          from._internal_hdf5_output_param());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _this->_impl_.num_output_ = from._impl_.num_output_;
    }
    if (cached_has_bits & 0x00000200u) {
      _this->_impl_.pad_ = from._impl_.pad_;
    }
    if (cached_has_bits & 0x00000400u) {
      _this->_impl_.kernelsize_ = from._impl_.kernelsize_;
    }
    if (cached_has_bits & 0x00000800u) {
      _this->_impl_.pool_ = from._impl_.pool_;
    }
    if (cached_has_bits & 0x00001000u) {
      _this->_impl_.batchsize_ = from._impl_.batchsize_;
    }
    if (cached_has_bits & 0x00002000u) {
      _this->_impl_.cropsize_ = from._impl_.cropsize_;
    }
    if (cached_has_bits & 0x00004000u) {
      _this->_impl_.mirror_ = from._impl_.mirror_;
    }
    if (cached_has_bits & 0x00008000u) {
      _this->_impl_.shuffle_images_ = from._impl_.shuffle_images_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      _this->_impl_.rand_skip_ = from._impl_.rand_skip_;
    }
    if (cached_has_bits & 0x00020000u) {
      _this->_impl_.det_context_pad_ = from._impl_.det_context_pad_;
    }
    if (cached_has_bits & 0x00040000u) {
      _this->_impl_.new_num_ = from._impl_.new_num_;
    }
    if (cached_has_bits & 0x00080000u) {
      _this->_impl_.new_channels_ = from._impl_.new_channels_;
    }
    if (cached_has_bits & 0x00100000u) {
      _this->_impl_.new_height_ = from._impl_.new_height_;
    }
    if (cached_has_bits & 0x00200000u) {
      _this->_impl_.new_width_ = from._impl_.new_width_;
    }
    if (cached_has_bits & 0x00400000u) {
      _this->_impl_.concat_dim_ = from._impl_.concat_dim_;
    }
    if (cached_has_bits & 0x00800000u) {
      _this->_impl_.biasterm_ = from._impl_.biasterm_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      _this->_impl_.group_ = from._impl_.group_;
    }
    if (cached_has_bits & 0x02000000u) {
      _this->_impl_.stride_ = from._impl_.stride_;
    }
    if (cached_has_bits & 0x04000000u) {
      _this->_impl_.dropout_ratio_ = from._impl_.dropout_ratio_;
    }
    if (cached_has_bits & 0x08000000u) {
      _this->_impl_.local_size_ = from._impl_.local_size_;
    }
    if (cached_has_bits & 0x10000000u) {
      _this->_impl_.alpha_ = from._impl_.alpha_;
    }
    if (cached_has_bits & 0x20000000u) {
      _this->_impl_.beta_ = from._impl_.beta_;
    }
    if (cached_has_bits & 0x40000000u) {
      _this->_impl_.scale_ = from._impl_.scale_;
    }
    if (cached_has_bits & 0x80000000u) {
      _this->_impl_.k_ = from._impl_.k_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  cached_has_bits = from._impl_._has_bits_[1];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.det_fg_threshold_ = from._impl_.det_fg_threshold_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.det_bg_threshold_ = from._impl_.det_bg_threshold_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.det_fg_fraction_ = from._impl_.det_fg_fraction_;
    }
    _this->_impl_._has_bits_[1] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void V0LayerParameter::CopyFrom(const V0LayerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.V0LayerParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool V0LayerParameter::IsInitialized() const {
  return true;
}

void V0LayerParameter::InternalSwap(V0LayerParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  swap(_impl_._has_bits_[1], other->_impl_._has_bits_[1]);
  _impl_.blobs_.InternalSwap(&other->_impl_.blobs_);
  _impl_.blobs_lr_.InternalSwap(&other->_impl_.blobs_lr_);
  _impl_.weight_decay_.InternalSwap(&other->_impl_.weight_decay_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.name_, lhs_arena,
      &other->_impl_.name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.type_, lhs_arena,
      &other->_impl_.type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.source_, lhs_arena,
      &other->_impl_.source_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.meanfile_, lhs_arena,
      &other->_impl_.meanfile_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &_impl_.det_crop_mode_, lhs_arena,
      &other->_impl_.det_crop_mode_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(V0LayerParameter, _impl_.new_width_)
      + sizeof(V0LayerParameter::_impl_.new_width_)
      - PROTOBUF_FIELD_OFFSET(V0LayerParameter, _impl_.weight_filler_)>(
          reinterpret_cast<char*>(&_impl_.weight_filler_),
          reinterpret_cast<char*>(&other->_impl_.weight_filler_));
  swap(_impl_.concat_dim_, other->_impl_.concat_dim_);
  swap(_impl_.biasterm_, other->_impl_.biasterm_);
  swap(_impl_.group_, other->_impl_.group_);
  swap(_impl_.stride_, other->_impl_.stride_);
  swap(_impl_.dropout_ratio_, other->_impl_.dropout_ratio_);
  swap(_impl_.local_size_, other->_impl_.local_size_);
  swap(_impl_.alpha_, other->_impl_.alpha_);
  swap(_impl_.beta_, other->_impl_.beta_);
  swap(_impl_.scale_, other->_impl_.scale_);
  swap(_impl_.k_, other->_impl_.k_);
  swap(_impl_.det_fg_threshold_, other->_impl_.det_fg_threshold_);
  swap(_impl_.det_bg_threshold_, other->_impl_.det_bg_threshold_);
  swap(_impl_.det_fg_fraction_, other->_impl_.det_fg_fraction_);
}

::PROTOBUF_NAMESPACE_ID::Metadata V0LayerParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[65]);
}

// ===================================================================

class PReLUParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<PReLUParameter>()._impl_._has_bits_);
  static const ::opencv_caffe::FillerParameter& filler(const PReLUParameter* msg);
  static void set_has_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_channel_shared(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::opencv_caffe::FillerParameter&
PReLUParameter::_Internal::filler(const PReLUParameter* msg) {
  return *msg->_impl_.filler_;
}
PReLUParameter::PReLUParameter(::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:opencv_caffe.PReLUParameter)
}
PReLUParameter::PReLUParameter(const PReLUParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  PReLUParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.filler_){nullptr}
    , decltype(_impl_.channel_shared_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_filler()) {
    _this->_impl_.filler_ = new ::opencv_caffe::FillerParameter(*from._impl_.filler_);
  }
  _this->_impl_.channel_shared_ = from._impl_.channel_shared_;
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.PReLUParameter)
}

inline void PReLUParameter::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_.filler_){nullptr}
    , decltype(_impl_.channel_shared_){false}
  };
}

PReLUParameter::~PReLUParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.PReLUParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PReLUParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete _impl_.filler_;
}

void PReLUParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PReLUParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.PReLUParameter)
  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 & 0x00000001u) {
    GOOGLE_DCHECK(_impl_.filler_ != nullptr);
    _impl_.filler_->Clear();
  }
  _impl_.channel_shared_ = false;
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PReLUParameter::_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 .opencv_caffe.FillerParameter filler = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool channel_shared = 2 [default = false];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_channel_shared(&has_bits);
          _impl_.channel_shared_ = ::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* PReLUParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PReLUParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional .opencv_caffe.FillerParameter filler = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, _Internal::filler(this),
        _Internal::filler(this).GetCachedSize(), target, stream);
  }

  // optional bool channel_shared = 2 [default = false];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_channel_shared(), 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:opencv_caffe.PReLUParameter)
  return target;
}

size_t PReLUParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PReLUParameter)
  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 .opencv_caffe.FillerParameter filler = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *_impl_.filler_);
    }

    // optional bool channel_shared = 2 [default = false];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 1;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PReLUParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    PReLUParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PReLUParameter::GetClassData() const { return &_class_data_; }


void PReLUParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<PReLUParameter*>(&to_msg);
  auto& from = static_cast<const PReLUParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PReLUParameter)
  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->_internal_mutable_filler()->::opencv_caffe::FillerParameter::MergeFrom(
          from._internal_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.channel_shared_ = from._impl_.channel_shared_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void PReLUParameter::CopyFrom(const PReLUParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.PReLUParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PReLUParameter::IsInitialized() const {
  return true;
}

void PReLUParameter::InternalSwap(PReLUParameter* 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(PReLUParameter, _impl_.channel_shared_)
      + sizeof(PReLUParameter::_impl_.channel_shared_)
      - PROTOBUF_FIELD_OFFSET(PReLUParameter, _impl_.filler_)>(
          reinterpret_cast<char*>(&_impl_.filler_),
          reinterpret_cast<char*>(&other->_impl_.filler_));
}

::PROTOBUF_NAMESPACE_ID::Metadata PReLUParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[66]);
}

// ===================================================================

class NormalizedBBox::_Internal {
 public:
  using HasBits = decltype(std::declval<NormalizedBBox>()._impl_._has_bits_);
  static void set_has_xmin(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_ymin(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_xmax(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_ymax(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_label(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_difficult(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_score(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_size(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
};

NormalizedBBox::NormalizedBBox(::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:opencv_caffe.NormalizedBBox)
}
NormalizedBBox::NormalizedBBox(const NormalizedBBox& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  NormalizedBBox* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.xmin_){}
    , decltype(_impl_.ymin_){}
    , decltype(_impl_.xmax_){}
    , decltype(_impl_.ymax_){}
    , decltype(_impl_.label_){}
    , decltype(_impl_.difficult_){}
    , decltype(_impl_.score_){}
    , decltype(_impl_.size_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.xmin_, &from._impl_.xmin_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.size_) -
    reinterpret_cast<char*>(&_impl_.xmin_)) + sizeof(_impl_.size_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.NormalizedBBox)
}

inline void NormalizedBBox::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_.xmin_){0}
    , decltype(_impl_.ymin_){0}
    , decltype(_impl_.xmax_){0}
    , decltype(_impl_.ymax_){0}
    , decltype(_impl_.label_){0}
    , decltype(_impl_.difficult_){false}
    , decltype(_impl_.score_){0}
    , decltype(_impl_.size_){0}
  };
}

NormalizedBBox::~NormalizedBBox() {
  // @@protoc_insertion_point(destructor:opencv_caffe.NormalizedBBox)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void NormalizedBBox::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void NormalizedBBox::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void NormalizedBBox::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.NormalizedBBox)
  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) {
    ::memset(&_impl_.xmin_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.size_) -
        reinterpret_cast<char*>(&_impl_.xmin_)) + sizeof(_impl_.size_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* NormalizedBBox::_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 xmin = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_xmin(&has_bits);
          _impl_.xmin_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float ymin = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_ymin(&has_bits);
          _impl_.ymin_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float xmax = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_xmax(&has_bits);
          _impl_.xmax_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float ymax = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          _Internal::set_has_ymax(&has_bits);
          _impl_.ymax_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 label = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_label(&has_bits);
          _impl_.label_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool difficult = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_difficult(&has_bits);
          _impl_.difficult_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float score = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
          _Internal::set_has_score(&has_bits);
          _impl_.score_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float size = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
          _Internal::set_has_size(&has_bits);
          _impl_.size_ = ::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* NormalizedBBox::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NormalizedBBox)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional float xmin = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_xmin(), target);
  }

  // optional float ymin = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_ymin(), target);
  }

  // optional float xmax = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_xmax(), target);
  }

  // optional float ymax = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_ymax(), target);
  }

  // optional int32 label = 5;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_label(), target);
  }

  // optional bool difficult = 6;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_difficult(), target);
  }

  // optional float score = 7;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(7, this->_internal_score(), target);
  }

  // optional float size = 8;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(8, this->_internal_size(), 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:opencv_caffe.NormalizedBBox)
  return target;
}

size_t NormalizedBBox::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NormalizedBBox)
  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 float xmin = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

    // optional float ymin = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 4;
    }

    // optional float xmax = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 + 4;
    }

    // optional float ymax = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 4;
    }

    // optional int32 label = 5;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_label());
    }

    // optional bool difficult = 6;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 1;
    }

    // optional float score = 7;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 4;
    }

    // optional float size = 8;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NormalizedBBox::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    NormalizedBBox::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NormalizedBBox::GetClassData() const { return &_class_data_; }


void NormalizedBBox::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<NormalizedBBox*>(&to_msg);
  auto& from = static_cast<const NormalizedBBox&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.NormalizedBBox)
  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->_impl_.xmin_ = from._impl_.xmin_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.ymin_ = from._impl_.ymin_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.xmax_ = from._impl_.xmax_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.ymax_ = from._impl_.ymax_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.label_ = from._impl_.label_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.difficult_ = from._impl_.difficult_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.score_ = from._impl_.score_;
    }
    if (cached_has_bits & 0x00000080u) {
      _this->_impl_.size_ = from._impl_.size_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void NormalizedBBox::CopyFrom(const NormalizedBBox& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.NormalizedBBox)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool NormalizedBBox::IsInitialized() const {
  return true;
}

void NormalizedBBox::InternalSwap(NormalizedBBox* 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(NormalizedBBox, _impl_.size_)
      + sizeof(NormalizedBBox::_impl_.size_)
      - PROTOBUF_FIELD_OFFSET(NormalizedBBox, _impl_.xmin_)>(
          reinterpret_cast<char*>(&_impl_.xmin_),
          reinterpret_cast<char*>(&other->_impl_.xmin_));
}

::PROTOBUF_NAMESPACE_ID::Metadata NormalizedBBox::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[67]);
}

// ===================================================================

class ROIPoolingParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ROIPoolingParameter>()._impl_._has_bits_);
  static void set_has_pooled_h(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_pooled_w(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_spatial_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

ROIPoolingParameter::ROIPoolingParameter(::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:opencv_caffe.ROIPoolingParameter)
}
ROIPoolingParameter::ROIPoolingParameter(const ROIPoolingParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ROIPoolingParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.pooled_h_){}
    , decltype(_impl_.pooled_w_){}
    , decltype(_impl_.spatial_scale_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.pooled_h_, &from._impl_.pooled_h_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.spatial_scale_) -
    reinterpret_cast<char*>(&_impl_.pooled_h_)) + sizeof(_impl_.spatial_scale_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ROIPoolingParameter)
}

inline void ROIPoolingParameter::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_.pooled_h_){0u}
    , decltype(_impl_.pooled_w_){0u}
    , decltype(_impl_.spatial_scale_){1}
  };
}

ROIPoolingParameter::~ROIPoolingParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.ROIPoolingParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ROIPoolingParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void ROIPoolingParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ROIPoolingParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ROIPoolingParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    ::memset(&_impl_.pooled_h_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.pooled_w_) -
        reinterpret_cast<char*>(&_impl_.pooled_h_)) + sizeof(_impl_.pooled_w_));
    _impl_.spatial_scale_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ROIPoolingParameter::_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 uint32 pooled_h = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_pooled_h(&has_bits);
          _impl_.pooled_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 pooled_w = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_pooled_w(&has_bits);
          _impl_.pooled_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float spatial_scale = 3 [default = 1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_spatial_scale(&has_bits);
          _impl_.spatial_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ROIPoolingParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ROIPoolingParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 pooled_h = 1 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_pooled_h(), target);
  }

  // optional uint32 pooled_w = 2 [default = 0];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_pooled_w(), target);
  }

  // optional float spatial_scale = 3 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_spatial_scale(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ROIPoolingParameter)
  return target;
}

size_t ROIPoolingParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ROIPoolingParameter)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional uint32 pooled_h = 1 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pooled_h());
    }

    // optional uint32 pooled_w = 2 [default = 0];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pooled_w());
    }

    // optional float spatial_scale = 3 [default = 1];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ROIPoolingParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    ROIPoolingParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ROIPoolingParameter::GetClassData() const { return &_class_data_; }


void ROIPoolingParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ROIPoolingParameter*>(&to_msg);
  auto& from = static_cast<const ROIPoolingParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ROIPoolingParameter)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.pooled_h_ = from._impl_.pooled_h_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.pooled_w_ = from._impl_.pooled_w_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.spatial_scale_ = from._impl_.spatial_scale_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ROIPoolingParameter::CopyFrom(const ROIPoolingParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ROIPoolingParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ROIPoolingParameter::IsInitialized() const {
  return true;
}

void ROIPoolingParameter::InternalSwap(ROIPoolingParameter* 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(ROIPoolingParameter, _impl_.pooled_w_)
      + sizeof(ROIPoolingParameter::_impl_.pooled_w_)
      - PROTOBUF_FIELD_OFFSET(ROIPoolingParameter, _impl_.pooled_h_)>(
          reinterpret_cast<char*>(&_impl_.pooled_h_),
          reinterpret_cast<char*>(&other->_impl_.pooled_h_));
  swap(_impl_.spatial_scale_, other->_impl_.spatial_scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ROIPoolingParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[68]);
}

// ===================================================================

class ProposalParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ProposalParameter>()._impl_._has_bits_);
  static void set_has_feat_stride(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_base_size(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_min_size(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_pre_nms_topn(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_post_nms_topn(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_nms_thresh(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

ProposalParameter::ProposalParameter(::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:opencv_caffe.ProposalParameter)
}
ProposalParameter::ProposalParameter(const ProposalParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  ProposalParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.ratio_){from._impl_.ratio_}
    , decltype(_impl_.scale_){from._impl_.scale_}
    , decltype(_impl_.feat_stride_){}
    , decltype(_impl_.base_size_){}
    , decltype(_impl_.min_size_){}
    , decltype(_impl_.pre_nms_topn_){}
    , decltype(_impl_.post_nms_topn_){}
    , decltype(_impl_.nms_thresh_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.feat_stride_, &from._impl_.feat_stride_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.nms_thresh_) -
    reinterpret_cast<char*>(&_impl_.feat_stride_)) + sizeof(_impl_.nms_thresh_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.ProposalParameter)
}

inline void ProposalParameter::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_.ratio_){arena}
    , decltype(_impl_.scale_){arena}
    , decltype(_impl_.feat_stride_){16u}
    , decltype(_impl_.base_size_){16u}
    , decltype(_impl_.min_size_){16u}
    , decltype(_impl_.pre_nms_topn_){6000u}
    , decltype(_impl_.post_nms_topn_){300u}
    , decltype(_impl_.nms_thresh_){0.7f}
  };
}

ProposalParameter::~ProposalParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.ProposalParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void ProposalParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.ratio_.~RepeatedField();
  _impl_.scale_.~RepeatedField();
}

void ProposalParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void ProposalParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ProposalParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.ratio_.Clear();
  _impl_.scale_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    _impl_.feat_stride_ = 16u;
    _impl_.base_size_ = 16u;
    _impl_.min_size_ = 16u;
    _impl_.pre_nms_topn_ = 6000u;
    _impl_.post_nms_topn_ = 300u;
    _impl_.nms_thresh_ = 0.7f;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ProposalParameter::_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 uint32 feat_stride = 1 [default = 16];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_feat_stride(&has_bits);
          _impl_.feat_stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 base_size = 2 [default = 16];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_base_size(&has_bits);
          _impl_.base_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 min_size = 3 [default = 16];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_min_size(&has_bits);
          _impl_.min_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float ratio = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_ratio(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<37>(ptr));
        } else if (static_cast<uint8_t>(tag) == 34) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_ratio(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float scale = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_scale(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<45>(ptr));
        } else if (static_cast<uint8_t>(tag) == 42) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_scale(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 pre_nms_topn = 6 [default = 6000];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_pre_nms_topn(&has_bits);
          _impl_.pre_nms_topn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 post_nms_topn = 7 [default = 300];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_post_nms_topn(&has_bits);
          _impl_.post_nms_topn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float nms_thresh = 8 [default = 0.7];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
          _Internal::set_has_nms_thresh(&has_bits);
          _impl_.nms_thresh_ = ::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* ProposalParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ProposalParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional uint32 feat_stride = 1 [default = 16];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_feat_stride(), target);
  }

  // optional uint32 base_size = 2 [default = 16];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_base_size(), target);
  }

  // optional uint32 min_size = 3 [default = 16];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_min_size(), target);
  }

  // repeated float ratio = 4;
  for (int i = 0, n = this->_internal_ratio_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_ratio(i), target);
  }

  // repeated float scale = 5;
  for (int i = 0, n = this->_internal_scale_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(5, this->_internal_scale(i), target);
  }

  // optional uint32 pre_nms_topn = 6 [default = 6000];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(6, this->_internal_pre_nms_topn(), target);
  }

  // optional uint32 post_nms_topn = 7 [default = 300];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_post_nms_topn(), target);
  }

  // optional float nms_thresh = 8 [default = 0.7];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(8, this->_internal_nms_thresh(), 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:opencv_caffe.ProposalParameter)
  return target;
}

size_t ProposalParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ProposalParameter)
  size_t total_size = 0;

  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated float ratio = 4;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_ratio_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_ratio_size());
    total_size += data_size;
  }

  // repeated float scale = 5;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_scale_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_scale_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional uint32 feat_stride = 1 [default = 16];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_feat_stride());
    }

    // optional uint32 base_size = 2 [default = 16];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_base_size());
    }

    // optional uint32 min_size = 3 [default = 16];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_min_size());
    }

    // optional uint32 pre_nms_topn = 6 [default = 6000];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_pre_nms_topn());
    }

    // optional uint32 post_nms_topn = 7 [default = 300];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_post_nms_topn());
    }

    // optional float nms_thresh = 8 [default = 0.7];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ProposalParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    ProposalParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ProposalParameter::GetClassData() const { return &_class_data_; }


void ProposalParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<ProposalParameter*>(&to_msg);
  auto& from = static_cast<const ProposalParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ProposalParameter)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.ratio_.MergeFrom(from._impl_.ratio_);
  _this->_impl_.scale_.MergeFrom(from._impl_.scale_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.feat_stride_ = from._impl_.feat_stride_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.base_size_ = from._impl_.base_size_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.min_size_ = from._impl_.min_size_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.pre_nms_topn_ = from._impl_.pre_nms_topn_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.post_nms_topn_ = from._impl_.post_nms_topn_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.nms_thresh_ = from._impl_.nms_thresh_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ProposalParameter::CopyFrom(const ProposalParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ProposalParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ProposalParameter::IsInitialized() const {
  return true;
}

void ProposalParameter::InternalSwap(ProposalParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.ratio_.InternalSwap(&other->_impl_.ratio_);
  _impl_.scale_.InternalSwap(&other->_impl_.scale_);
  swap(_impl_.feat_stride_, other->_impl_.feat_stride_);
  swap(_impl_.base_size_, other->_impl_.base_size_);
  swap(_impl_.min_size_, other->_impl_.min_size_);
  swap(_impl_.pre_nms_topn_, other->_impl_.pre_nms_topn_);
  swap(_impl_.post_nms_topn_, other->_impl_.post_nms_topn_);
  swap(_impl_.nms_thresh_, other->_impl_.nms_thresh_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ProposalParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[69]);
}

// ===================================================================

class PSROIPoolingParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<PSROIPoolingParameter>()._impl_._has_bits_);
  static void set_has_spatial_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_output_dim(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_group_size(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000007) ^ 0x00000007) != 0;
  }
};

PSROIPoolingParameter::PSROIPoolingParameter(::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:opencv_caffe.PSROIPoolingParameter)
}
PSROIPoolingParameter::PSROIPoolingParameter(const PSROIPoolingParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  PSROIPoolingParameter* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.spatial_scale_){}
    , decltype(_impl_.output_dim_){}
    , decltype(_impl_.group_size_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.spatial_scale_, &from._impl_.spatial_scale_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.group_size_) -
    reinterpret_cast<char*>(&_impl_.spatial_scale_)) + sizeof(_impl_.group_size_));
  // @@protoc_insertion_point(copy_constructor:opencv_caffe.PSROIPoolingParameter)
}

inline void PSROIPoolingParameter::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_.spatial_scale_){0}
    , decltype(_impl_.output_dim_){0}
    , decltype(_impl_.group_size_){0}
  };
}

PSROIPoolingParameter::~PSROIPoolingParameter() {
  // @@protoc_insertion_point(destructor:opencv_caffe.PSROIPoolingParameter)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void PSROIPoolingParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void PSROIPoolingParameter::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void PSROIPoolingParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.PSROIPoolingParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    ::memset(&_impl_.spatial_scale_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&_impl_.group_size_) -
        reinterpret_cast<char*>(&_impl_.spatial_scale_)) + sizeof(_impl_.group_size_));
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PSROIPoolingParameter::_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) {
      // required float spatial_scale = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_spatial_scale(&has_bits);
          _impl_.spatial_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // required int32 output_dim = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_output_dim(&has_bits);
          _impl_.output_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // required int32 group_size = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_group_size(&has_bits);
          _impl_.group_size_ = ::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* PSROIPoolingParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PSROIPoolingParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // required float spatial_scale = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(1, this->_internal_spatial_scale(), target);
  }

  // required int32 output_dim = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_output_dim(), target);
  }

  // required int32 group_size = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_group_size(), 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:opencv_caffe.PSROIPoolingParameter)
  return target;
}

size_t PSROIPoolingParameter::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:opencv_caffe.PSROIPoolingParameter)
  size_t total_size = 0;

  if (_internal_has_spatial_scale()) {
    // required float spatial_scale = 1;
    total_size += 1 + 4;
  }

  if (_internal_has_output_dim()) {
    // required int32 output_dim = 2;
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_output_dim());
  }

  if (_internal_has_group_size()) {
    // required int32 group_size = 3;
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_group_size());
  }

  return total_size;
}
size_t PSROIPoolingParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PSROIPoolingParameter)
  size_t total_size = 0;

  if (((_impl_._has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) {  // All required fields are present.
    // required float spatial_scale = 1;
    total_size += 1 + 4;

    // required int32 output_dim = 2;
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_output_dim());

    // required int32 group_size = 3;
    total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_group_size());

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PSROIPoolingParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    PSROIPoolingParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PSROIPoolingParameter::GetClassData() const { return &_class_data_; }


void PSROIPoolingParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<PSROIPoolingParameter*>(&to_msg);
  auto& from = static_cast<const PSROIPoolingParameter&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PSROIPoolingParameter)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.spatial_scale_ = from._impl_.spatial_scale_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.output_dim_ = from._impl_.output_dim_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.group_size_ = from._impl_.group_size_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void PSROIPoolingParameter::CopyFrom(const PSROIPoolingParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.PSROIPoolingParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool PSROIPoolingParameter::IsInitialized() const {
  if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
  return true;
}

void PSROIPoolingParameter::InternalSwap(PSROIPoolingParameter* 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(PSROIPoolingParameter, _impl_.group_size_)
      + sizeof(PSROIPoolingParameter::_impl_.group_size_)
      - PROTOBUF_FIELD_OFFSET(PSROIPoolingParameter, _impl_.spatial_scale_)>(
          reinterpret_cast<char*>(&_impl_.spatial_scale_),
          reinterpret_cast<char*>(&other->_impl_.spatial_scale_));
}

::PROTOBUF_NAMESPACE_ID::Metadata PSROIPoolingParameter::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
      file_level_metadata_opencv_2dcaffe_2eproto[70]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace opencv_caffe
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::opencv_caffe::BlobShape*
Arena::CreateMaybeMessage< ::opencv_caffe::BlobShape >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::BlobShape >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::BlobProto*
Arena::CreateMaybeMessage< ::opencv_caffe::BlobProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::BlobProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::BlobProtoVector*
Arena::CreateMaybeMessage< ::opencv_caffe::BlobProtoVector >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::BlobProtoVector >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PermuteParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::PermuteParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::PermuteParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NormalizeBBoxParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::NormalizeBBoxParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::NormalizeBBoxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PriorBoxParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::PriorBoxParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::PriorBoxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::DetectionOutputParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::DetectionOutputParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::DetectionOutputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::Datum*
Arena::CreateMaybeMessage< ::opencv_caffe::Datum >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::Datum >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::FillerParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::FillerParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::FillerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NetParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::NetParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::NetParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SolverParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::SolverParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::SolverParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SolverState*
Arena::CreateMaybeMessage< ::opencv_caffe::SolverState >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::SolverState >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NetState*
Arena::CreateMaybeMessage< ::opencv_caffe::NetState >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::NetState >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NetStateRule*
Arena::CreateMaybeMessage< ::opencv_caffe::NetStateRule >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::NetStateRule >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ParamSpec*
Arena::CreateMaybeMessage< ::opencv_caffe::ParamSpec >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ParamSpec >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::LayerParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::LayerParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::LayerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::TransformationParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::TransformationParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::TransformationParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::LossParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::LossParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::LossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::AccuracyParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::AccuracyParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::AccuracyParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ArgMaxParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ArgMaxParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ArgMaxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ConcatParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ConcatParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ConcatParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::BatchNormParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::BatchNormParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::BatchNormParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::BiasParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::BiasParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::BiasParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ContrastiveLossParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ContrastiveLossParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ContrastiveLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ConvolutionParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ConvolutionParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ConvolutionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::CropParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::CropParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::CropParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::DataParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::DataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::DataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NonMaximumSuppressionParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::NonMaximumSuppressionParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::NonMaximumSuppressionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SaveOutputParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::SaveOutputParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::SaveOutputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::DropoutParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::DropoutParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::DropoutParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::DummyDataParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::DummyDataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::DummyDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::EltwiseParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::EltwiseParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::EltwiseParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ELUParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ELUParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ELUParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::EmbedParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::EmbedParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::EmbedParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ExpParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ExpParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ExpParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::FlattenParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::FlattenParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::FlattenParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::HDF5DataParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::HDF5DataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::HDF5DataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::HDF5OutputParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::HDF5OutputParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::HDF5OutputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::HingeLossParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::HingeLossParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::HingeLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ImageDataParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ImageDataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ImageDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::InfogainLossParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::InfogainLossParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::InfogainLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::InnerProductParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::InnerProductParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::InnerProductParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::InputParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::InputParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::InputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::LogParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::LogParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::LogParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::LRNParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::LRNParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::LRNParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::MemoryDataParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::MemoryDataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::MemoryDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::MVNParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::MVNParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::MVNParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ParameterParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ParameterParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ParameterParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PoolingParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::PoolingParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::PoolingParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PowerParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::PowerParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::PowerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PythonParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::PythonParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::PythonParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::RecurrentParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::RecurrentParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::RecurrentParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ReductionParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ReductionParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ReductionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ReLUParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ReLUParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ReLUParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ReshapeParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ReshapeParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ReshapeParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ScaleParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ScaleParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ScaleParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SigmoidParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::SigmoidParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::SigmoidParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SliceParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::SliceParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::SliceParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SoftmaxParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::SoftmaxParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::SoftmaxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::TanHParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::TanHParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::TanHParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::TileParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::TileParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::TileParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ThresholdParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ThresholdParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ThresholdParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::WindowDataParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::WindowDataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::WindowDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SPPParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::SPPParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::SPPParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::V1LayerParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::V1LayerParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::V1LayerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::V0LayerParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::V0LayerParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::V0LayerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PReLUParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::PReLUParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::PReLUParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NormalizedBBox*
Arena::CreateMaybeMessage< ::opencv_caffe::NormalizedBBox >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::NormalizedBBox >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ROIPoolingParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ROIPoolingParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ROIPoolingParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ProposalParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::ProposalParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::ProposalParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PSROIPoolingParameter*
Arena::CreateMaybeMessage< ::opencv_caffe::PSROIPoolingParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::opencv_caffe::PSROIPoolingParameter >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
