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

#include "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 caffe {
constexpr BlobShape::BlobShape(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : dim_()
  , _dim_cached_byte_size_(0){}
struct BlobShapeDefaultTypeInternal {
  constexpr BlobShapeDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~BlobShapeDefaultTypeInternal() {}
  union {
    BlobShape _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BlobShapeDefaultTypeInternal _BlobShape_default_instance_;
constexpr BlobProto::BlobProto(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : data_()
  , diff_()
  , double_data_()
  , double_diff_()
  , shape_(nullptr)
  , num_(0)
  , channels_(0)
  , height_(0)
  , width_(0){}
struct BlobProtoDefaultTypeInternal {
  constexpr BlobProtoDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~BlobProtoDefaultTypeInternal() {}
  union {
    BlobProto _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BlobProtoDefaultTypeInternal _BlobProto_default_instance_;
constexpr BlobProtoVector::BlobProtoVector(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : blobs_(){}
struct BlobProtoVectorDefaultTypeInternal {
  constexpr BlobProtoVectorDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~BlobProtoVectorDefaultTypeInternal() {}
  union {
    BlobProtoVector _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BlobProtoVectorDefaultTypeInternal _BlobProtoVector_default_instance_;
constexpr Datum::Datum(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : float_data_()
  , labels_()
  , float_labels_()
  , data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , byte_labels_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , channels_(0)
  , height_(0)
  , width_(0)
  , label_(0)
  , encoded_(false)
  , float_label_(0){}
struct DatumDefaultTypeInternal {
  constexpr DatumDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DatumDefaultTypeInternal() {}
  union {
    Datum _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DatumDefaultTypeInternal _Datum_default_instance_;
constexpr MTCNNBBox::MTCNNBBox(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : xmin_(0)
  , ymin_(0)
  , xmax_(0)
  , ymax_(0){}
struct MTCNNBBoxDefaultTypeInternal {
  constexpr MTCNNBBoxDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~MTCNNBBoxDefaultTypeInternal() {}
  union {
    MTCNNBBox _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MTCNNBBoxDefaultTypeInternal _MTCNNBBox_default_instance_;
constexpr MTCNNDatum::MTCNNDatum(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : pts_()
  , datum_(nullptr)
  , roi_(nullptr){}
struct MTCNNDatumDefaultTypeInternal {
  constexpr MTCNNDatumDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~MTCNNDatumDefaultTypeInternal() {}
  union {
    MTCNNDatum _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MTCNNDatumDefaultTypeInternal _MTCNNDatum_default_instance_;
constexpr LabelMapItem::LabelMapItem(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , display_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , label_(0){}
struct LabelMapItemDefaultTypeInternal {
  constexpr LabelMapItemDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LabelMapItemDefaultTypeInternal() {}
  union {
    LabelMapItem _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LabelMapItemDefaultTypeInternal _LabelMapItem_default_instance_;
constexpr LabelMap::LabelMap(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : item_(){}
struct LabelMapDefaultTypeInternal {
  constexpr LabelMapDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LabelMapDefaultTypeInternal() {}
  union {
    LabelMap _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LabelMapDefaultTypeInternal _LabelMap_default_instance_;
constexpr Sampler::Sampler(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : min_scale_(1)
  , max_scale_(1)
  , min_aspect_ratio_(1)
  , max_aspect_ratio_(1){}
struct SamplerDefaultTypeInternal {
  constexpr SamplerDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SamplerDefaultTypeInternal() {}
  union {
    Sampler _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SamplerDefaultTypeInternal _Sampler_default_instance_;
constexpr SampleConstraint::SampleConstraint(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : min_jaccard_overlap_(0)
  , max_jaccard_overlap_(0)
  , min_sample_coverage_(0)
  , max_sample_coverage_(0)
  , min_object_coverage_(0)
  , max_object_coverage_(0){}
struct SampleConstraintDefaultTypeInternal {
  constexpr SampleConstraintDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SampleConstraintDefaultTypeInternal() {}
  union {
    SampleConstraint _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SampleConstraintDefaultTypeInternal _SampleConstraint_default_instance_;
constexpr BatchSampler::BatchSampler(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : sampler_(nullptr)
  , sample_constraint_(nullptr)
  , max_sample_(0u)
  , use_original_image_(true)
  , max_trials_(100u){}
struct BatchSamplerDefaultTypeInternal {
  constexpr BatchSamplerDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~BatchSamplerDefaultTypeInternal() {}
  union {
    BatchSampler _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BatchSamplerDefaultTypeInternal _BatchSampler_default_instance_;
constexpr EmitConstraint::EmitConstraint(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : emit_type_(0)

  , emit_overlap_(0){}
struct EmitConstraintDefaultTypeInternal {
  constexpr EmitConstraintDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~EmitConstraintDefaultTypeInternal() {}
  union {
    EmitConstraint _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EmitConstraintDefaultTypeInternal _EmitConstraint_default_instance_;
constexpr NormalizedBBox::NormalizedBBox(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : xmin_(0)
  , ymin_(0)
  , xmax_(0)
  , ymax_(0)
  , label_(0)
  , difficult_(false)
  , score_(0)
  , size_(0){}
struct NormalizedBBoxDefaultTypeInternal {
  constexpr NormalizedBBoxDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NormalizedBBoxDefaultTypeInternal() {}
  union {
    NormalizedBBox _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NormalizedBBoxDefaultTypeInternal _NormalizedBBox_default_instance_;
constexpr Annotation::Annotation(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : bbox_(nullptr)
  , instance_id_(0){}
struct AnnotationDefaultTypeInternal {
  constexpr AnnotationDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~AnnotationDefaultTypeInternal() {}
  union {
    Annotation _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AnnotationDefaultTypeInternal _Annotation_default_instance_;
constexpr AnnotationGroup::AnnotationGroup(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : annotation_()
  , group_label_(0){}
struct AnnotationGroupDefaultTypeInternal {
  constexpr AnnotationGroupDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~AnnotationGroupDefaultTypeInternal() {}
  union {
    AnnotationGroup _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AnnotationGroupDefaultTypeInternal _AnnotationGroup_default_instance_;
constexpr AnnotatedDatum::AnnotatedDatum(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : annotation_group_()
  , datum_(nullptr)
  , type_(0)
{}
struct AnnotatedDatumDefaultTypeInternal {
  constexpr AnnotatedDatumDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~AnnotatedDatumDefaultTypeInternal() {}
  union {
    AnnotatedDatum _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AnnotatedDatumDefaultTypeInternal _AnnotatedDatum_default_instance_;
constexpr FillerParameter::FillerParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : type_(nullptr)
  , value_(0)
  , min_(0)
  , mean_(0)
  , variance_norm_(0)

  , sparse_(-1)
  , max_(1)
  , std_(1){}
struct FillerParameterDefaultTypeInternal {
  constexpr FillerParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~FillerParameterDefaultTypeInternal() {}
  union {
    FillerParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FillerParameterDefaultTypeInternal _FillerParameter_default_instance_;
constexpr NetParameter::NetParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : layers_()
  , input_()
  , input_dim_()
  , input_shape_()
  , layer_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , state_(nullptr)
  , force_backward_(false)
  , debug_info_(false){}
struct NetParameterDefaultTypeInternal {
  constexpr NetParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NetParameterDefaultTypeInternal() {}
  union {
    NetParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NetParameterDefaultTypeInternal _NetParameter_default_instance_;
constexpr SolverParameter::SolverParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : test_net_()
  , test_iter_()
  , test_net_param_()
  , test_state_()
  , stepvalue_()
  , train_net_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , lr_policy_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , snapshot_prefix_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , net_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , regularization_type_(nullptr)
  , type_(nullptr)
  , eval_type_(nullptr)
  , ap_version_(nullptr)
  , train_net_param_(nullptr)
  , net_param_(nullptr)
  , train_state_(nullptr)
  , test_interval_(0)
  , base_lr_(0)
  , display_(0)
  , max_iter_(0)
  , gamma_(0)
  , power_(0)
  , momentum_(0)
  , weight_decay_(0)
  , stepsize_(0)
  , snapshot_(0)
  , device_id_(0)
  , show_per_class_result_(false)
  , test_compute_loss_(false)
  , snapshot_diff_(false)
  , debug_info_(false)
  , solver_type_(0)

  , momentum2_(0.999f)
  , random_seed_(int64_t{-1})
  , solver_mode_(1)

  , delta_(1e-08f)
  , average_loss_(1)
  , clip_gradients_(-1)
  , test_initialization_(true)
  , snapshot_after_train_(true)
  , layer_wise_reduce_(true)
  , iter_size_(1)
  , snapshot_format_(1)

  , rms_decay_(0.99f){}
struct SolverParameterDefaultTypeInternal {
  constexpr SolverParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SolverParameterDefaultTypeInternal() {}
  union {
    SolverParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SolverParameterDefaultTypeInternal _SolverParameter_default_instance_;
constexpr SolverState::SolverState(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : history_()
  , learned_net_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , iter_(0)
  , current_step_(0){}
struct SolverStateDefaultTypeInternal {
  constexpr SolverStateDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SolverStateDefaultTypeInternal() {}
  union {
    SolverState _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SolverStateDefaultTypeInternal _SolverState_default_instance_;
constexpr NetState::NetState(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : stage_()
  , level_(0)
  , phase_(1)
{}
struct NetStateDefaultTypeInternal {
  constexpr NetStateDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NetStateDefaultTypeInternal() {}
  union {
    NetState _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NetStateDefaultTypeInternal _NetState_default_instance_;
constexpr NetStateRule::NetStateRule(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : stage_()
  , not_stage_()
  , phase_(0)

  , min_level_(0)
  , max_level_(0){}
struct NetStateRuleDefaultTypeInternal {
  constexpr NetStateRuleDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NetStateRuleDefaultTypeInternal() {}
  union {
    NetStateRule _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NetStateRuleDefaultTypeInternal _NetStateRule_default_instance_;
constexpr ParamSpec::ParamSpec(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , share_mode_(0)

  , lr_mult_(1)
  , decay_mult_(1){}
struct ParamSpecDefaultTypeInternal {
  constexpr ParamSpecDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ParamSpecDefaultTypeInternal() {}
  union {
    ParamSpec _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ParamSpecDefaultTypeInternal _ParamSpec_default_instance_;
constexpr LayerParameter::LayerParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : bottom_()
  , top_()
  , loss_weight_()
  , param_()
  , blobs_()
  , include_()
  , exclude_()
  , propagate_down_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , type_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , transform_param_(nullptr)
  , loss_param_(nullptr)
  , accuracy_param_(nullptr)
  , argmax_param_(nullptr)
  , concat_param_(nullptr)
  , contrastive_loss_param_(nullptr)
  , convolution_param_(nullptr)
  , data_param_(nullptr)
  , dropout_param_(nullptr)
  , dummy_data_param_(nullptr)
  , eltwise_param_(nullptr)
  , exp_param_(nullptr)
  , hdf5_data_param_(nullptr)
  , hdf5_output_param_(nullptr)
  , hinge_loss_param_(nullptr)
  , image_data_param_(nullptr)
  , infogain_loss_param_(nullptr)
  , inner_product_param_(nullptr)
  , lrn_param_(nullptr)
  , memory_data_param_(nullptr)
  , mvn_param_(nullptr)
  , pooling_param_(nullptr)
  , power_param_(nullptr)
  , relu_param_(nullptr)
  , sigmoid_param_(nullptr)
  , softmax_param_(nullptr)
  , slice_param_(nullptr)
  , tanh_param_(nullptr)
  , threshold_param_(nullptr)
  , window_data_param_(nullptr)
  , python_param_(nullptr)
  , prelu_param_(nullptr)
  , spp_param_(nullptr)
  , reshape_param_(nullptr)
  , log_param_(nullptr)
  , flatten_param_(nullptr)
  , reduction_param_(nullptr)
  , embed_param_(nullptr)
  , tile_param_(nullptr)
  , batch_norm_param_(nullptr)
  , elu_param_(nullptr)
  , bias_param_(nullptr)
  , scale_param_(nullptr)
  , input_param_(nullptr)
  , crop_param_(nullptr)
  , parameter_param_(nullptr)
  , recurrent_param_(nullptr)
  , convolution3d_param_(nullptr)
  , pooling3d_param_(nullptr)
  , annotated_data_param_(nullptr)
  , multibox_loss_param_(nullptr)
  , permute_param_(nullptr)
  , prior_box_param_(nullptr)
  , detection_output_param_(nullptr)
  , detection_evaluate_param_(nullptr)
  , norm_param_(nullptr)
  , im2seq_param_(nullptr)
  , seq2out_param_(nullptr)
  , img_size_param_(nullptr)
  , lstm_param_(nullptr)
  , center_loss_param_(nullptr)
  , shuffle_channel_param_(nullptr)
  , roi_pooling_param_(nullptr)
  , clip_param_(nullptr)
  , upsample_param_(nullptr)
  , interp_param_(nullptr)
  , phase_(0)
{}
struct LayerParameterDefaultTypeInternal {
  constexpr LayerParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LayerParameterDefaultTypeInternal() {}
  union {
    LayerParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LayerParameterDefaultTypeInternal _LayerParameter_default_instance_;
constexpr ClipParameter::ClipParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : min_(0)
  , max_(0){}
struct ClipParameterDefaultTypeInternal {
  constexpr ClipParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ClipParameterDefaultTypeInternal() {}
  union {
    ClipParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ClipParameterDefaultTypeInternal _ClipParameter_default_instance_;
constexpr ROIPoolingParameter::ROIPoolingParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : pooled_h_(0u)
  , pooled_w_(0u)
  , spatial_scale_(1){}
struct ROIPoolingParameterDefaultTypeInternal {
  constexpr ROIPoolingParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ROIPoolingParameterDefaultTypeInternal() {}
  union {
    ROIPoolingParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ROIPoolingParameterDefaultTypeInternal _ROIPoolingParameter_default_instance_;
constexpr InterpParameter::InterpParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : height_(0)
  , width_(0)
  , pad_beg_(0)
  , pad_end_(0)
  , zoom_factor_(1)
  , shrink_factor_(1){}
struct InterpParameterDefaultTypeInternal {
  constexpr InterpParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~InterpParameterDefaultTypeInternal() {}
  union {
    InterpParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT InterpParameterDefaultTypeInternal _InterpParameter_default_instance_;
constexpr LSTMParameter::LSTMParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : weight_filler_(nullptr)
  , bias_filler_(nullptr)
  , num_output_(0u)
  , clipping_threshold_(0)
  , paramq_(0u)
  , scale_in_(0)
  , scale_out_(0)
  , a_max_(127)
  , batch_size_(1u)
  , a_min_(-128){}
struct LSTMParameterDefaultTypeInternal {
  constexpr LSTMParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LSTMParameterDefaultTypeInternal() {}
  union {
    LSTMParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LSTMParameterDefaultTypeInternal _LSTMParameter_default_instance_;
constexpr Im2seqParameter::Im2seqParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : direction_(0)

  , line2time_loss_(false)
  , size_(1u)
  , stride_(1u){}
struct Im2seqParameterDefaultTypeInternal {
  constexpr Im2seqParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~Im2seqParameterDefaultTypeInternal() {}
  union {
    Im2seqParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Im2seqParameterDefaultTypeInternal _Im2seqParameter_default_instance_;
constexpr CenterLossParameter::CenterLossParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : distance_type_(nullptr)
  , center_filler_(nullptr)
  , num_output_(0u)
  , axis_(1){}
struct CenterLossParameterDefaultTypeInternal {
  constexpr CenterLossParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~CenterLossParameterDefaultTypeInternal() {}
  union {
    CenterLossParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT CenterLossParameterDefaultTypeInternal _CenterLossParameter_default_instance_;
constexpr Seq2outParameter::Seq2outParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized){}
struct Seq2outParameterDefaultTypeInternal {
  constexpr Seq2outParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~Seq2outParameterDefaultTypeInternal() {}
  union {
    Seq2outParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Seq2outParameterDefaultTypeInternal _Seq2outParameter_default_instance_;
constexpr ImgSizeParameter::ImgSizeParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : pretrained_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , pretrained_layer_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , pretrained_layer_bin_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , x_scaling_(1)
  , y_scaling_(1){}
struct ImgSizeParameterDefaultTypeInternal {
  constexpr ImgSizeParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ImgSizeParameterDefaultTypeInternal() {}
  union {
    ImgSizeParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ImgSizeParameterDefaultTypeInternal _ImgSizeParameter_default_instance_;
constexpr TransformationParameter::TransformationParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : mean_value_()
  , mean_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , resize_param_(nullptr)
  , noise_param_(nullptr)
  , emit_constraint_(nullptr)
  , distort_param_(nullptr)
  , expand_param_(nullptr)
  , crop_size_(0u)
  , mirror_(false)
  , force_color_(false)
  , force_gray_(false)
  , crop_h_(0u)
  , crop_w_(0u)
  , scale_(1){}
struct TransformationParameterDefaultTypeInternal {
  constexpr TransformationParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TransformationParameterDefaultTypeInternal() {}
  union {
    TransformationParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TransformationParameterDefaultTypeInternal _TransformationParameter_default_instance_;
constexpr ResizeParameter::ResizeParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : pad_value_()
  , interp_mode_()
  , height_(0u)
  , width_(0u)
  , height_scale_(0u)
  , width_scale_(0u)
  , pad_mode_(1)

  , prob_(1)
  , resize_mode_(1)
{}
struct ResizeParameterDefaultTypeInternal {
  constexpr ResizeParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ResizeParameterDefaultTypeInternal() {}
  union {
    ResizeParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ResizeParameterDefaultTypeInternal _ResizeParameter_default_instance_;
constexpr SaltPepperParameter::SaltPepperParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : value_()
  , fraction_(0){}
struct SaltPepperParameterDefaultTypeInternal {
  constexpr SaltPepperParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SaltPepperParameterDefaultTypeInternal() {}
  union {
    SaltPepperParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SaltPepperParameterDefaultTypeInternal _SaltPepperParameter_default_instance_;
constexpr NoiseParameter::NoiseParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : saltpepper_param_(nullptr)
  , prob_(0)
  , hist_eq_(false)
  , inverse_(false)
  , decolorize_(false)
  , gauss_blur_(false)
  , posterize_(false)
  , erode_(false)
  , saltpepper_(false)
  , clahe_(false)
  , convert_to_hsv_(false)
  , convert_to_lab_(false)
  , jpeg_(-1){}
struct NoiseParameterDefaultTypeInternal {
  constexpr NoiseParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NoiseParameterDefaultTypeInternal() {}
  union {
    NoiseParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NoiseParameterDefaultTypeInternal _NoiseParameter_default_instance_;
constexpr DistortionParameter::DistortionParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : brightness_prob_(0)
  , brightness_delta_(0)
  , contrast_prob_(0)
  , contrast_lower_(0)
  , contrast_upper_(0)
  , hue_prob_(0)
  , hue_delta_(0)
  , saturation_prob_(0)
  , saturation_lower_(0)
  , saturation_upper_(0)
  , random_order_prob_(0){}
struct DistortionParameterDefaultTypeInternal {
  constexpr DistortionParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DistortionParameterDefaultTypeInternal() {}
  union {
    DistortionParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DistortionParameterDefaultTypeInternal _DistortionParameter_default_instance_;
constexpr ExpansionParameter::ExpansionParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : prob_(1)
  , max_expand_ratio_(1){}
struct ExpansionParameterDefaultTypeInternal {
  constexpr ExpansionParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ExpansionParameterDefaultTypeInternal() {}
  union {
    ExpansionParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ExpansionParameterDefaultTypeInternal _ExpansionParameter_default_instance_;
constexpr LossParameter::LossParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : ignore_label_(0)
  , normalize_(false)
  , normalization_(1)

  , is_num_scale_(true){}
struct LossParameterDefaultTypeInternal {
  constexpr LossParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LossParameterDefaultTypeInternal() {}
  union {
    LossParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LossParameterDefaultTypeInternal _LossParameter_default_instance_;
constexpr AccuracyParameter::AccuracyParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : ignore_label_(0)
  , top_k_(1u)
  , axis_(1){}
struct AccuracyParameterDefaultTypeInternal {
  constexpr AccuracyParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~AccuracyParameterDefaultTypeInternal() {}
  union {
    AccuracyParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AccuracyParameterDefaultTypeInternal _AccuracyParameter_default_instance_;
constexpr AnnotatedDataParameter::AnnotatedDataParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : batch_sampler_()
  , label_map_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , anno_type_(0)
{}
struct AnnotatedDataParameterDefaultTypeInternal {
  constexpr AnnotatedDataParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~AnnotatedDataParameterDefaultTypeInternal() {}
  union {
    AnnotatedDataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AnnotatedDataParameterDefaultTypeInternal _AnnotatedDataParameter_default_instance_;
constexpr ArgMaxParameter::ArgMaxParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : out_max_val_(false)
  , softmax_threshold_(false)
  , axis_(0)
  , top_k_(1u){}
struct ArgMaxParameterDefaultTypeInternal {
  constexpr ArgMaxParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ArgMaxParameterDefaultTypeInternal() {}
  union {
    ArgMaxParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ArgMaxParameterDefaultTypeInternal _ArgMaxParameter_default_instance_;
constexpr ConcatParameter::ConcatParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : concat_dim_(1u)
  , axis_(1){}
struct ConcatParameterDefaultTypeInternal {
  constexpr ConcatParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ConcatParameterDefaultTypeInternal() {}
  union {
    ConcatParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConcatParameterDefaultTypeInternal _ConcatParameter_default_instance_;
constexpr BatchNormParameter::BatchNormParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : filler_(nullptr)
  , bias_filler_(nullptr)
  , scale_filler_(nullptr)
  , use_global_stats_(false)
  , use_weight_bias_(true)
  , bias_term_(true)
  , moving_average_fraction_(0.999f)
  , eps_(1e-05f){}
struct BatchNormParameterDefaultTypeInternal {
  constexpr BatchNormParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~BatchNormParameterDefaultTypeInternal() {}
  union {
    BatchNormParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BatchNormParameterDefaultTypeInternal _BatchNormParameter_default_instance_;
constexpr BiasParameter::BiasParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : filler_(nullptr)
  , axis_(1)
  , num_axes_(1){}
struct BiasParameterDefaultTypeInternal {
  constexpr BiasParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~BiasParameterDefaultTypeInternal() {}
  union {
    BiasParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BiasParameterDefaultTypeInternal _BiasParameter_default_instance_;
constexpr ContrastiveLossParameter::ContrastiveLossParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : legacy_version_(false)
  , margin_(1){}
struct ContrastiveLossParameterDefaultTypeInternal {
  constexpr ContrastiveLossParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ContrastiveLossParameterDefaultTypeInternal() {}
  union {
    ContrastiveLossParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ContrastiveLossParameterDefaultTypeInternal _ContrastiveLossParameter_default_instance_;
constexpr ConvolutionParameter::ConvolutionParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : pad_()
  , kernel_size_()
  , stride_()
  , dilation_()
  , weight_filler_(nullptr)
  , bias_filler_(nullptr)
  , num_output_(0u)
  , pad_h_(0u)
  , pad_w_(0u)
  , kernel_h_(0u)
  , kernel_w_(0u)
  , stride_h_(0u)
  , stride_w_(0u)
  , engine_(0)

  , force_nd_im2col_(false)
  , paramq_(0u)
  , params_(0)
  , scale_in_(0)
  , scale_out_(0)
  , a_max_(127)
  , bias_term_(true)
  , group_(1u)
  , axis_(1)
  , a_min_(-128){}
struct ConvolutionParameterDefaultTypeInternal {
  constexpr ConvolutionParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ConvolutionParameterDefaultTypeInternal() {}
  union {
    ConvolutionParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConvolutionParameterDefaultTypeInternal _ConvolutionParameter_default_instance_;
constexpr Convolution3DParameter::Convolution3DParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : weight_filler_(nullptr)
  , bias_filler_(nullptr)
  , num_output_(0u)
  , pad_(0u)
  , kernel_size_(0u)
  , kernel_depth_(0u)
  , temporal_pad_(0u)
  , filter_group_(1u)
  , bias_term_(true)
  , group_(1u)
  , stride_(1u)
  , temporal_stride_(1u){}
struct Convolution3DParameterDefaultTypeInternal {
  constexpr Convolution3DParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~Convolution3DParameterDefaultTypeInternal() {}
  union {
    Convolution3DParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Convolution3DParameterDefaultTypeInternal _Convolution3DParameter_default_instance_;
constexpr CropParameter::CropParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : offset_()
  , axis_(2){}
struct CropParameterDefaultTypeInternal {
  constexpr CropParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~CropParameterDefaultTypeInternal() {}
  union {
    CropParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT CropParameterDefaultTypeInternal _CropParameter_default_instance_;
constexpr DataParameter::DataParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , mean_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , batch_size_(0u)
  , crop_size_(0u)
  , rand_skip_(0u)
  , backend_(0)

  , mirror_(false)
  , force_encoded_color_(false)
  , output_width_(false)
  , label_size_(0u)
  , data_width_(0u)
  , scale_(1)
  , prefetch_(4u){}
struct DataParameterDefaultTypeInternal {
  constexpr DataParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DataParameterDefaultTypeInternal() {}
  union {
    DataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DataParameterDefaultTypeInternal _DataParameter_default_instance_;
constexpr DetectionEvaluateParameter::DetectionEvaluateParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : name_size_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , resize_param_(nullptr)
  , num_classes_(0u)
  , background_label_id_(0u)
  , overlap_threshold_(0.5f)
  , evaluate_difficult_gt_(true){}
struct DetectionEvaluateParameterDefaultTypeInternal {
  constexpr DetectionEvaluateParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DetectionEvaluateParameterDefaultTypeInternal() {}
  union {
    DetectionEvaluateParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DetectionEvaluateParameterDefaultTypeInternal _DetectionEvaluateParameter_default_instance_;
constexpr NonMaximumSuppressionParameter::NonMaximumSuppressionParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : top_k_(0)
  , nms_threshold_(0.3f)
  , eta_(1){}
struct NonMaximumSuppressionParameterDefaultTypeInternal {
  constexpr NonMaximumSuppressionParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NonMaximumSuppressionParameterDefaultTypeInternal() {}
  union {
    NonMaximumSuppressionParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NonMaximumSuppressionParameterDefaultTypeInternal _NonMaximumSuppressionParameter_default_instance_;
constexpr SaveOutputParameter::SaveOutputParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : output_directory_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , output_name_prefix_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , output_format_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , label_map_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , name_size_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , resize_param_(nullptr)
  , num_test_image_(0u){}
struct SaveOutputParameterDefaultTypeInternal {
  constexpr SaveOutputParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SaveOutputParameterDefaultTypeInternal() {}
  union {
    SaveOutputParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SaveOutputParameterDefaultTypeInternal _SaveOutputParameter_default_instance_;
constexpr DetectionOutputParameter::DetectionOutputParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : save_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , nms_param_(nullptr)
  , save_output_param_(nullptr)
  , num_classes_(0u)
  , background_label_id_(0)
  , confidence_threshold_(0)
  , variance_encoded_in_target_(false)
  , visualize_(false)
  , visualize_threshold_(0)
  , share_location_(true)
  , code_type_(1)

  , keep_top_k_(-1)
  , objectness_score_(0.01f){}
struct DetectionOutputParameterDefaultTypeInternal {
  constexpr DetectionOutputParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DetectionOutputParameterDefaultTypeInternal() {}
  union {
    DetectionOutputParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DetectionOutputParameterDefaultTypeInternal _DetectionOutputParameter_default_instance_;
constexpr DropoutParameter::DropoutParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : dropout_ratio_(0.5f){}
struct DropoutParameterDefaultTypeInternal {
  constexpr DropoutParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DropoutParameterDefaultTypeInternal() {}
  union {
    DropoutParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DropoutParameterDefaultTypeInternal _DropoutParameter_default_instance_;
constexpr DummyDataParameter::DummyDataParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : data_filler_()
  , num_()
  , channels_()
  , height_()
  , width_()
  , shape_(){}
struct DummyDataParameterDefaultTypeInternal {
  constexpr DummyDataParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~DummyDataParameterDefaultTypeInternal() {}
  union {
    DummyDataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DummyDataParameterDefaultTypeInternal _DummyDataParameter_default_instance_;
constexpr EltwiseParameter::EltwiseParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : coeff_()
  , operation_(1)

  , stable_prod_grad_(true){}
struct EltwiseParameterDefaultTypeInternal {
  constexpr EltwiseParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~EltwiseParameterDefaultTypeInternal() {}
  union {
    EltwiseParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EltwiseParameterDefaultTypeInternal _EltwiseParameter_default_instance_;
constexpr ELUParameter::ELUParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : alpha_(1){}
struct ELUParameterDefaultTypeInternal {
  constexpr ELUParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ELUParameterDefaultTypeInternal() {}
  union {
    ELUParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ELUParameterDefaultTypeInternal _ELUParameter_default_instance_;
constexpr EmbedParameter::EmbedParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : weight_filler_(nullptr)
  , bias_filler_(nullptr)
  , num_output_(0u)
  , input_dim_(0u)
  , bias_term_(true){}
struct EmbedParameterDefaultTypeInternal {
  constexpr EmbedParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~EmbedParameterDefaultTypeInternal() {}
  union {
    EmbedParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EmbedParameterDefaultTypeInternal _EmbedParameter_default_instance_;
constexpr ExpParameter::ExpParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : shift_(0)
  , base_(-1)
  , scale_(1){}
struct ExpParameterDefaultTypeInternal {
  constexpr ExpParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ExpParameterDefaultTypeInternal() {}
  union {
    ExpParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ExpParameterDefaultTypeInternal _ExpParameter_default_instance_;
constexpr FlattenParameter::FlattenParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : axis_(1)
  , end_axis_(-1){}
struct FlattenParameterDefaultTypeInternal {
  constexpr FlattenParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~FlattenParameterDefaultTypeInternal() {}
  union {
    FlattenParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FlattenParameterDefaultTypeInternal _FlattenParameter_default_instance_;
constexpr HDF5DataParameter::HDF5DataParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , batch_size_(0u)
  , shuffle_(false){}
struct HDF5DataParameterDefaultTypeInternal {
  constexpr HDF5DataParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~HDF5DataParameterDefaultTypeInternal() {}
  union {
    HDF5DataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HDF5DataParameterDefaultTypeInternal _HDF5DataParameter_default_instance_;
constexpr HDF5OutputParameter::HDF5OutputParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : file_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct HDF5OutputParameterDefaultTypeInternal {
  constexpr HDF5OutputParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~HDF5OutputParameterDefaultTypeInternal() {}
  union {
    HDF5OutputParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HDF5OutputParameterDefaultTypeInternal _HDF5OutputParameter_default_instance_;
constexpr HingeLossParameter::HingeLossParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : norm_(1)
{}
struct HingeLossParameterDefaultTypeInternal {
  constexpr HingeLossParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~HingeLossParameterDefaultTypeInternal() {}
  union {
    HingeLossParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HingeLossParameterDefaultTypeInternal _HingeLossParameter_default_instance_;
constexpr ImageDataParameter::ImageDataParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , mean_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , root_folder_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , crop_size_(0u)
  , rand_skip_(0u)
  , shuffle_(false)
  , mirror_(false)
  , new_height_(0u)
  , new_width_(0u)
  , att_num_(1u)
  , scale_(1)
  , batch_size_(1u)
  , is_color_(true)
  , label_num_(1u){}
struct ImageDataParameterDefaultTypeInternal {
  constexpr ImageDataParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ImageDataParameterDefaultTypeInternal() {}
  union {
    ImageDataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ImageDataParameterDefaultTypeInternal _ImageDataParameter_default_instance_;
constexpr InfogainLossParameter::InfogainLossParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , axis_(1){}
struct InfogainLossParameterDefaultTypeInternal {
  constexpr InfogainLossParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~InfogainLossParameterDefaultTypeInternal() {}
  union {
    InfogainLossParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT InfogainLossParameterDefaultTypeInternal _InfogainLossParameter_default_instance_;
constexpr InnerProductParameter::InnerProductParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : weight_filler_(nullptr)
  , bias_filler_(nullptr)
  , num_output_(0u)
  , transpose_(false)
  , paramq_(0u)
  , params_(0)
  , scale_in_(0)
  , scale_out_(0)
  , bias_term_(true)
  , axis_(1)
  , a_min_(-128)
  , a_max_(127){}
struct InnerProductParameterDefaultTypeInternal {
  constexpr InnerProductParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~InnerProductParameterDefaultTypeInternal() {}
  union {
    InnerProductParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT InnerProductParameterDefaultTypeInternal _InnerProductParameter_default_instance_;
constexpr InputParameter::InputParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : shape_(){}
struct InputParameterDefaultTypeInternal {
  constexpr InputParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~InputParameterDefaultTypeInternal() {}
  union {
    InputParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT InputParameterDefaultTypeInternal _InputParameter_default_instance_;
constexpr LogParameter::LogParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : shift_(0)
  , base_(-1)
  , scale_(1){}
struct LogParameterDefaultTypeInternal {
  constexpr LogParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LogParameterDefaultTypeInternal() {}
  union {
    LogParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LogParameterDefaultTypeInternal _LogParameter_default_instance_;
constexpr LRNParameter::LRNParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : norm_region_(0)

  , engine_(0)

  , local_size_(5u)
  , alpha_(1)
  , beta_(0.75f)
  , k_(1){}
struct LRNParameterDefaultTypeInternal {
  constexpr LRNParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~LRNParameterDefaultTypeInternal() {}
  union {
    LRNParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LRNParameterDefaultTypeInternal _LRNParameter_default_instance_;
constexpr MemoryDataParameter::MemoryDataParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : batch_size_(0u)
  , channels_(0u)
  , height_(0u)
  , width_(0u){}
struct MemoryDataParameterDefaultTypeInternal {
  constexpr MemoryDataParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~MemoryDataParameterDefaultTypeInternal() {}
  union {
    MemoryDataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MemoryDataParameterDefaultTypeInternal _MemoryDataParameter_default_instance_;
constexpr MultiBoxLossParameter::MultiBoxLossParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : nms_param_(nullptr)
  , conf_loss_type_(0)

  , num_classes_(0u)
  , background_label_id_(0u)
  , do_neg_mining_(false)
  , encode_variance_in_target_(false)
  , map_object_to_agnostic_(false)
  , ignore_cross_boundary_bbox_(false)
  , bp_inside_(false)
  , use_prior_for_nms_(false)
  , loc_loss_type_(1)

  , loc_weight_(1)
  , match_type_(1)

  , overlap_threshold_(0.5f)
  , share_location_(true)
  , use_prior_for_matching_(true)
  , use_difficult_gt_(true)
  , neg_pos_ratio_(3)
  , neg_overlap_(0.5f)
  , code_type_(1)

  , mining_type_(1)

  , sample_size_(64){}
struct MultiBoxLossParameterDefaultTypeInternal {
  constexpr MultiBoxLossParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~MultiBoxLossParameterDefaultTypeInternal() {}
  union {
    MultiBoxLossParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MultiBoxLossParameterDefaultTypeInternal _MultiBoxLossParameter_default_instance_;
constexpr MVNParameter::MVNParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : across_channels_(false)
  , normalize_variance_(true)
  , eps_(1e-09f){}
struct MVNParameterDefaultTypeInternal {
  constexpr MVNParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~MVNParameterDefaultTypeInternal() {}
  union {
    MVNParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MVNParameterDefaultTypeInternal _MVNParameter_default_instance_;
constexpr NormalizeParameter::NormalizeParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : scale_filler_(nullptr)
  , across_spatial_(true)
  , channel_shared_(true)
  , eps_(1e-10f){}
struct NormalizeParameterDefaultTypeInternal {
  constexpr NormalizeParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~NormalizeParameterDefaultTypeInternal() {}
  union {
    NormalizeParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NormalizeParameterDefaultTypeInternal _NormalizeParameter_default_instance_;
constexpr ParameterParameter::ParameterParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : shape_(nullptr){}
struct ParameterParameterDefaultTypeInternal {
  constexpr ParameterParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ParameterParameterDefaultTypeInternal() {}
  union {
    ParameterParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ParameterParameterDefaultTypeInternal _ParameterParameter_default_instance_;
constexpr PermuteParameter::PermuteParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : order_(){}
struct PermuteParameterDefaultTypeInternal {
  constexpr PermuteParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~PermuteParameterDefaultTypeInternal() {}
  union {
    PermuteParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PermuteParameterDefaultTypeInternal _PermuteParameter_default_instance_;
constexpr PoolingParameter::PoolingParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : pool_(0)

  , kernel_size_(0u)
  , pad_(0u)
  , kernel_h_(0u)
  , kernel_w_(0u)
  , stride_h_(0u)
  , stride_w_(0u)
  , pad_h_(0u)
  , pad_w_(0u)
  , engine_(0)

  , global_pooling_(false)
  , round_mode_(0)

  , stride_(1u)
  , avg_include_pad_(true){}
struct PoolingParameterDefaultTypeInternal {
  constexpr PoolingParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~PoolingParameterDefaultTypeInternal() {}
  union {
    PoolingParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PoolingParameterDefaultTypeInternal _PoolingParameter_default_instance_;
constexpr Pooling3DParameter::Pooling3DParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : pool_(0)

  , kernel_size_(0u)
  , kernel_depth_(0u)
  , pad_(0u)
  , temporal_pad_(0u)
  , stride_(1u)
  , temporal_stride_(1u){}
struct Pooling3DParameterDefaultTypeInternal {
  constexpr Pooling3DParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~Pooling3DParameterDefaultTypeInternal() {}
  union {
    Pooling3DParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT Pooling3DParameterDefaultTypeInternal _Pooling3DParameter_default_instance_;
constexpr PowerParameter::PowerParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : shift_(0)
  , power_(1)
  , scale_(1){}
struct PowerParameterDefaultTypeInternal {
  constexpr PowerParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~PowerParameterDefaultTypeInternal() {}
  union {
    PowerParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PowerParameterDefaultTypeInternal _PowerParameter_default_instance_;
constexpr PriorBoxParameter::PriorBoxParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : min_size_()
  , max_size_()
  , aspect_ratio_()
  , variance_()
  , clip_(false)
  , img_size_(0u)
  , img_h_(0u)
  , img_w_(0u)
  , step_(0)
  , step_h_(0)
  , step_w_(0)
  , flip_(true)
  , offset_(0.5f){}
struct PriorBoxParameterDefaultTypeInternal {
  constexpr PriorBoxParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~PriorBoxParameterDefaultTypeInternal() {}
  union {
    PriorBoxParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PriorBoxParameterDefaultTypeInternal _PriorBoxParameter_default_instance_;
constexpr PythonParameter::PythonParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : module_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , layer_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , param_str_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , share_in_parallel_(false){}
struct PythonParameterDefaultTypeInternal {
  constexpr PythonParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~PythonParameterDefaultTypeInternal() {}
  union {
    PythonParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PythonParameterDefaultTypeInternal _PythonParameter_default_instance_;
constexpr RecurrentParameter::RecurrentParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : weight_filler_(nullptr)
  , bias_filler_(nullptr)
  , num_output_(0u)
  , debug_info_(false)
  , expose_hidden_(false){}
struct RecurrentParameterDefaultTypeInternal {
  constexpr RecurrentParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~RecurrentParameterDefaultTypeInternal() {}
  union {
    RecurrentParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RecurrentParameterDefaultTypeInternal _RecurrentParameter_default_instance_;
constexpr ReductionParameter::ReductionParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : axis_(0)
  , operation_(1)

  , coeff_(1){}
struct ReductionParameterDefaultTypeInternal {
  constexpr ReductionParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ReductionParameterDefaultTypeInternal() {}
  union {
    ReductionParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ReductionParameterDefaultTypeInternal _ReductionParameter_default_instance_;
constexpr ReLUParameter::ReLUParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : negative_slope_(0)
  , engine_(0)
{}
struct ReLUParameterDefaultTypeInternal {
  constexpr ReLUParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ReLUParameterDefaultTypeInternal() {}
  union {
    ReLUParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ReLUParameterDefaultTypeInternal _ReLUParameter_default_instance_;
constexpr ReshapeParameter::ReshapeParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : shape_(nullptr)
  , axis_(0)
  , num_axes_(-1){}
struct ReshapeParameterDefaultTypeInternal {
  constexpr ReshapeParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ReshapeParameterDefaultTypeInternal() {}
  union {
    ReshapeParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ReshapeParameterDefaultTypeInternal _ReshapeParameter_default_instance_;
constexpr ScaleParameter::ScaleParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : filler_(nullptr)
  , bias_filler_(nullptr)
  , bias_term_(false)
  , axis_(1)
  , num_axes_(1){}
struct ScaleParameterDefaultTypeInternal {
  constexpr ScaleParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ScaleParameterDefaultTypeInternal() {}
  union {
    ScaleParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ScaleParameterDefaultTypeInternal _ScaleParameter_default_instance_;
constexpr SigmoidParameter::SigmoidParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : engine_(0)
{}
struct SigmoidParameterDefaultTypeInternal {
  constexpr SigmoidParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SigmoidParameterDefaultTypeInternal() {}
  union {
    SigmoidParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SigmoidParameterDefaultTypeInternal _SigmoidParameter_default_instance_;
constexpr SliceParameter::SliceParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : slice_point_()
  , slice_dim_(1u)
  , axis_(1){}
struct SliceParameterDefaultTypeInternal {
  constexpr SliceParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SliceParameterDefaultTypeInternal() {}
  union {
    SliceParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SliceParameterDefaultTypeInternal _SliceParameter_default_instance_;
constexpr SoftmaxParameter::SoftmaxParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : engine_(0)

  , axis_(1){}
struct SoftmaxParameterDefaultTypeInternal {
  constexpr SoftmaxParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SoftmaxParameterDefaultTypeInternal() {}
  union {
    SoftmaxParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SoftmaxParameterDefaultTypeInternal _SoftmaxParameter_default_instance_;
constexpr TanHParameter::TanHParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : engine_(0)
{}
struct TanHParameterDefaultTypeInternal {
  constexpr TanHParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TanHParameterDefaultTypeInternal() {}
  union {
    TanHParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TanHParameterDefaultTypeInternal _TanHParameter_default_instance_;
constexpr TileParameter::TileParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : tiles_(0)
  , axis_(1){}
struct TileParameterDefaultTypeInternal {
  constexpr TileParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~TileParameterDefaultTypeInternal() {}
  union {
    TileParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TileParameterDefaultTypeInternal _TileParameter_default_instance_;
constexpr ThresholdParameter::ThresholdParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : threshold_(0){}
struct ThresholdParameterDefaultTypeInternal {
  constexpr ThresholdParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ThresholdParameterDefaultTypeInternal() {}
  union {
    ThresholdParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ThresholdParameterDefaultTypeInternal _ThresholdParameter_default_instance_;
constexpr WindowDataParameter::WindowDataParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , mean_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , crop_mode_(nullptr)
  , root_folder_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , batch_size_(0u)
  , crop_size_(0u)
  , mirror_(false)
  , cache_images_(false)
  , context_pad_(0u)
  , scale_(1)
  , fg_threshold_(0.5f)
  , bg_threshold_(0.5f)
  , fg_fraction_(0.25f){}
struct WindowDataParameterDefaultTypeInternal {
  constexpr WindowDataParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~WindowDataParameterDefaultTypeInternal() {}
  union {
    WindowDataParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT WindowDataParameterDefaultTypeInternal _WindowDataParameter_default_instance_;
constexpr SPPParameter::SPPParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : pyramid_height_(0u)
  , pool_(0)

  , engine_(0)
{}
struct SPPParameterDefaultTypeInternal {
  constexpr SPPParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~SPPParameterDefaultTypeInternal() {}
  union {
    SPPParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SPPParameterDefaultTypeInternal _SPPParameter_default_instance_;
constexpr V1LayerParameter::V1LayerParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : bottom_()
  , top_()
  , blobs_()
  , blobs_lr_()
  , weight_decay_()
  , include_()
  , exclude_()
  , loss_weight_()
  , param_()
  , blob_share_mode_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , layer_(nullptr)
  , concat_param_(nullptr)
  , convolution_param_(nullptr)
  , data_param_(nullptr)
  , dropout_param_(nullptr)
  , hdf5_data_param_(nullptr)
  , hdf5_output_param_(nullptr)
  , image_data_param_(nullptr)
  , infogain_loss_param_(nullptr)
  , inner_product_param_(nullptr)
  , lrn_param_(nullptr)
  , pooling_param_(nullptr)
  , window_data_param_(nullptr)
  , power_param_(nullptr)
  , memory_data_param_(nullptr)
  , argmax_param_(nullptr)
  , eltwise_param_(nullptr)
  , threshold_param_(nullptr)
  , dummy_data_param_(nullptr)
  , accuracy_param_(nullptr)
  , hinge_loss_param_(nullptr)
  , relu_param_(nullptr)
  , slice_param_(nullptr)
  , mvn_param_(nullptr)
  , transform_param_(nullptr)
  , tanh_param_(nullptr)
  , sigmoid_param_(nullptr)
  , softmax_param_(nullptr)
  , contrastive_loss_param_(nullptr)
  , exp_param_(nullptr)
  , loss_param_(nullptr)
  , type_(0)
{}
struct V1LayerParameterDefaultTypeInternal {
  constexpr V1LayerParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~V1LayerParameterDefaultTypeInternal() {}
  union {
    V1LayerParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT V1LayerParameterDefaultTypeInternal _V1LayerParameter_default_instance_;
constexpr V0LayerParameter::V0LayerParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : blobs_()
  , blobs_lr_()
  , weight_decay_()
  , name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , type_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , meanfile_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
  , det_crop_mode_(nullptr)
  , weight_filler_(nullptr)
  , bias_filler_(nullptr)
  , hdf5_output_param_(nullptr)
  , num_output_(0u)
  , pad_(0u)
  , kernelsize_(0u)
  , pool_(0)

  , batchsize_(0u)
  , cropsize_(0u)
  , new_width_(0)
  , mirror_(false)
  , shuffle_images_(false)
  , rand_skip_(0u)
  , det_context_pad_(0u)
  , new_num_(0)
  , new_channels_(0)
  , new_height_(0)
  , concat_dim_(1u)
  , biasterm_(true)
  , group_(1u)
  , stride_(1u)
  , dropout_ratio_(0.5f)
  , local_size_(5u)
  , alpha_(1)
  , beta_(0.75f)
  , scale_(1)
  , k_(1)
  , det_fg_threshold_(0.5f)
  , det_bg_threshold_(0.5f)
  , det_fg_fraction_(0.25f){}
struct V0LayerParameterDefaultTypeInternal {
  constexpr V0LayerParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~V0LayerParameterDefaultTypeInternal() {}
  union {
    V0LayerParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT V0LayerParameterDefaultTypeInternal _V0LayerParameter_default_instance_;
constexpr PReLUParameter::PReLUParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : filler_(nullptr)
  , channel_shared_(false){}
struct PReLUParameterDefaultTypeInternal {
  constexpr PReLUParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~PReLUParameterDefaultTypeInternal() {}
  union {
    PReLUParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PReLUParameterDefaultTypeInternal _PReLUParameter_default_instance_;
constexpr ShuffleChannelParameter::ShuffleChannelParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : group_(1u){}
struct ShuffleChannelParameterDefaultTypeInternal {
  constexpr ShuffleChannelParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~ShuffleChannelParameterDefaultTypeInternal() {}
  union {
    ShuffleChannelParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ShuffleChannelParameterDefaultTypeInternal _ShuffleChannelParameter_default_instance_;
constexpr UpsampleParameter::UpsampleParameter(
  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
  : scale_(0){}
struct UpsampleParameterDefaultTypeInternal {
  constexpr UpsampleParameterDefaultTypeInternal()
    : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
  ~UpsampleParameterDefaultTypeInternal() {}
  union {
    UpsampleParameter _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT UpsampleParameterDefaultTypeInternal _UpsampleParameter_default_instance_;
}  // namespace caffe
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_caffe_2eproto[99];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_caffe_2eproto[38];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_caffe_2eproto = nullptr;

const uint32_t TableStruct_caffe_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::caffe::BlobShape, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::BlobShape, dim_),
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, shape_),
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, data_),
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, diff_),
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, double_data_),
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, double_diff_),
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, num_),
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, channels_),
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, height_),
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProto, width_),
  0,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  1,
  2,
  3,
  4,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProtoVector, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::BlobProtoVector, blobs_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, channels_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, height_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, width_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, data_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, label_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, float_data_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, encoded_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, labels_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, float_label_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, float_labels_),
  PROTOBUF_FIELD_OFFSET(::caffe::Datum, byte_labels_),
  2,
  3,
  4,
  0,
  5,
  ~0u,
  6,
  ~0u,
  7,
  ~0u,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNBBox, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNBBox, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNBBox, xmin_),
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNBBox, ymin_),
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNBBox, xmax_),
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNBBox, ymax_),
  0,
  1,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNDatum, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNDatum, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNDatum, datum_),
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNDatum, roi_),
  PROTOBUF_FIELD_OFFSET(::caffe::MTCNNDatum, pts_),
  0,
  1,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::caffe::LabelMapItem, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::LabelMapItem, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::LabelMapItem, name_),
  PROTOBUF_FIELD_OFFSET(::caffe::LabelMapItem, label_),
  PROTOBUF_FIELD_OFFSET(::caffe::LabelMapItem, display_name_),
  0,
  2,
  1,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::caffe::LabelMap, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::LabelMap, item_),
  PROTOBUF_FIELD_OFFSET(::caffe::Sampler, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::Sampler, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::Sampler, min_scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::Sampler, max_scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::Sampler, min_aspect_ratio_),
  PROTOBUF_FIELD_OFFSET(::caffe::Sampler, max_aspect_ratio_),
  0,
  1,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::caffe::SampleConstraint, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::SampleConstraint, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::SampleConstraint, min_jaccard_overlap_),
  PROTOBUF_FIELD_OFFSET(::caffe::SampleConstraint, max_jaccard_overlap_),
  PROTOBUF_FIELD_OFFSET(::caffe::SampleConstraint, min_sample_coverage_),
  PROTOBUF_FIELD_OFFSET(::caffe::SampleConstraint, max_sample_coverage_),
  PROTOBUF_FIELD_OFFSET(::caffe::SampleConstraint, min_object_coverage_),
  PROTOBUF_FIELD_OFFSET(::caffe::SampleConstraint, max_object_coverage_),
  0,
  1,
  2,
  3,
  4,
  5,
  PROTOBUF_FIELD_OFFSET(::caffe::BatchSampler, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchSampler, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::BatchSampler, use_original_image_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchSampler, sampler_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchSampler, sample_constraint_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchSampler, max_sample_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchSampler, max_trials_),
  3,
  0,
  1,
  2,
  4,
  PROTOBUF_FIELD_OFFSET(::caffe::EmitConstraint, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::EmitConstraint, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::EmitConstraint, emit_type_),
  PROTOBUF_FIELD_OFFSET(::caffe::EmitConstraint, emit_overlap_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizedBBox, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizedBBox, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizedBBox, xmin_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizedBBox, ymin_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizedBBox, xmax_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizedBBox, ymax_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizedBBox, label_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizedBBox, difficult_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizedBBox, score_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizedBBox, size_),
  0,
  1,
  2,
  3,
  4,
  5,
  6,
  7,
  PROTOBUF_FIELD_OFFSET(::caffe::Annotation, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::Annotation, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::Annotation, instance_id_),
  PROTOBUF_FIELD_OFFSET(::caffe::Annotation, bbox_),
  1,
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotationGroup, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotationGroup, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotationGroup, group_label_),
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotationGroup, annotation_),
  0,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotatedDatum, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotatedDatum, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotatedDatum, datum_),
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotatedDatum, type_),
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotatedDatum, annotation_group_),
  0,
  1,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::caffe::FillerParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::FillerParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::FillerParameter, type_),
  PROTOBUF_FIELD_OFFSET(::caffe::FillerParameter, value_),
  PROTOBUF_FIELD_OFFSET(::caffe::FillerParameter, min_),
  PROTOBUF_FIELD_OFFSET(::caffe::FillerParameter, max_),
  PROTOBUF_FIELD_OFFSET(::caffe::FillerParameter, mean_),
  PROTOBUF_FIELD_OFFSET(::caffe::FillerParameter, std_),
  PROTOBUF_FIELD_OFFSET(::caffe::FillerParameter, sparse_),
  PROTOBUF_FIELD_OFFSET(::caffe::FillerParameter, variance_norm_),
  0,
  1,
  2,
  6,
  3,
  7,
  5,
  4,
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, name_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, input_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, input_shape_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, input_dim_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, force_backward_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, state_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, debug_info_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, layer_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetParameter, layers_),
  0,
  ~0u,
  ~0u,
  ~0u,
  2,
  1,
  3,
  ~0u,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, net_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, net_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, train_net_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, test_net_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, train_net_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, test_net_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, train_state_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, test_state_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, eval_type_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, ap_version_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, show_per_class_result_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, test_iter_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, test_interval_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, test_compute_loss_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, test_initialization_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, base_lr_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, display_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, average_loss_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, max_iter_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, iter_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, lr_policy_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, gamma_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, power_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, momentum_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, weight_decay_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, regularization_type_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, stepsize_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, stepvalue_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, clip_gradients_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, snapshot_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, snapshot_prefix_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, snapshot_diff_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, snapshot_format_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, solver_mode_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, device_id_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, random_seed_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, type_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, delta_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, momentum2_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, rms_decay_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, debug_info_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, snapshot_after_train_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, solver_type_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverParameter, layer_wise_reduce_),
  3,
  9,
  0,
  ~0u,
  8,
  ~0u,
  10,
  ~0u,
  6,
  7,
  22,
  ~0u,
  11,
  23,
  33,
  12,
  13,
  31,
  14,
  36,
  1,
  15,
  16,
  17,
  18,
  4,
  19,
  ~0u,
  32,
  20,
  2,
  24,
  37,
  29,
  21,
  28,
  5,
  30,
  27,
  38,
  25,
  34,
  26,
  35,
  PROTOBUF_FIELD_OFFSET(::caffe::SolverState, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverState, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::SolverState, iter_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverState, learned_net_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverState, history_),
  PROTOBUF_FIELD_OFFSET(::caffe::SolverState, current_step_),
  1,
  0,
  ~0u,
  2,
  PROTOBUF_FIELD_OFFSET(::caffe::NetState, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetState, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::NetState, phase_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetState, level_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetState, stage_),
  1,
  0,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::caffe::NetStateRule, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetStateRule, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::NetStateRule, phase_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetStateRule, min_level_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetStateRule, max_level_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetStateRule, stage_),
  PROTOBUF_FIELD_OFFSET(::caffe::NetStateRule, not_stage_),
  0,
  1,
  2,
  ~0u,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::caffe::ParamSpec, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ParamSpec, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ParamSpec, name_),
  PROTOBUF_FIELD_OFFSET(::caffe::ParamSpec, share_mode_),
  PROTOBUF_FIELD_OFFSET(::caffe::ParamSpec, lr_mult_),
  PROTOBUF_FIELD_OFFSET(::caffe::ParamSpec, decay_mult_),
  0,
  1,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, name_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, type_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, bottom_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, top_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, phase_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, loss_weight_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, blobs_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, propagate_down_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, include_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, exclude_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, transform_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, loss_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, accuracy_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, annotated_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, argmax_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, batch_norm_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, bias_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, concat_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, contrastive_loss_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, convolution_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, convolution3d_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, crop_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, detection_evaluate_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, detection_output_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, dropout_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, dummy_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, eltwise_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, elu_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, embed_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, exp_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, flatten_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, hdf5_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, hdf5_output_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, hinge_loss_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, image_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, infogain_loss_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, inner_product_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, input_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, log_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, lrn_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, lstm_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, im2seq_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, seq2out_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, img_size_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, memory_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, multibox_loss_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, mvn_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, norm_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, parameter_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, permute_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, pooling_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, pooling3d_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, power_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, prelu_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, prior_box_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, python_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, recurrent_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, reduction_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, relu_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, reshape_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, scale_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, sigmoid_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, softmax_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, spp_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, slice_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, tanh_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, threshold_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, tile_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, window_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, center_loss_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, shuffle_channel_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, interp_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, roi_pooling_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, clip_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::LayerParameter, upsample_param_),
  0,
  1,
  ~0u,
  ~0u,
  68,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  2,
  3,
  4,
  51,
  5,
  41,
  43,
  6,
  7,
  8,
  49,
  46,
  9,
  56,
  55,
  10,
  11,
  12,
  42,
  39,
  13,
  37,
  14,
  15,
  16,
  17,
  18,
  19,
  45,
  36,
  20,
  61,
  58,
  59,
  60,
  21,
  52,
  22,
  57,
  47,
  53,
  23,
  50,
  24,
  33,
  54,
  32,
  48,
  38,
  25,
  35,
  44,
  26,
  27,
  34,
  28,
  29,
  30,
  40,
  31,
  62,
  63,
  67,
  64,
  65,
  66,
  PROTOBUF_FIELD_OFFSET(::caffe::ClipParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ClipParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ClipParameter, min_),
  PROTOBUF_FIELD_OFFSET(::caffe::ClipParameter, max_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::ROIPoolingParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ROIPoolingParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ROIPoolingParameter, pooled_h_),
  PROTOBUF_FIELD_OFFSET(::caffe::ROIPoolingParameter, pooled_w_),
  PROTOBUF_FIELD_OFFSET(::caffe::ROIPoolingParameter, spatial_scale_),
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::caffe::InterpParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::InterpParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::InterpParameter, height_),
  PROTOBUF_FIELD_OFFSET(::caffe::InterpParameter, width_),
  PROTOBUF_FIELD_OFFSET(::caffe::InterpParameter, zoom_factor_),
  PROTOBUF_FIELD_OFFSET(::caffe::InterpParameter, shrink_factor_),
  PROTOBUF_FIELD_OFFSET(::caffe::InterpParameter, pad_beg_),
  PROTOBUF_FIELD_OFFSET(::caffe::InterpParameter, pad_end_),
  0,
  1,
  4,
  5,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, num_output_),
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, clipping_threshold_),
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, weight_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, bias_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, batch_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, paramq_),
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, scale_in_),
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, scale_out_),
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, a_min_),
  PROTOBUF_FIELD_OFFSET(::caffe::LSTMParameter, a_max_),
  2,
  3,
  0,
  1,
  8,
  4,
  5,
  6,
  9,
  7,
  PROTOBUF_FIELD_OFFSET(::caffe::Im2seqParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::Im2seqParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::Im2seqParameter, direction_),
  PROTOBUF_FIELD_OFFSET(::caffe::Im2seqParameter, size_),
  PROTOBUF_FIELD_OFFSET(::caffe::Im2seqParameter, stride_),
  PROTOBUF_FIELD_OFFSET(::caffe::Im2seqParameter, line2time_loss_),
  0,
  2,
  3,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::CenterLossParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::CenterLossParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::CenterLossParameter, num_output_),
  PROTOBUF_FIELD_OFFSET(::caffe::CenterLossParameter, center_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::CenterLossParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::CenterLossParameter, distance_type_),
  2,
  1,
  3,
  0,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::caffe::Seq2outParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ImgSizeParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImgSizeParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ImgSizeParameter, x_scaling_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImgSizeParameter, y_scaling_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImgSizeParameter, pretrained_file_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImgSizeParameter, pretrained_layer_name_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImgSizeParameter, pretrained_layer_bin_),
  3,
  4,
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, mirror_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, crop_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, crop_h_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, crop_w_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, mean_file_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, mean_value_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, force_color_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, force_gray_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, resize_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, noise_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, distort_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, expand_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::TransformationParameter, emit_constraint_),
  12,
  7,
  6,
  10,
  11,
  0,
  ~0u,
  8,
  9,
  1,
  2,
  4,
  5,
  3,
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, prob_),
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, resize_mode_),
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, height_),
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, width_),
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, height_scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, width_scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, pad_mode_),
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, pad_value_),
  PROTOBUF_FIELD_OFFSET(::caffe::ResizeParameter, interp_mode_),
  5,
  6,
  0,
  1,
  2,
  3,
  4,
  ~0u,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::caffe::SaltPepperParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::SaltPepperParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::SaltPepperParameter, fraction_),
  PROTOBUF_FIELD_OFFSET(::caffe::SaltPepperParameter, value_),
  0,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, prob_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, hist_eq_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, inverse_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, decolorize_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, gauss_blur_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, jpeg_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, posterize_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, erode_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, saltpepper_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, saltpepper_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, clahe_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, convert_to_hsv_),
  PROTOBUF_FIELD_OFFSET(::caffe::NoiseParameter, convert_to_lab_),
  1,
  2,
  3,
  4,
  5,
  12,
  6,
  7,
  8,
  0,
  9,
  10,
  11,
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, brightness_prob_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, brightness_delta_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, contrast_prob_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, contrast_lower_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, contrast_upper_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, hue_prob_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, hue_delta_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, saturation_prob_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, saturation_lower_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, saturation_upper_),
  PROTOBUF_FIELD_OFFSET(::caffe::DistortionParameter, random_order_prob_),
  0,
  1,
  2,
  3,
  4,
  5,
  6,
  7,
  8,
  9,
  10,
  PROTOBUF_FIELD_OFFSET(::caffe::ExpansionParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ExpansionParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ExpansionParameter, prob_),
  PROTOBUF_FIELD_OFFSET(::caffe::ExpansionParameter, max_expand_ratio_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::LossParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::LossParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::LossParameter, ignore_label_),
  PROTOBUF_FIELD_OFFSET(::caffe::LossParameter, normalization_),
  PROTOBUF_FIELD_OFFSET(::caffe::LossParameter, normalize_),
  PROTOBUF_FIELD_OFFSET(::caffe::LossParameter, is_num_scale_),
  0,
  2,
  1,
  3,
  PROTOBUF_FIELD_OFFSET(::caffe::AccuracyParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::AccuracyParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::AccuracyParameter, top_k_),
  PROTOBUF_FIELD_OFFSET(::caffe::AccuracyParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::AccuracyParameter, ignore_label_),
  1,
  2,
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotatedDataParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotatedDataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotatedDataParameter, batch_sampler_),
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotatedDataParameter, label_map_file_),
  PROTOBUF_FIELD_OFFSET(::caffe::AnnotatedDataParameter, anno_type_),
  ~0u,
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::ArgMaxParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ArgMaxParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ArgMaxParameter, out_max_val_),
  PROTOBUF_FIELD_OFFSET(::caffe::ArgMaxParameter, top_k_),
  PROTOBUF_FIELD_OFFSET(::caffe::ArgMaxParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::ArgMaxParameter, softmax_threshold_),
  0,
  3,
  2,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::ConcatParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConcatParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ConcatParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConcatParameter, concat_dim_),
  1,
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::BatchNormParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchNormParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::BatchNormParameter, use_global_stats_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchNormParameter, moving_average_fraction_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchNormParameter, eps_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchNormParameter, use_weight_bias_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchNormParameter, bias_term_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchNormParameter, filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchNormParameter, bias_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::BatchNormParameter, scale_filler_),
  3,
  6,
  7,
  4,
  5,
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::caffe::BiasParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::BiasParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::BiasParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::BiasParameter, num_axes_),
  PROTOBUF_FIELD_OFFSET(::caffe::BiasParameter, filler_),
  1,
  2,
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::ContrastiveLossParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ContrastiveLossParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ContrastiveLossParameter, margin_),
  PROTOBUF_FIELD_OFFSET(::caffe::ContrastiveLossParameter, legacy_version_),
  1,
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, num_output_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, bias_term_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, pad_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, kernel_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, stride_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, dilation_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, pad_h_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, pad_w_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, kernel_h_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, kernel_w_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, stride_h_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, stride_w_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, group_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, weight_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, bias_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, engine_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, force_nd_im2col_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, paramq_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, params_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, scale_in_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, scale_out_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, a_min_),
  PROTOBUF_FIELD_OFFSET(::caffe::ConvolutionParameter, a_max_),
  2,
  16,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
  3,
  4,
  5,
  6,
  7,
  8,
  17,
  0,
  1,
  9,
  18,
  10,
  11,
  12,
  13,
  14,
  19,
  15,
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, num_output_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, bias_term_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, pad_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, kernel_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, group_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, kernel_depth_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, stride_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, temporal_stride_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, weight_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, bias_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, filter_group_),
  PROTOBUF_FIELD_OFFSET(::caffe::Convolution3DParameter, temporal_pad_),
  2,
  8,
  3,
  4,
  9,
  5,
  10,
  11,
  0,
  1,
  7,
  6,
  PROTOBUF_FIELD_OFFSET(::caffe::CropParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::CropParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::CropParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::CropParameter, offset_),
  0,
  ~0u,
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, source_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, batch_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, rand_skip_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, backend_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, mean_file_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, crop_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, mirror_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, force_encoded_color_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, prefetch_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, label_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, data_width_),
  PROTOBUF_FIELD_OFFSET(::caffe::DataParameter, output_width_),
  0,
  2,
  4,
  5,
  11,
  1,
  3,
  6,
  7,
  12,
  9,
  10,
  8,
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionEvaluateParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionEvaluateParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionEvaluateParameter, num_classes_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionEvaluateParameter, background_label_id_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionEvaluateParameter, overlap_threshold_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionEvaluateParameter, evaluate_difficult_gt_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionEvaluateParameter, name_size_file_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionEvaluateParameter, resize_param_),
  2,
  3,
  4,
  5,
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::NonMaximumSuppressionParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::NonMaximumSuppressionParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::NonMaximumSuppressionParameter, nms_threshold_),
  PROTOBUF_FIELD_OFFSET(::caffe::NonMaximumSuppressionParameter, top_k_),
  PROTOBUF_FIELD_OFFSET(::caffe::NonMaximumSuppressionParameter, eta_),
  1,
  0,
  2,
  PROTOBUF_FIELD_OFFSET(::caffe::SaveOutputParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::SaveOutputParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::SaveOutputParameter, output_directory_),
  PROTOBUF_FIELD_OFFSET(::caffe::SaveOutputParameter, output_name_prefix_),
  PROTOBUF_FIELD_OFFSET(::caffe::SaveOutputParameter, output_format_),
  PROTOBUF_FIELD_OFFSET(::caffe::SaveOutputParameter, label_map_file_),
  PROTOBUF_FIELD_OFFSET(::caffe::SaveOutputParameter, name_size_file_),
  PROTOBUF_FIELD_OFFSET(::caffe::SaveOutputParameter, num_test_image_),
  PROTOBUF_FIELD_OFFSET(::caffe::SaveOutputParameter, resize_param_),
  0,
  1,
  2,
  3,
  4,
  6,
  5,
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, num_classes_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, share_location_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, background_label_id_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, nms_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, save_output_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, code_type_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, variance_encoded_in_target_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, keep_top_k_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, confidence_threshold_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, visualize_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, visualize_threshold_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, save_file_),
  PROTOBUF_FIELD_OFFSET(::caffe::DetectionOutputParameter, objectness_score_),
  3,
  9,
  4,
  1,
  2,
  10,
  6,
  11,
  5,
  7,
  8,
  0,
  12,
  PROTOBUF_FIELD_OFFSET(::caffe::DropoutParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::DropoutParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::DropoutParameter, dropout_ratio_),
  0,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::caffe::DummyDataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::DummyDataParameter, data_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::DummyDataParameter, shape_),
  PROTOBUF_FIELD_OFFSET(::caffe::DummyDataParameter, num_),
  PROTOBUF_FIELD_OFFSET(::caffe::DummyDataParameter, channels_),
  PROTOBUF_FIELD_OFFSET(::caffe::DummyDataParameter, height_),
  PROTOBUF_FIELD_OFFSET(::caffe::DummyDataParameter, width_),
  PROTOBUF_FIELD_OFFSET(::caffe::EltwiseParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::EltwiseParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::EltwiseParameter, operation_),
  PROTOBUF_FIELD_OFFSET(::caffe::EltwiseParameter, coeff_),
  PROTOBUF_FIELD_OFFSET(::caffe::EltwiseParameter, stable_prod_grad_),
  0,
  ~0u,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::ELUParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ELUParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ELUParameter, alpha_),
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::EmbedParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::EmbedParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::EmbedParameter, num_output_),
  PROTOBUF_FIELD_OFFSET(::caffe::EmbedParameter, input_dim_),
  PROTOBUF_FIELD_OFFSET(::caffe::EmbedParameter, bias_term_),
  PROTOBUF_FIELD_OFFSET(::caffe::EmbedParameter, weight_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::EmbedParameter, bias_filler_),
  2,
  3,
  4,
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::ExpParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ExpParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ExpParameter, base_),
  PROTOBUF_FIELD_OFFSET(::caffe::ExpParameter, scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::ExpParameter, shift_),
  1,
  2,
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::FlattenParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::FlattenParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::FlattenParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::FlattenParameter, end_axis_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::HDF5DataParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::HDF5DataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::HDF5DataParameter, source_),
  PROTOBUF_FIELD_OFFSET(::caffe::HDF5DataParameter, batch_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::HDF5DataParameter, shuffle_),
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::caffe::HDF5OutputParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::HDF5OutputParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::HDF5OutputParameter, file_name_),
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::HingeLossParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::HingeLossParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::HingeLossParameter, norm_),
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, source_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, batch_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, rand_skip_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, shuffle_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, new_height_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, new_width_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, is_color_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, mean_file_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, crop_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, mirror_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, root_folder_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, label_num_),
  PROTOBUF_FIELD_OFFSET(::caffe::ImageDataParameter, att_num_),
  0,
  11,
  4,
  5,
  7,
  8,
  12,
  10,
  1,
  3,
  6,
  2,
  13,
  9,
  PROTOBUF_FIELD_OFFSET(::caffe::InfogainLossParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::InfogainLossParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::InfogainLossParameter, source_),
  PROTOBUF_FIELD_OFFSET(::caffe::InfogainLossParameter, axis_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, num_output_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, bias_term_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, weight_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, bias_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, transpose_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, paramq_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, params_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, scale_in_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, scale_out_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, a_min_),
  PROTOBUF_FIELD_OFFSET(::caffe::InnerProductParameter, a_max_),
  2,
  8,
  0,
  1,
  9,
  3,
  4,
  5,
  6,
  7,
  10,
  11,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::caffe::InputParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::InputParameter, shape_),
  PROTOBUF_FIELD_OFFSET(::caffe::LogParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::LogParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::LogParameter, base_),
  PROTOBUF_FIELD_OFFSET(::caffe::LogParameter, scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::LogParameter, shift_),
  1,
  2,
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::LRNParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::LRNParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::LRNParameter, local_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::LRNParameter, alpha_),
  PROTOBUF_FIELD_OFFSET(::caffe::LRNParameter, beta_),
  PROTOBUF_FIELD_OFFSET(::caffe::LRNParameter, norm_region_),
  PROTOBUF_FIELD_OFFSET(::caffe::LRNParameter, k_),
  PROTOBUF_FIELD_OFFSET(::caffe::LRNParameter, engine_),
  2,
  3,
  4,
  0,
  5,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::MemoryDataParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::MemoryDataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::MemoryDataParameter, batch_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::MemoryDataParameter, channels_),
  PROTOBUF_FIELD_OFFSET(::caffe::MemoryDataParameter, height_),
  PROTOBUF_FIELD_OFFSET(::caffe::MemoryDataParameter, width_),
  0,
  1,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, loc_loss_type_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, conf_loss_type_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, loc_weight_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, num_classes_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, share_location_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, match_type_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, overlap_threshold_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, use_prior_for_matching_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, background_label_id_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, use_difficult_gt_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, do_neg_mining_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, neg_pos_ratio_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, neg_overlap_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, code_type_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, encode_variance_in_target_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, map_object_to_agnostic_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, ignore_cross_boundary_bbox_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, bp_inside_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, mining_type_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, nms_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, sample_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::MultiBoxLossParameter, use_prior_for_nms_),
  10,
  1,
  11,
  2,
  14,
  12,
  13,
  15,
  3,
  16,
  4,
  17,
  18,
  19,
  5,
  6,
  7,
  8,
  20,
  0,
  21,
  9,
  PROTOBUF_FIELD_OFFSET(::caffe::MVNParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::MVNParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::MVNParameter, normalize_variance_),
  PROTOBUF_FIELD_OFFSET(::caffe::MVNParameter, across_channels_),
  PROTOBUF_FIELD_OFFSET(::caffe::MVNParameter, eps_),
  1,
  0,
  2,
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizeParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizeParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizeParameter, across_spatial_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizeParameter, scale_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizeParameter, channel_shared_),
  PROTOBUF_FIELD_OFFSET(::caffe::NormalizeParameter, eps_),
  1,
  0,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::caffe::ParameterParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ParameterParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ParameterParameter, shape_),
  0,
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::caffe::PermuteParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::PermuteParameter, order_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, avg_include_pad_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, pool_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, pad_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, pad_h_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, pad_w_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, kernel_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, kernel_h_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, kernel_w_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, stride_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, stride_h_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, stride_w_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, engine_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, global_pooling_),
  PROTOBUF_FIELD_OFFSET(::caffe::PoolingParameter, round_mode_),
  13,
  0,
  2,
  7,
  8,
  1,
  3,
  4,
  12,
  5,
  6,
  9,
  10,
  11,
  PROTOBUF_FIELD_OFFSET(::caffe::Pooling3DParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::Pooling3DParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::Pooling3DParameter, pool_),
  PROTOBUF_FIELD_OFFSET(::caffe::Pooling3DParameter, kernel_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::Pooling3DParameter, kernel_depth_),
  PROTOBUF_FIELD_OFFSET(::caffe::Pooling3DParameter, stride_),
  PROTOBUF_FIELD_OFFSET(::caffe::Pooling3DParameter, temporal_stride_),
  PROTOBUF_FIELD_OFFSET(::caffe::Pooling3DParameter, pad_),
  PROTOBUF_FIELD_OFFSET(::caffe::Pooling3DParameter, temporal_pad_),
  0,
  1,
  2,
  5,
  6,
  3,
  4,
  PROTOBUF_FIELD_OFFSET(::caffe::PowerParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::PowerParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::PowerParameter, power_),
  PROTOBUF_FIELD_OFFSET(::caffe::PowerParameter, scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::PowerParameter, shift_),
  1,
  2,
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, min_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, max_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, aspect_ratio_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, flip_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, clip_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, variance_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, img_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, img_h_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, img_w_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, step_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, step_h_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, step_w_),
  PROTOBUF_FIELD_OFFSET(::caffe::PriorBoxParameter, offset_),
  ~0u,
  ~0u,
  ~0u,
  7,
  0,
  ~0u,
  1,
  2,
  3,
  4,
  5,
  6,
  8,
  PROTOBUF_FIELD_OFFSET(::caffe::PythonParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::PythonParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::PythonParameter, module_),
  PROTOBUF_FIELD_OFFSET(::caffe::PythonParameter, layer_),
  PROTOBUF_FIELD_OFFSET(::caffe::PythonParameter, param_str_),
  PROTOBUF_FIELD_OFFSET(::caffe::PythonParameter, share_in_parallel_),
  0,
  1,
  2,
  3,
  PROTOBUF_FIELD_OFFSET(::caffe::RecurrentParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::RecurrentParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::RecurrentParameter, num_output_),
  PROTOBUF_FIELD_OFFSET(::caffe::RecurrentParameter, weight_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::RecurrentParameter, bias_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::RecurrentParameter, debug_info_),
  PROTOBUF_FIELD_OFFSET(::caffe::RecurrentParameter, expose_hidden_),
  2,
  0,
  1,
  3,
  4,
  PROTOBUF_FIELD_OFFSET(::caffe::ReductionParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ReductionParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ReductionParameter, operation_),
  PROTOBUF_FIELD_OFFSET(::caffe::ReductionParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::ReductionParameter, coeff_),
  1,
  0,
  2,
  PROTOBUF_FIELD_OFFSET(::caffe::ReLUParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ReLUParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ReLUParameter, negative_slope_),
  PROTOBUF_FIELD_OFFSET(::caffe::ReLUParameter, engine_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::ReshapeParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ReshapeParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ReshapeParameter, shape_),
  PROTOBUF_FIELD_OFFSET(::caffe::ReshapeParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::ReshapeParameter, num_axes_),
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::caffe::ScaleParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ScaleParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ScaleParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::ScaleParameter, num_axes_),
  PROTOBUF_FIELD_OFFSET(::caffe::ScaleParameter, filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::ScaleParameter, bias_term_),
  PROTOBUF_FIELD_OFFSET(::caffe::ScaleParameter, bias_filler_),
  3,
  4,
  0,
  2,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::SigmoidParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::SigmoidParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::SigmoidParameter, engine_),
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::SliceParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::SliceParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::SliceParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::SliceParameter, slice_point_),
  PROTOBUF_FIELD_OFFSET(::caffe::SliceParameter, slice_dim_),
  1,
  ~0u,
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::SoftmaxParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::SoftmaxParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::SoftmaxParameter, engine_),
  PROTOBUF_FIELD_OFFSET(::caffe::SoftmaxParameter, axis_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::TanHParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::TanHParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::TanHParameter, engine_),
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::TileParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::TileParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::TileParameter, axis_),
  PROTOBUF_FIELD_OFFSET(::caffe::TileParameter, tiles_),
  1,
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::ThresholdParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ThresholdParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ThresholdParameter, threshold_),
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, source_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, mean_file_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, batch_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, crop_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, mirror_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, fg_threshold_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, bg_threshold_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, fg_fraction_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, context_pad_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, crop_mode_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, cache_images_),
  PROTOBUF_FIELD_OFFSET(::caffe::WindowDataParameter, root_folder_),
  0,
  9,
  1,
  4,
  5,
  6,
  10,
  11,
  12,
  8,
  2,
  7,
  3,
  PROTOBUF_FIELD_OFFSET(::caffe::SPPParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::SPPParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::SPPParameter, pyramid_height_),
  PROTOBUF_FIELD_OFFSET(::caffe::SPPParameter, pool_),
  PROTOBUF_FIELD_OFFSET(::caffe::SPPParameter, engine_),
  0,
  1,
  2,
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, bottom_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, top_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, name_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, include_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, exclude_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, type_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, blobs_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, blob_share_mode_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, blobs_lr_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, weight_decay_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, loss_weight_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, accuracy_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, argmax_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, concat_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, contrastive_loss_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, convolution_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, dropout_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, dummy_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, eltwise_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, exp_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, hdf5_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, hdf5_output_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, hinge_loss_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, image_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, infogain_loss_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, inner_product_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, lrn_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, memory_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, mvn_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, pooling_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, power_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, relu_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, sigmoid_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, softmax_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, slice_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, tanh_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, threshold_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, window_data_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, transform_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, loss_param_),
  PROTOBUF_FIELD_OFFSET(::caffe::V1LayerParameter, 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(::caffe::V0LayerParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, name_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, type_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, num_output_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, biasterm_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, weight_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, bias_filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, pad_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, kernelsize_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, group_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, stride_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, pool_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, dropout_ratio_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, local_size_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, alpha_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, beta_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, k_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, source_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, scale_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, meanfile_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, batchsize_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, cropsize_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, mirror_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, blobs_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, blobs_lr_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, weight_decay_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, rand_skip_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, det_fg_threshold_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, det_bg_threshold_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, det_fg_fraction_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, det_context_pad_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, det_crop_mode_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, new_num_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, new_channels_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, new_height_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, new_width_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, shuffle_images_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, concat_dim_),
  PROTOBUF_FIELD_OFFSET(::caffe::V0LayerParameter, hdf5_output_param_),
  0,
  1,
  8,
  23,
  5,
  6,
  9,
  10,
  24,
  25,
  11,
  26,
  27,
  28,
  29,
  31,
  2,
  30,
  3,
  12,
  13,
  15,
  ~0u,
  ~0u,
  ~0u,
  17,
  32,
  33,
  34,
  18,
  4,
  19,
  20,
  21,
  14,
  16,
  22,
  7,
  PROTOBUF_FIELD_OFFSET(::caffe::PReLUParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::PReLUParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::PReLUParameter, filler_),
  PROTOBUF_FIELD_OFFSET(::caffe::PReLUParameter, channel_shared_),
  0,
  1,
  PROTOBUF_FIELD_OFFSET(::caffe::ShuffleChannelParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::ShuffleChannelParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::ShuffleChannelParameter, group_),
  0,
  PROTOBUF_FIELD_OFFSET(::caffe::UpsampleParameter, _has_bits_),
  PROTOBUF_FIELD_OFFSET(::caffe::UpsampleParameter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::caffe::UpsampleParameter, scale_),
  0,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, -1, sizeof(::caffe::BlobShape)},
  { 7, 22, -1, sizeof(::caffe::BlobProto)},
  { 31, -1, -1, sizeof(::caffe::BlobProtoVector)},
  { 38, 55, -1, sizeof(::caffe::Datum)},
  { 66, 76, -1, sizeof(::caffe::MTCNNBBox)},
  { 80, 89, -1, sizeof(::caffe::MTCNNDatum)},
  { 92, 101, -1, sizeof(::caffe::LabelMapItem)},
  { 104, -1, -1, sizeof(::caffe::LabelMap)},
  { 111, 121, -1, sizeof(::caffe::Sampler)},
  { 125, 137, -1, sizeof(::caffe::SampleConstraint)},
  { 143, 154, -1, sizeof(::caffe::BatchSampler)},
  { 159, 167, -1, sizeof(::caffe::EmitConstraint)},
  { 169, 183, -1, sizeof(::caffe::NormalizedBBox)},
  { 191, 199, -1, sizeof(::caffe::Annotation)},
  { 201, 209, -1, sizeof(::caffe::AnnotationGroup)},
  { 211, 220, -1, sizeof(::caffe::AnnotatedDatum)},
  { 223, 237, -1, sizeof(::caffe::FillerParameter)},
  { 245, 260, -1, sizeof(::caffe::NetParameter)},
  { 269, 319, -1, sizeof(::caffe::SolverParameter)},
  { 363, 373, -1, sizeof(::caffe::SolverState)},
  { 377, 386, -1, sizeof(::caffe::NetState)},
  { 389, 400, -1, sizeof(::caffe::NetStateRule)},
  { 405, 415, -1, sizeof(::caffe::ParamSpec)},
  { 419, 502, -1, sizeof(::caffe::LayerParameter)},
  { 579, 587, -1, sizeof(::caffe::ClipParameter)},
  { 589, 598, -1, sizeof(::caffe::ROIPoolingParameter)},
  { 601, 613, -1, sizeof(::caffe::InterpParameter)},
  { 619, 635, -1, sizeof(::caffe::LSTMParameter)},
  { 645, 655, -1, sizeof(::caffe::Im2seqParameter)},
  { 659, 669, -1, sizeof(::caffe::CenterLossParameter)},
  { 673, -1, -1, sizeof(::caffe::Seq2outParameter)},
  { 679, 690, -1, sizeof(::caffe::ImgSizeParameter)},
  { 695, 715, -1, sizeof(::caffe::TransformationParameter)},
  { 729, 744, -1, sizeof(::caffe::ResizeParameter)},
  { 753, 761, -1, sizeof(::caffe::SaltPepperParameter)},
  { 763, 782, -1, sizeof(::caffe::NoiseParameter)},
  { 795, 812, -1, sizeof(::caffe::DistortionParameter)},
  { 823, 831, -1, sizeof(::caffe::ExpansionParameter)},
  { 833, 843, -1, sizeof(::caffe::LossParameter)},
  { 847, 856, -1, sizeof(::caffe::AccuracyParameter)},
  { 859, 868, -1, sizeof(::caffe::AnnotatedDataParameter)},
  { 871, 881, -1, sizeof(::caffe::ArgMaxParameter)},
  { 885, 893, -1, sizeof(::caffe::ConcatParameter)},
  { 895, 909, -1, sizeof(::caffe::BatchNormParameter)},
  { 917, 926, -1, sizeof(::caffe::BiasParameter)},
  { 929, 937, -1, sizeof(::caffe::ContrastiveLossParameter)},
  { 939, 969, -1, sizeof(::caffe::ConvolutionParameter)},
  { 993, 1011, -1, sizeof(::caffe::Convolution3DParameter)},
  { 1023, 1031, -1, sizeof(::caffe::CropParameter)},
  { 1033, 1052, -1, sizeof(::caffe::DataParameter)},
  { 1065, 1077, -1, sizeof(::caffe::DetectionEvaluateParameter)},
  { 1083, 1092, -1, sizeof(::caffe::NonMaximumSuppressionParameter)},
  { 1095, 1108, -1, sizeof(::caffe::SaveOutputParameter)},
  { 1115, 1134, -1, sizeof(::caffe::DetectionOutputParameter)},
  { 1147, 1154, -1, sizeof(::caffe::DropoutParameter)},
  { 1155, -1, -1, sizeof(::caffe::DummyDataParameter)},
  { 1167, 1176, -1, sizeof(::caffe::EltwiseParameter)},
  { 1179, 1186, -1, sizeof(::caffe::ELUParameter)},
  { 1187, 1198, -1, sizeof(::caffe::EmbedParameter)},
  { 1203, 1212, -1, sizeof(::caffe::ExpParameter)},
  { 1215, 1223, -1, sizeof(::caffe::FlattenParameter)},
  { 1225, 1234, -1, sizeof(::caffe::HDF5DataParameter)},
  { 1237, 1244, -1, sizeof(::caffe::HDF5OutputParameter)},
  { 1245, 1252, -1, sizeof(::caffe::HingeLossParameter)},
  { 1253, 1273, -1, sizeof(::caffe::ImageDataParameter)},
  { 1287, 1295, -1, sizeof(::caffe::InfogainLossParameter)},
  { 1297, 1315, -1, sizeof(::caffe::InnerProductParameter)},
  { 1327, -1, -1, sizeof(::caffe::InputParameter)},
  { 1334, 1343, -1, sizeof(::caffe::LogParameter)},
  { 1346, 1358, -1, sizeof(::caffe::LRNParameter)},
  { 1364, 1374, -1, sizeof(::caffe::MemoryDataParameter)},
  { 1378, 1406, -1, sizeof(::caffe::MultiBoxLossParameter)},
  { 1428, 1437, -1, sizeof(::caffe::MVNParameter)},
  { 1440, 1450, -1, sizeof(::caffe::NormalizeParameter)},
  { 1454, 1461, -1, sizeof(::caffe::ParameterParameter)},
  { 1462, -1, -1, sizeof(::caffe::PermuteParameter)},
  { 1469, 1489, -1, sizeof(::caffe::PoolingParameter)},
  { 1503, 1516, -1, sizeof(::caffe::Pooling3DParameter)},
  { 1523, 1532, -1, sizeof(::caffe::PowerParameter)},
  { 1535, 1554, -1, sizeof(::caffe::PriorBoxParameter)},
  { 1567, 1577, -1, sizeof(::caffe::PythonParameter)},
  { 1581, 1592, -1, sizeof(::caffe::RecurrentParameter)},
  { 1597, 1606, -1, sizeof(::caffe::ReductionParameter)},
  { 1609, 1617, -1, sizeof(::caffe::ReLUParameter)},
  { 1619, 1628, -1, sizeof(::caffe::ReshapeParameter)},
  { 1631, 1642, -1, sizeof(::caffe::ScaleParameter)},
  { 1647, 1654, -1, sizeof(::caffe::SigmoidParameter)},
  { 1655, 1664, -1, sizeof(::caffe::SliceParameter)},
  { 1667, 1675, -1, sizeof(::caffe::SoftmaxParameter)},
  { 1677, 1684, -1, sizeof(::caffe::TanHParameter)},
  { 1685, 1693, -1, sizeof(::caffe::TileParameter)},
  { 1695, 1702, -1, sizeof(::caffe::ThresholdParameter)},
  { 1703, 1722, -1, sizeof(::caffe::WindowDataParameter)},
  { 1735, 1744, -1, sizeof(::caffe::SPPParameter)},
  { 1747, 1796, -1, sizeof(::caffe::V1LayerParameter)},
  { 1839, 1883, -1, sizeof(::caffe::V0LayerParameter)},
  { 1921, 1929, -1, sizeof(::caffe::PReLUParameter)},
  { 1931, 1938, -1, sizeof(::caffe::ShuffleChannelParameter)},
  { 1939, 1946, -1, sizeof(::caffe::UpsampleParameter)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_BlobShape_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_BlobProto_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_BlobProtoVector_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_Datum_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_MTCNNBBox_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_MTCNNDatum_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_LabelMapItem_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_LabelMap_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_Sampler_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_SampleConstraint_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_BatchSampler_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_EmitConstraint_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_NormalizedBBox_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_Annotation_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_AnnotationGroup_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_AnnotatedDatum_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_FillerParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_NetParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_SolverParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_SolverState_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_NetState_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_NetStateRule_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ParamSpec_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_LayerParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ClipParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ROIPoolingParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_InterpParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_LSTMParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_Im2seqParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_CenterLossParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_Seq2outParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ImgSizeParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_TransformationParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ResizeParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_SaltPepperParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_NoiseParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_DistortionParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ExpansionParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_LossParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_AccuracyParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_AnnotatedDataParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ArgMaxParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ConcatParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_BatchNormParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_BiasParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ContrastiveLossParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ConvolutionParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_Convolution3DParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_CropParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_DataParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_DetectionEvaluateParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_NonMaximumSuppressionParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_SaveOutputParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_DetectionOutputParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_DropoutParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_DummyDataParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_EltwiseParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ELUParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_EmbedParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ExpParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_FlattenParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_HDF5DataParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_HDF5OutputParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_HingeLossParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ImageDataParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_InfogainLossParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_InnerProductParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_InputParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_LogParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_LRNParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_MemoryDataParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_MultiBoxLossParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_MVNParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_NormalizeParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ParameterParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_PermuteParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_PoolingParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_Pooling3DParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_PowerParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_PriorBoxParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_PythonParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_RecurrentParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ReductionParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ReLUParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ReshapeParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ScaleParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_SigmoidParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_SliceParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_SoftmaxParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_TanHParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_TileParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ThresholdParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_WindowDataParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_SPPParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_V1LayerParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_V0LayerParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_PReLUParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_ShuffleChannelParameter_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::caffe::_UpsampleParameter_default_instance_),
};

const char descriptor_table_protodef_caffe_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\013caffe.proto\022\005caffe\"\034\n\tBlobShape\022\017\n\003dim"
  "\030\001 \003(\003B\002\020\001\"\314\001\n\tBlobProto\022\037\n\005shape\030\007 \001(\0132"
  "\020.caffe.BlobShape\022\020\n\004data\030\005 \003(\002B\002\020\001\022\020\n\004d"
  "iff\030\006 \003(\002B\002\020\001\022\027\n\013double_data\030\010 \003(\001B\002\020\001\022\027"
  "\n\013double_diff\030\t \003(\001B\002\020\001\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\"2\n\017BlobProtoVector\022\037\n\005"
  "blobs\030\001 \003(\0132\020.caffe.BlobProto\"\321\001\n\005Datum\022"
  "\020\n\010channels\030\001 \001(\005\022\016\n\006height\030\002 \001(\005\022\r\n\005wid"
  "th\030\003 \001(\005\022\014\n\004data\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:\005fals"
  "e\022\016\n\006labels\030\010 \003(\005\022\023\n\013float_label\030\t \001(\002\022\024"
  "\n\014float_labels\030\n \003(\002\022\023\n\013byte_labels\030\013 \001("
  "\014\"C\n\tMTCNNBBox\022\014\n\004xmin\030\001 \001(\002\022\014\n\004ymin\030\002 \001"
  "(\002\022\014\n\004xmax\030\003 \001(\002\022\014\n\004ymax\030\004 \001(\002\"U\n\nMTCNND"
  "atum\022\033\n\005datum\030\001 \001(\0132\014.caffe.Datum\022\035\n\003roi"
  "\030\002 \001(\0132\020.caffe.MTCNNBBox\022\013\n\003pts\030\003 \003(\002\"A\n"
  "\014LabelMapItem\022\014\n\004name\030\001 \001(\t\022\r\n\005label\030\002 \001"
  "(\005\022\024\n\014display_name\030\003 \001(\t\"-\n\010LabelMap\022!\n\004"
  "item\030\001 \003(\0132\023.caffe.LabelMapItem\"o\n\007Sampl"
  "er\022\024\n\tmin_scale\030\001 \001(\002:\0011\022\024\n\tmax_scale\030\002 "
  "\001(\002:\0011\022\033\n\020min_aspect_ratio\030\003 \001(\002:\0011\022\033\n\020m"
  "ax_aspect_ratio\030\004 \001(\002:\0011\"\300\001\n\020SampleConst"
  "raint\022\033\n\023min_jaccard_overlap\030\001 \001(\002\022\033\n\023ma"
  "x_jaccard_overlap\030\002 \001(\002\022\033\n\023min_sample_co"
  "verage\030\003 \001(\002\022\033\n\023max_sample_coverage\030\004 \001("
  "\002\022\033\n\023min_object_coverage\030\005 \001(\002\022\033\n\023max_ob"
  "ject_coverage\030\006 \001(\002\"\262\001\n\014BatchSampler\022 \n\022"
  "use_original_image\030\001 \001(\010:\004true\022\037\n\007sample"
  "r\030\002 \001(\0132\016.caffe.Sampler\0222\n\021sample_constr"
  "aint\030\003 \001(\0132\027.caffe.SampleConstraint\022\022\n\nm"
  "ax_sample\030\004 \001(\r\022\027\n\nmax_trials\030\005 \001(\r:\003100"
  "\"\212\001\n\016EmitConstraint\0229\n\temit_type\030\001 \001(\0162\036"
  ".caffe.EmitConstraint.EmitType:\006CENTER\022\024"
  "\n\014emit_overlap\030\002 \001(\002\"\'\n\010EmitType\022\n\n\006CENT"
  "ER\020\000\022\017\n\013MIN_OVERLAP\020\001\"\207\001\n\016NormalizedBBox"
  "\022\014\n\004xmin\030\001 \001(\002\022\014\n\004ymin\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\tdiffi"
  "cult\030\006 \001(\010\022\r\n\005score\030\007 \001(\002\022\014\n\004size\030\010 \001(\002\""
  "I\n\nAnnotation\022\026\n\013instance_id\030\001 \001(\005:\0010\022#\n"
  "\004bbox\030\002 \001(\0132\025.caffe.NormalizedBBox\"M\n\017An"
  "notationGroup\022\023\n\013group_label\030\001 \001(\005\022%\n\nan"
  "notation\030\002 \003(\0132\021.caffe.Annotation\"\257\001\n\016An"
  "notatedDatum\022\033\n\005datum\030\001 \001(\0132\014.caffe.Datu"
  "m\0222\n\004type\030\002 \001(\0162$.caffe.AnnotatedDatum.A"
  "nnotationType\0220\n\020annotation_group\030\003 \003(\0132"
  "\026.caffe.AnnotationGroup\"\032\n\016AnnotationTyp"
  "e\022\010\n\004BBOX\020\000\"\212\002\n\017FillerParameter\022\026\n\004type\030"
  "\001 \001(\t:\010constant\022\020\n\005value\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\006sparse\030\007 \001(\005:\002-1\022B"
  "\n\rvariance_norm\030\010 \001(\0162#.caffe.FillerPara"
  "meter.VarianceNorm:\006FAN_IN\"4\n\014VarianceNo"
  "rm\022\n\n\006FAN_IN\020\000\022\013\n\007FAN_OUT\020\001\022\013\n\007AVERAGE\020\002"
  "\"\216\002\n\014NetParameter\022\014\n\004name\030\001 \001(\t\022\r\n\005input"
  "\030\003 \003(\t\022%\n\013input_shape\030\010 \003(\0132\020.caffe.Blob"
  "Shape\022\021\n\tinput_dim\030\004 \003(\005\022\035\n\016force_backwa"
  "rd\030\005 \001(\010:\005false\022\036\n\005state\030\006 \001(\0132\017.caffe.N"
  "etState\022\031\n\ndebug_info\030\007 \001(\010:\005false\022$\n\005la"
  "yer\030d \003(\0132\025.caffe.LayerParameter\022\'\n\006laye"
  "rs\030\002 \003(\0132\027.caffe.V1LayerParameter\"\252\013\n\017So"
  "lverParameter\022\013\n\003net\030\030 \001(\t\022&\n\tnet_param\030"
  "\031 \001(\0132\023.caffe.NetParameter\022\021\n\ttrain_net\030"
  "\001 \001(\t\022\020\n\010test_net\030\002 \003(\t\022,\n\017train_net_par"
  "am\030\025 \001(\0132\023.caffe.NetParameter\022+\n\016test_ne"
  "t_param\030\026 \003(\0132\023.caffe.NetParameter\022$\n\013tr"
  "ain_state\030\032 \001(\0132\017.caffe.NetState\022#\n\ntest"
  "_state\030\033 \003(\0132\017.caffe.NetState\022!\n\teval_ty"
  "pe\030) \001(\t:\016classification\022\034\n\nap_version\030*"
  " \001(\t:\010Integral\022$\n\025show_per_class_result\030"
  ", \001(\010:\005false\022\021\n\ttest_iter\030\003 \003(\005\022\030\n\rtest_"
  "interval\030\004 \001(\005:\0010\022 \n\021test_compute_loss\030\023"
  " \001(\010:\005false\022!\n\023test_initialization\030  \001(\010"
  ":\004true\022\017\n\007base_lr\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\010mo"
  "mentum\030\013 \001(\002\022\024\n\014weight_decay\030\014 \001(\002\022\037\n\023re"
  "gularization_type\030\035 \001(\t:\002L2\022\020\n\010stepsize\030"
  "\r \001(\005\022\021\n\tstepvalue\030\" \003(\005\022\032\n\016clip_gradien"
  "ts\030# \001(\002:\002-1\022\023\n\010snapshot\030\016 \001(\005:\0010\022\027\n\017sna"
  "pshot_prefix\030\017 \001(\t\022\034\n\rsnapshot_diff\030\020 \001("
  "\010:\005false\022K\n\017snapshot_format\030% \001(\0162%.caff"
  "e.SolverParameter.SnapshotFormat:\013BINARY"
  "PROTO\022;\n\013solver_mode\030\021 \001(\0162!.caffe.Solve"
  "rParameter.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\004typ"
  "e\030( \001(\t:\003SGD\022\024\n\005delta\030\037 \001(\002:\0051e-08\022\030\n\tmo"
  "mentum2\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\024snap"
  "shot_after_train\030\034 \001(\010:\004true\022;\n\013solver_t"
  "ype\030\036 \001(\0162!.caffe.SolverParameter.Solver"
  "Type:\003SGD\022\037\n\021layer_wise_reduce\030- \001(\010:\004tr"
  "ue\"+\n\016SnapshotFormat\022\010\n\004HDF5\020\000\022\017\n\013BINARY"
  "PROTO\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\010NESTEROV\020\001\022\013\n\007"
  "ADAGRAD\020\002\022\013\n\007RMSPROP\020\003\022\014\n\010ADADELTA\020\004\022\010\n\004"
  "ADAM\020\005\"l\n\013SolverState\022\014\n\004iter\030\001 \001(\005\022\023\n\013l"
  "earned_net\030\002 \001(\t\022!\n\007history\030\003 \003(\0132\020.caff"
  "e.BlobProto\022\027\n\014current_step\030\004 \001(\005:\0010\"N\n\010"
  "NetState\022!\n\005phase\030\001 \001(\0162\014.caffe.Phase:\004T"
  "EST\022\020\n\005level\030\002 \001(\005:\0010\022\r\n\005stage\030\003 \003(\t\"s\n\014"
  "NetStateRule\022\033\n\005phase\030\001 \001(\0162\014.caffe.Phas"
  "e\022\021\n\tmin_level\030\002 \001(\005\022\021\n\tmax_level\030\003 \001(\005\022"
  "\r\n\005stage\030\004 \003(\t\022\021\n\tnot_stage\030\005 \003(\t\"\243\001\n\tPa"
  "ramSpec\022\014\n\004name\030\001 \001(\t\0221\n\nshare_mode\030\002 \001("
  "\0162\035.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\""
  "\205\034\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\033\n\005p"
  "hase\030\n \001(\0162\014.caffe.Phase\022\023\n\013loss_weight\030"
  "\005 \003(\002\022\037\n\005param\030\006 \003(\0132\020.caffe.ParamSpec\022\037"
  "\n\005blobs\030\007 \003(\0132\020.caffe.BlobProto\022\026\n\016propa"
  "gate_down\030\013 \003(\010\022$\n\007include\030\010 \003(\0132\023.caffe"
  ".NetStateRule\022$\n\007exclude\030\t \003(\0132\023.caffe.N"
  "etStateRule\0227\n\017transform_param\030d \001(\0132\036.c"
  "affe.TransformationParameter\022(\n\nloss_par"
  "am\030e \001(\0132\024.caffe.LossParameter\0220\n\016accura"
  "cy_param\030f \001(\0132\030.caffe.AccuracyParameter"
  "\022<\n\024annotated_data_param\030\310\001 \001(\0132\035.caffe."
  "AnnotatedDataParameter\022,\n\014argmax_param\030g"
  " \001(\0132\026.caffe.ArgMaxParameter\0224\n\020batch_no"
  "rm_param\030\213\001 \001(\0132\031.caffe.BatchNormParamet"
  "er\022)\n\nbias_param\030\215\001 \001(\0132\024.caffe.BiasPara"
  "meter\022,\n\014concat_param\030h \001(\0132\026.caffe.Conc"
  "atParameter\022\?\n\026contrastive_loss_param\030i "
  "\001(\0132\037.caffe.ContrastiveLossParameter\0226\n\021"
  "convolution_param\030j \001(\0132\033.caffe.Convolut"
  "ionParameter\022;\n\023convolution3d_param\030\223\001 \001"
  "(\0132\035.caffe.Convolution3DParameter\022)\n\ncro"
  "p_param\030\220\001 \001(\0132\024.caffe.CropParameter\022(\n\n"
  "data_param\030k \001(\0132\024.caffe.DataParameter\022D"
  "\n\030detection_evaluate_param\030\315\001 \001(\0132!.caff"
  "e.DetectionEvaluateParameter\022@\n\026detectio"
  "n_output_param\030\314\001 \001(\0132\037.caffe.DetectionO"
  "utputParameter\022.\n\rdropout_param\030l \001(\0132\027."
  "caffe.DropoutParameter\0223\n\020dummy_data_par"
  "am\030m \001(\0132\031.caffe.DummyDataParameter\022.\n\re"
  "ltwise_param\030n \001(\0132\027.caffe.EltwiseParame"
  "ter\022\'\n\telu_param\030\214\001 \001(\0132\023.caffe.ELUParam"
  "eter\022+\n\013embed_param\030\211\001 \001(\0132\025.caffe.Embed"
  "Parameter\022&\n\texp_param\030o \001(\0132\023.caffe.Exp"
  "Parameter\022/\n\rflatten_param\030\207\001 \001(\0132\027.caff"
  "e.FlattenParameter\0221\n\017hdf5_data_param\030p "
  "\001(\0132\030.caffe.HDF5DataParameter\0225\n\021hdf5_ou"
  "tput_param\030q \001(\0132\032.caffe.HDF5OutputParam"
  "eter\0223\n\020hinge_loss_param\030r \001(\0132\031.caffe.H"
  "ingeLossParameter\0223\n\020image_data_param\030s "
  "\001(\0132\031.caffe.ImageDataParameter\0229\n\023infoga"
  "in_loss_param\030t \001(\0132\034.caffe.InfogainLoss"
  "Parameter\0229\n\023inner_product_param\030u \001(\0132\034"
  ".caffe.InnerProductParameter\022+\n\013input_pa"
  "ram\030\217\001 \001(\0132\025.caffe.InputParameter\022\'\n\tlog"
  "_param\030\206\001 \001(\0132\023.caffe.LogParameter\022&\n\tlr"
  "n_param\030v \001(\0132\023.caffe.LRNParameter\022)\n\nls"
  "tm_param\030\322\001 \001(\0132\024.caffe.LSTMParameter\022-\n"
  "\014im2seq_param\030\317\001 \001(\0132\026.caffe.Im2seqParam"
  "eter\022/\n\rseq2out_param\030\320\001 \001(\0132\027.caffe.Seq"
  "2outParameter\0220\n\016img_size_param\030\321\001 \001(\0132\027"
  ".caffe.ImgSizeParameter\0225\n\021memory_data_p"
  "aram\030w \001(\0132\032.caffe.MemoryDataParameter\022:"
  "\n\023multibox_loss_param\030\311\001 \001(\0132\034.caffe.Mul"
  "tiBoxLossParameter\022&\n\tmvn_param\030x \001(\0132\023."
  "caffe.MVNParameter\022.\n\nnorm_param\030\316\001 \001(\0132"
  "\031.caffe.NormalizeParameter\0223\n\017parameter_"
  "param\030\221\001 \001(\0132\031.caffe.ParameterParameter\022"
  "/\n\rpermute_param\030\312\001 \001(\0132\027.caffe.PermuteP"
  "arameter\022.\n\rpooling_param\030y \001(\0132\027.caffe."
  "PoolingParameter\0223\n\017pooling3d_param\030\224\001 \001"
  "(\0132\031.caffe.Pooling3DParameter\022*\n\013power_p"
  "aram\030z \001(\0132\025.caffe.PowerParameter\022+\n\013pre"
  "lu_param\030\203\001 \001(\0132\025.caffe.PReLUParameter\0222"
  "\n\017prior_box_param\030\313\001 \001(\0132\030.caffe.PriorBo"
  "xParameter\022-\n\014python_param\030\202\001 \001(\0132\026.caff"
  "e.PythonParameter\0223\n\017recurrent_param\030\222\001 "
  "\001(\0132\031.caffe.RecurrentParameter\0223\n\017reduct"
  "ion_param\030\210\001 \001(\0132\031.caffe.ReductionParame"
  "ter\022(\n\nrelu_param\030{ \001(\0132\024.caffe.ReLUPara"
  "meter\022/\n\rreshape_param\030\205\001 \001(\0132\027.caffe.Re"
  "shapeParameter\022+\n\013scale_param\030\216\001 \001(\0132\025.c"
  "affe.ScaleParameter\022.\n\rsigmoid_param\030| \001"
  "(\0132\027.caffe.SigmoidParameter\022.\n\rsoftmax_p"
  "aram\030} \001(\0132\027.caffe.SoftmaxParameter\022\'\n\ts"
  "pp_param\030\204\001 \001(\0132\023.caffe.SPPParameter\022*\n\013"
  "slice_param\030~ \001(\0132\025.caffe.SliceParameter"
  "\022(\n\ntanh_param\030\177 \001(\0132\024.caffe.TanHParamet"
  "er\0223\n\017threshold_param\030\200\001 \001(\0132\031.caffe.Thr"
  "esholdParameter\022)\n\ntile_param\030\212\001 \001(\0132\024.c"
  "affe.TileParameter\0226\n\021window_data_param\030"
  "\201\001 \001(\0132\032.caffe.WindowDataParameter\0226\n\021ce"
  "nter_loss_param\030\323\001 \001(\0132\032.caffe.CenterLos"
  "sParameter\022>\n\025shuffle_channel_param\030\324\001 \001"
  "(\0132\036.caffe.ShuffleChannelParameter\022-\n\014in"
  "terp_param\030\242\021 \001(\0132\026.caffe.InterpParamete"
  "r\0226\n\021roi_pooling_param\030\231\021 \001(\0132\032.caffe.RO"
  "IPoolingParameter\022)\n\nclip_param\030\232\021 \001(\0132\024"
  ".caffe.ClipParameter\0221\n\016upsample_param\030\233"
  "\021 \001(\0132\030.caffe.UpsampleParameter\")\n\rClipP"
  "arameter\022\013\n\003min\030\001 \002(\002\022\013\n\003max\030\002 \002(\002\"Y\n\023RO"
  "IPoolingParameter\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\"\220\001\n\017InterpParameter\022\021\n\006height\030\001 \001("
  "\005:\0010\022\020\n\005width\030\002 \001(\005:\0010\022\026\n\013zoom_factor\030\003 "
  "\001(\005:\0011\022\030\n\rshrink_factor\030\004 \001(\005:\0011\022\022\n\007pad_"
  "beg\030\005 \001(\005:\0010\022\022\n\007pad_end\030\006 \001(\005:\0010\"\223\002\n\rLST"
  "MParameter\022\022\n\nnum_output\030\001 \001(\r\022\035\n\022clippi"
  "ng_threshold\030\002 \001(\002:\0010\022-\n\rweight_filler\030\003"
  " \001(\0132\026.caffe.FillerParameter\022+\n\013bias_fil"
  "ler\030\004 \001(\0132\026.caffe.FillerParameter\022\025\n\nbat"
  "ch_size\030\005 \001(\r:\0011\022\016\n\006paramq\030\006 \001(\r\022\020\n\010scal"
  "e_in\030\007 \001(\002\022\021\n\tscale_out\030\010 \001(\002\022\023\n\005a_min\030\t"
  " \001(\005:\004-128\022\022\n\005a_max\030\n \001(\005:\003127\"\325\001\n\017Im2se"
  "qParameter\022<\n\tdirection\030\001 \001(\0162 .caffe.Im"
  "2seqParameter.Direction:\007FORWARD\022\017\n\004size"
  "\030\002 \001(\r:\0011\022\021\n\006stride\030\003 \001(\r:\0011\022\035\n\016line2tim"
  "e_loss\030\004 \001(\010:\005false\"A\n\tDirection\022\013\n\007FORW"
  "ARD\020\000\022\014\n\010REVERSED\020\001\022\013\n\007TOPDOWN\020\002\022\014\n\010BOTT"
  "OMUP\020\003\"\204\001\n\023CenterLossParameter\022\022\n\nnum_ou"
  "tput\030\001 \001(\r\022-\n\rcenter_filler\030\002 \001(\0132\026.caff"
  "e.FillerParameter\022\017\n\004axis\030\003 \001(\005:\0011\022\031\n\rdi"
  "stance_type\030\035 \001(\t:\002L2\"\022\n\020Seq2outParamete"
  "r\"\227\001\n\020ImgSizeParameter\022\024\n\tx_scaling\030\001 \001("
  "\002:\0011\022\024\n\ty_scaling\030\002 \001(\002:\0011\022\030\n\017pretrained"
  "_file\030\364\003 \001(\t\022\036\n\025pretrained_layer_name\030\365\003"
  " \001(\t\022\035\n\024pretrained_layer_bin\030\366\003 \001(\t\"\312\003\n\027"
  "TransformationParameter\022\020\n\005scale\030\001 \001(\002:\001"
  "1\022\025\n\006mirror\030\002 \001(\010:\005false\022\024\n\tcrop_size\030\003 "
  "\001(\r:\0010\022\021\n\006crop_h\030\013 \001(\r:\0010\022\021\n\006crop_w\030\014 \001("
  "\r:\0010\022\021\n\tmean_file\030\004 \001(\t\022\022\n\nmean_value\030\005 "
  "\003(\002\022\032\n\013force_color\030\006 \001(\010:\005false\022\031\n\nforce"
  "_gray\030\007 \001(\010:\005false\022,\n\014resize_param\030\010 \001(\013"
  "2\026.caffe.ResizeParameter\022*\n\013noise_param\030"
  "\t \001(\0132\025.caffe.NoiseParameter\0221\n\rdistort_"
  "param\030\r \001(\0132\032.caffe.DistortionParameter\022"
  "/\n\014expand_param\030\016 \001(\0132\031.caffe.ExpansionP"
  "arameter\022.\n\017emit_constraint\030\n \001(\0132\025.caff"
  "e.EmitConstraint\"\220\004\n\017ResizeParameter\022\017\n\004"
  "prob\030\001 \001(\002:\0011\022=\n\013resize_mode\030\002 \001(\0162\".caf"
  "fe.ResizeParameter.Resize_mode:\004WARP\022\021\n\006"
  "height\030\003 \001(\r:\0010\022\020\n\005width\030\004 \001(\r:\0010\022\027\n\014hei"
  "ght_scale\030\010 \001(\r:\0010\022\026\n\013width_scale\030\t \001(\r:"
  "\0010\022;\n\010pad_mode\030\005 \001(\0162\037.caffe.ResizeParam"
  "eter.Pad_mode:\010CONSTANT\022\021\n\tpad_value\030\006 \003"
  "(\002\0227\n\013interp_mode\030\007 \003(\0162\".caffe.ResizePa"
  "rameter.Interp_mode\"G\n\013Resize_mode\022\010\n\004WA"
  "RP\020\001\022\022\n\016FIT_SMALL_SIZE\020\002\022\032\n\026FIT_LARGE_SI"
  "ZE_AND_PAD\020\003\":\n\010Pad_mode\022\014\n\010CONSTANT\020\001\022\014"
  "\n\010MIRRORED\020\002\022\022\n\016REPEAT_NEAREST\020\003\"I\n\013Inte"
  "rp_mode\022\n\n\006LINEAR\020\001\022\010\n\004AREA\020\002\022\013\n\007NEAREST"
  "\020\003\022\t\n\005CUBIC\020\004\022\014\n\010LANCZOS4\020\005\"9\n\023SaltPeppe"
  "rParameter\022\023\n\010fraction\030\001 \001(\002:\0010\022\r\n\005value"
  "\030\002 \003(\002\"\356\002\n\016NoiseParameter\022\017\n\004prob\030\001 \001(\002:"
  "\0010\022\026\n\007hist_eq\030\002 \001(\010:\005false\022\026\n\007inverse\030\003 "
  "\001(\010:\005false\022\031\n\ndecolorize\030\004 \001(\010:\005false\022\031\n"
  "\ngauss_blur\030\005 \001(\010:\005false\022\020\n\004jpeg\030\006 \001(\002:\002"
  "-1\022\030\n\tposterize\030\007 \001(\010:\005false\022\024\n\005erode\030\010 "
  "\001(\010:\005false\022\031\n\nsaltpepper\030\t \001(\010:\005false\0224\n"
  "\020saltpepper_param\030\n \001(\0132\032.caffe.SaltPepp"
  "erParameter\022\024\n\005clahe\030\013 \001(\010:\005false\022\035\n\016con"
  "vert_to_hsv\030\014 \001(\010:\005false\022\035\n\016convert_to_l"
  "ab\030\r \001(\010:\005false\"\275\002\n\023DistortionParameter\022"
  "\032\n\017brightness_prob\030\001 \001(\002:\0010\022\033\n\020brightnes"
  "s_delta\030\002 \001(\002:\0010\022\030\n\rcontrast_prob\030\003 \001(\002:"
  "\0010\022\031\n\016contrast_lower\030\004 \001(\002:\0010\022\031\n\016contras"
  "t_upper\030\005 \001(\002:\0010\022\023\n\010hue_prob\030\006 \001(\002:\0010\022\024\n"
  "\thue_delta\030\007 \001(\002:\0010\022\032\n\017saturation_prob\030\010"
  " \001(\002:\0010\022\033\n\020saturation_lower\030\t \001(\002:\0010\022\033\n\020"
  "saturation_upper\030\n \001(\002:\0010\022\034\n\021random_orde"
  "r_prob\030\013 \001(\002:\0010\"B\n\022ExpansionParameter\022\017\n"
  "\004prob\030\001 \001(\002:\0011\022\033\n\020max_expand_ratio\030\002 \001(\002"
  ":\0011\"\336\001\n\rLossParameter\022\024\n\014ignore_label\030\001 "
  "\001(\005\022D\n\rnormalization\030\003 \001(\0162&.caffe.LossP"
  "arameter.NormalizationMode:\005VALID\022\021\n\tnor"
  "malize\030\002 \001(\010\022\032\n\014is_num_scale\030\004 \001(\010:\004true"
  "\"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\021Accuracy"
  "Parameter\022\020\n\005top_k\030\001 \001(\r:\0011\022\017\n\004axis\030\002 \001("
  "\005:\0011\022\024\n\014ignore_label\030\003 \001(\005\"\225\001\n\026Annotated"
  "DataParameter\022*\n\rbatch_sampler\030\001 \003(\0132\023.c"
  "affe.BatchSampler\022\026\n\016label_map_file\030\002 \001("
  "\t\0227\n\tanno_type\030\003 \001(\0162$.caffe.AnnotatedDa"
  "tum.AnnotationType\"o\n\017ArgMaxParameter\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\022 \n\021softmax_threshold\030\004"
  " \001(\010:\005false\"9\n\017ConcatParameter\022\017\n\004axis\030\002"
  " \001(\005:\0011\022\025\n\nconcat_dim\030\001 \001(\r:\0011\"\245\002\n\022Batch"
  "NormParameter\022\030\n\020use_global_stats\030\001 \001(\010\022"
  "&\n\027moving_average_fraction\030\002 \001(\002:\0050.999\022"
  "\022\n\003eps\030\003 \001(\002:\0051e-05\022\035\n\017use_weight_bias\030\005"
  " \001(\010:\004true\022\027\n\tbias_term\030\006 \001(\010:\004true\022&\n\006f"
  "iller\030\007 \001(\0132\026.caffe.FillerParameter\022+\n\013b"
  "ias_filler\030\010 \001(\0132\026.caffe.FillerParameter"
  "\022,\n\014scale_filler\030\t \001(\0132\026.caffe.FillerPar"
  "ameter\"]\n\rBiasParameter\022\017\n\004axis\030\001 \001(\005:\0011"
  "\022\023\n\010num_axes\030\002 \001(\005:\0011\022&\n\006filler\030\003 \001(\0132\026."
  "caffe.FillerParameter\"L\n\030ContrastiveLoss"
  "Parameter\022\021\n\006margin\030\001 \001(\002:\0011\022\035\n\016legacy_v"
  "ersion\030\002 \001(\010:\005false\"\200\005\n\024ConvolutionParam"
  "eter\022\022\n\nnum_output\030\001 \001(\r\022\027\n\tbias_term\030\002 "
  "\001(\010:\004true\022\013\n\003pad\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\010ker"
  "nel_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\010stride_w\030\016 \001(\r\022\020\n\005group\030\005 \001(\r"
  ":\0011\022-\n\rweight_filler\030\007 \001(\0132\026.caffe.Fille"
  "rParameter\022+\n\013bias_filler\030\010 \001(\0132\026.caffe."
  "FillerParameter\022;\n\006engine\030\017 \001(\0162\".caffe."
  "ConvolutionParameter.Engine:\007DEFAULT\022\017\n\004"
  "axis\030\020 \001(\005:\0011\022\036\n\017force_nd_im2col\030\021 \001(\010:\005"
  "false\022\016\n\006paramq\030\023 \001(\r\022\021\n\006params\030\024 \001(\002:\0010"
  "\022\020\n\010scale_in\030\025 \001(\002\022\021\n\tscale_out\030\026 \001(\002\022\023\n"
  "\005a_min\030\027 \001(\005:\004-128\022\022\n\005a_max\030\030 \001(\005:\003127\">"
  "\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDN"
  "N\020\002\022\021\n\rCUDNN_FORWARD\020\003\"\317\002\n\026Convolution3D"
  "Parameter\022\022\n\nnum_output\030\001 \001(\r\022\027\n\tbias_te"
  "rm\030\002 \001(\010:\004true\022\016\n\003pad\030\003 \001(\r:\0010\022\023\n\013kernel"
  "_size\030\004 \001(\r\022\020\n\005group\030\005 \001(\r:\0011\022\024\n\014kernel_"
  "depth\030\006 \001(\r\022\021\n\006stride\030\007 \001(\r:\0011\022\032\n\017tempor"
  "al_stride\030\010 \001(\r:\0011\022-\n\rweight_filler\030\t \001("
  "\0132\026.caffe.FillerParameter\022+\n\013bias_filler"
  "\030\n \001(\0132\026.caffe.FillerParameter\022\027\n\014filter"
  "_group\030\013 \001(\r:\0011\022\027\n\014temporal_pad\030\014 \001(\r:\0010"
  "\"0\n\rCropParameter\022\017\n\004axis\030\001 \001(\005:\0012\022\016\n\006of"
  "fset\030\002 \003(\r\"\357\002\n\rDataParameter\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\0221\n\007backend\030\010 \001(\0162\027.caffe.DataPara"
  "meter.DB:\007LEVELDB\022\020\n\005scale\030\002 \001(\002:\0011\022\021\n\tm"
  "ean_file\030\003 \001(\t\022\024\n\tcrop_size\030\005 \001(\r:\0010\022\025\n\006"
  "mirror\030\006 \001(\010:\005false\022\"\n\023force_encoded_col"
  "or\030\t \001(\010:\005false\022\023\n\010prefetch\030\n \001(\r:\0014\022\025\n\n"
  "label_size\030\013 \001(\r:\0010\022\025\n\ndata_width\030\014 \001(\r:"
  "\0010\022\033\n\014output_width\030\r \001(\010:\005false\"\033\n\002DB\022\013\n"
  "\007LEVELDB\020\000\022\010\n\004LMDB\020\001\"\334\001\n\032DetectionEvalua"
  "teParameter\022\023\n\013num_classes\030\001 \001(\r\022\036\n\023back"
  "ground_label_id\030\002 \001(\r:\0010\022\036\n\021overlap_thre"
  "shold\030\003 \001(\002:\0030.5\022#\n\025evaluate_difficult_g"
  "t\030\004 \001(\010:\004true\022\026\n\016name_size_file\030\005 \001(\t\022,\n"
  "\014resize_param\030\006 \001(\0132\026.caffe.ResizeParame"
  "ter\"[\n\036NonMaximumSuppressionParameter\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\"\330\001\n\023SaveOutputParameter"
  "\022\030\n\020output_directory\030\001 \001(\t\022\032\n\022output_nam"
  "e_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_size_file\030"
  "\005 \001(\t\022\026\n\016num_test_image\030\006 \001(\r\022,\n\014resize_"
  "param\030\007 \001(\0132\026.caffe.ResizeParameter\"\347\003\n\030"
  "DetectionOutputParameter\022\023\n\013num_classes\030"
  "\001 \001(\r\022\034\n\016share_location\030\002 \001(\010:\004true\022\036\n\023b"
  "ackground_label_id\030\003 \001(\005:\0010\0228\n\tnms_param"
  "\030\004 \001(\0132%.caffe.NonMaximumSuppressionPara"
  "meter\0225\n\021save_output_param\030\005 \001(\0132\032.caffe"
  ".SaveOutputParameter\022<\n\tcode_type\030\006 \001(\0162"
  "!.caffe.PriorBoxParameter.CodeType:\006CORN"
  "ER\022)\n\032variance_encoded_in_target\030\010 \001(\010:\005"
  "false\022\026\n\nkeep_top_k\030\007 \001(\005:\002-1\022\034\n\024confide"
  "nce_threshold\030\t \001(\002\022\030\n\tvisualize\030\n \001(\010:\005"
  "false\022\033\n\023visualize_threshold\030\013 \001(\002\022\021\n\tsa"
  "ve_file\030\014 \001(\t\022\036\n\020objectness_score\030\030 \001(\002:"
  "\0040.01\".\n\020DropoutParameter\022\032\n\rdropout_rat"
  "io\030\001 \001(\002:\0030.5\"\240\001\n\022DummyDataParameter\022+\n\013"
  "data_filler\030\001 \003(\0132\026.caffe.FillerParamete"
  "r\022\037\n\005shape\030\006 \003(\0132\020.caffe.BlobShape\022\013\n\003nu"
  "m\030\002 \003(\r\022\020\n\010channels\030\003 \003(\r\022\016\n\006height\030\004 \003("
  "\r\022\r\n\005width\030\005 \003(\r\"\245\001\n\020EltwiseParameter\0229\n"
  "\toperation\030\001 \001(\0162!.caffe.EltwiseParamete"
  "r.EltwiseOp:\003SUM\022\r\n\005coeff\030\002 \003(\002\022\036\n\020stabl"
  "e_prod_grad\030\003 \001(\010:\004true\"\'\n\tEltwiseOp\022\010\n\004"
  "PROD\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\"\254\001\n\016EmbedParameter\022\022\n"
  "\nnum_output\030\001 \001(\r\022\021\n\tinput_dim\030\002 \001(\r\022\027\n\t"
  "bias_term\030\003 \001(\010:\004true\022-\n\rweight_filler\030\004"
  " \001(\0132\026.caffe.FillerParameter\022+\n\013bias_fil"
  "ler\030\005 \001(\0132\026.caffe.FillerParameter\"D\n\014Exp"
  "Parameter\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\020FlattenParame"
  "ter\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\006source\030\001 \001(\t\022"
  "\022\n\nbatch_size\030\002 \001(\r\022\026\n\007shuffle\030\003 \001(\010:\005fa"
  "lse\"(\n\023HDF5OutputParameter\022\021\n\tfile_name\030"
  "\001 \001(\t\"^\n\022HingeLossParameter\0220\n\004norm\030\001 \001("
  "\0162\036.caffe.HingeLossParameter.Norm:\002L1\"\026\n"
  "\004Norm\022\006\n\002L1\020\001\022\006\n\002L2\020\002\"\301\002\n\022ImageDataParam"
  "eter\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_height\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\tmean_file\030\003 \001(\t\022\024\n\tc"
  "rop_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\022\024\n\tlabel_num\030\r \001"
  "(\r:\0011\022\022\n\007att_num\030\016 \001(\r:\0011\"8\n\025InfogainLos"
  "sParameter\022\016\n\006source\030\001 \001(\t\022\017\n\004axis\030\002 \001(\005"
  ":\0011\"\277\002\n\025InnerProductParameter\022\022\n\nnum_out"
  "put\030\001 \001(\r\022\027\n\tbias_term\030\002 \001(\010:\004true\022-\n\rwe"
  "ight_filler\030\003 \001(\0132\026.caffe.FillerParamete"
  "r\022+\n\013bias_filler\030\004 \001(\0132\026.caffe.FillerPar"
  "ameter\022\017\n\004axis\030\005 \001(\005:\0011\022\030\n\ttranspose\030\006 \001"
  "(\010:\005false\022\021\n\006paramq\030\007 \001(\r:\0010\022\021\n\006params\030\010"
  " \001(\002:\0010\022\020\n\010scale_in\030\t \001(\002\022\021\n\tscale_out\030\n"
  " \001(\002\022\023\n\005a_min\030\013 \001(\005:\004-128\022\022\n\005a_max\030\014 \001(\005"
  ":\003127\"1\n\016InputParameter\022\037\n\005shape\030\001 \003(\0132\020"
  ".caffe.BlobShape\"D\n\014LogParameter\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\"\270\002\n\014LRNParameter\022\025\n\nlocal_size\030\001 "
  "\001(\r:\0015\022\020\n\005alpha\030\002 \001(\002:\0011\022\022\n\004beta\030\003 \001(\002:\004"
  "0.75\022D\n\013norm_region\030\004 \001(\0162\036.caffe.LRNPar"
  "ameter.NormRegion:\017ACROSS_CHANNELS\022\014\n\001k\030"
  "\005 \001(\002:\0011\0223\n\006engine\030\006 \001(\0162\032.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\"\350\010\n\025MultiBoxLossParameter\022"
  "J\n\rloc_loss_type\030\001 \001(\0162(.caffe.MultiBoxL"
  "ossParameter.LocLossType:\tSMOOTH_L1\022J\n\016c"
  "onf_loss_type\030\002 \001(\0162).caffe.MultiBoxLoss"
  "Parameter.ConfLossType:\007SOFTMAX\022\025\n\nloc_w"
  "eight\030\003 \001(\002:\0011\022\023\n\013num_classes\030\004 \001(\r\022\034\n\016s"
  "hare_location\030\005 \001(\010:\004true\022J\n\nmatch_type\030"
  "\006 \001(\0162&.caffe.MultiBoxLossParameter.Matc"
  "hType:\016PER_PREDICTION\022\036\n\021overlap_thresho"
  "ld\030\007 \001(\002:\0030.5\022$\n\026use_prior_for_matching\030"
  "\010 \001(\010:\004true\022\036\n\023background_label_id\030\t \001(\r"
  ":\0010\022\036\n\020use_difficult_gt\030\n \001(\010:\004true\022\025\n\rd"
  "o_neg_mining\030\013 \001(\010\022\030\n\rneg_pos_ratio\030\014 \001("
  "\002:\0013\022\030\n\013neg_overlap\030\r \001(\002:\0030.5\022<\n\tcode_t"
  "ype\030\016 \001(\0162!.caffe.PriorBoxParameter.Code"
  "Type:\006CORNER\022(\n\031encode_variance_in_targe"
  "t\030\020 \001(\010:\005false\022%\n\026map_object_to_agnostic"
  "\030\021 \001(\010:\005false\022)\n\032ignore_cross_boundary_b"
  "box\030\022 \001(\010:\005false\022\030\n\tbp_inside\030\023 \001(\010:\005fal"
  "se\022J\n\013mining_type\030\024 \001(\0162\'.caffe.MultiBox"
  "LossParameter.MiningType:\014MAX_NEGATIVE\0228"
  "\n\tnms_param\030\025 \001(\0132%.caffe.NonMaximumSupp"
  "ressionParameter\022\027\n\013sample_size\030\026 \001(\005:\0026"
  "4\022 \n\021use_prior_for_nms\030\027 \001(\010:\005false\"$\n\013L"
  "ocLossType\022\006\n\002L2\020\000\022\r\n\tSMOOTH_L1\020\001\")\n\014Con"
  "fLossType\022\013\n\007SOFTMAX\020\000\022\014\n\010LOGISTIC\020\001\".\n\t"
  "MatchType\022\r\n\tBIPARTITE\020\000\022\022\n\016PER_PREDICTI"
  "ON\020\001\":\n\nMiningType\022\010\n\004NONE\020\000\022\020\n\014MAX_NEGA"
  "TIVE\020\001\022\020\n\014HARD_EXAMPLE\020\002\"d\n\014MVNParameter"
  "\022 \n\022normalize_variance\030\001 \001(\010:\004true\022\036\n\017ac"
  "ross_channels\030\002 \001(\010:\005false\022\022\n\003eps\030\003 \001(\002:"
  "\0051e-09\"\222\001\n\022NormalizeParameter\022\034\n\016across_"
  "spatial\030\001 \001(\010:\004true\022,\n\014scale_filler\030\002 \001("
  "\0132\026.caffe.FillerParameter\022\034\n\016channel_sha"
  "red\030\003 \001(\010:\004true\022\022\n\003eps\030\004 \001(\002:\0051e-10\"5\n\022P"
  "arameterParameter\022\037\n\005shape\030\001 \001(\0132\020.caffe"
  ".BlobShape\"!\n\020PermuteParameter\022\r\n\005order\030"
  "\001 \003(\r\"\240\004\n\020PoolingParameter\022\035\n\017avg_includ"
  "e_pad\030\r \001(\010:\004true\0225\n\004pool\030\001 \001(\0162\".caffe."
  "PoolingParameter.PoolMethod:\003MAX\022\016\n\003pad\030"
  "\004 \001(\r:\0010\022\020\n\005pad_h\030\t \001(\r:\0010\022\020\n\005pad_w\030\n \001("
  "\r:\0010\022\023\n\013kernel_size\030\002 \001(\r\022\020\n\010kernel_h\030\005 "
  "\001(\r\022\020\n\010kernel_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\0227\n\006"
  "engine\030\013 \001(\0162\036.caffe.PoolingParameter.En"
  "gine:\007DEFAULT\022\035\n\016global_pooling\030\014 \001(\010:\005f"
  "alse\022;\n\nround_mode\030\016 \001(\0162!.caffe.Pooling"
  "Parameter.RoundMode:\004CEIL\".\n\nPoolMethod\022"
  "\007\n\003MAX\020\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Eng"
  "ine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\" "
  "\n\tRoundMode\022\010\n\004CEIL\020\000\022\t\n\005FLOOR\020\001\"\200\002\n\022Poo"
  "ling3DParameter\0227\n\004pool\030\001 \001(\0162$.caffe.Po"
  "oling3DParameter.PoolMethod:\003MAX\022\023\n\013kern"
  "el_size\030\002 \001(\r\022\024\n\014kernel_depth\030\003 \001(\r\022\021\n\006s"
  "tride\030\004 \001(\r:\0011\022\032\n\017temporal_stride\030\005 \001(\r:"
  "\0011\022\016\n\003pad\030\006 \001(\r:\0010\022\027\n\014temporal_pad\030\007 \001(\r"
  ":\0010\".\n\nPoolMethod\022\007\n\003MAX\020\000\022\007\n\003AVE\020\001\022\016\n\nS"
  "TOCHASTIC\020\002\"F\n\016PowerParameter\022\020\n\005power\030\001"
  " \001(\002:\0011\022\020\n\005scale\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002"
  ":\0010\"\265\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\023\n\004clip\030\005 \001(\010:\005f"
  "alse\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\006"
  "offset\030\r \001(\002:\0030.5\"8\n\010CodeType\022\n\n\006CORNER\020"
  "\001\022\017\n\013CENTER_SIZE\020\002\022\017\n\013CORNER_SIZE\020\003\"g\n\017P"
  "ythonParameter\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_p"
  "arallel\030\004 \001(\010:\005false\"\300\001\n\022RecurrentParame"
  "ter\022\025\n\nnum_output\030\001 \001(\r:\0010\022-\n\rweight_fil"
  "ler\030\002 \001(\0132\026.caffe.FillerParameter\022+\n\013bia"
  "s_filler\030\003 \001(\0132\026.caffe.FillerParameter\022\031"
  "\n\ndebug_info\030\004 \001(\010:\005false\022\034\n\rexpose_hidd"
  "en\030\005 \001(\010:\005false\"\255\001\n\022ReductionParameter\022="
  "\n\toperation\030\001 \001(\0162%.caffe.ReductionParam"
  "eter.ReductionOp:\003SUM\022\017\n\004axis\030\002 \001(\005:\0010\022\020"
  "\n\005coeff\030\003 \001(\002:\0011\"5\n\013ReductionOp\022\007\n\003SUM\020\001"
  "\022\010\n\004ASUM\020\002\022\t\n\005SUMSQ\020\003\022\010\n\004MEAN\020\004\"\215\001\n\rReLU"
  "Parameter\022\031\n\016negative_slope\030\001 \001(\002:\0010\0224\n\006"
  "engine\030\002 \001(\0162\033.caffe.ReLUParameter.Engin"
  "e:\007DEFAULT\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAF"
  "FE\020\001\022\t\n\005CUDNN\020\002\"Z\n\020ReshapeParameter\022\037\n\005s"
  "hape\030\001 \001(\0132\020.caffe.BlobShape\022\017\n\004axis\030\002 \001"
  "(\005:\0010\022\024\n\010num_axes\030\003 \001(\005:\002-1\"\245\001\n\016ScalePar"
  "ameter\022\017\n\004axis\030\001 \001(\005:\0011\022\023\n\010num_axes\030\002 \001("
  "\005:\0011\022&\n\006filler\030\003 \001(\0132\026.caffe.FillerParam"
  "eter\022\030\n\tbias_term\030\004 \001(\010:\005false\022+\n\013bias_f"
  "iller\030\005 \001(\0132\026.caffe.FillerParameter\"x\n\020S"
  "igmoidParameter\0227\n\006engine\030\001 \001(\0162\036.caffe."
  "SigmoidParameter.Engine:\007DEFAULT\"+\n\006Engi"
  "ne\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"L\n"
  "\016SliceParameter\022\017\n\004axis\030\003 \001(\005:\0011\022\023\n\013slic"
  "e_point\030\002 \003(\r\022\024\n\tslice_dim\030\001 \001(\r:\0011\"\211\001\n\020"
  "SoftmaxParameter\0227\n\006engine\030\001 \001(\0162\036.caffe"
  ".SoftmaxParameter.Engine:\007DEFAULT\022\017\n\004axi"
  "s\030\002 \001(\005:\0011\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAF"
  "FE\020\001\022\t\n\005CUDNN\020\002\"r\n\rTanHParameter\0224\n\006engi"
  "ne\030\001 \001(\0162\033.caffe.TanHParameter.Engine:\007D"
  "EFAULT\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001"
  "\022\t\n\005CUDNN\020\002\"/\n\rTileParameter\022\017\n\004axis\030\001 \001"
  "(\005:\0011\022\r\n\005tiles\030\002 \001(\005\"*\n\022ThresholdParamet"
  "er\022\024\n\tthreshold\030\001 \001(\002:\0010\"\301\002\n\023WindowDataP"
  "arameter\022\016\n\006source\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_threshold\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\013context_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:\005"
  "false\022\025\n\013root_folder\030\r \001(\t:\000\"\353\001\n\014SPPPara"
  "meter\022\026\n\016pyramid_height\030\001 \001(\r\0221\n\004pool\030\002 "
  "\001(\0162\036.caffe.SPPParameter.PoolMethod:\003MAX"
  "\0223\n\006engine\030\006 \001(\0162\032.caffe.SPPParameter.En"
  "gine:\007DEFAULT\".\n\nPoolMethod\022\007\n\003MAX\020\000\022\007\n\003"
  "AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Engine\022\013\n\007DEFAU"
  "LT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"\340\023\n\020V1LayerPa"
  "rameter\022\016\n\006bottom\030\002 \003(\t\022\013\n\003top\030\003 \003(\t\022\014\n\004"
  "name\030\004 \001(\t\022$\n\007include\030  \003(\0132\023.caffe.NetS"
  "tateRule\022$\n\007exclude\030! \003(\0132\023.caffe.NetSta"
  "teRule\022/\n\004type\030\005 \001(\0162!.caffe.V1LayerPara"
  "meter.LayerType\022\037\n\005blobs\030\006 \003(\0132\020.caffe.B"
  "lobProto\022\016\n\005param\030\351\007 \003(\t\022>\n\017blob_share_m"
  "ode\030\352\007 \003(\0162$.caffe.V1LayerParameter.DimC"
  "heckMode\022\020\n\010blobs_lr\030\007 \003(\002\022\024\n\014weight_dec"
  "ay\030\010 \003(\002\022\023\n\013loss_weight\030# \003(\002\0220\n\016accurac"
  "y_param\030\033 \001(\0132\030.caffe.AccuracyParameter\022"
  ",\n\014argmax_param\030\027 \001(\0132\026.caffe.ArgMaxPara"
  "meter\022,\n\014concat_param\030\t \001(\0132\026.caffe.Conc"
  "atParameter\022\?\n\026contrastive_loss_param\030( "
  "\001(\0132\037.caffe.ContrastiveLossParameter\0226\n\021"
  "convolution_param\030\n \001(\0132\033.caffe.Convolut"
  "ionParameter\022(\n\ndata_param\030\013 \001(\0132\024.caffe"
  ".DataParameter\022.\n\rdropout_param\030\014 \001(\0132\027."
  "caffe.DropoutParameter\0223\n\020dummy_data_par"
  "am\030\032 \001(\0132\031.caffe.DummyDataParameter\022.\n\re"
  "ltwise_param\030\030 \001(\0132\027.caffe.EltwiseParame"
  "ter\022&\n\texp_param\030) \001(\0132\023.caffe.ExpParame"
  "ter\0221\n\017hdf5_data_param\030\r \001(\0132\030.caffe.HDF"
  "5DataParameter\0225\n\021hdf5_output_param\030\016 \001("
  "\0132\032.caffe.HDF5OutputParameter\0223\n\020hinge_l"
  "oss_param\030\035 \001(\0132\031.caffe.HingeLossParamet"
  "er\0223\n\020image_data_param\030\017 \001(\0132\031.caffe.Ima"
  "geDataParameter\0229\n\023infogain_loss_param\030\020"
  " \001(\0132\034.caffe.InfogainLossParameter\0229\n\023in"
  "ner_product_param\030\021 \001(\0132\034.caffe.InnerPro"
  "ductParameter\022&\n\tlrn_param\030\022 \001(\0132\023.caffe"
  ".LRNParameter\0225\n\021memory_data_param\030\026 \001(\013"
  "2\032.caffe.MemoryDataParameter\022&\n\tmvn_para"
  "m\030\" \001(\0132\023.caffe.MVNParameter\022.\n\rpooling_"
  "param\030\023 \001(\0132\027.caffe.PoolingParameter\022*\n\013"
  "power_param\030\025 \001(\0132\025.caffe.PowerParameter"
  "\022(\n\nrelu_param\030\036 \001(\0132\024.caffe.ReLUParamet"
  "er\022.\n\rsigmoid_param\030& \001(\0132\027.caffe.Sigmoi"
  "dParameter\022.\n\rsoftmax_param\030\' \001(\0132\027.caff"
  "e.SoftmaxParameter\022*\n\013slice_param\030\037 \001(\0132"
  "\025.caffe.SliceParameter\022(\n\ntanh_param\030% \001"
  "(\0132\024.caffe.TanHParameter\0222\n\017threshold_pa"
  "ram\030\031 \001(\0132\031.caffe.ThresholdParameter\0225\n\021"
  "window_data_param\030\024 \001(\0132\032.caffe.WindowDa"
  "taParameter\0227\n\017transform_param\030$ \001(\0132\036.c"
  "affe.TransformationParameter\022(\n\nloss_par"
  "am\030* \001(\0132\024.caffe.LossParameter\022&\n\005layer\030"
  "\001 \001(\0132\027.caffe.V0LayerParameter\"\330\004\n\tLayer"
  "Type\022\010\n\004NONE\020\000\022\n\n\006ABSVAL\020#\022\014\n\010ACCURACY\020\001"
  "\022\n\n\006ARGMAX\020\036\022\010\n\004BNLL\020\002\022\n\n\006CONCAT\020\003\022\024\n\020CO"
  "NTRASTIVE_LOSS\020%\022\017\n\013CONVOLUTION\020\004\022\010\n\004DAT"
  "A\020\005\022\021\n\rDECONVOLUTION\020\'\022\013\n\007DROPOUT\020\006\022\016\n\nD"
  "UMMY_DATA\020 \022\022\n\016EUCLIDEAN_LOSS\020\007\022\013\n\007ELTWI"
  "SE\020\031\022\007\n\003EXP\020&\022\013\n\007FLATTEN\020\010\022\r\n\tHDF5_DATA\020"
  "\t\022\017\n\013HDF5_OUTPUT\020\n\022\016\n\nHINGE_LOSS\020\034\022\n\n\006IM"
  "2COL\020\013\022\016\n\nIMAGE_DATA\020\014\022\021\n\rINFOGAIN_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_L"
  "OSS\020\033\022\013\n\007SILENCE\020$\022\013\n\007SOFTMAX\020\024\022\020\n\014SOFTM"
  "AX_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\tTHRESHOLD\020\037\"*\n\014Dim"
  "CheckMode\022\n\n\006STRICT\020\000\022\016\n\nPERMISSIVE\020\001\"\375\007"
  "\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\010biasterm\030\004"
  " \001(\010:\004true\022-\n\rweight_filler\030\005 \001(\0132\026.caff"
  "e.FillerParameter\022+\n\013bias_filler\030\006 \001(\0132\026"
  ".caffe.FillerParameter\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\006"
  "stride\030\n \001(\r:\0011\0225\n\004pool\030\013 \001(\0162\".caffe.V0"
  "LayerParameter.PoolMethod:\003MAX\022\032\n\rdropou"
  "t_ratio\030\014 \001(\002:\0030.5\022\025\n\nlocal_size\030\r \001(\r:\001"
  "5\022\020\n\005alpha\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\010cropsize\030\024 \001(\r:\0010\022\025\n\006mirror\030\025 \001("
  "\010:\005false\022\037\n\005blobs\0302 \003(\0132\020.caffe.BlobProt"
  "o\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_thresh"
  "old\0306 \001(\002:\0030.5\022\035\n\020det_bg_threshold\0307 \001(\002"
  ":\0030.5\022\035\n\017det_fg_fraction\0308 \001(\002:\0040.25\022\032\n\017"
  "det_context_pad\030: \001(\r:\0010\022\033\n\rdet_crop_mod"
  "e\030; \001(\t:\004warp\022\022\n\007new_num\030< \001(\005:\0010\022\027\n\014new"
  "_channels\030= \001(\005:\0010\022\025\n\nnew_height\030> \001(\005:\001"
  "0\022\024\n\tnew_width\030\? \001(\005:\0010\022\035\n\016shuffle_image"
  "s\030@ \001(\010:\005false\022\025\n\nconcat_dim\030A \001(\r:\0011\0226\n"
  "\021hdf5_output_param\030\351\007 \001(\0132\032.caffe.HDF5Ou"
  "tputParameter\".\n\nPoolMethod\022\007\n\003MAX\020\000\022\007\n\003"
  "AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"W\n\016PReLUParameter\022"
  "&\n\006filler\030\001 \001(\0132\026.caffe.FillerParameter\022"
  "\035\n\016channel_shared\030\002 \001(\010:\005false\"+\n\027Shuffl"
  "eChannelParameter\022\020\n\005group\030\001 \001(\r:\0011\"\"\n\021U"
  "psampleParameter\022\r\n\005scale\030\001 \001(\002*0\n\005Phase"
  "\022\t\n\005TRAIN\020\000\022\010\n\004TEST\020\001\022\010\n\004QUAN\020\002\022\010\n\004INT8\020"
  "\003"
  ;
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_caffe_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_caffe_2eproto = {
  false, false, 24961, descriptor_table_protodef_caffe_2eproto, "caffe.proto", 
  &descriptor_table_caffe_2eproto_once, nullptr, 0, 99,
  schemas, file_default_instances, TableStruct_caffe_2eproto::offsets,
  file_level_metadata_caffe_2eproto, file_level_enum_descriptors_caffe_2eproto, file_level_service_descriptors_caffe_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_caffe_2eproto_getter() {
  return &descriptor_table_caffe_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_caffe_2eproto(&descriptor_table_caffe_2eproto);
namespace caffe {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EmitConstraint_EmitType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[0];
}
bool EmitConstraint_EmitType_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 EmitConstraint_EmitType EmitConstraint::CENTER;
constexpr EmitConstraint_EmitType EmitConstraint::MIN_OVERLAP;
constexpr EmitConstraint_EmitType EmitConstraint::EmitType_MIN;
constexpr EmitConstraint_EmitType EmitConstraint::EmitType_MAX;
constexpr int EmitConstraint::EmitType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* AnnotatedDatum_AnnotationType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[1];
}
bool AnnotatedDatum_AnnotationType_IsValid(int value) {
  switch (value) {
    case 0:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr AnnotatedDatum_AnnotationType AnnotatedDatum::BBOX;
constexpr AnnotatedDatum_AnnotationType AnnotatedDatum::AnnotationType_MIN;
constexpr AnnotatedDatum_AnnotationType AnnotatedDatum::AnnotationType_MAX;
constexpr int AnnotatedDatum::AnnotationType_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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[2];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[3];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[4];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[5];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[6];
}
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* Im2seqParameter_Direction_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[7];
}
bool Im2seqParameter_Direction_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 Im2seqParameter_Direction Im2seqParameter::FORWARD;
constexpr Im2seqParameter_Direction Im2seqParameter::REVERSED;
constexpr Im2seqParameter_Direction Im2seqParameter::TOPDOWN;
constexpr Im2seqParameter_Direction Im2seqParameter::BOTTOMUP;
constexpr Im2seqParameter_Direction Im2seqParameter::Direction_MIN;
constexpr Im2seqParameter_Direction Im2seqParameter::Direction_MAX;
constexpr int Im2seqParameter::Direction_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ResizeParameter_Resize_mode_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[8];
}
bool ResizeParameter_Resize_mode_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ResizeParameter_Resize_mode ResizeParameter::WARP;
constexpr ResizeParameter_Resize_mode ResizeParameter::FIT_SMALL_SIZE;
constexpr ResizeParameter_Resize_mode ResizeParameter::FIT_LARGE_SIZE_AND_PAD;
constexpr ResizeParameter_Resize_mode ResizeParameter::Resize_mode_MIN;
constexpr ResizeParameter_Resize_mode ResizeParameter::Resize_mode_MAX;
constexpr int ResizeParameter::Resize_mode_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ResizeParameter_Pad_mode_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[9];
}
bool ResizeParameter_Pad_mode_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
    case 3:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ResizeParameter_Pad_mode ResizeParameter::CONSTANT;
constexpr ResizeParameter_Pad_mode ResizeParameter::MIRRORED;
constexpr ResizeParameter_Pad_mode ResizeParameter::REPEAT_NEAREST;
constexpr ResizeParameter_Pad_mode ResizeParameter::Pad_mode_MIN;
constexpr ResizeParameter_Pad_mode ResizeParameter::Pad_mode_MAX;
constexpr int ResizeParameter::Pad_mode_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ResizeParameter_Interp_mode_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[10];
}
bool ResizeParameter_Interp_mode_IsValid(int value) {
  switch (value) {
    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 ResizeParameter_Interp_mode ResizeParameter::LINEAR;
constexpr ResizeParameter_Interp_mode ResizeParameter::AREA;
constexpr ResizeParameter_Interp_mode ResizeParameter::NEAREST;
constexpr ResizeParameter_Interp_mode ResizeParameter::CUBIC;
constexpr ResizeParameter_Interp_mode ResizeParameter::LANCZOS4;
constexpr ResizeParameter_Interp_mode ResizeParameter::Interp_mode_MIN;
constexpr ResizeParameter_Interp_mode ResizeParameter::Interp_mode_MAX;
constexpr int ResizeParameter::Interp_mode_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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[11];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[12];
}
bool ConvolutionParameter_Engine_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 ConvolutionParameter_Engine ConvolutionParameter::DEFAULT;
constexpr ConvolutionParameter_Engine ConvolutionParameter::CAFFE;
constexpr ConvolutionParameter_Engine ConvolutionParameter::CUDNN;
constexpr ConvolutionParameter_Engine ConvolutionParameter::CUDNN_FORWARD;
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[13];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[14];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[15];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[16];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[17];
}
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* MultiBoxLossParameter_LocLossType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[18];
}
bool MultiBoxLossParameter_LocLossType_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 MultiBoxLossParameter_LocLossType MultiBoxLossParameter::L2;
constexpr MultiBoxLossParameter_LocLossType MultiBoxLossParameter::SMOOTH_L1;
constexpr MultiBoxLossParameter_LocLossType MultiBoxLossParameter::LocLossType_MIN;
constexpr MultiBoxLossParameter_LocLossType MultiBoxLossParameter::LocLossType_MAX;
constexpr int MultiBoxLossParameter::LocLossType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MultiBoxLossParameter_ConfLossType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[19];
}
bool MultiBoxLossParameter_ConfLossType_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 MultiBoxLossParameter_ConfLossType MultiBoxLossParameter::SOFTMAX;
constexpr MultiBoxLossParameter_ConfLossType MultiBoxLossParameter::LOGISTIC;
constexpr MultiBoxLossParameter_ConfLossType MultiBoxLossParameter::ConfLossType_MIN;
constexpr MultiBoxLossParameter_ConfLossType MultiBoxLossParameter::ConfLossType_MAX;
constexpr int MultiBoxLossParameter::ConfLossType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MultiBoxLossParameter_MatchType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[20];
}
bool MultiBoxLossParameter_MatchType_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 MultiBoxLossParameter_MatchType MultiBoxLossParameter::BIPARTITE;
constexpr MultiBoxLossParameter_MatchType MultiBoxLossParameter::PER_PREDICTION;
constexpr MultiBoxLossParameter_MatchType MultiBoxLossParameter::MatchType_MIN;
constexpr MultiBoxLossParameter_MatchType MultiBoxLossParameter::MatchType_MAX;
constexpr int MultiBoxLossParameter::MatchType_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MultiBoxLossParameter_MiningType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[21];
}
bool MultiBoxLossParameter_MiningType_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 MultiBoxLossParameter_MiningType MultiBoxLossParameter::NONE;
constexpr MultiBoxLossParameter_MiningType MultiBoxLossParameter::MAX_NEGATIVE;
constexpr MultiBoxLossParameter_MiningType MultiBoxLossParameter::HARD_EXAMPLE;
constexpr MultiBoxLossParameter_MiningType MultiBoxLossParameter::MiningType_MIN;
constexpr MultiBoxLossParameter_MiningType MultiBoxLossParameter::MiningType_MAX;
constexpr int MultiBoxLossParameter::MiningType_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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[22];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[23];
}
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* PoolingParameter_RoundMode_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[24];
}
bool PoolingParameter_RoundMode_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 PoolingParameter_RoundMode PoolingParameter::CEIL;
constexpr PoolingParameter_RoundMode PoolingParameter::FLOOR;
constexpr PoolingParameter_RoundMode PoolingParameter::RoundMode_MIN;
constexpr PoolingParameter_RoundMode PoolingParameter::RoundMode_MAX;
constexpr int PoolingParameter::RoundMode_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Pooling3DParameter_PoolMethod_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[25];
}
bool Pooling3DParameter_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 Pooling3DParameter_PoolMethod Pooling3DParameter::MAX;
constexpr Pooling3DParameter_PoolMethod Pooling3DParameter::AVE;
constexpr Pooling3DParameter_PoolMethod Pooling3DParameter::STOCHASTIC;
constexpr Pooling3DParameter_PoolMethod Pooling3DParameter::PoolMethod_MIN;
constexpr Pooling3DParameter_PoolMethod Pooling3DParameter::PoolMethod_MAX;
constexpr int Pooling3DParameter::PoolMethod_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PriorBoxParameter_CodeType_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[26];
}
bool PriorBoxParameter_CodeType_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
    case 3:
      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::CORNER_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* ReductionParameter_ReductionOp_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[27];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[28];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[29];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[30];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[31];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[32];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[33];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[34];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[35];
}
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_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[36];
}
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* Phase_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_caffe_2eproto);
  return file_level_enum_descriptors_caffe_2eproto[37];
}
bool Phase_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
    case 3:
      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),
  dim_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.BlobShape)
}
BlobShape::BlobShape(const BlobShape& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      dim_(from.dim_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:caffe.BlobShape)
}

inline void BlobShape::SharedCtor() {
}

BlobShape::~BlobShape() {
  // @@protoc_insertion_point(destructor:caffe.BlobShape)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void BlobShape::ArenaDtor(void* object) {
  BlobShape* _this = reinterpret_cast< BlobShape* >(object);
  (void)_this;
}
void BlobShape::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BlobShape::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* BlobShape::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.BlobShape)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated int64 dim = 1 [packed = true];
  {
    int byte_size = _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 = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.BlobShape)
  return target;
}

size_t BlobShape::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int64Size(this->dim_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _dim_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void BlobShape::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<BlobShape *>(to)->MergeFrom(
      static_cast<const BlobShape &>(from));
}


void BlobShape::MergeFrom(const BlobShape& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.BlobShape)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void BlobShape::CopyFrom(const BlobShape& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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_);
  dim_.InternalSwap(&other->dim_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BlobShape::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[0]);
}

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

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

const ::caffe::BlobShape&
BlobProto::_Internal::shape(const BlobProto* msg) {
  return *msg->shape_;
}
BlobProto::BlobProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  data_(arena),
  diff_(arena),
  double_data_(arena),
  double_diff_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.BlobProto)
}
BlobProto::BlobProto(const BlobProto& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      data_(from.data_),
      diff_(from.diff_),
      double_data_(from.double_data_),
      double_diff_(from.double_diff_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_shape()) {
    shape_ = new ::caffe::BlobShape(*from.shape_);
  } else {
    shape_ = nullptr;
  }
  ::memcpy(&num_, &from.num_,
    static_cast<size_t>(reinterpret_cast<char*>(&width_) -
    reinterpret_cast<char*>(&num_)) + sizeof(width_));
  // @@protoc_insertion_point(copy_constructor:caffe.BlobProto)
}

inline void BlobProto::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&shape_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&width_) -
    reinterpret_cast<char*>(&shape_)) + sizeof(width_));
}

BlobProto::~BlobProto() {
  // @@protoc_insertion_point(destructor:caffe.BlobProto)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void BlobProto::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete shape_;
}

void BlobProto::ArenaDtor(void* object) {
  BlobProto* _this = reinterpret_cast< BlobProto* >(object);
  (void)_this;
}
void BlobProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BlobProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* BlobProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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);
          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 .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;
      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:
  _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:caffe.BlobProto)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

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

  // optional int32 width = 4 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 .caffe.BlobShape shape = 7;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        7, _Internal::shape(this), 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);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.BlobProto)
  return target;
}

size_t BlobProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 +
        ::PROTOBUF_NAMESPACE_ID::internal::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 +
        ::PROTOBUF_NAMESPACE_ID::internal::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 +
        ::PROTOBUF_NAMESPACE_ID::internal::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 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<int32_t>(data_size));
    }
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional .caffe.BlobShape shape = 7;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *shape_);
    }

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

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

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void BlobProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<BlobProto *>(to)->MergeFrom(
      static_cast<const BlobProto &>(from));
}


void BlobProto::MergeFrom(const BlobProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.BlobProto)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  data_.MergeFrom(from.data_);
  diff_.MergeFrom(from.diff_);
  double_data_.MergeFrom(from.double_data_);
  double_diff_.MergeFrom(from.double_diff_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_shape()->::caffe::BlobShape::MergeFrom(from._internal_shape());
    }
    if (cached_has_bits & 0x00000002u) {
      num_ = from.num_;
    }
    if (cached_has_bits & 0x00000004u) {
      channels_ = from.channels_;
    }
    if (cached_has_bits & 0x00000008u) {
      height_ = from.height_;
    }
    if (cached_has_bits & 0x00000010u) {
      width_ = from.width_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void BlobProto::InternalSwap(BlobProto* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  data_.InternalSwap(&other->data_);
  diff_.InternalSwap(&other->diff_);
  double_data_.InternalSwap(&other->double_data_);
  double_diff_.InternalSwap(&other->double_diff_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BlobProto, width_)
      + sizeof(BlobProto::width_)
      - PROTOBUF_FIELD_OFFSET(BlobProto, shape_)>(
          reinterpret_cast<char*>(&shape_),
          reinterpret_cast<char*>(&other->shape_));
}

::PROTOBUF_NAMESPACE_ID::Metadata BlobProto::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_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),
  blobs_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.BlobProtoVector)
}
BlobProtoVector::BlobProtoVector(const BlobProtoVector& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      blobs_(from.blobs_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:caffe.BlobProtoVector)
}

inline void BlobProtoVector::SharedCtor() {
}

BlobProtoVector::~BlobProtoVector() {
  // @@protoc_insertion_point(destructor:caffe.BlobProtoVector)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void BlobProtoVector::ArenaDtor(void* object) {
  BlobProtoVector* _this = reinterpret_cast< BlobProtoVector* >(object);
  (void)_this;
}
void BlobProtoVector::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BlobProtoVector::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* BlobProtoVector::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .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:caffe.BlobProtoVector)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .caffe.BlobProto blobs = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_blobs_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_blobs(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.BlobProtoVector)
  return target;
}

size_t BlobProtoVector::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 .caffe.BlobProto blobs = 1;
  total_size += 1UL * this->_internal_blobs_size();
  for (const auto& msg : this->blobs_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void BlobProtoVector::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<BlobProtoVector *>(to)->MergeFrom(
      static_cast<const BlobProtoVector &>(from));
}


void BlobProtoVector::MergeFrom(const BlobProtoVector& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.BlobProtoVector)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void BlobProtoVector::CopyFrom(const BlobProtoVector& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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_);
  blobs_.InternalSwap(&other->blobs_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BlobProtoVector::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[2]);
}

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

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

Datum::Datum(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  float_data_(arena),
  labels_(arena),
  float_labels_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.Datum)
}
Datum::Datum(const Datum& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      float_data_(from.float_data_),
      labels_(from.labels_),
      float_labels_(from.float_labels_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_data()) {
    data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(), 
      GetArenaForAllocation());
  }
  byte_labels_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    byte_labels_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_byte_labels()) {
    byte_labels_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_byte_labels(), 
      GetArenaForAllocation());
  }
  ::memcpy(&channels_, &from.channels_,
    static_cast<size_t>(reinterpret_cast<char*>(&float_label_) -
    reinterpret_cast<char*>(&channels_)) + sizeof(float_label_));
  // @@protoc_insertion_point(copy_constructor:caffe.Datum)
}

inline void Datum::SharedCtor() {
data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
byte_labels_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  byte_labels_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&channels_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&float_label_) -
    reinterpret_cast<char*>(&channels_)) + sizeof(float_label_));
}

Datum::~Datum() {
  // @@protoc_insertion_point(destructor:caffe.Datum)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void Datum::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  byte_labels_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void Datum::ArenaDtor(void* object) {
  Datum* _this = reinterpret_cast< Datum* >(object);
  (void)_this;
}
void Datum::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Datum::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  float_data_.Clear();
  labels_.Clear();
  float_labels_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      data_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      byte_labels_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&channels_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&float_label_) -
        reinterpret_cast<char*>(&channels_)) + sizeof(float_label_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Datum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          encoded_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 labels = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_labels(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<64>(ptr));
        } else if (static_cast<uint8_t>(tag) == 66) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_labels(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float float_label = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 77)) {
          _Internal::set_has_float_label(&has_bits);
          float_label_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated float float_labels = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 85)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_float_labels(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<85>(ptr));
        } else if (static_cast<uint8_t>(tag) == 82) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_float_labels(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bytes byte_labels = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          auto str = _internal_mutable_byte_labels();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::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:
  _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:caffe.Datum)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional int32 width = 3;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_float_data(i), target);
  }

  // optional bool encoded = 7 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_encoded(), target);
  }

  // repeated int32 labels = 8;
  for (int i = 0, n = this->_internal_labels_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(8, this->_internal_labels(i), target);
  }

  // optional float float_label = 9;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(9, this->_internal_float_label(), target);
  }

  // repeated float float_labels = 10;
  for (int i = 0, n = this->_internal_float_labels_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_float_labels(i), target);
  }

  // optional bytes byte_labels = 11;
  if (cached_has_bits & 0x00000002u) {
    target = stream->WriteBytesMaybeAliased(
        11, this->_internal_byte_labels(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.Datum)
  return target;
}

size_t Datum::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_float_data_size());
    total_size += data_size;
  }

  // repeated int32 labels = 8;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->labels_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_labels_size());
    total_size += data_size;
  }

  // repeated float float_labels = 10;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_float_labels_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_float_labels_size());
    total_size += data_size;
  }

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

    // optional bytes byte_labels = 11;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
          this->_internal_byte_labels());
    }

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

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

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

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

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void Datum::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<Datum *>(to)->MergeFrom(
      static_cast<const Datum &>(from));
}


void Datum::MergeFrom(const Datum& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.Datum)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  float_data_.MergeFrom(from.float_data_);
  labels_.MergeFrom(from.labels_);
  float_labels_.MergeFrom(from.float_labels_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_data(from._internal_data());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_byte_labels(from._internal_byte_labels());
    }
    if (cached_has_bits & 0x00000004u) {
      channels_ = from.channels_;
    }
    if (cached_has_bits & 0x00000008u) {
      height_ = from.height_;
    }
    if (cached_has_bits & 0x00000010u) {
      width_ = from.width_;
    }
    if (cached_has_bits & 0x00000020u) {
      label_ = from.label_;
    }
    if (cached_has_bits & 0x00000040u) {
      encoded_ = from.encoded_;
    }
    if (cached_has_bits & 0x00000080u) {
      float_label_ = from.float_label_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void Datum::CopyFrom(const Datum& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  float_data_.InternalSwap(&other->float_data_);
  labels_.InternalSwap(&other->labels_);
  float_labels_.InternalSwap(&other->float_labels_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &data_, lhs_arena,
      &other->data_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &byte_labels_, lhs_arena,
      &other->byte_labels_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Datum, float_label_)
      + sizeof(Datum::float_label_)
      - PROTOBUF_FIELD_OFFSET(Datum, channels_)>(
          reinterpret_cast<char*>(&channels_),
          reinterpret_cast<char*>(&other->channels_));
}

::PROTOBUF_NAMESPACE_ID::Metadata Datum::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[3]);
}

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

class MTCNNBBox::_Internal {
 public:
  using HasBits = decltype(std::declval<MTCNNBBox>()._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;
  }
};

MTCNNBBox::MTCNNBBox(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.MTCNNBBox)
}
MTCNNBBox::MTCNNBBox(const MTCNNBBox& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&xmin_, &from.xmin_,
    static_cast<size_t>(reinterpret_cast<char*>(&ymax_) -
    reinterpret_cast<char*>(&xmin_)) + sizeof(ymax_));
  // @@protoc_insertion_point(copy_constructor:caffe.MTCNNBBox)
}

inline void MTCNNBBox::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&xmin_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&ymax_) -
    reinterpret_cast<char*>(&xmin_)) + sizeof(ymax_));
}

MTCNNBBox::~MTCNNBBox() {
  // @@protoc_insertion_point(destructor:caffe.MTCNNBBox)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void MTCNNBBox::ArenaDtor(void* object) {
  MTCNNBBox* _this = reinterpret_cast< MTCNNBBox* >(object);
  (void)_this;
}
void MTCNNBBox::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void MTCNNBBox::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* MTCNNBBox::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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);
          ymax_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional float xmin = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_xmin(), target);
  }

  // optional float ymin = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_ymin(), target);
  }

  // optional float xmax = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_xmax(), target);
  }

  // optional float ymax = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_ymax(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.MTCNNBBox)
  return target;
}

size_t MTCNNBBox::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.MTCNNBBox)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // 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;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void MTCNNBBox::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<MTCNNBBox *>(to)->MergeFrom(
      static_cast<const MTCNNBBox &>(from));
}


void MTCNNBBox::MergeFrom(const MTCNNBBox& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.MTCNNBBox)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      xmin_ = from.xmin_;
    }
    if (cached_has_bits & 0x00000002u) {
      ymin_ = from.ymin_;
    }
    if (cached_has_bits & 0x00000004u) {
      xmax_ = from.xmax_;
    }
    if (cached_has_bits & 0x00000008u) {
      ymax_ = from.ymax_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata MTCNNBBox::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[4]);
}

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

class MTCNNDatum::_Internal {
 public:
  using HasBits = decltype(std::declval<MTCNNDatum>()._has_bits_);
  static const ::caffe::Datum& datum(const MTCNNDatum* msg);
  static void set_has_datum(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::caffe::MTCNNBBox& roi(const MTCNNDatum* msg);
  static void set_has_roi(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::caffe::Datum&
MTCNNDatum::_Internal::datum(const MTCNNDatum* msg) {
  return *msg->datum_;
}
const ::caffe::MTCNNBBox&
MTCNNDatum::_Internal::roi(const MTCNNDatum* msg) {
  return *msg->roi_;
}
MTCNNDatum::MTCNNDatum(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  pts_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.MTCNNDatum)
}
MTCNNDatum::MTCNNDatum(const MTCNNDatum& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      pts_(from.pts_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_datum()) {
    datum_ = new ::caffe::Datum(*from.datum_);
  } else {
    datum_ = nullptr;
  }
  if (from._internal_has_roi()) {
    roi_ = new ::caffe::MTCNNBBox(*from.roi_);
  } else {
    roi_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:caffe.MTCNNDatum)
}

inline void MTCNNDatum::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&datum_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&roi_) -
    reinterpret_cast<char*>(&datum_)) + sizeof(roi_));
}

MTCNNDatum::~MTCNNDatum() {
  // @@protoc_insertion_point(destructor:caffe.MTCNNDatum)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void MTCNNDatum::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete datum_;
  if (this != internal_default_instance()) delete roi_;
}

void MTCNNDatum::ArenaDtor(void* object) {
  MTCNNDatum* _this = reinterpret_cast< MTCNNDatum* >(object);
  (void)_this;
}
void MTCNNDatum::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void MTCNNDatum::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  pts_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(datum_ != nullptr);
      datum_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(roi_ != nullptr);
      roi_->Clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* MTCNNDatum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .caffe.Datum datum = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_datum(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.MTCNNBBox roi = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_roi(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float pts = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_pts(::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_pts(), 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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .caffe.Datum datum = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::datum(this), target, stream);
  }

  // optional .caffe.MTCNNBBox roi = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::roi(this), target, stream);
  }

  // repeated float pts = 3;
  for (int i = 0, n = this->_internal_pts_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_pts(i), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.MTCNNDatum)
  return target;
}

size_t MTCNNDatum::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.MTCNNDatum)
  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 pts = 3;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_pts_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_pts_size());
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .caffe.Datum datum = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *datum_);
    }

    // optional .caffe.MTCNNBBox roi = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *roi_);
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void MTCNNDatum::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<MTCNNDatum *>(to)->MergeFrom(
      static_cast<const MTCNNDatum &>(from));
}


void MTCNNDatum::MergeFrom(const MTCNNDatum& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.MTCNNDatum)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  pts_.MergeFrom(from.pts_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_datum()->::caffe::Datum::MergeFrom(from._internal_datum());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_roi()->::caffe::MTCNNBBox::MergeFrom(from._internal_roi());
    }
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata MTCNNDatum::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[5]);
}

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

class LabelMapItem::_Internal {
 public:
  using HasBits = decltype(std::declval<LabelMapItem>()._has_bits_);
  static void set_has_name(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_label(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_display_name(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

LabelMapItem::LabelMapItem(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.LabelMapItem)
}
LabelMapItem::LabelMapItem(const LabelMapItem& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  display_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_display_name()) {
    display_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_display_name(), 
      GetArenaForAllocation());
  }
  label_ = from.label_;
  // @@protoc_insertion_point(copy_constructor:caffe.LabelMapItem)
}

inline void LabelMapItem::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
display_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  display_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
label_ = 0;
}

LabelMapItem::~LabelMapItem() {
  // @@protoc_insertion_point(destructor:caffe.LabelMapItem)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void LabelMapItem::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  display_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void LabelMapItem::ArenaDtor(void* object) {
  LabelMapItem* _this = reinterpret_cast< LabelMapItem* >(object);
  (void)_this;
}
void LabelMapItem::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LabelMapItem::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      display_name_.ClearNonDefaultToEmpty();
    }
  }
  label_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* LabelMapItem::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.LabelMapItem.name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 label = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_label(&has_bits);
          label_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string display_name = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          auto str = _internal_mutable_display_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.LabelMapItem.display_name");
          #endif  // !NDEBUG
          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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _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,
      "caffe.LabelMapItem.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // optional int32 label = 2;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_label(), target);
  }

  // optional string display_name = 3;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_display_name().data(), static_cast<int>(this->_internal_display_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "caffe.LabelMapItem.display_name");
    target = stream->WriteStringMaybeAliased(
        3, this->_internal_display_name(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.LabelMapItem)
  return target;
}

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

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

    // optional int32 label = 2;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_label());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void LabelMapItem::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<LabelMapItem *>(to)->MergeFrom(
      static_cast<const LabelMapItem &>(from));
}


void LabelMapItem::MergeFrom(const LabelMapItem& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LabelMapItem)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_display_name(from._internal_display_name());
    }
    if (cached_has_bits & 0x00000004u) {
      label_ = from.label_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void LabelMapItem::InternalSwap(LabelMapItem* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &display_name_, lhs_arena,
      &other->display_name_, rhs_arena
  );
  swap(label_, other->label_);
}

::PROTOBUF_NAMESPACE_ID::Metadata LabelMapItem::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[6]);
}

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

class LabelMap::_Internal {
 public:
};

LabelMap::LabelMap(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  item_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.LabelMap)
}
LabelMap::LabelMap(const LabelMap& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      item_(from.item_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:caffe.LabelMap)
}

inline void LabelMap::SharedCtor() {
}

LabelMap::~LabelMap() {
  // @@protoc_insertion_point(destructor:caffe.LabelMap)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void LabelMap::ArenaDtor(void* object) {
  LabelMap* _this = reinterpret_cast< LabelMap* >(object);
  (void)_this;
}
void LabelMap::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LabelMap::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* LabelMap::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .caffe.LabelMapItem item = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_item(), 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* LabelMap::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:caffe.LabelMap)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .caffe.LabelMapItem item = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_item_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_item(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.LabelMap)
  return target;
}

size_t LabelMap::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.LabelMap)
  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 .caffe.LabelMapItem item = 1;
  total_size += 1UL * this->_internal_item_size();
  for (const auto& msg : this->item_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void LabelMap::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<LabelMap *>(to)->MergeFrom(
      static_cast<const LabelMap &>(from));
}


void LabelMap::MergeFrom(const LabelMap& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LabelMap)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  item_.MergeFrom(from.item_);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void LabelMap::InternalSwap(LabelMap* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  item_.InternalSwap(&other->item_);
}

::PROTOBUF_NAMESPACE_ID::Metadata LabelMap::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[7]);
}

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

class Sampler::_Internal {
 public:
  using HasBits = decltype(std::declval<Sampler>()._has_bits_);
  static void set_has_min_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_max_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_min_aspect_ratio(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_max_aspect_ratio(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

Sampler::Sampler(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.Sampler)
}
Sampler::Sampler(const Sampler& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&min_scale_, &from.min_scale_,
    static_cast<size_t>(reinterpret_cast<char*>(&max_aspect_ratio_) -
    reinterpret_cast<char*>(&min_scale_)) + sizeof(max_aspect_ratio_));
  // @@protoc_insertion_point(copy_constructor:caffe.Sampler)
}

inline void Sampler::SharedCtor() {
min_scale_ = 1;
max_scale_ = 1;
min_aspect_ratio_ = 1;
max_aspect_ratio_ = 1;
}

Sampler::~Sampler() {
  // @@protoc_insertion_point(destructor:caffe.Sampler)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void Sampler::ArenaDtor(void* object) {
  Sampler* _this = reinterpret_cast< Sampler* >(object);
  (void)_this;
}
void Sampler::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Sampler::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    min_scale_ = 1;
    max_scale_ = 1;
    min_aspect_ratio_ = 1;
    max_aspect_ratio_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Sampler::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float min_scale = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_min_scale(&has_bits);
          min_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float max_scale = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_max_scale(&has_bits);
          max_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float min_aspect_ratio = 3 [default = 1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_min_aspect_ratio(&has_bits);
          min_aspect_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float max_aspect_ratio = 4 [default = 1];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          _Internal::set_has_max_aspect_ratio(&has_bits);
          max_aspect_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional float min_scale = 1 [default = 1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_min_scale(), target);
  }

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

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

  // optional float max_aspect_ratio = 4 [default = 1];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_max_aspect_ratio(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.Sampler)
  return target;
}

size_t Sampler::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.Sampler)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional float min_scale = 1 [default = 1];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

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

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void Sampler::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<Sampler *>(to)->MergeFrom(
      static_cast<const Sampler &>(from));
}


void Sampler::MergeFrom(const Sampler& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.Sampler)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      min_scale_ = from.min_scale_;
    }
    if (cached_has_bits & 0x00000002u) {
      max_scale_ = from.max_scale_;
    }
    if (cached_has_bits & 0x00000004u) {
      min_aspect_ratio_ = from.min_aspect_ratio_;
    }
    if (cached_has_bits & 0x00000008u) {
      max_aspect_ratio_ = from.max_aspect_ratio_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void Sampler::InternalSwap(Sampler* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(min_scale_, other->min_scale_);
  swap(max_scale_, other->max_scale_);
  swap(min_aspect_ratio_, other->min_aspect_ratio_);
  swap(max_aspect_ratio_, other->max_aspect_ratio_);
}

::PROTOBUF_NAMESPACE_ID::Metadata Sampler::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[8]);
}

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

class SampleConstraint::_Internal {
 public:
  using HasBits = decltype(std::declval<SampleConstraint>()._has_bits_);
  static void set_has_min_jaccard_overlap(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_max_jaccard_overlap(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_min_sample_coverage(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_max_sample_coverage(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_min_object_coverage(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_max_object_coverage(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

SampleConstraint::SampleConstraint(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.SampleConstraint)
}
SampleConstraint::SampleConstraint(const SampleConstraint& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&min_jaccard_overlap_, &from.min_jaccard_overlap_,
    static_cast<size_t>(reinterpret_cast<char*>(&max_object_coverage_) -
    reinterpret_cast<char*>(&min_jaccard_overlap_)) + sizeof(max_object_coverage_));
  // @@protoc_insertion_point(copy_constructor:caffe.SampleConstraint)
}

inline void SampleConstraint::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&min_jaccard_overlap_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&max_object_coverage_) -
    reinterpret_cast<char*>(&min_jaccard_overlap_)) + sizeof(max_object_coverage_));
}

SampleConstraint::~SampleConstraint() {
  // @@protoc_insertion_point(destructor:caffe.SampleConstraint)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void SampleConstraint::ArenaDtor(void* object) {
  SampleConstraint* _this = reinterpret_cast< SampleConstraint* >(object);
  (void)_this;
}
void SampleConstraint::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SampleConstraint::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* SampleConstraint::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float min_jaccard_overlap = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_min_jaccard_overlap(&has_bits);
          min_jaccard_overlap_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float max_jaccard_overlap = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_max_jaccard_overlap(&has_bits);
          max_jaccard_overlap_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float min_sample_coverage = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_min_sample_coverage(&has_bits);
          min_sample_coverage_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float max_sample_coverage = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          _Internal::set_has_max_sample_coverage(&has_bits);
          max_sample_coverage_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float min_object_coverage = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
          _Internal::set_has_min_object_coverage(&has_bits);
          min_object_coverage_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float max_object_coverage = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
          _Internal::set_has_max_object_coverage(&has_bits);
          max_object_coverage_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional float min_jaccard_overlap = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_min_jaccard_overlap(), target);
  }

  // optional float max_jaccard_overlap = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_max_jaccard_overlap(), target);
  }

  // optional float min_sample_coverage = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_min_sample_coverage(), target);
  }

  // optional float max_sample_coverage = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_max_sample_coverage(), target);
  }

  // optional float min_object_coverage = 5;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_min_object_coverage(), target);
  }

  // optional float max_object_coverage = 6;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_max_object_coverage(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.SampleConstraint)
  return target;
}

size_t SampleConstraint::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.SampleConstraint)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional float min_jaccard_overlap = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

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

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

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

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void SampleConstraint::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SampleConstraint *>(to)->MergeFrom(
      static_cast<const SampleConstraint &>(from));
}


void SampleConstraint::MergeFrom(const SampleConstraint& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SampleConstraint)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      min_jaccard_overlap_ = from.min_jaccard_overlap_;
    }
    if (cached_has_bits & 0x00000002u) {
      max_jaccard_overlap_ = from.max_jaccard_overlap_;
    }
    if (cached_has_bits & 0x00000004u) {
      min_sample_coverage_ = from.min_sample_coverage_;
    }
    if (cached_has_bits & 0x00000008u) {
      max_sample_coverage_ = from.max_sample_coverage_;
    }
    if (cached_has_bits & 0x00000010u) {
      min_object_coverage_ = from.min_object_coverage_;
    }
    if (cached_has_bits & 0x00000020u) {
      max_object_coverage_ = from.max_object_coverage_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata SampleConstraint::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[9]);
}

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

class BatchSampler::_Internal {
 public:
  using HasBits = decltype(std::declval<BatchSampler>()._has_bits_);
  static void set_has_use_original_image(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::caffe::Sampler& sampler(const BatchSampler* msg);
  static void set_has_sampler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::caffe::SampleConstraint& sample_constraint(const BatchSampler* msg);
  static void set_has_sample_constraint(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_max_sample(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_max_trials(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
};

const ::caffe::Sampler&
BatchSampler::_Internal::sampler(const BatchSampler* msg) {
  return *msg->sampler_;
}
const ::caffe::SampleConstraint&
BatchSampler::_Internal::sample_constraint(const BatchSampler* msg) {
  return *msg->sample_constraint_;
}
BatchSampler::BatchSampler(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.BatchSampler)
}
BatchSampler::BatchSampler(const BatchSampler& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_sampler()) {
    sampler_ = new ::caffe::Sampler(*from.sampler_);
  } else {
    sampler_ = nullptr;
  }
  if (from._internal_has_sample_constraint()) {
    sample_constraint_ = new ::caffe::SampleConstraint(*from.sample_constraint_);
  } else {
    sample_constraint_ = nullptr;
  }
  ::memcpy(&max_sample_, &from.max_sample_,
    static_cast<size_t>(reinterpret_cast<char*>(&max_trials_) -
    reinterpret_cast<char*>(&max_sample_)) + sizeof(max_trials_));
  // @@protoc_insertion_point(copy_constructor:caffe.BatchSampler)
}

inline void BatchSampler::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&sampler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&max_sample_) -
    reinterpret_cast<char*>(&sampler_)) + sizeof(max_sample_));
use_original_image_ = true;
max_trials_ = 100u;
}

BatchSampler::~BatchSampler() {
  // @@protoc_insertion_point(destructor:caffe.BatchSampler)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void BatchSampler::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete sampler_;
  if (this != internal_default_instance()) delete sample_constraint_;
}

void BatchSampler::ArenaDtor(void* object) {
  BatchSampler* _this = reinterpret_cast< BatchSampler* >(object);
  (void)_this;
}
void BatchSampler::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BatchSampler::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(sampler_ != nullptr);
      sampler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(sample_constraint_ != nullptr);
      sample_constraint_->Clear();
    }
  }
  if (cached_has_bits & 0x0000001cu) {
    max_sample_ = 0u;
    use_original_image_ = true;
    max_trials_ = 100u;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BatchSampler::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional bool use_original_image = 1 [default = true];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_use_original_image(&has_bits);
          use_original_image_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.Sampler sampler = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_sampler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.SampleConstraint sample_constraint = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_sample_constraint(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 max_sample = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_max_sample(&has_bits);
          max_sample_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 max_trials = 5 [default = 100];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_max_trials(&has_bits);
          max_trials_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional bool use_original_image = 1 [default = true];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_use_original_image(), target);
  }

  // optional .caffe.Sampler sampler = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::sampler(this), target, stream);
  }

  // optional .caffe.SampleConstraint sample_constraint = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::sample_constraint(this), target, stream);
  }

  // optional uint32 max_sample = 4;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_max_sample(), target);
  }

  // optional uint32 max_trials = 5 [default = 100];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_max_trials(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.BatchSampler)
  return target;
}

size_t BatchSampler::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.BatchSampler)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional .caffe.Sampler sampler = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *sampler_);
    }

    // optional .caffe.SampleConstraint sample_constraint = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *sample_constraint_);
    }

    // optional uint32 max_sample = 4;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_max_sample());
    }

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

    // optional uint32 max_trials = 5 [default = 100];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_max_trials());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void BatchSampler::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<BatchSampler *>(to)->MergeFrom(
      static_cast<const BatchSampler &>(from));
}


void BatchSampler::MergeFrom(const BatchSampler& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.BatchSampler)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_sampler()->::caffe::Sampler::MergeFrom(from._internal_sampler());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_sample_constraint()->::caffe::SampleConstraint::MergeFrom(from._internal_sample_constraint());
    }
    if (cached_has_bits & 0x00000004u) {
      max_sample_ = from.max_sample_;
    }
    if (cached_has_bits & 0x00000008u) {
      use_original_image_ = from.use_original_image_;
    }
    if (cached_has_bits & 0x00000010u) {
      max_trials_ = from.max_trials_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void BatchSampler::InternalSwap(BatchSampler* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BatchSampler, max_sample_)
      + sizeof(BatchSampler::max_sample_)
      - PROTOBUF_FIELD_OFFSET(BatchSampler, sampler_)>(
          reinterpret_cast<char*>(&sampler_),
          reinterpret_cast<char*>(&other->sampler_));
  swap(use_original_image_, other->use_original_image_);
  swap(max_trials_, other->max_trials_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BatchSampler::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[10]);
}

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

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

EmitConstraint::EmitConstraint(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.EmitConstraint)
}
EmitConstraint::EmitConstraint(const EmitConstraint& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&emit_type_, &from.emit_type_,
    static_cast<size_t>(reinterpret_cast<char*>(&emit_overlap_) -
    reinterpret_cast<char*>(&emit_type_)) + sizeof(emit_overlap_));
  // @@protoc_insertion_point(copy_constructor:caffe.EmitConstraint)
}

inline void EmitConstraint::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&emit_type_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&emit_overlap_) -
    reinterpret_cast<char*>(&emit_type_)) + sizeof(emit_overlap_));
}

EmitConstraint::~EmitConstraint() {
  // @@protoc_insertion_point(destructor:caffe.EmitConstraint)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void EmitConstraint::ArenaDtor(void* object) {
  EmitConstraint* _this = reinterpret_cast< EmitConstraint* >(object);
  (void)_this;
}
void EmitConstraint::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void EmitConstraint::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* EmitConstraint::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .caffe.EmitConstraint.EmitType emit_type = 1 [default = CENTER];
      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(::caffe::EmitConstraint_EmitType_IsValid(val))) {
            _internal_set_emit_type(static_cast<::caffe::EmitConstraint_EmitType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional float emit_overlap = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_emit_overlap(&has_bits);
          emit_overlap_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .caffe.EmitConstraint.EmitType emit_type = 1 [default = CENTER];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_emit_type(), target);
  }

  // optional float emit_overlap = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_emit_overlap(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.EmitConstraint)
  return target;
}

size_t EmitConstraint::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.EmitConstraint)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .caffe.EmitConstraint.EmitType emit_type = 1 [default = CENTER];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_emit_type());
    }

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void EmitConstraint::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<EmitConstraint *>(to)->MergeFrom(
      static_cast<const EmitConstraint &>(from));
}


void EmitConstraint::MergeFrom(const EmitConstraint& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.EmitConstraint)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      emit_type_ = from.emit_type_;
    }
    if (cached_has_bits & 0x00000002u) {
      emit_overlap_ = from.emit_overlap_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata EmitConstraint::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[11]);
}

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

class NormalizedBBox::_Internal {
 public:
  using HasBits = decltype(std::declval<NormalizedBBox>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.NormalizedBBox)
}
NormalizedBBox::NormalizedBBox(const NormalizedBBox& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&xmin_, &from.xmin_,
    static_cast<size_t>(reinterpret_cast<char*>(&size_) -
    reinterpret_cast<char*>(&xmin_)) + sizeof(size_));
  // @@protoc_insertion_point(copy_constructor:caffe.NormalizedBBox)
}

inline void NormalizedBBox::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&xmin_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&size_) -
    reinterpret_cast<char*>(&xmin_)) + sizeof(size_));
}

NormalizedBBox::~NormalizedBBox() {
  // @@protoc_insertion_point(destructor:caffe.NormalizedBBox)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void NormalizedBBox::ArenaDtor(void* object) {
  NormalizedBBox* _this = reinterpret_cast< NormalizedBBox* >(object);
  (void)_this;
}
void NormalizedBBox::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NormalizedBBox::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* NormalizedBBox::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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);
          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);
          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);
          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);
          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);
          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:
  _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:caffe.NormalizedBBox)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float xmin = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_xmin(), target);
  }

  // optional float ymin = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_ymin(), target);
  }

  // optional float xmax = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_xmax(), target);
  }

  // optional float ymax = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_ymax(), target);
  }

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

  // optional bool difficult = 6;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_difficult(), target);
  }

  // optional float score = 7;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_score(), target);
  }

  // optional float size = 8;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_size(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.NormalizedBBox)
  return target;
}

size_t NormalizedBBox::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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 += ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

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

void NormalizedBBox::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<NormalizedBBox *>(to)->MergeFrom(
      static_cast<const NormalizedBBox &>(from));
}


void NormalizedBBox::MergeFrom(const NormalizedBBox& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NormalizedBBox)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      xmin_ = from.xmin_;
    }
    if (cached_has_bits & 0x00000002u) {
      ymin_ = from.ymin_;
    }
    if (cached_has_bits & 0x00000004u) {
      xmax_ = from.xmax_;
    }
    if (cached_has_bits & 0x00000008u) {
      ymax_ = from.ymax_;
    }
    if (cached_has_bits & 0x00000010u) {
      label_ = from.label_;
    }
    if (cached_has_bits & 0x00000020u) {
      difficult_ = from.difficult_;
    }
    if (cached_has_bits & 0x00000040u) {
      score_ = from.score_;
    }
    if (cached_has_bits & 0x00000080u) {
      size_ = from.size_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void NormalizedBBox::CopyFrom(const NormalizedBBox& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(NormalizedBBox, size_)
      + sizeof(NormalizedBBox::size_)
      - PROTOBUF_FIELD_OFFSET(NormalizedBBox, xmin_)>(
          reinterpret_cast<char*>(&xmin_),
          reinterpret_cast<char*>(&other->xmin_));
}

::PROTOBUF_NAMESPACE_ID::Metadata NormalizedBBox::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[12]);
}

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

class Annotation::_Internal {
 public:
  using HasBits = decltype(std::declval<Annotation>()._has_bits_);
  static void set_has_instance_id(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::caffe::NormalizedBBox& bbox(const Annotation* msg);
  static void set_has_bbox(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::caffe::NormalizedBBox&
Annotation::_Internal::bbox(const Annotation* msg) {
  return *msg->bbox_;
}
Annotation::Annotation(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.Annotation)
}
Annotation::Annotation(const Annotation& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_bbox()) {
    bbox_ = new ::caffe::NormalizedBBox(*from.bbox_);
  } else {
    bbox_ = nullptr;
  }
  instance_id_ = from.instance_id_;
  // @@protoc_insertion_point(copy_constructor:caffe.Annotation)
}

inline void Annotation::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&bbox_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&instance_id_) -
    reinterpret_cast<char*>(&bbox_)) + sizeof(instance_id_));
}

Annotation::~Annotation() {
  // @@protoc_insertion_point(destructor:caffe.Annotation)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void Annotation::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete bbox_;
}

void Annotation::ArenaDtor(void* object) {
  Annotation* _this = reinterpret_cast< Annotation* >(object);
  (void)_this;
}
void Annotation::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Annotation::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(bbox_ != nullptr);
    bbox_->Clear();
  }
  instance_id_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Annotation::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 instance_id = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_instance_id(&has_bits);
          instance_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.NormalizedBBox bbox = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_bbox(), 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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 instance_id = 1 [default = 0];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_instance_id(), target);
  }

  // optional .caffe.NormalizedBBox bbox = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::bbox(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.Annotation)
  return target;
}

size_t Annotation::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.Annotation)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .caffe.NormalizedBBox bbox = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *bbox_);
    }

    // optional int32 instance_id = 1 [default = 0];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_instance_id());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void Annotation::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<Annotation *>(to)->MergeFrom(
      static_cast<const Annotation &>(from));
}


void Annotation::MergeFrom(const Annotation& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.Annotation)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_bbox()->::caffe::NormalizedBBox::MergeFrom(from._internal_bbox());
    }
    if (cached_has_bits & 0x00000002u) {
      instance_id_ = from.instance_id_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata Annotation::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[13]);
}

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

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

AnnotationGroup::AnnotationGroup(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  annotation_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.AnnotationGroup)
}
AnnotationGroup::AnnotationGroup(const AnnotationGroup& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      annotation_(from.annotation_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  group_label_ = from.group_label_;
  // @@protoc_insertion_point(copy_constructor:caffe.AnnotationGroup)
}

inline void AnnotationGroup::SharedCtor() {
group_label_ = 0;
}

AnnotationGroup::~AnnotationGroup() {
  // @@protoc_insertion_point(destructor:caffe.AnnotationGroup)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void AnnotationGroup::ArenaDtor(void* object) {
  AnnotationGroup* _this = reinterpret_cast< AnnotationGroup* >(object);
  (void)_this;
}
void AnnotationGroup::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void AnnotationGroup::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  annotation_.Clear();
  group_label_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* AnnotationGroup::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 group_label = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_group_label(&has_bits);
          group_label_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .caffe.Annotation annotation = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_annotation(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 group_label = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_group_label(), target);
  }

  // repeated .caffe.Annotation annotation = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_annotation_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_annotation(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.AnnotationGroup)
  return target;
}

size_t AnnotationGroup::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.AnnotationGroup)
  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 .caffe.Annotation annotation = 2;
  total_size += 1UL * this->_internal_annotation_size();
  for (const auto& msg : this->annotation_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // optional int32 group_label = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_group_label());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void AnnotationGroup::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<AnnotationGroup *>(to)->MergeFrom(
      static_cast<const AnnotationGroup &>(from));
}


void AnnotationGroup::MergeFrom(const AnnotationGroup& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.AnnotationGroup)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  annotation_.MergeFrom(from.annotation_);
  if (from._internal_has_group_label()) {
    _internal_set_group_label(from._internal_group_label());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void AnnotationGroup::InternalSwap(AnnotationGroup* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  annotation_.InternalSwap(&other->annotation_);
  swap(group_label_, other->group_label_);
}

::PROTOBUF_NAMESPACE_ID::Metadata AnnotationGroup::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[14]);
}

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

class AnnotatedDatum::_Internal {
 public:
  using HasBits = decltype(std::declval<AnnotatedDatum>()._has_bits_);
  static const ::caffe::Datum& datum(const AnnotatedDatum* msg);
  static void set_has_datum(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_type(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::caffe::Datum&
AnnotatedDatum::_Internal::datum(const AnnotatedDatum* msg) {
  return *msg->datum_;
}
AnnotatedDatum::AnnotatedDatum(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  annotation_group_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.AnnotatedDatum)
}
AnnotatedDatum::AnnotatedDatum(const AnnotatedDatum& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      annotation_group_(from.annotation_group_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_datum()) {
    datum_ = new ::caffe::Datum(*from.datum_);
  } else {
    datum_ = nullptr;
  }
  type_ = from.type_;
  // @@protoc_insertion_point(copy_constructor:caffe.AnnotatedDatum)
}

inline void AnnotatedDatum::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&datum_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&type_) -
    reinterpret_cast<char*>(&datum_)) + sizeof(type_));
}

AnnotatedDatum::~AnnotatedDatum() {
  // @@protoc_insertion_point(destructor:caffe.AnnotatedDatum)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void AnnotatedDatum::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete datum_;
}

void AnnotatedDatum::ArenaDtor(void* object) {
  AnnotatedDatum* _this = reinterpret_cast< AnnotatedDatum* >(object);
  (void)_this;
}
void AnnotatedDatum::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void AnnotatedDatum::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  annotation_group_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(datum_ != nullptr);
    datum_->Clear();
  }
  type_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* AnnotatedDatum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .caffe.Datum datum = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_datum(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.AnnotatedDatum.AnnotationType type = 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(::caffe::AnnotatedDatum_AnnotationType_IsValid(val))) {
            _internal_set_type(static_cast<::caffe::AnnotatedDatum_AnnotationType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // repeated .caffe.AnnotationGroup annotation_group = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_annotation_group(), ptr);
            CHK_(ptr);
            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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .caffe.Datum datum = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::datum(this), target, stream);
  }

  // optional .caffe.AnnotatedDatum.AnnotationType type = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      2, this->_internal_type(), target);
  }

  // repeated .caffe.AnnotationGroup annotation_group = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_annotation_group_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, this->_internal_annotation_group(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.AnnotatedDatum)
  return target;
}

size_t AnnotatedDatum::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.AnnotatedDatum)
  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 .caffe.AnnotationGroup annotation_group = 3;
  total_size += 1UL * this->_internal_annotation_group_size();
  for (const auto& msg : this->annotation_group_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .caffe.Datum datum = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *datum_);
    }

    // optional .caffe.AnnotatedDatum.AnnotationType type = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void AnnotatedDatum::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<AnnotatedDatum *>(to)->MergeFrom(
      static_cast<const AnnotatedDatum &>(from));
}


void AnnotatedDatum::MergeFrom(const AnnotatedDatum& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.AnnotatedDatum)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  annotation_group_.MergeFrom(from.annotation_group_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_datum()->::caffe::Datum::MergeFrom(from._internal_datum());
    }
    if (cached_has_bits & 0x00000002u) {
      type_ = from.type_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata AnnotatedDatum::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[15]);
}

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

class FillerParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<FillerParameter>()._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::_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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.FillerParameter)
}
FillerParameter::FillerParameter(const FillerParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  type_.UnsafeSetDefault(nullptr);
  if (from._internal_has_type()) {
    type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_type(), 
      GetArenaForAllocation());
  }
  ::memcpy(&value_, &from.value_,
    static_cast<size_t>(reinterpret_cast<char*>(&std_) -
    reinterpret_cast<char*>(&value_)) + sizeof(std_));
  // @@protoc_insertion_point(copy_constructor:caffe.FillerParameter)
}

inline void FillerParameter::SharedCtor() {
type_.UnsafeSetDefault(nullptr);
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&value_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&variance_norm_) -
    reinterpret_cast<char*>(&value_)) + sizeof(variance_norm_));
sparse_ = -1;
max_ = 1;
std_ = 1;
}

FillerParameter::~FillerParameter() {
  // @@protoc_insertion_point(destructor:caffe.FillerParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void FillerParameter::ArenaDtor(void* object) {
  FillerParameter* _this = reinterpret_cast< FillerParameter* >(object);
  (void)_this;
}
void FillerParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void FillerParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    type_.ClearToDefault(::caffe::FillerParameter::_i_give_permission_to_break_this_code_default_type_, GetArenaForAllocation());
     }
  if (cached_has_bits & 0x000000feu) {
    ::memset(&value_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&variance_norm_) -
        reinterpret_cast<char*>(&value_)) + sizeof(variance_norm_));
    sparse_ = -1;
    max_ = 1;
    std_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* FillerParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.FillerParameter.type");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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);
          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);
          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);
          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);
          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);
          sparse_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::FillerParameter_VarianceNorm_IsValid(val))) {
            _internal_set_variance_norm(static_cast<::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:
  _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:caffe.FillerParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_value(), target);
  }

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

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

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

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

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

  // optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      8, this->_internal_variance_norm(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.FillerParameter)
  return target;
}

size_t FillerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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 .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_variance_norm());
    }

    // optional int32 sparse = 7 [default = -1];
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

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

void FillerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<FillerParameter *>(to)->MergeFrom(
      static_cast<const FillerParameter &>(from));
}


void FillerParameter::MergeFrom(const FillerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.FillerParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_type(from._internal_type());
    }
    if (cached_has_bits & 0x00000002u) {
      value_ = from.value_;
    }
    if (cached_has_bits & 0x00000004u) {
      min_ = from.min_;
    }
    if (cached_has_bits & 0x00000008u) {
      mean_ = from.mean_;
    }
    if (cached_has_bits & 0x00000010u) {
      variance_norm_ = from.variance_norm_;
    }
    if (cached_has_bits & 0x00000020u) {
      sparse_ = from.sparse_;
    }
    if (cached_has_bits & 0x00000040u) {
      max_ = from.max_;
    }
    if (cached_has_bits & 0x00000080u) {
      std_ = from.std_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void FillerParameter::CopyFrom(const FillerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      nullptr,
      &type_, lhs_arena,
      &other->type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(FillerParameter, variance_norm_)
      + sizeof(FillerParameter::variance_norm_)
      - PROTOBUF_FIELD_OFFSET(FillerParameter, value_)>(
          reinterpret_cast<char*>(&value_),
          reinterpret_cast<char*>(&other->value_));
  swap(sparse_, other->sparse_);
  swap(max_, other->max_);
  swap(std_, other->std_);
}

::PROTOBUF_NAMESPACE_ID::Metadata FillerParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[16]);
}

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

class NetParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<NetParameter>()._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 ::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 ::caffe::NetState&
NetParameter::_Internal::state(const NetParameter* msg) {
  return *msg->state_;
}
NetParameter::NetParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  layers_(arena),
  input_(arena),
  input_dim_(arena),
  input_shape_(arena),
  layer_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.NetParameter)
}
NetParameter::NetParameter(const NetParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      layers_(from.layers_),
      input_(from.input_),
      input_dim_(from.input_dim_),
      input_shape_(from.input_shape_),
      layer_(from.layer_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_state()) {
    state_ = new ::caffe::NetState(*from.state_);
  } else {
    state_ = nullptr;
  }
  ::memcpy(&force_backward_, &from.force_backward_,
    static_cast<size_t>(reinterpret_cast<char*>(&debug_info_) -
    reinterpret_cast<char*>(&force_backward_)) + sizeof(debug_info_));
  // @@protoc_insertion_point(copy_constructor:caffe.NetParameter)
}

inline void NetParameter::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&state_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&debug_info_) -
    reinterpret_cast<char*>(&state_)) + sizeof(debug_info_));
}

NetParameter::~NetParameter() {
  // @@protoc_insertion_point(destructor:caffe.NetParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void NetParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete state_;
}

void NetParameter::ArenaDtor(void* object) {
  NetParameter* _this = reinterpret_cast< NetParameter* >(object);
  (void)_this;
}
void NetParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NetParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* NetParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.NetParameter.name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.NetParameter.input");
            #endif  // !NDEBUG
            CHK_(ptr);
            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);
          force_backward_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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);
          debug_info_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .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 .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:
  _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:caffe.NetParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "caffe.NetParameter.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // repeated .caffe.V1LayerParameter layers = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_layers_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_layers(i), 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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_force_backward(), target);
  }

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

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

  // repeated .caffe.BlobShape input_shape = 8;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_input_shape_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8, this->_internal_input_shape(i), target, stream);
  }

  // repeated .caffe.LayerParameter layer = 100;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_layer_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(100, this->_internal_layer(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.NetParameter)
  return target;
}

size_t NetParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 .caffe.V1LayerParameter layers = 2;
  total_size += 1UL * this->_internal_layers_size();
  for (const auto& msg : this->layers_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

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

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

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

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

  cached_has_bits = _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 .caffe.NetState state = 6;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *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, &_cached_size_);
}

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

void NetParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<NetParameter *>(to)->MergeFrom(
      static_cast<const NetParameter &>(from));
}


void NetParameter::MergeFrom(const NetParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NetParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

bool NetParameter::IsInitialized() const {
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(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(_has_bits_[0], other->_has_bits_[0]);
  layers_.InternalSwap(&other->layers_);
  input_.InternalSwap(&other->input_);
  input_dim_.InternalSwap(&other->input_dim_);
  input_shape_.InternalSwap(&other->input_shape_);
  layer_.InternalSwap(&other->layer_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(NetParameter, debug_info_)
      + sizeof(NetParameter::debug_info_)
      - PROTOBUF_FIELD_OFFSET(NetParameter, state_)>(
          reinterpret_cast<char*>(&state_),
          reinterpret_cast<char*>(&other->state_));
}

::PROTOBUF_NAMESPACE_ID::Metadata NetParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[17]);
}

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

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

const ::caffe::NetParameter&
SolverParameter::_Internal::net_param(const SolverParameter* msg) {
  return *msg->net_param_;
}
const ::caffe::NetParameter&
SolverParameter::_Internal::train_net_param(const SolverParameter* msg) {
  return *msg->train_net_param_;
}
const ::caffe::NetState&
SolverParameter::_Internal::train_state(const SolverParameter* msg) {
  return *msg->train_state_;
}
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString SolverParameter::_i_give_permission_to_break_this_code_default_eval_type_{{{"classification", 14}}, {nullptr}};
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString SolverParameter::_i_give_permission_to_break_this_code_default_ap_version_{{{"Integral", 8}}, {nullptr}};
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString SolverParameter::_i_give_permission_to_break_this_code_default_regularization_type_{{{"L2", 2}}, {nullptr}};
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString SolverParameter::_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),
  test_net_(arena),
  test_iter_(arena),
  test_net_param_(arena),
  test_state_(arena),
  stepvalue_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.SolverParameter)
}
SolverParameter::SolverParameter(const SolverParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      test_net_(from.test_net_),
      test_iter_(from.test_iter_),
      test_net_param_(from.test_net_param_),
      test_state_(from.test_state_),
      stepvalue_(from.stepvalue_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  train_net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    train_net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_train_net()) {
    train_net_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_train_net(), 
      GetArenaForAllocation());
  }
  lr_policy_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    lr_policy_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_lr_policy()) {
    lr_policy_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_lr_policy(), 
      GetArenaForAllocation());
  }
  snapshot_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    snapshot_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_snapshot_prefix()) {
    snapshot_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_snapshot_prefix(), 
      GetArenaForAllocation());
  }
  net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_net()) {
    net_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_net(), 
      GetArenaForAllocation());
  }
  regularization_type_.UnsafeSetDefault(nullptr);
  if (from._internal_has_regularization_type()) {
    regularization_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_regularization_type(), 
      GetArenaForAllocation());
  }
  type_.UnsafeSetDefault(nullptr);
  if (from._internal_has_type()) {
    type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_type(), 
      GetArenaForAllocation());
  }
  eval_type_.UnsafeSetDefault(nullptr);
  if (from._internal_has_eval_type()) {
    eval_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_eval_type(), 
      GetArenaForAllocation());
  }
  ap_version_.UnsafeSetDefault(nullptr);
  if (from._internal_has_ap_version()) {
    ap_version_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_ap_version(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_train_net_param()) {
    train_net_param_ = new ::caffe::NetParameter(*from.train_net_param_);
  } else {
    train_net_param_ = nullptr;
  }
  if (from._internal_has_net_param()) {
    net_param_ = new ::caffe::NetParameter(*from.net_param_);
  } else {
    net_param_ = nullptr;
  }
  if (from._internal_has_train_state()) {
    train_state_ = new ::caffe::NetState(*from.train_state_);
  } else {
    train_state_ = nullptr;
  }
  ::memcpy(&test_interval_, &from.test_interval_,
    static_cast<size_t>(reinterpret_cast<char*>(&rms_decay_) -
    reinterpret_cast<char*>(&test_interval_)) + sizeof(rms_decay_));
  // @@protoc_insertion_point(copy_constructor:caffe.SolverParameter)
}

inline void SolverParameter::SharedCtor() {
train_net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  train_net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
lr_policy_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  lr_policy_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
snapshot_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  snapshot_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
regularization_type_.UnsafeSetDefault(nullptr);
type_.UnsafeSetDefault(nullptr);
eval_type_.UnsafeSetDefault(nullptr);
ap_version_.UnsafeSetDefault(nullptr);
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&train_net_param_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&solver_type_) -
    reinterpret_cast<char*>(&train_net_param_)) + sizeof(solver_type_));
momentum2_ = 0.999f;
random_seed_ = int64_t{-1};
solver_mode_ = 1;
delta_ = 1e-08f;
average_loss_ = 1;
clip_gradients_ = -1;
test_initialization_ = true;
snapshot_after_train_ = true;
layer_wise_reduce_ = true;
iter_size_ = 1;
snapshot_format_ = 1;
rms_decay_ = 0.99f;
}

SolverParameter::~SolverParameter() {
  // @@protoc_insertion_point(destructor:caffe.SolverParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void SolverParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  train_net_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  lr_policy_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  snapshot_prefix_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  net_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  regularization_type_.DestroyNoArena(nullptr);
  type_.DestroyNoArena(nullptr);
  eval_type_.DestroyNoArena(nullptr);
  ap_version_.DestroyNoArena(nullptr);
  if (this != internal_default_instance()) delete train_net_param_;
  if (this != internal_default_instance()) delete net_param_;
  if (this != internal_default_instance()) delete train_state_;
}

void SolverParameter::ArenaDtor(void* object) {
  SolverParameter* _this = reinterpret_cast< SolverParameter* >(object);
  (void)_this;
}
void SolverParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SolverParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  test_net_.Clear();
  test_iter_.Clear();
  test_net_param_.Clear();
  test_state_.Clear();
  stepvalue_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      train_net_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      lr_policy_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      snapshot_prefix_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      net_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      regularization_type_.ClearToDefault(::caffe::SolverParameter::_i_give_permission_to_break_this_code_default_regularization_type_, GetArenaForAllocation());
       }
    if (cached_has_bits & 0x00000020u) {
      type_.ClearToDefault(::caffe::SolverParameter::_i_give_permission_to_break_this_code_default_type_, GetArenaForAllocation());
       }
    if (cached_has_bits & 0x00000040u) {
      eval_type_.ClearToDefault(::caffe::SolverParameter::_i_give_permission_to_break_this_code_default_eval_type_, GetArenaForAllocation());
       }
    if (cached_has_bits & 0x00000080u) {
      ap_version_.ClearToDefault(::caffe::SolverParameter::_i_give_permission_to_break_this_code_default_ap_version_, GetArenaForAllocation());
       }
  }
  if (cached_has_bits & 0x00000700u) {
    if (cached_has_bits & 0x00000100u) {
      GOOGLE_DCHECK(train_net_param_ != nullptr);
      train_net_param_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      GOOGLE_DCHECK(net_param_ != nullptr);
      net_param_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      GOOGLE_DCHECK(train_state_ != nullptr);
      train_state_->Clear();
    }
  }
  if (cached_has_bits & 0x0000f800u) {
    ::memset(&test_interval_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&gamma_) -
        reinterpret_cast<char*>(&test_interval_)) + sizeof(gamma_));
  }
  if (cached_has_bits & 0x00ff0000u) {
    ::memset(&power_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&test_compute_loss_) -
        reinterpret_cast<char*>(&power_)) + sizeof(test_compute_loss_));
  }
  if (cached_has_bits & 0xff000000u) {
    ::memset(&snapshot_diff_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&solver_type_) -
        reinterpret_cast<char*>(&snapshot_diff_)) + sizeof(solver_type_));
    momentum2_ = 0.999f;
    random_seed_ = int64_t{-1};
    solver_mode_ = 1;
    delta_ = 1e-08f;
    average_loss_ = 1;
  }
  cached_has_bits = _has_bits_[1];
  if (cached_has_bits & 0x0000007fu) {
    clip_gradients_ = -1;
    test_initialization_ = true;
    snapshot_after_train_ = true;
    layer_wise_reduce_ = true;
    iter_size_ = 1;
    snapshot_format_ = 1;
    rms_decay_ = 0.99f;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SolverParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SolverParameter.train_net");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SolverParameter.test_net");
            #endif  // !NDEBUG
            CHK_(ptr);
            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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SolverParameter.lr_policy");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SolverParameter.snapshot_prefix");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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(&_has_bits_);
          snapshot_diff_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::SolverParameter_SolverMode_IsValid(val))) {
            _internal_set_solver_mode(static_cast<::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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          random_seed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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 .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(&_has_bits_);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SolverParameter.net");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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 .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 .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(&_has_bits_);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SolverParameter.regularization_type");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::SolverParameter_SolverType_IsValid(val))) {
            _internal_set_solver_type(static_cast<::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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          iter_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::SolverParameter_SnapshotFormat_IsValid(val))) {
            _internal_set_snapshot_format(static_cast<::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(&_has_bits_);
          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(&_has_bits_);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SolverParameter.type");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string eval_type = 41 [default = "classification"];
      case 41:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          auto str = _internal_mutable_eval_type();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SolverParameter.eval_type");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string ap_version = 42 [default = "Integral"];
      case 42:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          auto str = _internal_mutable_ap_version();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SolverParameter.ap_version");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool show_per_class_result = 44 [default = false];
      case 44:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_show_per_class_result(&_has_bits_);
          show_per_class_result_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool layer_wise_reduce = 45 [default = true];
      case 45:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_layer_wise_reduce(&_has_bits_);
          layer_wise_reduce_ = ::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* SolverParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:caffe.SolverParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_test_iter(i), target);
  }

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

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

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

  // optional int32 max_iter = 7;
  if (cached_has_bits & 0x00004000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "caffe.SolverParameter.lr_policy");
    target = stream->WriteStringMaybeAliased(
        8, this->_internal_lr_policy(), target);
  }

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

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

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

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

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

  // optional int32 snapshot = 14 [default = 0];
  if (cached_has_bits & 0x00100000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "caffe.SolverParameter.snapshot_prefix");
    target = stream->WriteStringMaybeAliased(
        15, this->_internal_snapshot_prefix(), target);
  }

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

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

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

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

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

  // optional .caffe.NetParameter train_net_param = 21;
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        21, _Internal::train_net_param(this), target, stream);
  }

  // repeated .caffe.NetParameter test_net_param = 22;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_test_net_param_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(22, this->_internal_test_net_param(i), target, stream);
  }

  // optional bool debug_info = 23 [default = false];
  if (cached_has_bits & 0x02000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "caffe.SolverParameter.net");
    target = stream->WriteStringMaybeAliased(
        24, this->_internal_net(), target);
  }

  // optional .caffe.NetParameter net_param = 25;
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        25, _Internal::net_param(this), target, stream);
  }

  // optional .caffe.NetState train_state = 26;
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        26, _Internal::train_state(this), target, stream);
  }

  // repeated .caffe.NetState test_state = 27;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_test_state_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(27, this->_internal_test_state(i), target, stream);
  }

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

  cached_has_bits = _has_bits_[0];
  // 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,
      "caffe.SolverParameter.regularization_type");
    target = stream->WriteStringMaybeAliased(
        29, this->_internal_regularization_type(), target);
  }

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

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

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

  cached_has_bits = _has_bits_[0];
  // optional int32 average_loss = 33 [default = 1];
  if (cached_has_bits & 0x80000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(34, this->_internal_stepvalue(i), target);
  }

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

  // optional int32 iter_size = 36 [default = 1];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(36, this->_internal_iter_size(), target);
  }

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

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

  cached_has_bits = _has_bits_[0];
  // optional float momentum2 = 39 [default = 0.999];
  if (cached_has_bits & 0x08000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "caffe.SolverParameter.type");
    target = stream->WriteStringMaybeAliased(
        40, this->_internal_type(), target);
  }

  // optional string eval_type = 41 [default = "classification"];
  if (cached_has_bits & 0x00000040u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_eval_type().data(), static_cast<int>(this->_internal_eval_type().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.eval_type");
    target = stream->WriteStringMaybeAliased(
        41, this->_internal_eval_type(), target);
  }

  // optional string ap_version = 42 [default = "Integral"];
  if (cached_has_bits & 0x00000080u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_ap_version().data(), static_cast<int>(this->_internal_ap_version().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.ap_version");
    target = stream->WriteStringMaybeAliased(
        42, this->_internal_ap_version(), target);
  }

  // optional bool show_per_class_result = 44 [default = false];
  if (cached_has_bits & 0x00400000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(44, this->_internal_show_per_class_result(), target);
  }

  cached_has_bits = _has_bits_[1];
  // optional bool layer_wise_reduce = 45 [default = true];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(45, this->_internal_layer_wise_reduce(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.SolverParameter)
  return target;
}

size_t SolverParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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(test_net_.size());
  for (int i = 0, n = test_net_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      test_net_.Get(i));
  }

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

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

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

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

  cached_has_bits = _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 string eval_type = 41 [default = "classification"];
    if (cached_has_bits & 0x00000040u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_eval_type());
    }

    // optional string ap_version = 42 [default = "Integral"];
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_ap_version());
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // optional int32 iter_size = 36 [default = 1];
    if (cached_has_bits & 0x00000010u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_iter_size());
    }

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void SolverParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SolverParameter *>(to)->MergeFrom(
      static_cast<const SolverParameter &>(from));
}


void SolverParameter::MergeFrom(const SolverParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SolverParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

bool SolverParameter::IsInitialized() const {
  if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(test_net_param_))
    return false;
  if (_internal_has_train_net_param()) {
    if (!train_net_param_->IsInitialized()) return false;
  }
  if (_internal_has_net_param()) {
    if (!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(_has_bits_[0], other->_has_bits_[0]);
  swap(_has_bits_[1], other->_has_bits_[1]);
  test_net_.InternalSwap(&other->test_net_);
  test_iter_.InternalSwap(&other->test_iter_);
  test_net_param_.InternalSwap(&other->test_net_param_);
  test_state_.InternalSwap(&other->test_state_);
  stepvalue_.InternalSwap(&other->stepvalue_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &train_net_, lhs_arena,
      &other->train_net_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &lr_policy_, lhs_arena,
      &other->lr_policy_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &snapshot_prefix_, lhs_arena,
      &other->snapshot_prefix_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &net_, lhs_arena,
      &other->net_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      nullptr,
      &regularization_type_, lhs_arena,
      &other->regularization_type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      nullptr,
      &type_, lhs_arena,
      &other->type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      nullptr,
      &eval_type_, lhs_arena,
      &other->eval_type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      nullptr,
      &ap_version_, lhs_arena,
      &other->ap_version_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SolverParameter, solver_type_)
      + sizeof(SolverParameter::solver_type_)
      - PROTOBUF_FIELD_OFFSET(SolverParameter, train_net_param_)>(
          reinterpret_cast<char*>(&train_net_param_),
          reinterpret_cast<char*>(&other->train_net_param_));
  swap(momentum2_, other->momentum2_);
  swap(random_seed_, other->random_seed_);
  swap(solver_mode_, other->solver_mode_);
  swap(delta_, other->delta_);
  swap(average_loss_, other->average_loss_);
  swap(clip_gradients_, other->clip_gradients_);
  swap(test_initialization_, other->test_initialization_);
  swap(snapshot_after_train_, other->snapshot_after_train_);
  swap(layer_wise_reduce_, other->layer_wise_reduce_);
  swap(iter_size_, other->iter_size_);
  swap(snapshot_format_, other->snapshot_format_);
  swap(rms_decay_, other->rms_decay_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SolverParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[18]);
}

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

class SolverState::_Internal {
 public:
  using HasBits = decltype(std::declval<SolverState>()._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),
  history_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.SolverState)
}
SolverState::SolverState(const SolverState& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      history_(from.history_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  learned_net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    learned_net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_learned_net()) {
    learned_net_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_learned_net(), 
      GetArenaForAllocation());
  }
  ::memcpy(&iter_, &from.iter_,
    static_cast<size_t>(reinterpret_cast<char*>(&current_step_) -
    reinterpret_cast<char*>(&iter_)) + sizeof(current_step_));
  // @@protoc_insertion_point(copy_constructor:caffe.SolverState)
}

inline void SolverState::SharedCtor() {
learned_net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  learned_net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&iter_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&current_step_) -
    reinterpret_cast<char*>(&iter_)) + sizeof(current_step_));
}

SolverState::~SolverState() {
  // @@protoc_insertion_point(destructor:caffe.SolverState)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void SolverState::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  learned_net_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void SolverState::ArenaDtor(void* object) {
  SolverState* _this = reinterpret_cast< SolverState* >(object);
  (void)_this;
}
void SolverState::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SolverState::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* SolverState::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SolverState.learned_net");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .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);
          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:
  _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:caffe.SolverState)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 iter = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "caffe.SolverState.learned_net");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_learned_net(), target);
  }

  // repeated .caffe.BlobProto history = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_history_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(3, this->_internal_history(i), target, stream);
  }

  // optional int32 current_step = 4 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_current_step(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.SolverState)
  return target;
}

size_t SolverState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 .caffe.BlobProto history = 3;
  total_size += 1UL * this->_internal_history_size();
  for (const auto& msg : this->history_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _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 += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_iter());
    }

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void SolverState::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SolverState *>(to)->MergeFrom(
      static_cast<const SolverState &>(from));
}


void SolverState::MergeFrom(const SolverState& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SolverState)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void SolverState::CopyFrom(const SolverState& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  history_.InternalSwap(&other->history_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &learned_net_, lhs_arena,
      &other->learned_net_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SolverState, current_step_)
      + sizeof(SolverState::current_step_)
      - PROTOBUF_FIELD_OFFSET(SolverState, iter_)>(
          reinterpret_cast<char*>(&iter_),
          reinterpret_cast<char*>(&other->iter_));
}

::PROTOBUF_NAMESPACE_ID::Metadata SolverState::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[19]);
}

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

class NetState::_Internal {
 public:
  using HasBits = decltype(std::declval<NetState>()._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),
  stage_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.NetState)
}
NetState::NetState(const NetState& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      stage_(from.stage_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&level_, &from.level_,
    static_cast<size_t>(reinterpret_cast<char*>(&phase_) -
    reinterpret_cast<char*>(&level_)) + sizeof(phase_));
  // @@protoc_insertion_point(copy_constructor:caffe.NetState)
}

inline void NetState::SharedCtor() {
level_ = 0;
phase_ = 1;
}

NetState::~NetState() {
  // @@protoc_insertion_point(destructor:caffe.NetState)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void NetState::ArenaDtor(void* object) {
  NetState* _this = reinterpret_cast< NetState* >(object);
  (void)_this;
}
void NetState::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NetState::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* NetState::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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(::caffe::Phase_IsValid(val))) {
            _internal_set_phase(static_cast<::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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.NetState.stage");
            #endif  // !NDEBUG
            CHK_(ptr);
            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:
  _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:caffe.NetState)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  // optional int32 level = 2 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "caffe.NetState.stage");
    target = stream->WriteString(3, s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.NetState)
  return target;
}

size_t NetState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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(stage_.size());
  for (int i = 0, n = stage_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      stage_.Get(i));
  }

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void NetState::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<NetState *>(to)->MergeFrom(
      static_cast<const NetState &>(from));
}


void NetState::MergeFrom(const NetState& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NetState)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void NetState::CopyFrom(const NetState& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  stage_.InternalSwap(&other->stage_);
  swap(level_, other->level_);
  swap(phase_, other->phase_);
}

::PROTOBUF_NAMESPACE_ID::Metadata NetState::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[20]);
}

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

class NetStateRule::_Internal {
 public:
  using HasBits = decltype(std::declval<NetStateRule>()._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),
  stage_(arena),
  not_stage_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.NetStateRule)
}
NetStateRule::NetStateRule(const NetStateRule& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      stage_(from.stage_),
      not_stage_(from.not_stage_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&phase_, &from.phase_,
    static_cast<size_t>(reinterpret_cast<char*>(&max_level_) -
    reinterpret_cast<char*>(&phase_)) + sizeof(max_level_));
  // @@protoc_insertion_point(copy_constructor:caffe.NetStateRule)
}

inline void NetStateRule::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&phase_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&max_level_) -
    reinterpret_cast<char*>(&phase_)) + sizeof(max_level_));
}

NetStateRule::~NetStateRule() {
  // @@protoc_insertion_point(destructor:caffe.NetStateRule)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void NetStateRule::ArenaDtor(void* object) {
  NetStateRule* _this = reinterpret_cast< NetStateRule* >(object);
  (void)_this;
}
void NetStateRule::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NetStateRule::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* NetStateRule::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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(::caffe::Phase_IsValid(val))) {
            _internal_set_phase(static_cast<::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);
          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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.NetStateRule.stage");
            #endif  // !NDEBUG
            CHK_(ptr);
            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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.NetStateRule.not_stage");
            #endif  // !NDEBUG
            CHK_(ptr);
            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:
  _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:caffe.NetStateRule)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional int32 max_level = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "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,
      "caffe.NetStateRule.not_stage");
    target = stream->WriteString(5, s, target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.NetStateRule)
  return target;
}

size_t NetStateRule::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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(stage_.size());
  for (int i = 0, n = stage_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      stage_.Get(i));
  }

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

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

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void NetStateRule::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<NetStateRule *>(to)->MergeFrom(
      static_cast<const NetStateRule &>(from));
}


void NetStateRule::MergeFrom(const NetStateRule& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NetStateRule)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void NetStateRule::CopyFrom(const NetStateRule& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  stage_.InternalSwap(&other->stage_);
  not_stage_.InternalSwap(&other->not_stage_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(NetStateRule, max_level_)
      + sizeof(NetStateRule::max_level_)
      - PROTOBUF_FIELD_OFFSET(NetStateRule, phase_)>(
          reinterpret_cast<char*>(&phase_),
          reinterpret_cast<char*>(&other->phase_));
}

::PROTOBUF_NAMESPACE_ID::Metadata NetStateRule::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[21]);
}

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

class ParamSpec::_Internal {
 public:
  using HasBits = decltype(std::declval<ParamSpec>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ParamSpec)
}
ParamSpec::ParamSpec(const ParamSpec& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  ::memcpy(&share_mode_, &from.share_mode_,
    static_cast<size_t>(reinterpret_cast<char*>(&decay_mult_) -
    reinterpret_cast<char*>(&share_mode_)) + sizeof(decay_mult_));
  // @@protoc_insertion_point(copy_constructor:caffe.ParamSpec)
}

inline void ParamSpec::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
share_mode_ = 0;
lr_mult_ = 1;
decay_mult_ = 1;
}

ParamSpec::~ParamSpec() {
  // @@protoc_insertion_point(destructor:caffe.ParamSpec)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void ParamSpec::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void ParamSpec::ArenaDtor(void* object) {
  ParamSpec* _this = reinterpret_cast< ParamSpec* >(object);
  (void)_this;
}
void ParamSpec::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ParamSpec::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    name_.ClearNonDefaultToEmpty();
  }
  if (cached_has_bits & 0x0000000eu) {
    share_mode_ = 0;
    lr_mult_ = 1;
    decay_mult_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ParamSpec::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.ParamSpec.name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::ParamSpec_DimCheckMode_IsValid(val))) {
            _internal_set_share_mode(static_cast<::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);
          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);
          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:
  _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:caffe.ParamSpec)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "caffe.ParamSpec.name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_name(), target);
  }

  // optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_decay_mult(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ParamSpec)
  return target;
}

size_t ParamSpec::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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 .caffe.ParamSpec.DimCheckMode share_mode = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

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

void ParamSpec::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ParamSpec *>(to)->MergeFrom(
      static_cast<const ParamSpec &>(from));
}


void ParamSpec::MergeFrom(const ParamSpec& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ParamSpec)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      share_mode_ = from.share_mode_;
    }
    if (cached_has_bits & 0x00000004u) {
      lr_mult_ = from.lr_mult_;
    }
    if (cached_has_bits & 0x00000008u) {
      decay_mult_ = from.decay_mult_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ParamSpec::CopyFrom(const ParamSpec& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  swap(share_mode_, other->share_mode_);
  swap(lr_mult_, other->lr_mult_);
  swap(decay_mult_, other->decay_mult_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ParamSpec::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[22]);
}

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

class LayerParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<LayerParameter>()._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)[2] |= 16u;
  }
  static const ::caffe::TransformationParameter& transform_param(const LayerParameter* msg);
  static void set_has_transform_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::caffe::LossParameter& loss_param(const LayerParameter* msg);
  static void set_has_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::caffe::AccuracyParameter& accuracy_param(const LayerParameter* msg);
  static void set_has_accuracy_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::caffe::AnnotatedDataParameter& annotated_data_param(const LayerParameter* msg);
  static void set_has_annotated_data_param(HasBits* has_bits) {
    (*has_bits)[1] |= 524288u;
  }
  static const ::caffe::ArgMaxParameter& argmax_param(const LayerParameter* msg);
  static void set_has_argmax_param(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::caffe::BatchNormParameter& batch_norm_param(const LayerParameter* msg);
  static void set_has_batch_norm_param(HasBits* has_bits) {
    (*has_bits)[1] |= 512u;
  }
  static const ::caffe::BiasParameter& bias_param(const LayerParameter* msg);
  static void set_has_bias_param(HasBits* has_bits) {
    (*has_bits)[1] |= 2048u;
  }
  static const ::caffe::ConcatParameter& concat_param(const LayerParameter* msg);
  static void set_has_concat_param(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::caffe::ContrastiveLossParameter& contrastive_loss_param(const LayerParameter* msg);
  static void set_has_contrastive_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::caffe::ConvolutionParameter& convolution_param(const LayerParameter* msg);
  static void set_has_convolution_param(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::caffe::Convolution3DParameter& convolution3d_param(const LayerParameter* msg);
  static void set_has_convolution3d_param(HasBits* has_bits) {
    (*has_bits)[1] |= 131072u;
  }
  static const ::caffe::CropParameter& crop_param(const LayerParameter* msg);
  static void set_has_crop_param(HasBits* has_bits) {
    (*has_bits)[1] |= 16384u;
  }
  static const ::caffe::DataParameter& data_param(const LayerParameter* msg);
  static void set_has_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::caffe::DetectionEvaluateParameter& detection_evaluate_param(const LayerParameter* msg);
  static void set_has_detection_evaluate_param(HasBits* has_bits) {
    (*has_bits)[1] |= 16777216u;
  }
  static const ::caffe::DetectionOutputParameter& detection_output_param(const LayerParameter* msg);
  static void set_has_detection_output_param(HasBits* has_bits) {
    (*has_bits)[1] |= 8388608u;
  }
  static const ::caffe::DropoutParameter& dropout_param(const LayerParameter* msg);
  static void set_has_dropout_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static const ::caffe::DummyDataParameter& dummy_data_param(const LayerParameter* msg);
  static void set_has_dummy_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static const ::caffe::EltwiseParameter& eltwise_param(const LayerParameter* msg);
  static void set_has_eltwise_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static const ::caffe::ELUParameter& elu_param(const LayerParameter* msg);
  static void set_has_elu_param(HasBits* has_bits) {
    (*has_bits)[1] |= 1024u;
  }
  static const ::caffe::EmbedParameter& embed_param(const LayerParameter* msg);
  static void set_has_embed_param(HasBits* has_bits) {
    (*has_bits)[1] |= 128u;
  }
  static const ::caffe::ExpParameter& exp_param(const LayerParameter* msg);
  static void set_has_exp_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static const ::caffe::FlattenParameter& flatten_param(const LayerParameter* msg);
  static void set_has_flatten_param(HasBits* has_bits) {
    (*has_bits)[1] |= 32u;
  }
  static const ::caffe::HDF5DataParameter& hdf5_data_param(const LayerParameter* msg);
  static void set_has_hdf5_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static const ::caffe::HDF5OutputParameter& hdf5_output_param(const LayerParameter* msg);
  static void set_has_hdf5_output_param(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static const ::caffe::HingeLossParameter& hinge_loss_param(const LayerParameter* msg);
  static void set_has_hinge_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static const ::caffe::ImageDataParameter& image_data_param(const LayerParameter* msg);
  static void set_has_image_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static const ::caffe::InfogainLossParameter& infogain_loss_param(const LayerParameter* msg);
  static void set_has_infogain_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static const ::caffe::InnerProductParameter& inner_product_param(const LayerParameter* msg);
  static void set_has_inner_product_param(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static const ::caffe::InputParameter& input_param(const LayerParameter* msg);
  static void set_has_input_param(HasBits* has_bits) {
    (*has_bits)[1] |= 8192u;
  }
  static const ::caffe::LogParameter& log_param(const LayerParameter* msg);
  static void set_has_log_param(HasBits* has_bits) {
    (*has_bits)[1] |= 16u;
  }
  static const ::caffe::LRNParameter& lrn_param(const LayerParameter* msg);
  static void set_has_lrn_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static const ::caffe::LSTMParameter& lstm_param(const LayerParameter* msg);
  static void set_has_lstm_param(HasBits* has_bits) {
    (*has_bits)[1] |= 536870912u;
  }
  static const ::caffe::Im2seqParameter& im2seq_param(const LayerParameter* msg);
  static void set_has_im2seq_param(HasBits* has_bits) {
    (*has_bits)[1] |= 67108864u;
  }
  static const ::caffe::Seq2outParameter& seq2out_param(const LayerParameter* msg);
  static void set_has_seq2out_param(HasBits* has_bits) {
    (*has_bits)[1] |= 134217728u;
  }
  static const ::caffe::ImgSizeParameter& img_size_param(const LayerParameter* msg);
  static void set_has_img_size_param(HasBits* has_bits) {
    (*has_bits)[1] |= 268435456u;
  }
  static const ::caffe::MemoryDataParameter& memory_data_param(const LayerParameter* msg);
  static void set_has_memory_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
  static const ::caffe::MultiBoxLossParameter& multibox_loss_param(const LayerParameter* msg);
  static void set_has_multibox_loss_param(HasBits* has_bits) {
    (*has_bits)[1] |= 1048576u;
  }
  static const ::caffe::MVNParameter& mvn_param(const LayerParameter* msg);
  static void set_has_mvn_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4194304u;
  }
  static const ::caffe::NormalizeParameter& norm_param(const LayerParameter* msg);
  static void set_has_norm_param(HasBits* has_bits) {
    (*has_bits)[1] |= 33554432u;
  }
  static const ::caffe::ParameterParameter& parameter_param(const LayerParameter* msg);
  static void set_has_parameter_param(HasBits* has_bits) {
    (*has_bits)[1] |= 32768u;
  }
  static const ::caffe::PermuteParameter& permute_param(const LayerParameter* msg);
  static void set_has_permute_param(HasBits* has_bits) {
    (*has_bits)[1] |= 2097152u;
  }
  static const ::caffe::PoolingParameter& pooling_param(const LayerParameter* msg);
  static void set_has_pooling_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8388608u;
  }
  static const ::caffe::Pooling3DParameter& pooling3d_param(const LayerParameter* msg);
  static void set_has_pooling3d_param(HasBits* has_bits) {
    (*has_bits)[1] |= 262144u;
  }
  static const ::caffe::PowerParameter& power_param(const LayerParameter* msg);
  static void set_has_power_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16777216u;
  }
  static const ::caffe::PReLUParameter& prelu_param(const LayerParameter* msg);
  static void set_has_prelu_param(HasBits* has_bits) {
    (*has_bits)[1] |= 2u;
  }
  static const ::caffe::PriorBoxParameter& prior_box_param(const LayerParameter* msg);
  static void set_has_prior_box_param(HasBits* has_bits) {
    (*has_bits)[1] |= 4194304u;
  }
  static const ::caffe::PythonParameter& python_param(const LayerParameter* msg);
  static void set_has_python_param(HasBits* has_bits) {
    (*has_bits)[1] |= 1u;
  }
  static const ::caffe::RecurrentParameter& recurrent_param(const LayerParameter* msg);
  static void set_has_recurrent_param(HasBits* has_bits) {
    (*has_bits)[1] |= 65536u;
  }
  static const ::caffe::ReductionParameter& reduction_param(const LayerParameter* msg);
  static void set_has_reduction_param(HasBits* has_bits) {
    (*has_bits)[1] |= 64u;
  }
  static const ::caffe::ReLUParameter& relu_param(const LayerParameter* msg);
  static void set_has_relu_param(HasBits* has_bits) {
    (*has_bits)[0] |= 33554432u;
  }
  static const ::caffe::ReshapeParameter& reshape_param(const LayerParameter* msg);
  static void set_has_reshape_param(HasBits* has_bits) {
    (*has_bits)[1] |= 8u;
  }
  static const ::caffe::ScaleParameter& scale_param(const LayerParameter* msg);
  static void set_has_scale_param(HasBits* has_bits) {
    (*has_bits)[1] |= 4096u;
  }
  static const ::caffe::SigmoidParameter& sigmoid_param(const LayerParameter* msg);
  static void set_has_sigmoid_param(HasBits* has_bits) {
    (*has_bits)[0] |= 67108864u;
  }
  static const ::caffe::SoftmaxParameter& softmax_param(const LayerParameter* msg);
  static void set_has_softmax_param(HasBits* has_bits) {
    (*has_bits)[0] |= 134217728u;
  }
  static const ::caffe::SPPParameter& spp_param(const LayerParameter* msg);
  static void set_has_spp_param(HasBits* has_bits) {
    (*has_bits)[1] |= 4u;
  }
  static const ::caffe::SliceParameter& slice_param(const LayerParameter* msg);
  static void set_has_slice_param(HasBits* has_bits) {
    (*has_bits)[0] |= 268435456u;
  }
  static const ::caffe::TanHParameter& tanh_param(const LayerParameter* msg);
  static void set_has_tanh_param(HasBits* has_bits) {
    (*has_bits)[0] |= 536870912u;
  }
  static const ::caffe::ThresholdParameter& threshold_param(const LayerParameter* msg);
  static void set_has_threshold_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1073741824u;
  }
  static const ::caffe::TileParameter& tile_param(const LayerParameter* msg);
  static void set_has_tile_param(HasBits* has_bits) {
    (*has_bits)[1] |= 256u;
  }
  static const ::caffe::WindowDataParameter& window_data_param(const LayerParameter* msg);
  static void set_has_window_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2147483648u;
  }
  static const ::caffe::CenterLossParameter& center_loss_param(const LayerParameter* msg);
  static void set_has_center_loss_param(HasBits* has_bits) {
    (*has_bits)[1] |= 1073741824u;
  }
  static const ::caffe::ShuffleChannelParameter& shuffle_channel_param(const LayerParameter* msg);
  static void set_has_shuffle_channel_param(HasBits* has_bits) {
    (*has_bits)[1] |= 2147483648u;
  }
  static const ::caffe::InterpParameter& interp_param(const LayerParameter* msg);
  static void set_has_interp_param(HasBits* has_bits) {
    (*has_bits)[2] |= 8u;
  }
  static const ::caffe::ROIPoolingParameter& roi_pooling_param(const LayerParameter* msg);
  static void set_has_roi_pooling_param(HasBits* has_bits) {
    (*has_bits)[2] |= 1u;
  }
  static const ::caffe::ClipParameter& clip_param(const LayerParameter* msg);
  static void set_has_clip_param(HasBits* has_bits) {
    (*has_bits)[2] |= 2u;
  }
  static const ::caffe::UpsampleParameter& upsample_param(const LayerParameter* msg);
  static void set_has_upsample_param(HasBits* has_bits) {
    (*has_bits)[2] |= 4u;
  }
};

const ::caffe::TransformationParameter&
LayerParameter::_Internal::transform_param(const LayerParameter* msg) {
  return *msg->transform_param_;
}
const ::caffe::LossParameter&
LayerParameter::_Internal::loss_param(const LayerParameter* msg) {
  return *msg->loss_param_;
}
const ::caffe::AccuracyParameter&
LayerParameter::_Internal::accuracy_param(const LayerParameter* msg) {
  return *msg->accuracy_param_;
}
const ::caffe::AnnotatedDataParameter&
LayerParameter::_Internal::annotated_data_param(const LayerParameter* msg) {
  return *msg->annotated_data_param_;
}
const ::caffe::ArgMaxParameter&
LayerParameter::_Internal::argmax_param(const LayerParameter* msg) {
  return *msg->argmax_param_;
}
const ::caffe::BatchNormParameter&
LayerParameter::_Internal::batch_norm_param(const LayerParameter* msg) {
  return *msg->batch_norm_param_;
}
const ::caffe::BiasParameter&
LayerParameter::_Internal::bias_param(const LayerParameter* msg) {
  return *msg->bias_param_;
}
const ::caffe::ConcatParameter&
LayerParameter::_Internal::concat_param(const LayerParameter* msg) {
  return *msg->concat_param_;
}
const ::caffe::ContrastiveLossParameter&
LayerParameter::_Internal::contrastive_loss_param(const LayerParameter* msg) {
  return *msg->contrastive_loss_param_;
}
const ::caffe::ConvolutionParameter&
LayerParameter::_Internal::convolution_param(const LayerParameter* msg) {
  return *msg->convolution_param_;
}
const ::caffe::Convolution3DParameter&
LayerParameter::_Internal::convolution3d_param(const LayerParameter* msg) {
  return *msg->convolution3d_param_;
}
const ::caffe::CropParameter&
LayerParameter::_Internal::crop_param(const LayerParameter* msg) {
  return *msg->crop_param_;
}
const ::caffe::DataParameter&
LayerParameter::_Internal::data_param(const LayerParameter* msg) {
  return *msg->data_param_;
}
const ::caffe::DetectionEvaluateParameter&
LayerParameter::_Internal::detection_evaluate_param(const LayerParameter* msg) {
  return *msg->detection_evaluate_param_;
}
const ::caffe::DetectionOutputParameter&
LayerParameter::_Internal::detection_output_param(const LayerParameter* msg) {
  return *msg->detection_output_param_;
}
const ::caffe::DropoutParameter&
LayerParameter::_Internal::dropout_param(const LayerParameter* msg) {
  return *msg->dropout_param_;
}
const ::caffe::DummyDataParameter&
LayerParameter::_Internal::dummy_data_param(const LayerParameter* msg) {
  return *msg->dummy_data_param_;
}
const ::caffe::EltwiseParameter&
LayerParameter::_Internal::eltwise_param(const LayerParameter* msg) {
  return *msg->eltwise_param_;
}
const ::caffe::ELUParameter&
LayerParameter::_Internal::elu_param(const LayerParameter* msg) {
  return *msg->elu_param_;
}
const ::caffe::EmbedParameter&
LayerParameter::_Internal::embed_param(const LayerParameter* msg) {
  return *msg->embed_param_;
}
const ::caffe::ExpParameter&
LayerParameter::_Internal::exp_param(const LayerParameter* msg) {
  return *msg->exp_param_;
}
const ::caffe::FlattenParameter&
LayerParameter::_Internal::flatten_param(const LayerParameter* msg) {
  return *msg->flatten_param_;
}
const ::caffe::HDF5DataParameter&
LayerParameter::_Internal::hdf5_data_param(const LayerParameter* msg) {
  return *msg->hdf5_data_param_;
}
const ::caffe::HDF5OutputParameter&
LayerParameter::_Internal::hdf5_output_param(const LayerParameter* msg) {
  return *msg->hdf5_output_param_;
}
const ::caffe::HingeLossParameter&
LayerParameter::_Internal::hinge_loss_param(const LayerParameter* msg) {
  return *msg->hinge_loss_param_;
}
const ::caffe::ImageDataParameter&
LayerParameter::_Internal::image_data_param(const LayerParameter* msg) {
  return *msg->image_data_param_;
}
const ::caffe::InfogainLossParameter&
LayerParameter::_Internal::infogain_loss_param(const LayerParameter* msg) {
  return *msg->infogain_loss_param_;
}
const ::caffe::InnerProductParameter&
LayerParameter::_Internal::inner_product_param(const LayerParameter* msg) {
  return *msg->inner_product_param_;
}
const ::caffe::InputParameter&
LayerParameter::_Internal::input_param(const LayerParameter* msg) {
  return *msg->input_param_;
}
const ::caffe::LogParameter&
LayerParameter::_Internal::log_param(const LayerParameter* msg) {
  return *msg->log_param_;
}
const ::caffe::LRNParameter&
LayerParameter::_Internal::lrn_param(const LayerParameter* msg) {
  return *msg->lrn_param_;
}
const ::caffe::LSTMParameter&
LayerParameter::_Internal::lstm_param(const LayerParameter* msg) {
  return *msg->lstm_param_;
}
const ::caffe::Im2seqParameter&
LayerParameter::_Internal::im2seq_param(const LayerParameter* msg) {
  return *msg->im2seq_param_;
}
const ::caffe::Seq2outParameter&
LayerParameter::_Internal::seq2out_param(const LayerParameter* msg) {
  return *msg->seq2out_param_;
}
const ::caffe::ImgSizeParameter&
LayerParameter::_Internal::img_size_param(const LayerParameter* msg) {
  return *msg->img_size_param_;
}
const ::caffe::MemoryDataParameter&
LayerParameter::_Internal::memory_data_param(const LayerParameter* msg) {
  return *msg->memory_data_param_;
}
const ::caffe::MultiBoxLossParameter&
LayerParameter::_Internal::multibox_loss_param(const LayerParameter* msg) {
  return *msg->multibox_loss_param_;
}
const ::caffe::MVNParameter&
LayerParameter::_Internal::mvn_param(const LayerParameter* msg) {
  return *msg->mvn_param_;
}
const ::caffe::NormalizeParameter&
LayerParameter::_Internal::norm_param(const LayerParameter* msg) {
  return *msg->norm_param_;
}
const ::caffe::ParameterParameter&
LayerParameter::_Internal::parameter_param(const LayerParameter* msg) {
  return *msg->parameter_param_;
}
const ::caffe::PermuteParameter&
LayerParameter::_Internal::permute_param(const LayerParameter* msg) {
  return *msg->permute_param_;
}
const ::caffe::PoolingParameter&
LayerParameter::_Internal::pooling_param(const LayerParameter* msg) {
  return *msg->pooling_param_;
}
const ::caffe::Pooling3DParameter&
LayerParameter::_Internal::pooling3d_param(const LayerParameter* msg) {
  return *msg->pooling3d_param_;
}
const ::caffe::PowerParameter&
LayerParameter::_Internal::power_param(const LayerParameter* msg) {
  return *msg->power_param_;
}
const ::caffe::PReLUParameter&
LayerParameter::_Internal::prelu_param(const LayerParameter* msg) {
  return *msg->prelu_param_;
}
const ::caffe::PriorBoxParameter&
LayerParameter::_Internal::prior_box_param(const LayerParameter* msg) {
  return *msg->prior_box_param_;
}
const ::caffe::PythonParameter&
LayerParameter::_Internal::python_param(const LayerParameter* msg) {
  return *msg->python_param_;
}
const ::caffe::RecurrentParameter&
LayerParameter::_Internal::recurrent_param(const LayerParameter* msg) {
  return *msg->recurrent_param_;
}
const ::caffe::ReductionParameter&
LayerParameter::_Internal::reduction_param(const LayerParameter* msg) {
  return *msg->reduction_param_;
}
const ::caffe::ReLUParameter&
LayerParameter::_Internal::relu_param(const LayerParameter* msg) {
  return *msg->relu_param_;
}
const ::caffe::ReshapeParameter&
LayerParameter::_Internal::reshape_param(const LayerParameter* msg) {
  return *msg->reshape_param_;
}
const ::caffe::ScaleParameter&
LayerParameter::_Internal::scale_param(const LayerParameter* msg) {
  return *msg->scale_param_;
}
const ::caffe::SigmoidParameter&
LayerParameter::_Internal::sigmoid_param(const LayerParameter* msg) {
  return *msg->sigmoid_param_;
}
const ::caffe::SoftmaxParameter&
LayerParameter::_Internal::softmax_param(const LayerParameter* msg) {
  return *msg->softmax_param_;
}
const ::caffe::SPPParameter&
LayerParameter::_Internal::spp_param(const LayerParameter* msg) {
  return *msg->spp_param_;
}
const ::caffe::SliceParameter&
LayerParameter::_Internal::slice_param(const LayerParameter* msg) {
  return *msg->slice_param_;
}
const ::caffe::TanHParameter&
LayerParameter::_Internal::tanh_param(const LayerParameter* msg) {
  return *msg->tanh_param_;
}
const ::caffe::ThresholdParameter&
LayerParameter::_Internal::threshold_param(const LayerParameter* msg) {
  return *msg->threshold_param_;
}
const ::caffe::TileParameter&
LayerParameter::_Internal::tile_param(const LayerParameter* msg) {
  return *msg->tile_param_;
}
const ::caffe::WindowDataParameter&
LayerParameter::_Internal::window_data_param(const LayerParameter* msg) {
  return *msg->window_data_param_;
}
const ::caffe::CenterLossParameter&
LayerParameter::_Internal::center_loss_param(const LayerParameter* msg) {
  return *msg->center_loss_param_;
}
const ::caffe::ShuffleChannelParameter&
LayerParameter::_Internal::shuffle_channel_param(const LayerParameter* msg) {
  return *msg->shuffle_channel_param_;
}
const ::caffe::InterpParameter&
LayerParameter::_Internal::interp_param(const LayerParameter* msg) {
  return *msg->interp_param_;
}
const ::caffe::ROIPoolingParameter&
LayerParameter::_Internal::roi_pooling_param(const LayerParameter* msg) {
  return *msg->roi_pooling_param_;
}
const ::caffe::ClipParameter&
LayerParameter::_Internal::clip_param(const LayerParameter* msg) {
  return *msg->clip_param_;
}
const ::caffe::UpsampleParameter&
LayerParameter::_Internal::upsample_param(const LayerParameter* msg) {
  return *msg->upsample_param_;
}
LayerParameter::LayerParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  bottom_(arena),
  top_(arena),
  loss_weight_(arena),
  param_(arena),
  blobs_(arena),
  include_(arena),
  exclude_(arena),
  propagate_down_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.LayerParameter)
}
LayerParameter::LayerParameter(const LayerParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      bottom_(from.bottom_),
      top_(from.top_),
      loss_weight_(from.loss_weight_),
      param_(from.param_),
      blobs_(from.blobs_),
      include_(from.include_),
      exclude_(from.exclude_),
      propagate_down_(from.propagate_down_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_type()) {
    type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_transform_param()) {
    transform_param_ = new ::caffe::TransformationParameter(*from.transform_param_);
  } else {
    transform_param_ = nullptr;
  }
  if (from._internal_has_loss_param()) {
    loss_param_ = new ::caffe::LossParameter(*from.loss_param_);
  } else {
    loss_param_ = nullptr;
  }
  if (from._internal_has_accuracy_param()) {
    accuracy_param_ = new ::caffe::AccuracyParameter(*from.accuracy_param_);
  } else {
    accuracy_param_ = nullptr;
  }
  if (from._internal_has_argmax_param()) {
    argmax_param_ = new ::caffe::ArgMaxParameter(*from.argmax_param_);
  } else {
    argmax_param_ = nullptr;
  }
  if (from._internal_has_concat_param()) {
    concat_param_ = new ::caffe::ConcatParameter(*from.concat_param_);
  } else {
    concat_param_ = nullptr;
  }
  if (from._internal_has_contrastive_loss_param()) {
    contrastive_loss_param_ = new ::caffe::ContrastiveLossParameter(*from.contrastive_loss_param_);
  } else {
    contrastive_loss_param_ = nullptr;
  }
  if (from._internal_has_convolution_param()) {
    convolution_param_ = new ::caffe::ConvolutionParameter(*from.convolution_param_);
  } else {
    convolution_param_ = nullptr;
  }
  if (from._internal_has_data_param()) {
    data_param_ = new ::caffe::DataParameter(*from.data_param_);
  } else {
    data_param_ = nullptr;
  }
  if (from._internal_has_dropout_param()) {
    dropout_param_ = new ::caffe::DropoutParameter(*from.dropout_param_);
  } else {
    dropout_param_ = nullptr;
  }
  if (from._internal_has_dummy_data_param()) {
    dummy_data_param_ = new ::caffe::DummyDataParameter(*from.dummy_data_param_);
  } else {
    dummy_data_param_ = nullptr;
  }
  if (from._internal_has_eltwise_param()) {
    eltwise_param_ = new ::caffe::EltwiseParameter(*from.eltwise_param_);
  } else {
    eltwise_param_ = nullptr;
  }
  if (from._internal_has_exp_param()) {
    exp_param_ = new ::caffe::ExpParameter(*from.exp_param_);
  } else {
    exp_param_ = nullptr;
  }
  if (from._internal_has_hdf5_data_param()) {
    hdf5_data_param_ = new ::caffe::HDF5DataParameter(*from.hdf5_data_param_);
  } else {
    hdf5_data_param_ = nullptr;
  }
  if (from._internal_has_hdf5_output_param()) {
    hdf5_output_param_ = new ::caffe::HDF5OutputParameter(*from.hdf5_output_param_);
  } else {
    hdf5_output_param_ = nullptr;
  }
  if (from._internal_has_hinge_loss_param()) {
    hinge_loss_param_ = new ::caffe::HingeLossParameter(*from.hinge_loss_param_);
  } else {
    hinge_loss_param_ = nullptr;
  }
  if (from._internal_has_image_data_param()) {
    image_data_param_ = new ::caffe::ImageDataParameter(*from.image_data_param_);
  } else {
    image_data_param_ = nullptr;
  }
  if (from._internal_has_infogain_loss_param()) {
    infogain_loss_param_ = new ::caffe::InfogainLossParameter(*from.infogain_loss_param_);
  } else {
    infogain_loss_param_ = nullptr;
  }
  if (from._internal_has_inner_product_param()) {
    inner_product_param_ = new ::caffe::InnerProductParameter(*from.inner_product_param_);
  } else {
    inner_product_param_ = nullptr;
  }
  if (from._internal_has_lrn_param()) {
    lrn_param_ = new ::caffe::LRNParameter(*from.lrn_param_);
  } else {
    lrn_param_ = nullptr;
  }
  if (from._internal_has_memory_data_param()) {
    memory_data_param_ = new ::caffe::MemoryDataParameter(*from.memory_data_param_);
  } else {
    memory_data_param_ = nullptr;
  }
  if (from._internal_has_mvn_param()) {
    mvn_param_ = new ::caffe::MVNParameter(*from.mvn_param_);
  } else {
    mvn_param_ = nullptr;
  }
  if (from._internal_has_pooling_param()) {
    pooling_param_ = new ::caffe::PoolingParameter(*from.pooling_param_);
  } else {
    pooling_param_ = nullptr;
  }
  if (from._internal_has_power_param()) {
    power_param_ = new ::caffe::PowerParameter(*from.power_param_);
  } else {
    power_param_ = nullptr;
  }
  if (from._internal_has_relu_param()) {
    relu_param_ = new ::caffe::ReLUParameter(*from.relu_param_);
  } else {
    relu_param_ = nullptr;
  }
  if (from._internal_has_sigmoid_param()) {
    sigmoid_param_ = new ::caffe::SigmoidParameter(*from.sigmoid_param_);
  } else {
    sigmoid_param_ = nullptr;
  }
  if (from._internal_has_softmax_param()) {
    softmax_param_ = new ::caffe::SoftmaxParameter(*from.softmax_param_);
  } else {
    softmax_param_ = nullptr;
  }
  if (from._internal_has_slice_param()) {
    slice_param_ = new ::caffe::SliceParameter(*from.slice_param_);
  } else {
    slice_param_ = nullptr;
  }
  if (from._internal_has_tanh_param()) {
    tanh_param_ = new ::caffe::TanHParameter(*from.tanh_param_);
  } else {
    tanh_param_ = nullptr;
  }
  if (from._internal_has_threshold_param()) {
    threshold_param_ = new ::caffe::ThresholdParameter(*from.threshold_param_);
  } else {
    threshold_param_ = nullptr;
  }
  if (from._internal_has_window_data_param()) {
    window_data_param_ = new ::caffe::WindowDataParameter(*from.window_data_param_);
  } else {
    window_data_param_ = nullptr;
  }
  if (from._internal_has_python_param()) {
    python_param_ = new ::caffe::PythonParameter(*from.python_param_);
  } else {
    python_param_ = nullptr;
  }
  if (from._internal_has_prelu_param()) {
    prelu_param_ = new ::caffe::PReLUParameter(*from.prelu_param_);
  } else {
    prelu_param_ = nullptr;
  }
  if (from._internal_has_spp_param()) {
    spp_param_ = new ::caffe::SPPParameter(*from.spp_param_);
  } else {
    spp_param_ = nullptr;
  }
  if (from._internal_has_reshape_param()) {
    reshape_param_ = new ::caffe::ReshapeParameter(*from.reshape_param_);
  } else {
    reshape_param_ = nullptr;
  }
  if (from._internal_has_log_param()) {
    log_param_ = new ::caffe::LogParameter(*from.log_param_);
  } else {
    log_param_ = nullptr;
  }
  if (from._internal_has_flatten_param()) {
    flatten_param_ = new ::caffe::FlattenParameter(*from.flatten_param_);
  } else {
    flatten_param_ = nullptr;
  }
  if (from._internal_has_reduction_param()) {
    reduction_param_ = new ::caffe::ReductionParameter(*from.reduction_param_);
  } else {
    reduction_param_ = nullptr;
  }
  if (from._internal_has_embed_param()) {
    embed_param_ = new ::caffe::EmbedParameter(*from.embed_param_);
  } else {
    embed_param_ = nullptr;
  }
  if (from._internal_has_tile_param()) {
    tile_param_ = new ::caffe::TileParameter(*from.tile_param_);
  } else {
    tile_param_ = nullptr;
  }
  if (from._internal_has_batch_norm_param()) {
    batch_norm_param_ = new ::caffe::BatchNormParameter(*from.batch_norm_param_);
  } else {
    batch_norm_param_ = nullptr;
  }
  if (from._internal_has_elu_param()) {
    elu_param_ = new ::caffe::ELUParameter(*from.elu_param_);
  } else {
    elu_param_ = nullptr;
  }
  if (from._internal_has_bias_param()) {
    bias_param_ = new ::caffe::BiasParameter(*from.bias_param_);
  } else {
    bias_param_ = nullptr;
  }
  if (from._internal_has_scale_param()) {
    scale_param_ = new ::caffe::ScaleParameter(*from.scale_param_);
  } else {
    scale_param_ = nullptr;
  }
  if (from._internal_has_input_param()) {
    input_param_ = new ::caffe::InputParameter(*from.input_param_);
  } else {
    input_param_ = nullptr;
  }
  if (from._internal_has_crop_param()) {
    crop_param_ = new ::caffe::CropParameter(*from.crop_param_);
  } else {
    crop_param_ = nullptr;
  }
  if (from._internal_has_parameter_param()) {
    parameter_param_ = new ::caffe::ParameterParameter(*from.parameter_param_);
  } else {
    parameter_param_ = nullptr;
  }
  if (from._internal_has_recurrent_param()) {
    recurrent_param_ = new ::caffe::RecurrentParameter(*from.recurrent_param_);
  } else {
    recurrent_param_ = nullptr;
  }
  if (from._internal_has_convolution3d_param()) {
    convolution3d_param_ = new ::caffe::Convolution3DParameter(*from.convolution3d_param_);
  } else {
    convolution3d_param_ = nullptr;
  }
  if (from._internal_has_pooling3d_param()) {
    pooling3d_param_ = new ::caffe::Pooling3DParameter(*from.pooling3d_param_);
  } else {
    pooling3d_param_ = nullptr;
  }
  if (from._internal_has_annotated_data_param()) {
    annotated_data_param_ = new ::caffe::AnnotatedDataParameter(*from.annotated_data_param_);
  } else {
    annotated_data_param_ = nullptr;
  }
  if (from._internal_has_multibox_loss_param()) {
    multibox_loss_param_ = new ::caffe::MultiBoxLossParameter(*from.multibox_loss_param_);
  } else {
    multibox_loss_param_ = nullptr;
  }
  if (from._internal_has_permute_param()) {
    permute_param_ = new ::caffe::PermuteParameter(*from.permute_param_);
  } else {
    permute_param_ = nullptr;
  }
  if (from._internal_has_prior_box_param()) {
    prior_box_param_ = new ::caffe::PriorBoxParameter(*from.prior_box_param_);
  } else {
    prior_box_param_ = nullptr;
  }
  if (from._internal_has_detection_output_param()) {
    detection_output_param_ = new ::caffe::DetectionOutputParameter(*from.detection_output_param_);
  } else {
    detection_output_param_ = nullptr;
  }
  if (from._internal_has_detection_evaluate_param()) {
    detection_evaluate_param_ = new ::caffe::DetectionEvaluateParameter(*from.detection_evaluate_param_);
  } else {
    detection_evaluate_param_ = nullptr;
  }
  if (from._internal_has_norm_param()) {
    norm_param_ = new ::caffe::NormalizeParameter(*from.norm_param_);
  } else {
    norm_param_ = nullptr;
  }
  if (from._internal_has_im2seq_param()) {
    im2seq_param_ = new ::caffe::Im2seqParameter(*from.im2seq_param_);
  } else {
    im2seq_param_ = nullptr;
  }
  if (from._internal_has_seq2out_param()) {
    seq2out_param_ = new ::caffe::Seq2outParameter(*from.seq2out_param_);
  } else {
    seq2out_param_ = nullptr;
  }
  if (from._internal_has_img_size_param()) {
    img_size_param_ = new ::caffe::ImgSizeParameter(*from.img_size_param_);
  } else {
    img_size_param_ = nullptr;
  }
  if (from._internal_has_lstm_param()) {
    lstm_param_ = new ::caffe::LSTMParameter(*from.lstm_param_);
  } else {
    lstm_param_ = nullptr;
  }
  if (from._internal_has_center_loss_param()) {
    center_loss_param_ = new ::caffe::CenterLossParameter(*from.center_loss_param_);
  } else {
    center_loss_param_ = nullptr;
  }
  if (from._internal_has_shuffle_channel_param()) {
    shuffle_channel_param_ = new ::caffe::ShuffleChannelParameter(*from.shuffle_channel_param_);
  } else {
    shuffle_channel_param_ = nullptr;
  }
  if (from._internal_has_roi_pooling_param()) {
    roi_pooling_param_ = new ::caffe::ROIPoolingParameter(*from.roi_pooling_param_);
  } else {
    roi_pooling_param_ = nullptr;
  }
  if (from._internal_has_clip_param()) {
    clip_param_ = new ::caffe::ClipParameter(*from.clip_param_);
  } else {
    clip_param_ = nullptr;
  }
  if (from._internal_has_upsample_param()) {
    upsample_param_ = new ::caffe::UpsampleParameter(*from.upsample_param_);
  } else {
    upsample_param_ = nullptr;
  }
  if (from._internal_has_interp_param()) {
    interp_param_ = new ::caffe::InterpParameter(*from.interp_param_);
  } else {
    interp_param_ = nullptr;
  }
  phase_ = from.phase_;
  // @@protoc_insertion_point(copy_constructor:caffe.LayerParameter)
}

inline void LayerParameter::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&transform_param_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&phase_) -
    reinterpret_cast<char*>(&transform_param_)) + sizeof(phase_));
}

LayerParameter::~LayerParameter() {
  // @@protoc_insertion_point(destructor:caffe.LayerParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void LayerParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete transform_param_;
  if (this != internal_default_instance()) delete loss_param_;
  if (this != internal_default_instance()) delete accuracy_param_;
  if (this != internal_default_instance()) delete argmax_param_;
  if (this != internal_default_instance()) delete concat_param_;
  if (this != internal_default_instance()) delete contrastive_loss_param_;
  if (this != internal_default_instance()) delete convolution_param_;
  if (this != internal_default_instance()) delete data_param_;
  if (this != internal_default_instance()) delete dropout_param_;
  if (this != internal_default_instance()) delete dummy_data_param_;
  if (this != internal_default_instance()) delete eltwise_param_;
  if (this != internal_default_instance()) delete exp_param_;
  if (this != internal_default_instance()) delete hdf5_data_param_;
  if (this != internal_default_instance()) delete hdf5_output_param_;
  if (this != internal_default_instance()) delete hinge_loss_param_;
  if (this != internal_default_instance()) delete image_data_param_;
  if (this != internal_default_instance()) delete infogain_loss_param_;
  if (this != internal_default_instance()) delete inner_product_param_;
  if (this != internal_default_instance()) delete lrn_param_;
  if (this != internal_default_instance()) delete memory_data_param_;
  if (this != internal_default_instance()) delete mvn_param_;
  if (this != internal_default_instance()) delete pooling_param_;
  if (this != internal_default_instance()) delete power_param_;
  if (this != internal_default_instance()) delete relu_param_;
  if (this != internal_default_instance()) delete sigmoid_param_;
  if (this != internal_default_instance()) delete softmax_param_;
  if (this != internal_default_instance()) delete slice_param_;
  if (this != internal_default_instance()) delete tanh_param_;
  if (this != internal_default_instance()) delete threshold_param_;
  if (this != internal_default_instance()) delete window_data_param_;
  if (this != internal_default_instance()) delete python_param_;
  if (this != internal_default_instance()) delete prelu_param_;
  if (this != internal_default_instance()) delete spp_param_;
  if (this != internal_default_instance()) delete reshape_param_;
  if (this != internal_default_instance()) delete log_param_;
  if (this != internal_default_instance()) delete flatten_param_;
  if (this != internal_default_instance()) delete reduction_param_;
  if (this != internal_default_instance()) delete embed_param_;
  if (this != internal_default_instance()) delete tile_param_;
  if (this != internal_default_instance()) delete batch_norm_param_;
  if (this != internal_default_instance()) delete elu_param_;
  if (this != internal_default_instance()) delete bias_param_;
  if (this != internal_default_instance()) delete scale_param_;
  if (this != internal_default_instance()) delete input_param_;
  if (this != internal_default_instance()) delete crop_param_;
  if (this != internal_default_instance()) delete parameter_param_;
  if (this != internal_default_instance()) delete recurrent_param_;
  if (this != internal_default_instance()) delete convolution3d_param_;
  if (this != internal_default_instance()) delete pooling3d_param_;
  if (this != internal_default_instance()) delete annotated_data_param_;
  if (this != internal_default_instance()) delete multibox_loss_param_;
  if (this != internal_default_instance()) delete permute_param_;
  if (this != internal_default_instance()) delete prior_box_param_;
  if (this != internal_default_instance()) delete detection_output_param_;
  if (this != internal_default_instance()) delete detection_evaluate_param_;
  if (this != internal_default_instance()) delete norm_param_;
  if (this != internal_default_instance()) delete im2seq_param_;
  if (this != internal_default_instance()) delete seq2out_param_;
  if (this != internal_default_instance()) delete img_size_param_;
  if (this != internal_default_instance()) delete lstm_param_;
  if (this != internal_default_instance()) delete center_loss_param_;
  if (this != internal_default_instance()) delete shuffle_channel_param_;
  if (this != internal_default_instance()) delete roi_pooling_param_;
  if (this != internal_default_instance()) delete clip_param_;
  if (this != internal_default_instance()) delete upsample_param_;
  if (this != internal_default_instance()) delete interp_param_;
}

void LayerParameter::ArenaDtor(void* object) {
  LayerParameter* _this = reinterpret_cast< LayerParameter* >(object);
  (void)_this;
}
void LayerParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LayerParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* LayerParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.LayerParameter.name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.LayerParameter.type");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.LayerParameter.bottom");
            #endif  // !NDEBUG
            CHK_(ptr);
            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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.LayerParameter.top");
            #endif  // !NDEBUG
            CHK_(ptr);
            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 .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 .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 .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 .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 .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(::caffe::Phase_IsValid(val))) {
            _internal_set_phase(static_cast<::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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .caffe.Convolution3DParameter convolution3d_param = 147;
      case 147:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 154)) {
          ptr = ctx->ParseMessage(_internal_mutable_convolution3d_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.Pooling3DParameter pooling3d_param = 148;
      case 148:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
          ptr = ctx->ParseMessage(_internal_mutable_pooling3d_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.AnnotatedDataParameter annotated_data_param = 200;
      case 200:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_annotated_data_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.MultiBoxLossParameter multibox_loss_param = 201;
      case 201:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_multibox_loss_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.PermuteParameter permute_param = 202;
      case 202:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_permute_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.PriorBoxParameter prior_box_param = 203;
      case 203:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
          ptr = ctx->ParseMessage(_internal_mutable_prior_box_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.DetectionOutputParameter detection_output_param = 204;
      case 204:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          ptr = ctx->ParseMessage(_internal_mutable_detection_output_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.DetectionEvaluateParameter detection_evaluate_param = 205;
      case 205:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_detection_evaluate_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.NormalizeParameter norm_param = 206;
      case 206:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
          ptr = ctx->ParseMessage(_internal_mutable_norm_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.Im2seqParameter im2seq_param = 207;
      case 207:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
          ptr = ctx->ParseMessage(_internal_mutable_im2seq_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.Seq2outParameter seq2out_param = 208;
      case 208:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
          ptr = ctx->ParseMessage(_internal_mutable_seq2out_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.ImgSizeParameter img_size_param = 209;
      case 209:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138)) {
          ptr = ctx->ParseMessage(_internal_mutable_img_size_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.LSTMParameter lstm_param = 210;
      case 210:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
          ptr = ctx->ParseMessage(_internal_mutable_lstm_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.CenterLossParameter center_loss_param = 211;
      case 211:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 154)) {
          ptr = ctx->ParseMessage(_internal_mutable_center_loss_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.ShuffleChannelParameter shuffle_channel_param = 212;
      case 212:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
          ptr = ctx->ParseMessage(_internal_mutable_shuffle_channel_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.ROIPoolingParameter roi_pooling_param = 2201;
      case 2201:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 202)) {
          ptr = ctx->ParseMessage(_internal_mutable_roi_pooling_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.ClipParameter clip_param = 2202;
      case 2202:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 210)) {
          ptr = ctx->ParseMessage(_internal_mutable_clip_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.UpsampleParameter upsample_param = 2203;
      case 2203:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 218)) {
          ptr = ctx->ParseMessage(_internal_mutable_upsample_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.InterpParameter interp_param = 2210;
      case 2210:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_interp_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:caffe.LayerParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "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,
      "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,
      "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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_loss_weight(i), target);
  }

  // repeated .caffe.ParamSpec param = 6;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_param_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, this->_internal_param(i), target, stream);
  }

  // repeated .caffe.BlobProto blobs = 7;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_blobs_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, this->_internal_blobs(i), target, stream);
  }

  // repeated .caffe.NetStateRule include = 8;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_include_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(8, this->_internal_include(i), target, stream);
  }

  // repeated .caffe.NetStateRule exclude = 9;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_exclude_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(9, this->_internal_exclude(i), target, stream);
  }

  cached_has_bits = _has_bits_[2];
  // optional .caffe.Phase phase = 10;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_propagate_down(i), target);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  // optional .caffe.Convolution3DParameter convolution3d_param = 147;
  if (cached_has_bits & 0x00020000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        147, _Internal::convolution3d_param(this), target, stream);
  }

  // optional .caffe.Pooling3DParameter pooling3d_param = 148;
  if (cached_has_bits & 0x00040000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        148, _Internal::pooling3d_param(this), target, stream);
  }

  // optional .caffe.AnnotatedDataParameter annotated_data_param = 200;
  if (cached_has_bits & 0x00080000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        200, _Internal::annotated_data_param(this), target, stream);
  }

  // optional .caffe.MultiBoxLossParameter multibox_loss_param = 201;
  if (cached_has_bits & 0x00100000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        201, _Internal::multibox_loss_param(this), target, stream);
  }

  // optional .caffe.PermuteParameter permute_param = 202;
  if (cached_has_bits & 0x00200000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        202, _Internal::permute_param(this), target, stream);
  }

  // optional .caffe.PriorBoxParameter prior_box_param = 203;
  if (cached_has_bits & 0x00400000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        203, _Internal::prior_box_param(this), target, stream);
  }

  // optional .caffe.DetectionOutputParameter detection_output_param = 204;
  if (cached_has_bits & 0x00800000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        204, _Internal::detection_output_param(this), target, stream);
  }

  // optional .caffe.DetectionEvaluateParameter detection_evaluate_param = 205;
  if (cached_has_bits & 0x01000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        205, _Internal::detection_evaluate_param(this), target, stream);
  }

  // optional .caffe.NormalizeParameter norm_param = 206;
  if (cached_has_bits & 0x02000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        206, _Internal::norm_param(this), target, stream);
  }

  // optional .caffe.Im2seqParameter im2seq_param = 207;
  if (cached_has_bits & 0x04000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        207, _Internal::im2seq_param(this), target, stream);
  }

  // optional .caffe.Seq2outParameter seq2out_param = 208;
  if (cached_has_bits & 0x08000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        208, _Internal::seq2out_param(this), target, stream);
  }

  // optional .caffe.ImgSizeParameter img_size_param = 209;
  if (cached_has_bits & 0x10000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        209, _Internal::img_size_param(this), target, stream);
  }

  // optional .caffe.LSTMParameter lstm_param = 210;
  if (cached_has_bits & 0x20000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        210, _Internal::lstm_param(this), target, stream);
  }

  // optional .caffe.CenterLossParameter center_loss_param = 211;
  if (cached_has_bits & 0x40000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        211, _Internal::center_loss_param(this), target, stream);
  }

  // optional .caffe.ShuffleChannelParameter shuffle_channel_param = 212;
  if (cached_has_bits & 0x80000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        212, _Internal::shuffle_channel_param(this), target, stream);
  }

  cached_has_bits = _has_bits_[2];
  // optional .caffe.ROIPoolingParameter roi_pooling_param = 2201;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2201, _Internal::roi_pooling_param(this), target, stream);
  }

  // optional .caffe.ClipParameter clip_param = 2202;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2202, _Internal::clip_param(this), target, stream);
  }

  // optional .caffe.UpsampleParameter upsample_param = 2203;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2203, _Internal::upsample_param(this), target, stream);
  }

  // optional .caffe.InterpParameter interp_param = 2210;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2210, _Internal::interp_param(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.LayerParameter)
  return target;
}

size_t LayerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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(bottom_.size());
  for (int i = 0, n = bottom_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      bottom_.Get(i));
  }

  // repeated string top = 4;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(top_.size());
  for (int i = 0, n = top_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_loss_weight_size());
    total_size += data_size;
  }

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

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

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

  // repeated .caffe.NetStateRule exclude = 9;
  total_size += 1UL * this->_internal_exclude_size();
  for (const auto& msg : this->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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_propagate_down_size());
    total_size += data_size;
  }

  cached_has_bits = _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 .caffe.TransformationParameter transform_param = 100;
    if (cached_has_bits & 0x00000004u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *transform_param_);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // optional .caffe.Convolution3DParameter convolution3d_param = 147;
    if (cached_has_bits & 0x00020000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *convolution3d_param_);
    }

    // optional .caffe.Pooling3DParameter pooling3d_param = 148;
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *pooling3d_param_);
    }

    // optional .caffe.AnnotatedDataParameter annotated_data_param = 200;
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *annotated_data_param_);
    }

    // optional .caffe.MultiBoxLossParameter multibox_loss_param = 201;
    if (cached_has_bits & 0x00100000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *multibox_loss_param_);
    }

    // optional .caffe.PermuteParameter permute_param = 202;
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *permute_param_);
    }

    // optional .caffe.PriorBoxParameter prior_box_param = 203;
    if (cached_has_bits & 0x00400000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *prior_box_param_);
    }

    // optional .caffe.DetectionOutputParameter detection_output_param = 204;
    if (cached_has_bits & 0x00800000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *detection_output_param_);
    }

  }
  if (cached_has_bits & 0xff000000u) {
    // optional .caffe.DetectionEvaluateParameter detection_evaluate_param = 205;
    if (cached_has_bits & 0x01000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *detection_evaluate_param_);
    }

    // optional .caffe.NormalizeParameter norm_param = 206;
    if (cached_has_bits & 0x02000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *norm_param_);
    }

    // optional .caffe.Im2seqParameter im2seq_param = 207;
    if (cached_has_bits & 0x04000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *im2seq_param_);
    }

    // optional .caffe.Seq2outParameter seq2out_param = 208;
    if (cached_has_bits & 0x08000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *seq2out_param_);
    }

    // optional .caffe.ImgSizeParameter img_size_param = 209;
    if (cached_has_bits & 0x10000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *img_size_param_);
    }

    // optional .caffe.LSTMParameter lstm_param = 210;
    if (cached_has_bits & 0x20000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *lstm_param_);
    }

    // optional .caffe.CenterLossParameter center_loss_param = 211;
    if (cached_has_bits & 0x40000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *center_loss_param_);
    }

    // optional .caffe.ShuffleChannelParameter shuffle_channel_param = 212;
    if (cached_has_bits & 0x80000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *shuffle_channel_param_);
    }

  }
  cached_has_bits = _has_bits_[2];
  if (cached_has_bits & 0x0000001fu) {
    // optional .caffe.ROIPoolingParameter roi_pooling_param = 2201;
    if (cached_has_bits & 0x00000001u) {
      total_size += 3 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *roi_pooling_param_);
    }

    // optional .caffe.ClipParameter clip_param = 2202;
    if (cached_has_bits & 0x00000002u) {
      total_size += 3 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *clip_param_);
    }

    // optional .caffe.UpsampleParameter upsample_param = 2203;
    if (cached_has_bits & 0x00000004u) {
      total_size += 3 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *upsample_param_);
    }

    // optional .caffe.InterpParameter interp_param = 2210;
    if (cached_has_bits & 0x00000008u) {
      total_size += 3 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *interp_param_);
    }

    // optional .caffe.Phase phase = 10;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_phase());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void LayerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<LayerParameter *>(to)->MergeFrom(
      static_cast<const LayerParameter &>(from));
}


void LayerParameter::MergeFrom(const LayerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LayerParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  bottom_.MergeFrom(from.bottom_);
  top_.MergeFrom(from.top_);
  loss_weight_.MergeFrom(from.loss_weight_);
  param_.MergeFrom(from.param_);
  blobs_.MergeFrom(from.blobs_);
  include_.MergeFrom(from.include_);
  exclude_.MergeFrom(from.exclude_);
  propagate_down_.MergeFrom(from.propagate_down_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_type(from._internal_type());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_transform_param()->::caffe::TransformationParameter::MergeFrom(from._internal_transform_param());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_mutable_loss_param()->::caffe::LossParameter::MergeFrom(from._internal_loss_param());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_mutable_accuracy_param()->::caffe::AccuracyParameter::MergeFrom(from._internal_accuracy_param());
    }
    if (cached_has_bits & 0x00000020u) {
      _internal_mutable_argmax_param()->::caffe::ArgMaxParameter::MergeFrom(from._internal_argmax_param());
    }
    if (cached_has_bits & 0x00000040u) {
      _internal_mutable_concat_param()->::caffe::ConcatParameter::MergeFrom(from._internal_concat_param());
    }
    if (cached_has_bits & 0x00000080u) {
      _internal_mutable_contrastive_loss_param()->::caffe::ContrastiveLossParameter::MergeFrom(from._internal_contrastive_loss_param());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _internal_mutable_convolution_param()->::caffe::ConvolutionParameter::MergeFrom(from._internal_convolution_param());
    }
    if (cached_has_bits & 0x00000200u) {
      _internal_mutable_data_param()->::caffe::DataParameter::MergeFrom(from._internal_data_param());
    }
    if (cached_has_bits & 0x00000400u) {
      _internal_mutable_dropout_param()->::caffe::DropoutParameter::MergeFrom(from._internal_dropout_param());
    }
    if (cached_has_bits & 0x00000800u) {
      _internal_mutable_dummy_data_param()->::caffe::DummyDataParameter::MergeFrom(from._internal_dummy_data_param());
    }
    if (cached_has_bits & 0x00001000u) {
      _internal_mutable_eltwise_param()->::caffe::EltwiseParameter::MergeFrom(from._internal_eltwise_param());
    }
    if (cached_has_bits & 0x00002000u) {
      _internal_mutable_exp_param()->::caffe::ExpParameter::MergeFrom(from._internal_exp_param());
    }
    if (cached_has_bits & 0x00004000u) {
      _internal_mutable_hdf5_data_param()->::caffe::HDF5DataParameter::MergeFrom(from._internal_hdf5_data_param());
    }
    if (cached_has_bits & 0x00008000u) {
      _internal_mutable_hdf5_output_param()->::caffe::HDF5OutputParameter::MergeFrom(from._internal_hdf5_output_param());
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      _internal_mutable_hinge_loss_param()->::caffe::HingeLossParameter::MergeFrom(from._internal_hinge_loss_param());
    }
    if (cached_has_bits & 0x00020000u) {
      _internal_mutable_image_data_param()->::caffe::ImageDataParameter::MergeFrom(from._internal_image_data_param());
    }
    if (cached_has_bits & 0x00040000u) {
      _internal_mutable_infogain_loss_param()->::caffe::InfogainLossParameter::MergeFrom(from._internal_infogain_loss_param());
    }
    if (cached_has_bits & 0x00080000u) {
      _internal_mutable_inner_product_param()->::caffe::InnerProductParameter::MergeFrom(from._internal_inner_product_param());
    }
    if (cached_has_bits & 0x00100000u) {
      _internal_mutable_lrn_param()->::caffe::LRNParameter::MergeFrom(from._internal_lrn_param());
    }
    if (cached_has_bits & 0x00200000u) {
      _internal_mutable_memory_data_param()->::caffe::MemoryDataParameter::MergeFrom(from._internal_memory_data_param());
    }
    if (cached_has_bits & 0x00400000u) {
      _internal_mutable_mvn_param()->::caffe::MVNParameter::MergeFrom(from._internal_mvn_param());
    }
    if (cached_has_bits & 0x00800000u) {
      _internal_mutable_pooling_param()->::caffe::PoolingParameter::MergeFrom(from._internal_pooling_param());
    }
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      _internal_mutable_power_param()->::caffe::PowerParameter::MergeFrom(from._internal_power_param());
    }
    if (cached_has_bits & 0x02000000u) {
      _internal_mutable_relu_param()->::caffe::ReLUParameter::MergeFrom(from._internal_relu_param());
    }
    if (cached_has_bits & 0x04000000u) {
      _internal_mutable_sigmoid_param()->::caffe::SigmoidParameter::MergeFrom(from._internal_sigmoid_param());
    }
    if (cached_has_bits & 0x08000000u) {
      _internal_mutable_softmax_param()->::caffe::SoftmaxParameter::MergeFrom(from._internal_softmax_param());
    }
    if (cached_has_bits & 0x10000000u) {
      _internal_mutable_slice_param()->::caffe::SliceParameter::MergeFrom(from._internal_slice_param());
    }
    if (cached_has_bits & 0x20000000u) {
      _internal_mutable_tanh_param()->::caffe::TanHParameter::MergeFrom(from._internal_tanh_param());
    }
    if (cached_has_bits & 0x40000000u) {
      _internal_mutable_threshold_param()->::caffe::ThresholdParameter::MergeFrom(from._internal_threshold_param());
    }
    if (cached_has_bits & 0x80000000u) {
      _internal_mutable_window_data_param()->::caffe::WindowDataParameter::MergeFrom(from._internal_window_data_param());
    }
  }
  cached_has_bits = from._has_bits_[1];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_python_param()->::caffe::PythonParameter::MergeFrom(from._internal_python_param());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_prelu_param()->::caffe::PReLUParameter::MergeFrom(from._internal_prelu_param());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_spp_param()->::caffe::SPPParameter::MergeFrom(from._internal_spp_param());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_mutable_reshape_param()->::caffe::ReshapeParameter::MergeFrom(from._internal_reshape_param());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_mutable_log_param()->::caffe::LogParameter::MergeFrom(from._internal_log_param());
    }
    if (cached_has_bits & 0x00000020u) {
      _internal_mutable_flatten_param()->::caffe::FlattenParameter::MergeFrom(from._internal_flatten_param());
    }
    if (cached_has_bits & 0x00000040u) {
      _internal_mutable_reduction_param()->::caffe::ReductionParameter::MergeFrom(from._internal_reduction_param());
    }
    if (cached_has_bits & 0x00000080u) {
      _internal_mutable_embed_param()->::caffe::EmbedParameter::MergeFrom(from._internal_embed_param());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _internal_mutable_tile_param()->::caffe::TileParameter::MergeFrom(from._internal_tile_param());
    }
    if (cached_has_bits & 0x00000200u) {
      _internal_mutable_batch_norm_param()->::caffe::BatchNormParameter::MergeFrom(from._internal_batch_norm_param());
    }
    if (cached_has_bits & 0x00000400u) {
      _internal_mutable_elu_param()->::caffe::ELUParameter::MergeFrom(from._internal_elu_param());
    }
    if (cached_has_bits & 0x00000800u) {
      _internal_mutable_bias_param()->::caffe::BiasParameter::MergeFrom(from._internal_bias_param());
    }
    if (cached_has_bits & 0x00001000u) {
      _internal_mutable_scale_param()->::caffe::ScaleParameter::MergeFrom(from._internal_scale_param());
    }
    if (cached_has_bits & 0x00002000u) {
      _internal_mutable_input_param()->::caffe::InputParameter::MergeFrom(from._internal_input_param());
    }
    if (cached_has_bits & 0x00004000u) {
      _internal_mutable_crop_param()->::caffe::CropParameter::MergeFrom(from._internal_crop_param());
    }
    if (cached_has_bits & 0x00008000u) {
      _internal_mutable_parameter_param()->::caffe::ParameterParameter::MergeFrom(from._internal_parameter_param());
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      _internal_mutable_recurrent_param()->::caffe::RecurrentParameter::MergeFrom(from._internal_recurrent_param());
    }
    if (cached_has_bits & 0x00020000u) {
      _internal_mutable_convolution3d_param()->::caffe::Convolution3DParameter::MergeFrom(from._internal_convolution3d_param());
    }
    if (cached_has_bits & 0x00040000u) {
      _internal_mutable_pooling3d_param()->::caffe::Pooling3DParameter::MergeFrom(from._internal_pooling3d_param());
    }
    if (cached_has_bits & 0x00080000u) {
      _internal_mutable_annotated_data_param()->::caffe::AnnotatedDataParameter::MergeFrom(from._internal_annotated_data_param());
    }
    if (cached_has_bits & 0x00100000u) {
      _internal_mutable_multibox_loss_param()->::caffe::MultiBoxLossParameter::MergeFrom(from._internal_multibox_loss_param());
    }
    if (cached_has_bits & 0x00200000u) {
      _internal_mutable_permute_param()->::caffe::PermuteParameter::MergeFrom(from._internal_permute_param());
    }
    if (cached_has_bits & 0x00400000u) {
      _internal_mutable_prior_box_param()->::caffe::PriorBoxParameter::MergeFrom(from._internal_prior_box_param());
    }
    if (cached_has_bits & 0x00800000u) {
      _internal_mutable_detection_output_param()->::caffe::DetectionOutputParameter::MergeFrom(from._internal_detection_output_param());
    }
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      _internal_mutable_detection_evaluate_param()->::caffe::DetectionEvaluateParameter::MergeFrom(from._internal_detection_evaluate_param());
    }
    if (cached_has_bits & 0x02000000u) {
      _internal_mutable_norm_param()->::caffe::NormalizeParameter::MergeFrom(from._internal_norm_param());
    }
    if (cached_has_bits & 0x04000000u) {
      _internal_mutable_im2seq_param()->::caffe::Im2seqParameter::MergeFrom(from._internal_im2seq_param());
    }
    if (cached_has_bits & 0x08000000u) {
      _internal_mutable_seq2out_param()->::caffe::Seq2outParameter::MergeFrom(from._internal_seq2out_param());
    }
    if (cached_has_bits & 0x10000000u) {
      _internal_mutable_img_size_param()->::caffe::ImgSizeParameter::MergeFrom(from._internal_img_size_param());
    }
    if (cached_has_bits & 0x20000000u) {
      _internal_mutable_lstm_param()->::caffe::LSTMParameter::MergeFrom(from._internal_lstm_param());
    }
    if (cached_has_bits & 0x40000000u) {
      _internal_mutable_center_loss_param()->::caffe::CenterLossParameter::MergeFrom(from._internal_center_loss_param());
    }
    if (cached_has_bits & 0x80000000u) {
      _internal_mutable_shuffle_channel_param()->::caffe::ShuffleChannelParameter::MergeFrom(from._internal_shuffle_channel_param());
    }
  }
  cached_has_bits = from._has_bits_[2];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_roi_pooling_param()->::caffe::ROIPoolingParameter::MergeFrom(from._internal_roi_pooling_param());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_clip_param()->::caffe::ClipParameter::MergeFrom(from._internal_clip_param());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_upsample_param()->::caffe::UpsampleParameter::MergeFrom(from._internal_upsample_param());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_mutable_interp_param()->::caffe::InterpParameter::MergeFrom(from._internal_interp_param());
    }
    if (cached_has_bits & 0x00000010u) {
      phase_ = from.phase_;
    }
    _has_bits_[2] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool LayerParameter::IsInitialized() const {
  if (_internal_has_clip_param()) {
    if (!clip_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(_has_bits_[0], other->_has_bits_[0]);
  swap(_has_bits_[1], other->_has_bits_[1]);
  swap(_has_bits_[2], other->_has_bits_[2]);
  bottom_.InternalSwap(&other->bottom_);
  top_.InternalSwap(&other->top_);
  loss_weight_.InternalSwap(&other->loss_weight_);
  param_.InternalSwap(&other->param_);
  blobs_.InternalSwap(&other->blobs_);
  include_.InternalSwap(&other->include_);
  exclude_.InternalSwap(&other->exclude_);
  propagate_down_.InternalSwap(&other->propagate_down_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &type_, lhs_arena,
      &other->type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(LayerParameter, phase_)
      + sizeof(LayerParameter::phase_)
      - PROTOBUF_FIELD_OFFSET(LayerParameter, transform_param_)>(
          reinterpret_cast<char*>(&transform_param_),
          reinterpret_cast<char*>(&other->transform_param_));
}

::PROTOBUF_NAMESPACE_ID::Metadata LayerParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[23]);
}

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

class ClipParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ClipParameter>()._has_bits_);
  static void set_has_min(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_max(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static bool MissingRequiredFields(const HasBits& has_bits) {
    return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0;
  }
};

ClipParameter::ClipParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ClipParameter)
}
ClipParameter::ClipParameter(const ClipParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&min_, &from.min_,
    static_cast<size_t>(reinterpret_cast<char*>(&max_) -
    reinterpret_cast<char*>(&min_)) + sizeof(max_));
  // @@protoc_insertion_point(copy_constructor:caffe.ClipParameter)
}

inline void ClipParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&min_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&max_) -
    reinterpret_cast<char*>(&min_)) + sizeof(max_));
}

ClipParameter::~ClipParameter() {
  // @@protoc_insertion_point(destructor:caffe.ClipParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ClipParameter::ArenaDtor(void* object) {
  ClipParameter* _this = reinterpret_cast< ClipParameter* >(object);
  (void)_this;
}
void ClipParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ClipParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* ClipParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // required float min = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_min(&has_bits);
          min_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // required float max = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_max(&has_bits);
          max_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

  // required float max = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_max(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ClipParameter)
  return target;
}

size_t ClipParameter::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:caffe.ClipParameter)
  size_t total_size = 0;

  if (_internal_has_min()) {
    // required float min = 1;
    total_size += 1 + 4;
  }

  if (_internal_has_max()) {
    // required float max = 2;
    total_size += 1 + 4;
  }

  return total_size;
}
size_t ClipParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.ClipParameter)
  size_t total_size = 0;

  if (((_has_bits_[0] & 0x00000003) ^ 0x00000003) == 0) {  // All required fields are present.
    // required float min = 1;
    total_size += 1 + 4;

    // required float max = 2;
    total_size += 1 + 4;

  } 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, &_cached_size_);
}

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

void ClipParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ClipParameter *>(to)->MergeFrom(
      static_cast<const ClipParameter &>(from));
}


void ClipParameter::MergeFrom(const ClipParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ClipParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      min_ = from.min_;
    }
    if (cached_has_bits & 0x00000002u) {
      max_ = from.max_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

bool ClipParameter::IsInitialized() const {
  if (_Internal::MissingRequiredFields(_has_bits_)) return false;
  return true;
}

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

::PROTOBUF_NAMESPACE_ID::Metadata ClipParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[24]);
}

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

class ROIPoolingParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ROIPoolingParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ROIPoolingParameter)
}
ROIPoolingParameter::ROIPoolingParameter(const ROIPoolingParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&pooled_h_, &from.pooled_h_,
    static_cast<size_t>(reinterpret_cast<char*>(&spatial_scale_) -
    reinterpret_cast<char*>(&pooled_h_)) + sizeof(spatial_scale_));
  // @@protoc_insertion_point(copy_constructor:caffe.ROIPoolingParameter)
}

inline void ROIPoolingParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&pooled_h_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&pooled_w_) -
    reinterpret_cast<char*>(&pooled_h_)) + sizeof(pooled_w_));
spatial_scale_ = 1;
}

ROIPoolingParameter::~ROIPoolingParameter() {
  // @@protoc_insertion_point(destructor:caffe.ROIPoolingParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ROIPoolingParameter::ArenaDtor(void* object) {
  ROIPoolingParameter* _this = reinterpret_cast< ROIPoolingParameter* >(object);
  (void)_this;
}
void ROIPoolingParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ROIPoolingParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* ROIPoolingParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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:
  _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:caffe.ROIPoolingParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 pooled_h = 1 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_spatial_scale(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ROIPoolingParameter)
  return target;
}

size_t ROIPoolingParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional uint32 pooled_h = 1 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pooled_h());
    }

    // optional uint32 pooled_w = 2 [default = 0];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

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

void ROIPoolingParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ROIPoolingParameter *>(to)->MergeFrom(
      static_cast<const ROIPoolingParameter &>(from));
}


void ROIPoolingParameter::MergeFrom(const ROIPoolingParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ROIPoolingParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      pooled_h_ = from.pooled_h_;
    }
    if (cached_has_bits & 0x00000002u) {
      pooled_w_ = from.pooled_w_;
    }
    if (cached_has_bits & 0x00000004u) {
      spatial_scale_ = from.spatial_scale_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ROIPoolingParameter::CopyFrom(const ROIPoolingParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ROIPoolingParameter, pooled_w_)
      + sizeof(ROIPoolingParameter::pooled_w_)
      - PROTOBUF_FIELD_OFFSET(ROIPoolingParameter, pooled_h_)>(
          reinterpret_cast<char*>(&pooled_h_),
          reinterpret_cast<char*>(&other->pooled_h_));
  swap(spatial_scale_, other->spatial_scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ROIPoolingParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[25]);
}

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

class InterpParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<InterpParameter>()._has_bits_);
  static void set_has_height(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_width(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_zoom_factor(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_shrink_factor(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_pad_beg(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_pad_end(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

InterpParameter::InterpParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.InterpParameter)
}
InterpParameter::InterpParameter(const InterpParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&height_, &from.height_,
    static_cast<size_t>(reinterpret_cast<char*>(&shrink_factor_) -
    reinterpret_cast<char*>(&height_)) + sizeof(shrink_factor_));
  // @@protoc_insertion_point(copy_constructor:caffe.InterpParameter)
}

inline void InterpParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&height_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&pad_end_) -
    reinterpret_cast<char*>(&height_)) + sizeof(pad_end_));
zoom_factor_ = 1;
shrink_factor_ = 1;
}

InterpParameter::~InterpParameter() {
  // @@protoc_insertion_point(destructor:caffe.InterpParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void InterpParameter::ArenaDtor(void* object) {
  InterpParameter* _this = reinterpret_cast< InterpParameter* >(object);
  (void)_this;
}
void InterpParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void InterpParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    ::memset(&height_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&pad_end_) -
        reinterpret_cast<char*>(&height_)) + sizeof(pad_end_));
    zoom_factor_ = 1;
    shrink_factor_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* InterpParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional int32 height = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_height(&has_bits);
          height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 width = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_width(&has_bits);
          width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 zoom_factor = 3 [default = 1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_zoom_factor(&has_bits);
          zoom_factor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 shrink_factor = 4 [default = 1];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_shrink_factor(&has_bits);
          shrink_factor_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 pad_beg = 5 [default = 0];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_pad_beg(&has_bits);
          pad_beg_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 pad_end = 6 [default = 0];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_pad_end(&has_bits);
          pad_end_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional int32 height = 1 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_height(), target);
  }

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

  // optional int32 zoom_factor = 3 [default = 1];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_zoom_factor(), target);
  }

  // optional int32 shrink_factor = 4 [default = 1];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_shrink_factor(), target);
  }

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

  // optional int32 pad_end = 6 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_pad_end(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.InterpParameter)
  return target;
}

size_t InterpParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.InterpParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional int32 height = 1 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_height());
    }

    // optional int32 width = 2 [default = 0];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_width());
    }

    // optional int32 pad_beg = 5 [default = 0];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_pad_beg());
    }

    // optional int32 pad_end = 6 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_pad_end());
    }

    // optional int32 zoom_factor = 3 [default = 1];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_zoom_factor());
    }

    // optional int32 shrink_factor = 4 [default = 1];
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_shrink_factor());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void InterpParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<InterpParameter *>(to)->MergeFrom(
      static_cast<const InterpParameter &>(from));
}


void InterpParameter::MergeFrom(const InterpParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.InterpParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      height_ = from.height_;
    }
    if (cached_has_bits & 0x00000002u) {
      width_ = from.width_;
    }
    if (cached_has_bits & 0x00000004u) {
      pad_beg_ = from.pad_beg_;
    }
    if (cached_has_bits & 0x00000008u) {
      pad_end_ = from.pad_end_;
    }
    if (cached_has_bits & 0x00000010u) {
      zoom_factor_ = from.zoom_factor_;
    }
    if (cached_has_bits & 0x00000020u) {
      shrink_factor_ = from.shrink_factor_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void InterpParameter::InternalSwap(InterpParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(InterpParameter, pad_end_)
      + sizeof(InterpParameter::pad_end_)
      - PROTOBUF_FIELD_OFFSET(InterpParameter, height_)>(
          reinterpret_cast<char*>(&height_),
          reinterpret_cast<char*>(&other->height_));
  swap(zoom_factor_, other->zoom_factor_);
  swap(shrink_factor_, other->shrink_factor_);
}

::PROTOBUF_NAMESPACE_ID::Metadata InterpParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[26]);
}

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

class LSTMParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<LSTMParameter>()._has_bits_);
  static void set_has_num_output(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_clipping_threshold(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::caffe::FillerParameter& weight_filler(const LSTMParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::caffe::FillerParameter& bias_filler(const LSTMParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_batch_size(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_paramq(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_scale_in(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_scale_out(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_a_min(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_a_max(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
};

const ::caffe::FillerParameter&
LSTMParameter::_Internal::weight_filler(const LSTMParameter* msg) {
  return *msg->weight_filler_;
}
const ::caffe::FillerParameter&
LSTMParameter::_Internal::bias_filler(const LSTMParameter* msg) {
  return *msg->bias_filler_;
}
LSTMParameter::LSTMParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.LSTMParameter)
}
LSTMParameter::LSTMParameter(const LSTMParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_weight_filler()) {
    weight_filler_ = new ::caffe::FillerParameter(*from.weight_filler_);
  } else {
    weight_filler_ = nullptr;
  }
  if (from._internal_has_bias_filler()) {
    bias_filler_ = new ::caffe::FillerParameter(*from.bias_filler_);
  } else {
    bias_filler_ = nullptr;
  }
  ::memcpy(&num_output_, &from.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&a_min_) -
    reinterpret_cast<char*>(&num_output_)) + sizeof(a_min_));
  // @@protoc_insertion_point(copy_constructor:caffe.LSTMParameter)
}

inline void LSTMParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&scale_out_) -
    reinterpret_cast<char*>(&weight_filler_)) + sizeof(scale_out_));
a_max_ = 127;
batch_size_ = 1u;
a_min_ = -128;
}

LSTMParameter::~LSTMParameter() {
  // @@protoc_insertion_point(destructor:caffe.LSTMParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void LSTMParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete weight_filler_;
  if (this != internal_default_instance()) delete bias_filler_;
}

void LSTMParameter::ArenaDtor(void* object) {
  LSTMParameter* _this = reinterpret_cast< LSTMParameter* >(object);
  (void)_this;
}
void LSTMParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LSTMParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(weight_filler_ != nullptr);
      weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(bias_filler_ != nullptr);
      bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&scale_out_) -
        reinterpret_cast<char*>(&num_output_)) + sizeof(scale_out_));
    a_max_ = 127;
  }
  if (cached_has_bits & 0x00000300u) {
    batch_size_ = 1u;
    a_min_ = -128;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* LSTMParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float clipping_threshold = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_clipping_threshold(&has_bits);
          clipping_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .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 .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 uint32 batch_size = 5 [default = 1];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_batch_size(&has_bits);
          batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 paramq = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_paramq(&has_bits);
          paramq_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float scale_in = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
          _Internal::set_has_scale_in(&has_bits);
          scale_in_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float scale_out = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
          _Internal::set_has_scale_out(&has_bits);
          scale_out_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 a_min = 9 [default = -128];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_a_min(&has_bits);
          a_min_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 a_max = 10 [default = 127];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_a_max(&has_bits);
          a_max_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional uint32 num_output = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional float clipping_threshold = 2 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_clipping_threshold(), target);
  }

  // optional .caffe.FillerParameter weight_filler = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::weight_filler(this), target, stream);
  }

  // optional .caffe.FillerParameter bias_filler = 4;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::bias_filler(this), target, stream);
  }

  // optional uint32 batch_size = 5 [default = 1];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_batch_size(), target);
  }

  // optional uint32 paramq = 6;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_paramq(), target);
  }

  // optional float scale_in = 7;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_scale_in(), target);
  }

  // optional float scale_out = 8;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_scale_out(), target);
  }

  // optional int32 a_min = 9 [default = -128];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(9, this->_internal_a_min(), target);
  }

  // optional int32 a_max = 10 [default = 127];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(10, this->_internal_a_max(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.LSTMParameter)
  return target;
}

size_t LSTMParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.LSTMParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .caffe.FillerParameter weight_filler = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *weight_filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *bias_filler_);
    }

    // optional uint32 num_output = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

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

    // optional uint32 paramq = 6;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_paramq());
    }

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

    // optional float scale_out = 8;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 4;
    }

    // optional int32 a_max = 10 [default = 127];
    if (cached_has_bits & 0x00000080u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_a_max());
    }

  }
  if (cached_has_bits & 0x00000300u) {
    // optional uint32 batch_size = 5 [default = 1];
    if (cached_has_bits & 0x00000100u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
    }

    // optional int32 a_min = 9 [default = -128];
    if (cached_has_bits & 0x00000200u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_a_min());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void LSTMParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<LSTMParameter *>(to)->MergeFrom(
      static_cast<const LSTMParameter &>(from));
}


void LSTMParameter::MergeFrom(const LSTMParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LSTMParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_weight_filler()->::caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      num_output_ = from.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      clipping_threshold_ = from.clipping_threshold_;
    }
    if (cached_has_bits & 0x00000010u) {
      paramq_ = from.paramq_;
    }
    if (cached_has_bits & 0x00000020u) {
      scale_in_ = from.scale_in_;
    }
    if (cached_has_bits & 0x00000040u) {
      scale_out_ = from.scale_out_;
    }
    if (cached_has_bits & 0x00000080u) {
      a_max_ = from.a_max_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000300u) {
    if (cached_has_bits & 0x00000100u) {
      batch_size_ = from.batch_size_;
    }
    if (cached_has_bits & 0x00000200u) {
      a_min_ = from.a_min_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void LSTMParameter::InternalSwap(LSTMParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(LSTMParameter, scale_out_)
      + sizeof(LSTMParameter::scale_out_)
      - PROTOBUF_FIELD_OFFSET(LSTMParameter, weight_filler_)>(
          reinterpret_cast<char*>(&weight_filler_),
          reinterpret_cast<char*>(&other->weight_filler_));
  swap(a_max_, other->a_max_);
  swap(batch_size_, other->batch_size_);
  swap(a_min_, other->a_min_);
}

::PROTOBUF_NAMESPACE_ID::Metadata LSTMParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[27]);
}

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

class Im2seqParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<Im2seqParameter>()._has_bits_);
  static void set_has_direction(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_size(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_stride(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_line2time_loss(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

Im2seqParameter::Im2seqParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.Im2seqParameter)
}
Im2seqParameter::Im2seqParameter(const Im2seqParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&direction_, &from.direction_,
    static_cast<size_t>(reinterpret_cast<char*>(&stride_) -
    reinterpret_cast<char*>(&direction_)) + sizeof(stride_));
  // @@protoc_insertion_point(copy_constructor:caffe.Im2seqParameter)
}

inline void Im2seqParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&direction_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&line2time_loss_) -
    reinterpret_cast<char*>(&direction_)) + sizeof(line2time_loss_));
size_ = 1u;
stride_ = 1u;
}

Im2seqParameter::~Im2seqParameter() {
  // @@protoc_insertion_point(destructor:caffe.Im2seqParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void Im2seqParameter::ArenaDtor(void* object) {
  Im2seqParameter* _this = reinterpret_cast< Im2seqParameter* >(object);
  (void)_this;
}
void Im2seqParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Im2seqParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    ::memset(&direction_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&line2time_loss_) -
        reinterpret_cast<char*>(&direction_)) + sizeof(line2time_loss_));
    size_ = 1u;
    stride_ = 1u;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Im2seqParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .caffe.Im2seqParameter.Direction direction = 1 [default = FORWARD];
      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(::caffe::Im2seqParameter_Direction_IsValid(val))) {
            _internal_set_direction(static_cast<::caffe::Im2seqParameter_Direction>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional uint32 size = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_size(&has_bits);
          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);
          stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool line2time_loss = 4 [default = false];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_line2time_loss(&has_bits);
          line2time_loss_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .caffe.Im2seqParameter.Direction direction = 1 [default = FORWARD];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_direction(), target);
  }

  // optional uint32 size = 2 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_size(), target);
  }

  // optional uint32 stride = 3 [default = 1];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_stride(), target);
  }

  // optional bool line2time_loss = 4 [default = false];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_line2time_loss(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.Im2seqParameter)
  return target;
}

size_t Im2seqParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.Im2seqParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional .caffe.Im2seqParameter.Direction direction = 1 [default = FORWARD];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_direction());
    }

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

    // optional uint32 size = 2 [default = 1];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_size());
    }

    // optional uint32 stride = 3 [default = 1];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void Im2seqParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<Im2seqParameter *>(to)->MergeFrom(
      static_cast<const Im2seqParameter &>(from));
}


void Im2seqParameter::MergeFrom(const Im2seqParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.Im2seqParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      direction_ = from.direction_;
    }
    if (cached_has_bits & 0x00000002u) {
      line2time_loss_ = from.line2time_loss_;
    }
    if (cached_has_bits & 0x00000004u) {
      size_ = from.size_;
    }
    if (cached_has_bits & 0x00000008u) {
      stride_ = from.stride_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void Im2seqParameter::InternalSwap(Im2seqParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Im2seqParameter, line2time_loss_)
      + sizeof(Im2seqParameter::line2time_loss_)
      - PROTOBUF_FIELD_OFFSET(Im2seqParameter, direction_)>(
          reinterpret_cast<char*>(&direction_),
          reinterpret_cast<char*>(&other->direction_));
  swap(size_, other->size_);
  swap(stride_, other->stride_);
}

::PROTOBUF_NAMESPACE_ID::Metadata Im2seqParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[28]);
}

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

class CenterLossParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<CenterLossParameter>()._has_bits_);
  static void set_has_num_output(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::caffe::FillerParameter& center_filler(const CenterLossParameter* msg);
  static void set_has_center_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_axis(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_distance_type(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::caffe::FillerParameter&
CenterLossParameter::_Internal::center_filler(const CenterLossParameter* msg) {
  return *msg->center_filler_;
}
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString CenterLossParameter::_i_give_permission_to_break_this_code_default_distance_type_{{{"L2", 2}}, {nullptr}};
CenterLossParameter::CenterLossParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.CenterLossParameter)
}
CenterLossParameter::CenterLossParameter(const CenterLossParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  distance_type_.UnsafeSetDefault(nullptr);
  if (from._internal_has_distance_type()) {
    distance_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_distance_type(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_center_filler()) {
    center_filler_ = new ::caffe::FillerParameter(*from.center_filler_);
  } else {
    center_filler_ = nullptr;
  }
  ::memcpy(&num_output_, &from.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
    reinterpret_cast<char*>(&num_output_)) + sizeof(axis_));
  // @@protoc_insertion_point(copy_constructor:caffe.CenterLossParameter)
}

inline void CenterLossParameter::SharedCtor() {
distance_type_.UnsafeSetDefault(nullptr);
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&center_filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&num_output_) -
    reinterpret_cast<char*>(&center_filler_)) + sizeof(num_output_));
axis_ = 1;
}

CenterLossParameter::~CenterLossParameter() {
  // @@protoc_insertion_point(destructor:caffe.CenterLossParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void CenterLossParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  distance_type_.DestroyNoArena(nullptr);
  if (this != internal_default_instance()) delete center_filler_;
}

void CenterLossParameter::ArenaDtor(void* object) {
  CenterLossParameter* _this = reinterpret_cast< CenterLossParameter* >(object);
  (void)_this;
}
void CenterLossParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void CenterLossParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      distance_type_.ClearToDefault(::caffe::CenterLossParameter::_i_give_permission_to_break_this_code_default_distance_type_, GetArenaForAllocation());
       }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(center_filler_ != nullptr);
      center_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x0000000cu) {
    num_output_ = 0u;
    axis_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* CenterLossParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.FillerParameter center_filler = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_center_filler(), ptr);
          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);
          axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string distance_type = 29 [default = "L2"];
      case 29:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 234)) {
          auto str = _internal_mutable_distance_type();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.CenterLossParameter.distance_type");
          #endif  // !NDEBUG
          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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional uint32 num_output = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional .caffe.FillerParameter center_filler = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::center_filler(this), target, stream);
  }

  // optional int32 axis = 3 [default = 1];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_axis(), target);
  }

  // optional string distance_type = 29 [default = "L2"];
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_distance_type().data(), static_cast<int>(this->_internal_distance_type().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "caffe.CenterLossParameter.distance_type");
    target = stream->WriteStringMaybeAliased(
        29, this->_internal_distance_type(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.CenterLossParameter)
  return target;
}

size_t CenterLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.CenterLossParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional string distance_type = 29 [default = "L2"];
    if (cached_has_bits & 0x00000001u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_distance_type());
    }

    // optional .caffe.FillerParameter center_filler = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *center_filler_);
    }

    // optional uint32 num_output = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

    // optional int32 axis = 3 [default = 1];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void CenterLossParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<CenterLossParameter *>(to)->MergeFrom(
      static_cast<const CenterLossParameter &>(from));
}


void CenterLossParameter::MergeFrom(const CenterLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.CenterLossParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_distance_type(from._internal_distance_type());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_center_filler()->::caffe::FillerParameter::MergeFrom(from._internal_center_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      num_output_ = from.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      axis_ = from.axis_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void CenterLossParameter::InternalSwap(CenterLossParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      nullptr,
      &distance_type_, lhs_arena,
      &other->distance_type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(CenterLossParameter, num_output_)
      + sizeof(CenterLossParameter::num_output_)
      - PROTOBUF_FIELD_OFFSET(CenterLossParameter, center_filler_)>(
          reinterpret_cast<char*>(&center_filler_),
          reinterpret_cast<char*>(&other->center_filler_));
  swap(axis_, other->axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata CenterLossParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[29]);
}

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

class Seq2outParameter::_Internal {
 public:
};

Seq2outParameter::Seq2outParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) {
  // @@protoc_insertion_point(arena_constructor:caffe.Seq2outParameter)
}
Seq2outParameter::Seq2outParameter(const Seq2outParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:caffe.Seq2outParameter)
}





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







::PROTOBUF_NAMESPACE_ID::Metadata Seq2outParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[30]);
}

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

class ImgSizeParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ImgSizeParameter>()._has_bits_);
  static void set_has_x_scaling(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_y_scaling(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_pretrained_file(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_pretrained_layer_name(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_pretrained_layer_bin(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

ImgSizeParameter::ImgSizeParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ImgSizeParameter)
}
ImgSizeParameter::ImgSizeParameter(const ImgSizeParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  pretrained_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    pretrained_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_pretrained_file()) {
    pretrained_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_pretrained_file(), 
      GetArenaForAllocation());
  }
  pretrained_layer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    pretrained_layer_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_pretrained_layer_name()) {
    pretrained_layer_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_pretrained_layer_name(), 
      GetArenaForAllocation());
  }
  pretrained_layer_bin_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    pretrained_layer_bin_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_pretrained_layer_bin()) {
    pretrained_layer_bin_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_pretrained_layer_bin(), 
      GetArenaForAllocation());
  }
  ::memcpy(&x_scaling_, &from.x_scaling_,
    static_cast<size_t>(reinterpret_cast<char*>(&y_scaling_) -
    reinterpret_cast<char*>(&x_scaling_)) + sizeof(y_scaling_));
  // @@protoc_insertion_point(copy_constructor:caffe.ImgSizeParameter)
}

inline void ImgSizeParameter::SharedCtor() {
pretrained_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  pretrained_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
pretrained_layer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  pretrained_layer_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
pretrained_layer_bin_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  pretrained_layer_bin_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
x_scaling_ = 1;
y_scaling_ = 1;
}

ImgSizeParameter::~ImgSizeParameter() {
  // @@protoc_insertion_point(destructor:caffe.ImgSizeParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void ImgSizeParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  pretrained_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  pretrained_layer_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  pretrained_layer_bin_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void ImgSizeParameter::ArenaDtor(void* object) {
  ImgSizeParameter* _this = reinterpret_cast< ImgSizeParameter* >(object);
  (void)_this;
}
void ImgSizeParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ImgSizeParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      pretrained_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      pretrained_layer_name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      pretrained_layer_bin_.ClearNonDefaultToEmpty();
    }
    x_scaling_ = 1;
    y_scaling_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ImgSizeParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float x_scaling = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_x_scaling(&has_bits);
          x_scaling_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float y_scaling = 2 [default = 1];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_y_scaling(&has_bits);
          y_scaling_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional string pretrained_file = 500;
      case 500:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
          auto str = _internal_mutable_pretrained_file();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.ImgSizeParameter.pretrained_file");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string pretrained_layer_name = 501;
      case 501:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
          auto str = _internal_mutable_pretrained_layer_name();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.ImgSizeParameter.pretrained_layer_name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional string pretrained_layer_bin = 502;
      case 502:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 178)) {
          auto str = _internal_mutable_pretrained_layer_bin();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.ImgSizeParameter.pretrained_layer_bin");
          #endif  // !NDEBUG
          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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional float x_scaling = 1 [default = 1];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_x_scaling(), target);
  }

  // optional float y_scaling = 2 [default = 1];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_y_scaling(), target);
  }

  // optional string pretrained_file = 500;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_pretrained_file().data(), static_cast<int>(this->_internal_pretrained_file().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "caffe.ImgSizeParameter.pretrained_file");
    target = stream->WriteStringMaybeAliased(
        500, this->_internal_pretrained_file(), target);
  }

  // optional string pretrained_layer_name = 501;
  if (cached_has_bits & 0x00000002u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_pretrained_layer_name().data(), static_cast<int>(this->_internal_pretrained_layer_name().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "caffe.ImgSizeParameter.pretrained_layer_name");
    target = stream->WriteStringMaybeAliased(
        501, this->_internal_pretrained_layer_name(), target);
  }

  // optional string pretrained_layer_bin = 502;
  if (cached_has_bits & 0x00000004u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_pretrained_layer_bin().data(), static_cast<int>(this->_internal_pretrained_layer_bin().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "caffe.ImgSizeParameter.pretrained_layer_bin");
    target = stream->WriteStringMaybeAliased(
        502, this->_internal_pretrained_layer_bin(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ImgSizeParameter)
  return target;
}

size_t ImgSizeParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.ImgSizeParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional string pretrained_file = 500;
    if (cached_has_bits & 0x00000001u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_pretrained_file());
    }

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

    // optional string pretrained_layer_bin = 502;
    if (cached_has_bits & 0x00000004u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_pretrained_layer_bin());
    }

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ImgSizeParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ImgSizeParameter *>(to)->MergeFrom(
      static_cast<const ImgSizeParameter &>(from));
}


void ImgSizeParameter::MergeFrom(const ImgSizeParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ImgSizeParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_pretrained_file(from._internal_pretrained_file());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_pretrained_layer_name(from._internal_pretrained_layer_name());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_pretrained_layer_bin(from._internal_pretrained_layer_bin());
    }
    if (cached_has_bits & 0x00000008u) {
      x_scaling_ = from.x_scaling_;
    }
    if (cached_has_bits & 0x00000010u) {
      y_scaling_ = from.y_scaling_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ImgSizeParameter::InternalSwap(ImgSizeParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &pretrained_file_, lhs_arena,
      &other->pretrained_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &pretrained_layer_name_, lhs_arena,
      &other->pretrained_layer_name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &pretrained_layer_bin_, lhs_arena,
      &other->pretrained_layer_bin_, rhs_arena
  );
  swap(x_scaling_, other->x_scaling_);
  swap(y_scaling_, other->y_scaling_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ImgSizeParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[31]);
}

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

class TransformationParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<TransformationParameter>()._has_bits_);
  static void set_has_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_mirror(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_crop_size(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_crop_h(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_crop_w(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  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] |= 256u;
  }
  static void set_has_force_gray(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::caffe::ResizeParameter& resize_param(const TransformationParameter* msg);
  static void set_has_resize_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::caffe::NoiseParameter& noise_param(const TransformationParameter* msg);
  static void set_has_noise_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::caffe::DistortionParameter& distort_param(const TransformationParameter* msg);
  static void set_has_distort_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::caffe::ExpansionParameter& expand_param(const TransformationParameter* msg);
  static void set_has_expand_param(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::caffe::EmitConstraint& emit_constraint(const TransformationParameter* msg);
  static void set_has_emit_constraint(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

const ::caffe::ResizeParameter&
TransformationParameter::_Internal::resize_param(const TransformationParameter* msg) {
  return *msg->resize_param_;
}
const ::caffe::NoiseParameter&
TransformationParameter::_Internal::noise_param(const TransformationParameter* msg) {
  return *msg->noise_param_;
}
const ::caffe::DistortionParameter&
TransformationParameter::_Internal::distort_param(const TransformationParameter* msg) {
  return *msg->distort_param_;
}
const ::caffe::ExpansionParameter&
TransformationParameter::_Internal::expand_param(const TransformationParameter* msg) {
  return *msg->expand_param_;
}
const ::caffe::EmitConstraint&
TransformationParameter::_Internal::emit_constraint(const TransformationParameter* msg) {
  return *msg->emit_constraint_;
}
TransformationParameter::TransformationParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  mean_value_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.TransformationParameter)
}
TransformationParameter::TransformationParameter(const TransformationParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      mean_value_(from.mean_value_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_mean_file()) {
    mean_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_mean_file(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_resize_param()) {
    resize_param_ = new ::caffe::ResizeParameter(*from.resize_param_);
  } else {
    resize_param_ = nullptr;
  }
  if (from._internal_has_noise_param()) {
    noise_param_ = new ::caffe::NoiseParameter(*from.noise_param_);
  } else {
    noise_param_ = nullptr;
  }
  if (from._internal_has_emit_constraint()) {
    emit_constraint_ = new ::caffe::EmitConstraint(*from.emit_constraint_);
  } else {
    emit_constraint_ = nullptr;
  }
  if (from._internal_has_distort_param()) {
    distort_param_ = new ::caffe::DistortionParameter(*from.distort_param_);
  } else {
    distort_param_ = nullptr;
  }
  if (from._internal_has_expand_param()) {
    expand_param_ = new ::caffe::ExpansionParameter(*from.expand_param_);
  } else {
    expand_param_ = nullptr;
  }
  ::memcpy(&crop_size_, &from.crop_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&scale_) -
    reinterpret_cast<char*>(&crop_size_)) + sizeof(scale_));
  // @@protoc_insertion_point(copy_constructor:caffe.TransformationParameter)
}

inline void TransformationParameter::SharedCtor() {
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&resize_param_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&crop_w_) -
    reinterpret_cast<char*>(&resize_param_)) + sizeof(crop_w_));
scale_ = 1;
}

TransformationParameter::~TransformationParameter() {
  // @@protoc_insertion_point(destructor:caffe.TransformationParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void TransformationParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  mean_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete resize_param_;
  if (this != internal_default_instance()) delete noise_param_;
  if (this != internal_default_instance()) delete emit_constraint_;
  if (this != internal_default_instance()) delete distort_param_;
  if (this != internal_default_instance()) delete expand_param_;
}

void TransformationParameter::ArenaDtor(void* object) {
  TransformationParameter* _this = reinterpret_cast< TransformationParameter* >(object);
  (void)_this;
}
void TransformationParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TransformationParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  mean_value_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      mean_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(resize_param_ != nullptr);
      resize_param_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(noise_param_ != nullptr);
      noise_param_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(emit_constraint_ != nullptr);
      emit_constraint_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      GOOGLE_DCHECK(distort_param_ != nullptr);
      distort_param_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      GOOGLE_DCHECK(expand_param_ != nullptr);
      expand_param_->Clear();
    }
  }
  if (cached_has_bits & 0x000000c0u) {
    ::memset(&crop_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&mirror_) -
        reinterpret_cast<char*>(&crop_size_)) + sizeof(mirror_));
  }
  if (cached_has_bits & 0x00001f00u) {
    ::memset(&force_color_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&crop_w_) -
        reinterpret_cast<char*>(&force_color_)) + sizeof(crop_w_));
    scale_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TransformationParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.TransformationParameter.mean_file");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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);
          force_gray_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.ResizeParameter resize_param = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
          ptr = ctx->ParseMessage(_internal_mutable_resize_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.NoiseParameter noise_param = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_noise_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.EmitConstraint emit_constraint = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_emit_constraint(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 crop_h = 11 [default = 0];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_crop_h(&has_bits);
          crop_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 crop_w = 12 [default = 0];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_crop_w(&has_bits);
          crop_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.DistortionParameter distort_param = 13;
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
          ptr = ctx->ParseMessage(_internal_mutable_distort_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.ExpansionParameter expand_param = 14;
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
          ptr = ctx->ParseMessage(_internal_mutable_expand_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:
  _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:caffe.TransformationParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional uint32 crop_size = 3 [default = 0];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_mean_value(i), target);
  }

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

  // optional bool force_gray = 7 [default = false];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_force_gray(), target);
  }

  // optional .caffe.ResizeParameter resize_param = 8;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        8, _Internal::resize_param(this), target, stream);
  }

  // optional .caffe.NoiseParameter noise_param = 9;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        9, _Internal::noise_param(this), target, stream);
  }

  // optional .caffe.EmitConstraint emit_constraint = 10;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        10, _Internal::emit_constraint(this), target, stream);
  }

  // optional uint32 crop_h = 11 [default = 0];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(11, this->_internal_crop_h(), target);
  }

  // optional uint32 crop_w = 12 [default = 0];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(12, this->_internal_crop_w(), target);
  }

  // optional .caffe.DistortionParameter distort_param = 13;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        13, _Internal::distort_param(this), target, stream);
  }

  // optional .caffe.ExpansionParameter expand_param = 14;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        14, _Internal::expand_param(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.TransformationParameter)
  return target;
}

size_t TransformationParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_mean_value_size());
    total_size += data_size;
  }

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

    // optional .caffe.ResizeParameter resize_param = 8;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *resize_param_);
    }

    // optional .caffe.NoiseParameter noise_param = 9;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *noise_param_);
    }

    // optional .caffe.EmitConstraint emit_constraint = 10;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *emit_constraint_);
    }

    // optional .caffe.DistortionParameter distort_param = 13;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *distort_param_);
    }

    // optional .caffe.ExpansionParameter expand_param = 14;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *expand_param_);
    }

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

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

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

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

    // optional uint32 crop_h = 11 [default = 0];
    if (cached_has_bits & 0x00000400u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_h());
    }

    // optional uint32 crop_w = 12 [default = 0];
    if (cached_has_bits & 0x00000800u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_w());
    }

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void TransformationParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<TransformationParameter *>(to)->MergeFrom(
      static_cast<const TransformationParameter &>(from));
}


void TransformationParameter::MergeFrom(const TransformationParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.TransformationParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  mean_value_.MergeFrom(from.mean_value_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_mean_file(from._internal_mean_file());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_resize_param()->::caffe::ResizeParameter::MergeFrom(from._internal_resize_param());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_noise_param()->::caffe::NoiseParameter::MergeFrom(from._internal_noise_param());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_mutable_emit_constraint()->::caffe::EmitConstraint::MergeFrom(from._internal_emit_constraint());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_mutable_distort_param()->::caffe::DistortionParameter::MergeFrom(from._internal_distort_param());
    }
    if (cached_has_bits & 0x00000020u) {
      _internal_mutable_expand_param()->::caffe::ExpansionParameter::MergeFrom(from._internal_expand_param());
    }
    if (cached_has_bits & 0x00000040u) {
      crop_size_ = from.crop_size_;
    }
    if (cached_has_bits & 0x00000080u) {
      mirror_ = from.mirror_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00001f00u) {
    if (cached_has_bits & 0x00000100u) {
      force_color_ = from.force_color_;
    }
    if (cached_has_bits & 0x00000200u) {
      force_gray_ = from.force_gray_;
    }
    if (cached_has_bits & 0x00000400u) {
      crop_h_ = from.crop_h_;
    }
    if (cached_has_bits & 0x00000800u) {
      crop_w_ = from.crop_w_;
    }
    if (cached_has_bits & 0x00001000u) {
      scale_ = from.scale_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TransformationParameter::CopyFrom(const TransformationParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  mean_value_.InternalSwap(&other->mean_value_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &mean_file_, lhs_arena,
      &other->mean_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(TransformationParameter, crop_w_)
      + sizeof(TransformationParameter::crop_w_)
      - PROTOBUF_FIELD_OFFSET(TransformationParameter, resize_param_)>(
          reinterpret_cast<char*>(&resize_param_),
          reinterpret_cast<char*>(&other->resize_param_));
  swap(scale_, other->scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata TransformationParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[32]);
}

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

class ResizeParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ResizeParameter>()._has_bits_);
  static void set_has_prob(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_resize_mode(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_height(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_width(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_height_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_width_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_pad_mode(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
};

ResizeParameter::ResizeParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  pad_value_(arena),
  interp_mode_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ResizeParameter)
}
ResizeParameter::ResizeParameter(const ResizeParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      pad_value_(from.pad_value_),
      interp_mode_(from.interp_mode_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&height_, &from.height_,
    static_cast<size_t>(reinterpret_cast<char*>(&resize_mode_) -
    reinterpret_cast<char*>(&height_)) + sizeof(resize_mode_));
  // @@protoc_insertion_point(copy_constructor:caffe.ResizeParameter)
}

inline void ResizeParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&height_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&width_scale_) -
    reinterpret_cast<char*>(&height_)) + sizeof(width_scale_));
pad_mode_ = 1;
prob_ = 1;
resize_mode_ = 1;
}

ResizeParameter::~ResizeParameter() {
  // @@protoc_insertion_point(destructor:caffe.ResizeParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ResizeParameter::ArenaDtor(void* object) {
  ResizeParameter* _this = reinterpret_cast< ResizeParameter* >(object);
  (void)_this;
}
void ResizeParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ResizeParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  pad_value_.Clear();
  interp_mode_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    ::memset(&height_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&width_scale_) -
        reinterpret_cast<char*>(&height_)) + sizeof(width_scale_));
    pad_mode_ = 1;
    prob_ = 1;
    resize_mode_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ResizeParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float prob = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_prob(&has_bits);
          prob_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.ResizeParameter.Resize_mode resize_mode = 2 [default = WARP];
      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(::caffe::ResizeParameter_Resize_mode_IsValid(val))) {
            _internal_set_resize_mode(static_cast<::caffe::ResizeParameter_Resize_mode>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional uint32 height = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_height(&has_bits);
          height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 width = 4 [default = 0];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_width(&has_bits);
          width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.ResizeParameter.Pad_mode pad_mode = 5 [default = CONSTANT];
      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(::caffe::ResizeParameter_Pad_mode_IsValid(val))) {
            _internal_set_pad_mode(static_cast<::caffe::ResizeParameter_Pad_mode>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // repeated float pad_value = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_pad_value(::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_pad_value(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated .caffe.ResizeParameter.Interp_mode interp_mode = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          ptr -= 1;
          do {
            ptr += 1;
            uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
            CHK_(ptr);
            if (PROTOBUF_PREDICT_TRUE(::caffe::ResizeParameter_Interp_mode_IsValid(val))) {
              _internal_add_interp_mode(static_cast<::caffe::ResizeParameter_Interp_mode>(val));
            } else {
              ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(7, val, mutable_unknown_fields());
            }
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<56>(ptr));
        } else if (static_cast<uint8_t>(tag) == 58) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(_internal_mutable_interp_mode(), ptr, ctx, ::caffe::ResizeParameter_Interp_mode_IsValid, &_internal_metadata_, 7);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 height_scale = 8 [default = 0];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_height_scale(&has_bits);
          height_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 width_scale = 9 [default = 0];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_width_scale(&has_bits);
          width_scale_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional float prob = 1 [default = 1];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_prob(), target);
  }

  // optional .caffe.ResizeParameter.Resize_mode resize_mode = 2 [default = WARP];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      2, this->_internal_resize_mode(), target);
  }

  // optional uint32 height = 3 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_height(), target);
  }

  // optional uint32 width = 4 [default = 0];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_width(), target);
  }

  // optional .caffe.ResizeParameter.Pad_mode pad_mode = 5 [default = CONSTANT];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      5, this->_internal_pad_mode(), target);
  }

  // repeated float pad_value = 6;
  for (int i = 0, n = this->_internal_pad_value_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_pad_value(i), target);
  }

  // repeated .caffe.ResizeParameter.Interp_mode interp_mode = 7;
  for (int i = 0, n = this->_internal_interp_mode_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
        7, this->_internal_interp_mode(i), target);
  }

  // optional uint32 height_scale = 8 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(8, this->_internal_height_scale(), target);
  }

  // optional uint32 width_scale = 9 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(9, this->_internal_width_scale(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ResizeParameter)
  return target;
}

size_t ResizeParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.ResizeParameter)
  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 pad_value = 6;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_pad_value_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_pad_value_size());
    total_size += data_size;
  }

  // repeated .caffe.ResizeParameter.Interp_mode interp_mode = 7;
  {
    size_t data_size = 0;
    unsigned int count = static_cast<unsigned int>(this->_internal_interp_mode_size());for (unsigned int i = 0; i < count; i++) {
      data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
        this->_internal_interp_mode(static_cast<int>(i)));
    }
    total_size += (1UL * count) + data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    // optional uint32 height = 3 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_height());
    }

    // optional uint32 width = 4 [default = 0];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_width());
    }

    // optional uint32 height_scale = 8 [default = 0];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_height_scale());
    }

    // optional uint32 width_scale = 9 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_width_scale());
    }

    // optional .caffe.ResizeParameter.Pad_mode pad_mode = 5 [default = CONSTANT];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_pad_mode());
    }

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

    // optional .caffe.ResizeParameter.Resize_mode resize_mode = 2 [default = WARP];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_resize_mode());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ResizeParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ResizeParameter *>(to)->MergeFrom(
      static_cast<const ResizeParameter &>(from));
}


void ResizeParameter::MergeFrom(const ResizeParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ResizeParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  pad_value_.MergeFrom(from.pad_value_);
  interp_mode_.MergeFrom(from.interp_mode_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      height_ = from.height_;
    }
    if (cached_has_bits & 0x00000002u) {
      width_ = from.width_;
    }
    if (cached_has_bits & 0x00000004u) {
      height_scale_ = from.height_scale_;
    }
    if (cached_has_bits & 0x00000008u) {
      width_scale_ = from.width_scale_;
    }
    if (cached_has_bits & 0x00000010u) {
      pad_mode_ = from.pad_mode_;
    }
    if (cached_has_bits & 0x00000020u) {
      prob_ = from.prob_;
    }
    if (cached_has_bits & 0x00000040u) {
      resize_mode_ = from.resize_mode_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ResizeParameter::InternalSwap(ResizeParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  pad_value_.InternalSwap(&other->pad_value_);
  interp_mode_.InternalSwap(&other->interp_mode_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ResizeParameter, width_scale_)
      + sizeof(ResizeParameter::width_scale_)
      - PROTOBUF_FIELD_OFFSET(ResizeParameter, height_)>(
          reinterpret_cast<char*>(&height_),
          reinterpret_cast<char*>(&other->height_));
  swap(pad_mode_, other->pad_mode_);
  swap(prob_, other->prob_);
  swap(resize_mode_, other->resize_mode_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ResizeParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[33]);
}

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

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

SaltPepperParameter::SaltPepperParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  value_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.SaltPepperParameter)
}
SaltPepperParameter::SaltPepperParameter(const SaltPepperParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      value_(from.value_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  fraction_ = from.fraction_;
  // @@protoc_insertion_point(copy_constructor:caffe.SaltPepperParameter)
}

inline void SaltPepperParameter::SharedCtor() {
fraction_ = 0;
}

SaltPepperParameter::~SaltPepperParameter() {
  // @@protoc_insertion_point(destructor:caffe.SaltPepperParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void SaltPepperParameter::ArenaDtor(void* object) {
  SaltPepperParameter* _this = reinterpret_cast< SaltPepperParameter* >(object);
  (void)_this;
}
void SaltPepperParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SaltPepperParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  value_.Clear();
  fraction_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SaltPepperParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float fraction = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_fraction(&has_bits);
          fraction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated float value = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_value(::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_value(), 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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional float fraction = 1 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_fraction(), target);
  }

  // repeated float value = 2;
  for (int i = 0, n = this->_internal_value_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_value(i), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.SaltPepperParameter)
  return target;
}

size_t SaltPepperParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.SaltPepperParameter)
  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 value = 2;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_value_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_value_size());
    total_size += data_size;
  }

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

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void SaltPepperParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SaltPepperParameter *>(to)->MergeFrom(
      static_cast<const SaltPepperParameter &>(from));
}


void SaltPepperParameter::MergeFrom(const SaltPepperParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SaltPepperParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  value_.MergeFrom(from.value_);
  if (from._internal_has_fraction()) {
    _internal_set_fraction(from._internal_fraction());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void SaltPepperParameter::InternalSwap(SaltPepperParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  value_.InternalSwap(&other->value_);
  swap(fraction_, other->fraction_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SaltPepperParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[34]);
}

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

class NoiseParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<NoiseParameter>()._has_bits_);
  static void set_has_prob(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_hist_eq(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_inverse(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_decolorize(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_gauss_blur(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_jpeg(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_posterize(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_erode(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_saltpepper(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::caffe::SaltPepperParameter& saltpepper_param(const NoiseParameter* msg);
  static void set_has_saltpepper_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_clahe(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_convert_to_hsv(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_convert_to_lab(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
};

const ::caffe::SaltPepperParameter&
NoiseParameter::_Internal::saltpepper_param(const NoiseParameter* msg) {
  return *msg->saltpepper_param_;
}
NoiseParameter::NoiseParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.NoiseParameter)
}
NoiseParameter::NoiseParameter(const NoiseParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_saltpepper_param()) {
    saltpepper_param_ = new ::caffe::SaltPepperParameter(*from.saltpepper_param_);
  } else {
    saltpepper_param_ = nullptr;
  }
  ::memcpy(&prob_, &from.prob_,
    static_cast<size_t>(reinterpret_cast<char*>(&jpeg_) -
    reinterpret_cast<char*>(&prob_)) + sizeof(jpeg_));
  // @@protoc_insertion_point(copy_constructor:caffe.NoiseParameter)
}

inline void NoiseParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&saltpepper_param_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&convert_to_lab_) -
    reinterpret_cast<char*>(&saltpepper_param_)) + sizeof(convert_to_lab_));
jpeg_ = -1;
}

NoiseParameter::~NoiseParameter() {
  // @@protoc_insertion_point(destructor:caffe.NoiseParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void NoiseParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete saltpepper_param_;
}

void NoiseParameter::ArenaDtor(void* object) {
  NoiseParameter* _this = reinterpret_cast< NoiseParameter* >(object);
  (void)_this;
}
void NoiseParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NoiseParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(saltpepper_param_ != nullptr);
    saltpepper_param_->Clear();
  }
  if (cached_has_bits & 0x000000feu) {
    ::memset(&prob_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&erode_) -
        reinterpret_cast<char*>(&prob_)) + sizeof(erode_));
  }
  if (cached_has_bits & 0x00001f00u) {
    ::memset(&saltpepper_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&convert_to_lab_) -
        reinterpret_cast<char*>(&saltpepper_)) + sizeof(convert_to_lab_));
    jpeg_ = -1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* NoiseParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float prob = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_prob(&has_bits);
          prob_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool hist_eq = 2 [default = false];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_hist_eq(&has_bits);
          hist_eq_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool inverse = 3 [default = false];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_inverse(&has_bits);
          inverse_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool decolorize = 4 [default = false];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_decolorize(&has_bits);
          decolorize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool gauss_blur = 5 [default = false];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_gauss_blur(&has_bits);
          gauss_blur_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float jpeg = 6 [default = -1];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
          _Internal::set_has_jpeg(&has_bits);
          jpeg_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool posterize = 7 [default = false];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_posterize(&has_bits);
          posterize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool erode = 8 [default = false];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_erode(&has_bits);
          erode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool saltpepper = 9 [default = false];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_saltpepper(&has_bits);
          saltpepper_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.SaltPepperParameter saltpepper_param = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_saltpepper_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool clahe = 11 [default = false];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_clahe(&has_bits);
          clahe_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool convert_to_hsv = 12 [default = false];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_convert_to_hsv(&has_bits);
          convert_to_hsv_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool convert_to_lab = 13 [default = false];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_convert_to_lab(&has_bits);
          convert_to_lab_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional float prob = 1 [default = 0];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_prob(), target);
  }

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

  // optional bool inverse = 3 [default = false];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_inverse(), target);
  }

  // optional bool decolorize = 4 [default = false];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_decolorize(), target);
  }

  // optional bool gauss_blur = 5 [default = false];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_gauss_blur(), target);
  }

  // optional float jpeg = 6 [default = -1];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_jpeg(), target);
  }

  // optional bool posterize = 7 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_posterize(), target);
  }

  // optional bool erode = 8 [default = false];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_erode(), target);
  }

  // optional bool saltpepper = 9 [default = false];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_saltpepper(), target);
  }

  // optional .caffe.SaltPepperParameter saltpepper_param = 10;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        10, _Internal::saltpepper_param(this), target, stream);
  }

  // optional bool clahe = 11 [default = false];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_clahe(), target);
  }

  // optional bool convert_to_hsv = 12 [default = false];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_convert_to_hsv(), target);
  }

  // optional bool convert_to_lab = 13 [default = false];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_convert_to_lab(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.NoiseParameter)
  return target;
}

size_t NoiseParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.NoiseParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .caffe.SaltPepperParameter saltpepper_param = 10;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *saltpepper_param_);
    }

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

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

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

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

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

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

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

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

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

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

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void NoiseParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<NoiseParameter *>(to)->MergeFrom(
      static_cast<const NoiseParameter &>(from));
}


void NoiseParameter::MergeFrom(const NoiseParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NoiseParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_saltpepper_param()->::caffe::SaltPepperParameter::MergeFrom(from._internal_saltpepper_param());
    }
    if (cached_has_bits & 0x00000002u) {
      prob_ = from.prob_;
    }
    if (cached_has_bits & 0x00000004u) {
      hist_eq_ = from.hist_eq_;
    }
    if (cached_has_bits & 0x00000008u) {
      inverse_ = from.inverse_;
    }
    if (cached_has_bits & 0x00000010u) {
      decolorize_ = from.decolorize_;
    }
    if (cached_has_bits & 0x00000020u) {
      gauss_blur_ = from.gauss_blur_;
    }
    if (cached_has_bits & 0x00000040u) {
      posterize_ = from.posterize_;
    }
    if (cached_has_bits & 0x00000080u) {
      erode_ = from.erode_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00001f00u) {
    if (cached_has_bits & 0x00000100u) {
      saltpepper_ = from.saltpepper_;
    }
    if (cached_has_bits & 0x00000200u) {
      clahe_ = from.clahe_;
    }
    if (cached_has_bits & 0x00000400u) {
      convert_to_hsv_ = from.convert_to_hsv_;
    }
    if (cached_has_bits & 0x00000800u) {
      convert_to_lab_ = from.convert_to_lab_;
    }
    if (cached_has_bits & 0x00001000u) {
      jpeg_ = from.jpeg_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata NoiseParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[35]);
}

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

class DistortionParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<DistortionParameter>()._has_bits_);
  static void set_has_brightness_prob(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_brightness_delta(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_contrast_prob(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_contrast_lower(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_contrast_upper(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_hue_prob(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_hue_delta(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_saturation_prob(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_saturation_lower(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_saturation_upper(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_random_order_prob(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
};

DistortionParameter::DistortionParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.DistortionParameter)
}
DistortionParameter::DistortionParameter(const DistortionParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&brightness_prob_, &from.brightness_prob_,
    static_cast<size_t>(reinterpret_cast<char*>(&random_order_prob_) -
    reinterpret_cast<char*>(&brightness_prob_)) + sizeof(random_order_prob_));
  // @@protoc_insertion_point(copy_constructor:caffe.DistortionParameter)
}

inline void DistortionParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&brightness_prob_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&random_order_prob_) -
    reinterpret_cast<char*>(&brightness_prob_)) + sizeof(random_order_prob_));
}

DistortionParameter::~DistortionParameter() {
  // @@protoc_insertion_point(destructor:caffe.DistortionParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void DistortionParameter::ArenaDtor(void* object) {
  DistortionParameter* _this = reinterpret_cast< DistortionParameter* >(object);
  (void)_this;
}
void DistortionParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DistortionParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    ::memset(&brightness_prob_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&saturation_prob_) -
        reinterpret_cast<char*>(&brightness_prob_)) + sizeof(saturation_prob_));
  }
  if (cached_has_bits & 0x00000700u) {
    ::memset(&saturation_lower_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&random_order_prob_) -
        reinterpret_cast<char*>(&saturation_lower_)) + sizeof(random_order_prob_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DistortionParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float brightness_prob = 1 [default = 0];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_brightness_prob(&has_bits);
          brightness_prob_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float brightness_delta = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_brightness_delta(&has_bits);
          brightness_delta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float contrast_prob = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_contrast_prob(&has_bits);
          contrast_prob_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float contrast_lower = 4 [default = 0];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          _Internal::set_has_contrast_lower(&has_bits);
          contrast_lower_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float contrast_upper = 5 [default = 0];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
          _Internal::set_has_contrast_upper(&has_bits);
          contrast_upper_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float hue_prob = 6 [default = 0];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
          _Internal::set_has_hue_prob(&has_bits);
          hue_prob_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float hue_delta = 7 [default = 0];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
          _Internal::set_has_hue_delta(&has_bits);
          hue_delta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float saturation_prob = 8 [default = 0];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
          _Internal::set_has_saturation_prob(&has_bits);
          saturation_prob_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float saturation_lower = 9 [default = 0];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 77)) {
          _Internal::set_has_saturation_lower(&has_bits);
          saturation_lower_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float saturation_upper = 10 [default = 0];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 85)) {
          _Internal::set_has_saturation_upper(&has_bits);
          saturation_upper_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float random_order_prob = 11 [default = 0];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 93)) {
          _Internal::set_has_random_order_prob(&has_bits);
          random_order_prob_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional float brightness_prob = 1 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_brightness_prob(), target);
  }

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

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

  // optional float contrast_lower = 4 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_contrast_lower(), target);
  }

  // optional float contrast_upper = 5 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_contrast_upper(), target);
  }

  // optional float hue_prob = 6 [default = 0];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_hue_prob(), target);
  }

  // optional float hue_delta = 7 [default = 0];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_hue_delta(), target);
  }

  // optional float saturation_prob = 8 [default = 0];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_saturation_prob(), target);
  }

  // optional float saturation_lower = 9 [default = 0];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(9, this->_internal_saturation_lower(), target);
  }

  // optional float saturation_upper = 10 [default = 0];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_saturation_upper(), target);
  }

  // optional float random_order_prob = 11 [default = 0];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_random_order_prob(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.DistortionParameter)
  return target;
}

size_t DistortionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.DistortionParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional float brightness_prob = 1 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

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

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

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

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

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

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

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

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

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void DistortionParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<DistortionParameter *>(to)->MergeFrom(
      static_cast<const DistortionParameter &>(from));
}


void DistortionParameter::MergeFrom(const DistortionParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.DistortionParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      brightness_prob_ = from.brightness_prob_;
    }
    if (cached_has_bits & 0x00000002u) {
      brightness_delta_ = from.brightness_delta_;
    }
    if (cached_has_bits & 0x00000004u) {
      contrast_prob_ = from.contrast_prob_;
    }
    if (cached_has_bits & 0x00000008u) {
      contrast_lower_ = from.contrast_lower_;
    }
    if (cached_has_bits & 0x00000010u) {
      contrast_upper_ = from.contrast_upper_;
    }
    if (cached_has_bits & 0x00000020u) {
      hue_prob_ = from.hue_prob_;
    }
    if (cached_has_bits & 0x00000040u) {
      hue_delta_ = from.hue_delta_;
    }
    if (cached_has_bits & 0x00000080u) {
      saturation_prob_ = from.saturation_prob_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000700u) {
    if (cached_has_bits & 0x00000100u) {
      saturation_lower_ = from.saturation_lower_;
    }
    if (cached_has_bits & 0x00000200u) {
      saturation_upper_ = from.saturation_upper_;
    }
    if (cached_has_bits & 0x00000400u) {
      random_order_prob_ = from.random_order_prob_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata DistortionParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[36]);
}

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

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

ExpansionParameter::ExpansionParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ExpansionParameter)
}
ExpansionParameter::ExpansionParameter(const ExpansionParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&prob_, &from.prob_,
    static_cast<size_t>(reinterpret_cast<char*>(&max_expand_ratio_) -
    reinterpret_cast<char*>(&prob_)) + sizeof(max_expand_ratio_));
  // @@protoc_insertion_point(copy_constructor:caffe.ExpansionParameter)
}

inline void ExpansionParameter::SharedCtor() {
prob_ = 1;
max_expand_ratio_ = 1;
}

ExpansionParameter::~ExpansionParameter() {
  // @@protoc_insertion_point(destructor:caffe.ExpansionParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ExpansionParameter::ArenaDtor(void* object) {
  ExpansionParameter* _this = reinterpret_cast< ExpansionParameter* >(object);
  (void)_this;
}
void ExpansionParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ExpansionParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    prob_ = 1;
    max_expand_ratio_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

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

  cached_has_bits = _has_bits_[0];
  // optional float prob = 1 [default = 1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_prob(), target);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ExpansionParameter)
  return target;
}

size_t ExpansionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.ExpansionParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional float prob = 1 [default = 1];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ExpansionParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ExpansionParameter *>(to)->MergeFrom(
      static_cast<const ExpansionParameter &>(from));
}


void ExpansionParameter::MergeFrom(const ExpansionParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ExpansionParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      prob_ = from.prob_;
    }
    if (cached_has_bits & 0x00000002u) {
      max_expand_ratio_ = from.max_expand_ratio_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void ExpansionParameter::InternalSwap(ExpansionParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(prob_, other->prob_);
  swap(max_expand_ratio_, other->max_expand_ratio_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ExpansionParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[37]);
}

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

class LossParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<LossParameter>()._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;
  }
  static void set_has_is_num_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
};

LossParameter::LossParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.LossParameter)
}
LossParameter::LossParameter(const LossParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&ignore_label_, &from.ignore_label_,
    static_cast<size_t>(reinterpret_cast<char*>(&is_num_scale_) -
    reinterpret_cast<char*>(&ignore_label_)) + sizeof(is_num_scale_));
  // @@protoc_insertion_point(copy_constructor:caffe.LossParameter)
}

inline void LossParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&ignore_label_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&normalize_) -
    reinterpret_cast<char*>(&ignore_label_)) + sizeof(normalize_));
normalization_ = 1;
is_num_scale_ = true;
}

LossParameter::~LossParameter() {
  // @@protoc_insertion_point(destructor:caffe.LossParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void LossParameter::ArenaDtor(void* object) {
  LossParameter* _this = reinterpret_cast< LossParameter* >(object);
  (void)_this;
}
void LossParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LossParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* LossParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          normalize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::LossParameter_NormalizationMode_IsValid(val))) {
            _internal_set_normalization(static_cast<::caffe::LossParameter_NormalizationMode>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional bool is_num_scale = 4 [default = true];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_is_num_scale(&has_bits);
          is_num_scale_ = ::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:
  _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:caffe.LossParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

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

  // optional .caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      3, this->_internal_normalization(), target);
  }

  // optional bool is_num_scale = 4 [default = true];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_is_num_scale(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.LossParameter)
  return target;
}

size_t LossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional int32 ignore_label = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_ignore_label());
    }

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

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void LossParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<LossParameter *>(to)->MergeFrom(
      static_cast<const LossParameter &>(from));
}


void LossParameter::MergeFrom(const LossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LossParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void LossParameter::CopyFrom(const LossParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(LossParameter, normalize_)
      + sizeof(LossParameter::normalize_)
      - PROTOBUF_FIELD_OFFSET(LossParameter, ignore_label_)>(
          reinterpret_cast<char*>(&ignore_label_),
          reinterpret_cast<char*>(&other->ignore_label_));
  swap(normalization_, other->normalization_);
  swap(is_num_scale_, other->is_num_scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata LossParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[38]);
}

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

class AccuracyParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<AccuracyParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.AccuracyParameter)
}
AccuracyParameter::AccuracyParameter(const AccuracyParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&ignore_label_, &from.ignore_label_,
    static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
    reinterpret_cast<char*>(&ignore_label_)) + sizeof(axis_));
  // @@protoc_insertion_point(copy_constructor:caffe.AccuracyParameter)
}

inline void AccuracyParameter::SharedCtor() {
ignore_label_ = 0;
top_k_ = 1u;
axis_ = 1;
}

AccuracyParameter::~AccuracyParameter() {
  // @@protoc_insertion_point(destructor:caffe.AccuracyParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void AccuracyParameter::ArenaDtor(void* object) {
  AccuracyParameter* _this = reinterpret_cast< AccuracyParameter* >(object);
  (void)_this;
}
void AccuracyParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void AccuracyParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* AccuracyParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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:
  _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:caffe.AccuracyParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 top_k = 1 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_top_k(), target);
  }

  // optional int32 axis = 2 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), target);
  }

  // optional int32 ignore_label = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_ignore_label(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.AccuracyParameter)
  return target;
}

size_t AccuracyParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional int32 ignore_label = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_ignore_label());
    }

    // optional uint32 top_k = 1 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_top_k());
    }

    // optional int32 axis = 2 [default = 1];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void AccuracyParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<AccuracyParameter *>(to)->MergeFrom(
      static_cast<const AccuracyParameter &>(from));
}


void AccuracyParameter::MergeFrom(const AccuracyParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.AccuracyParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void AccuracyParameter::CopyFrom(const AccuracyParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(ignore_label_, other->ignore_label_);
  swap(top_k_, other->top_k_);
  swap(axis_, other->axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata AccuracyParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[39]);
}

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

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

AnnotatedDataParameter::AnnotatedDataParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  batch_sampler_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.AnnotatedDataParameter)
}
AnnotatedDataParameter::AnnotatedDataParameter(const AnnotatedDataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      batch_sampler_(from.batch_sampler_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  label_map_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    label_map_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_label_map_file()) {
    label_map_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_label_map_file(), 
      GetArenaForAllocation());
  }
  anno_type_ = from.anno_type_;
  // @@protoc_insertion_point(copy_constructor:caffe.AnnotatedDataParameter)
}

inline void AnnotatedDataParameter::SharedCtor() {
label_map_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  label_map_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
anno_type_ = 0;
}

AnnotatedDataParameter::~AnnotatedDataParameter() {
  // @@protoc_insertion_point(destructor:caffe.AnnotatedDataParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void AnnotatedDataParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  label_map_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void AnnotatedDataParameter::ArenaDtor(void* object) {
  AnnotatedDataParameter* _this = reinterpret_cast< AnnotatedDataParameter* >(object);
  (void)_this;
}
void AnnotatedDataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void AnnotatedDataParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  batch_sampler_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    label_map_file_.ClearNonDefaultToEmpty();
  }
  anno_type_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* AnnotatedDataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .caffe.BatchSampler batch_sampler = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_batch_sampler(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
        } else
          goto handle_unusual;
        continue;
      // optional string label_map_file = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
          auto str = _internal_mutable_label_map_file();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.AnnotatedDataParameter.label_map_file");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.AnnotatedDatum.AnnotationType anno_type = 3;
      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(::caffe::AnnotatedDatum_AnnotationType_IsValid(val))) {
            _internal_set_anno_type(static_cast<::caffe::AnnotatedDatum_AnnotationType>(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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  // repeated .caffe.BatchSampler batch_sampler = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_batch_sampler_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_batch_sampler(i), target, stream);
  }

  cached_has_bits = _has_bits_[0];
  // optional string label_map_file = 2;
  if (cached_has_bits & 0x00000001u) {
    ::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,
      "caffe.AnnotatedDataParameter.label_map_file");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_label_map_file(), target);
  }

  // optional .caffe.AnnotatedDatum.AnnotationType anno_type = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      3, this->_internal_anno_type(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.AnnotatedDataParameter)
  return target;
}

size_t AnnotatedDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.AnnotatedDataParameter)
  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 .caffe.BatchSampler batch_sampler = 1;
  total_size += 1UL * this->_internal_batch_sampler_size();
  for (const auto& msg : this->batch_sampler_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional string label_map_file = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_label_map_file());
    }

    // optional .caffe.AnnotatedDatum.AnnotationType anno_type = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_anno_type());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void AnnotatedDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<AnnotatedDataParameter *>(to)->MergeFrom(
      static_cast<const AnnotatedDataParameter &>(from));
}


void AnnotatedDataParameter::MergeFrom(const AnnotatedDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.AnnotatedDataParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  batch_sampler_.MergeFrom(from.batch_sampler_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_label_map_file(from._internal_label_map_file());
    }
    if (cached_has_bits & 0x00000002u) {
      anno_type_ = from.anno_type_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void AnnotatedDataParameter::InternalSwap(AnnotatedDataParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  batch_sampler_.InternalSwap(&other->batch_sampler_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &label_map_file_, lhs_arena,
      &other->label_map_file_, rhs_arena
  );
  swap(anno_type_, other->anno_type_);
}

::PROTOBUF_NAMESPACE_ID::Metadata AnnotatedDataParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[40]);
}

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

class ArgMaxParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ArgMaxParameter>()._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] |= 8u;
  }
  static void set_has_axis(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_softmax_threshold(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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ArgMaxParameter)
}
ArgMaxParameter::ArgMaxParameter(const ArgMaxParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&out_max_val_, &from.out_max_val_,
    static_cast<size_t>(reinterpret_cast<char*>(&top_k_) -
    reinterpret_cast<char*>(&out_max_val_)) + sizeof(top_k_));
  // @@protoc_insertion_point(copy_constructor:caffe.ArgMaxParameter)
}

inline void ArgMaxParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&out_max_val_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
    reinterpret_cast<char*>(&out_max_val_)) + sizeof(axis_));
top_k_ = 1u;
}

ArgMaxParameter::~ArgMaxParameter() {
  // @@protoc_insertion_point(destructor:caffe.ArgMaxParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ArgMaxParameter::ArenaDtor(void* object) {
  ArgMaxParameter* _this = reinterpret_cast< ArgMaxParameter* >(object);
  (void)_this;
}
void ArgMaxParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ArgMaxParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    ::memset(&out_max_val_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&axis_) -
        reinterpret_cast<char*>(&out_max_val_)) + sizeof(axis_));
    top_k_ = 1u;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ArgMaxParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool softmax_threshold = 4 [default = false];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_softmax_threshold(&has_bits);
          softmax_threshold_ = ::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:
  _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:caffe.ArgMaxParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional bool out_max_val = 1 [default = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_out_max_val(), target);
  }

  // optional uint32 top_k = 2 [default = 1];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_top_k(), target);
  }

  // optional int32 axis = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_axis(), target);
  }

  // optional bool softmax_threshold = 4 [default = false];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_softmax_threshold(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ArgMaxParameter)
  return target;
}

size_t ArgMaxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional bool out_max_val = 1 [default = false];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 1;
    }

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

    // optional int32 axis = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

    // optional uint32 top_k = 2 [default = 1];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_top_k());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ArgMaxParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ArgMaxParameter *>(to)->MergeFrom(
      static_cast<const ArgMaxParameter &>(from));
}


void ArgMaxParameter::MergeFrom(const ArgMaxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ArgMaxParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      out_max_val_ = from.out_max_val_;
    }
    if (cached_has_bits & 0x00000002u) {
      softmax_threshold_ = from.softmax_threshold_;
    }
    if (cached_has_bits & 0x00000004u) {
      axis_ = from.axis_;
    }
    if (cached_has_bits & 0x00000008u) {
      top_k_ = from.top_k_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ArgMaxParameter::CopyFrom(const ArgMaxParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ArgMaxParameter, axis_)
      + sizeof(ArgMaxParameter::axis_)
      - PROTOBUF_FIELD_OFFSET(ArgMaxParameter, out_max_val_)>(
          reinterpret_cast<char*>(&out_max_val_),
          reinterpret_cast<char*>(&other->out_max_val_));
  swap(top_k_, other->top_k_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ArgMaxParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[41]);
}

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

class ConcatParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ConcatParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ConcatParameter)
}
ConcatParameter::ConcatParameter(const ConcatParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&concat_dim_, &from.concat_dim_,
    static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
    reinterpret_cast<char*>(&concat_dim_)) + sizeof(axis_));
  // @@protoc_insertion_point(copy_constructor:caffe.ConcatParameter)
}

inline void ConcatParameter::SharedCtor() {
concat_dim_ = 1u;
axis_ = 1;
}

ConcatParameter::~ConcatParameter() {
  // @@protoc_insertion_point(destructor:caffe.ConcatParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ConcatParameter::ArenaDtor(void* object) {
  ConcatParameter* _this = reinterpret_cast< ConcatParameter* >(object);
  (void)_this;
}
void ConcatParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ConcatParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* ConcatParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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:
  _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:caffe.ConcatParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 concat_dim = 1 [default = 1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_concat_dim(), target);
  }

  // optional int32 axis = 2 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ConcatParameter)
  return target;
}

size_t ConcatParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional uint32 concat_dim = 1 [default = 1];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_concat_dim());
    }

    // optional int32 axis = 2 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ConcatParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ConcatParameter *>(to)->MergeFrom(
      static_cast<const ConcatParameter &>(from));
}


void ConcatParameter::MergeFrom(const ConcatParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ConcatParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      concat_dim_ = from.concat_dim_;
    }
    if (cached_has_bits & 0x00000002u) {
      axis_ = from.axis_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ConcatParameter::CopyFrom(const ConcatParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(concat_dim_, other->concat_dim_);
  swap(axis_, other->axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ConcatParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[42]);
}

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

class BatchNormParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<BatchNormParameter>()._has_bits_);
  static void set_has_use_global_stats(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_moving_average_fraction(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_eps(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_use_weight_bias(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_bias_term(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::caffe::FillerParameter& filler(const BatchNormParameter* msg);
  static void set_has_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::caffe::FillerParameter& bias_filler(const BatchNormParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::caffe::FillerParameter& scale_filler(const BatchNormParameter* msg);
  static void set_has_scale_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
};

const ::caffe::FillerParameter&
BatchNormParameter::_Internal::filler(const BatchNormParameter* msg) {
  return *msg->filler_;
}
const ::caffe::FillerParameter&
BatchNormParameter::_Internal::bias_filler(const BatchNormParameter* msg) {
  return *msg->bias_filler_;
}
const ::caffe::FillerParameter&
BatchNormParameter::_Internal::scale_filler(const BatchNormParameter* msg) {
  return *msg->scale_filler_;
}
BatchNormParameter::BatchNormParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.BatchNormParameter)
}
BatchNormParameter::BatchNormParameter(const BatchNormParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_filler()) {
    filler_ = new ::caffe::FillerParameter(*from.filler_);
  } else {
    filler_ = nullptr;
  }
  if (from._internal_has_bias_filler()) {
    bias_filler_ = new ::caffe::FillerParameter(*from.bias_filler_);
  } else {
    bias_filler_ = nullptr;
  }
  if (from._internal_has_scale_filler()) {
    scale_filler_ = new ::caffe::FillerParameter(*from.scale_filler_);
  } else {
    scale_filler_ = nullptr;
  }
  ::memcpy(&use_global_stats_, &from.use_global_stats_,
    static_cast<size_t>(reinterpret_cast<char*>(&eps_) -
    reinterpret_cast<char*>(&use_global_stats_)) + sizeof(eps_));
  // @@protoc_insertion_point(copy_constructor:caffe.BatchNormParameter)
}

inline void BatchNormParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&use_global_stats_) -
    reinterpret_cast<char*>(&filler_)) + sizeof(use_global_stats_));
use_weight_bias_ = true;
bias_term_ = true;
moving_average_fraction_ = 0.999f;
eps_ = 1e-05f;
}

BatchNormParameter::~BatchNormParameter() {
  // @@protoc_insertion_point(destructor:caffe.BatchNormParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void BatchNormParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete filler_;
  if (this != internal_default_instance()) delete bias_filler_;
  if (this != internal_default_instance()) delete scale_filler_;
}

void BatchNormParameter::ArenaDtor(void* object) {
  BatchNormParameter* _this = reinterpret_cast< BatchNormParameter* >(object);
  (void)_this;
}
void BatchNormParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BatchNormParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(filler_ != nullptr);
      filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(bias_filler_ != nullptr);
      bias_filler_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(scale_filler_ != nullptr);
      scale_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x000000f8u) {
    use_global_stats_ = false;
    use_weight_bias_ = true;
    bias_term_ = true;
    moving_average_fraction_ = 0.999f;
    eps_ = 1e-05f;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BatchNormParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          eps_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_weight_bias = 5 [default = true];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_use_weight_bias(&has_bits);
          use_weight_bias_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool bias_term = 6 [default = true];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_bias_term(&has_bits);
          bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.FillerParameter filler = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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 .caffe.FillerParameter scale_filler = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_scale_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:
  _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:caffe.BatchNormParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional bool use_global_stats = 1;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_use_global_stats(), target);
  }

  // optional float moving_average_fraction = 2 [default = 0.999];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_moving_average_fraction(), target);
  }

  // optional float eps = 3 [default = 1e-05];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_eps(), target);
  }

  // optional bool use_weight_bias = 5 [default = true];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_use_weight_bias(), target);
  }

  // optional bool bias_term = 6 [default = true];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_bias_term(), target);
  }

  // optional .caffe.FillerParameter filler = 7;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        7, _Internal::filler(this), target, stream);
  }

  // optional .caffe.FillerParameter bias_filler = 8;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        8, _Internal::bias_filler(this), target, stream);
  }

  // optional .caffe.FillerParameter scale_filler = 9;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        9, _Internal::scale_filler(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.BatchNormParameter)
  return target;
}

size_t BatchNormParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .caffe.FillerParameter filler = 7;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 8;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *bias_filler_);
    }

    // optional .caffe.FillerParameter scale_filler = 9;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *scale_filler_);
    }

    // optional bool use_global_stats = 1;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 1;
    }

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

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

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void BatchNormParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<BatchNormParameter *>(to)->MergeFrom(
      static_cast<const BatchNormParameter &>(from));
}


void BatchNormParameter::MergeFrom(const BatchNormParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.BatchNormParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_filler()->::caffe::FillerParameter::MergeFrom(from._internal_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_scale_filler()->::caffe::FillerParameter::MergeFrom(from._internal_scale_filler());
    }
    if (cached_has_bits & 0x00000008u) {
      use_global_stats_ = from.use_global_stats_;
    }
    if (cached_has_bits & 0x00000010u) {
      use_weight_bias_ = from.use_weight_bias_;
    }
    if (cached_has_bits & 0x00000020u) {
      bias_term_ = from.bias_term_;
    }
    if (cached_has_bits & 0x00000040u) {
      moving_average_fraction_ = from.moving_average_fraction_;
    }
    if (cached_has_bits & 0x00000080u) {
      eps_ = from.eps_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void BatchNormParameter::CopyFrom(const BatchNormParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(BatchNormParameter, use_global_stats_)
      + sizeof(BatchNormParameter::use_global_stats_)
      - PROTOBUF_FIELD_OFFSET(BatchNormParameter, filler_)>(
          reinterpret_cast<char*>(&filler_),
          reinterpret_cast<char*>(&other->filler_));
  swap(use_weight_bias_, other->use_weight_bias_);
  swap(bias_term_, other->bias_term_);
  swap(moving_average_fraction_, other->moving_average_fraction_);
  swap(eps_, other->eps_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BatchNormParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[43]);
}

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

class BiasParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<BiasParameter>()._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 ::caffe::FillerParameter& filler(const BiasParameter* msg);
  static void set_has_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::caffe::FillerParameter&
BiasParameter::_Internal::filler(const BiasParameter* msg) {
  return *msg->filler_;
}
BiasParameter::BiasParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.BiasParameter)
}
BiasParameter::BiasParameter(const BiasParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_filler()) {
    filler_ = new ::caffe::FillerParameter(*from.filler_);
  } else {
    filler_ = nullptr;
  }
  ::memcpy(&axis_, &from.axis_,
    static_cast<size_t>(reinterpret_cast<char*>(&num_axes_) -
    reinterpret_cast<char*>(&axis_)) + sizeof(num_axes_));
  // @@protoc_insertion_point(copy_constructor:caffe.BiasParameter)
}

inline void BiasParameter::SharedCtor() {
filler_ = nullptr;
axis_ = 1;
num_axes_ = 1;
}

BiasParameter::~BiasParameter() {
  // @@protoc_insertion_point(destructor:caffe.BiasParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void BiasParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete filler_;
}

void BiasParameter::ArenaDtor(void* object) {
  BiasParameter* _this = reinterpret_cast< BiasParameter* >(object);
  (void)_this;
}
void BiasParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BiasParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(filler_ != nullptr);
      filler_->Clear();
    }
    axis_ = 1;
    num_axes_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* BiasParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          num_axes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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:
  _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:caffe.BiasParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 axis = 1 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
  }

  // optional int32 num_axes = 2 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_axes(), target);
  }

  // optional .caffe.FillerParameter filler = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::filler(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.BiasParameter)
  return target;
}

size_t BiasParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional .caffe.FillerParameter filler = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *filler_);
    }

    // optional int32 axis = 1 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

    // optional int32 num_axes = 2 [default = 1];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_axes());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void BiasParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<BiasParameter *>(to)->MergeFrom(
      static_cast<const BiasParameter &>(from));
}


void BiasParameter::MergeFrom(const BiasParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.BiasParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_filler()->::caffe::FillerParameter::MergeFrom(from._internal_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      axis_ = from.axis_;
    }
    if (cached_has_bits & 0x00000004u) {
      num_axes_ = from.num_axes_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void BiasParameter::CopyFrom(const BiasParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(filler_, other->filler_);
  swap(axis_, other->axis_);
  swap(num_axes_, other->num_axes_);
}

::PROTOBUF_NAMESPACE_ID::Metadata BiasParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[44]);
}

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

class ContrastiveLossParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ContrastiveLossParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ContrastiveLossParameter)
}
ContrastiveLossParameter::ContrastiveLossParameter(const ContrastiveLossParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&legacy_version_, &from.legacy_version_,
    static_cast<size_t>(reinterpret_cast<char*>(&margin_) -
    reinterpret_cast<char*>(&legacy_version_)) + sizeof(margin_));
  // @@protoc_insertion_point(copy_constructor:caffe.ContrastiveLossParameter)
}

inline void ContrastiveLossParameter::SharedCtor() {
legacy_version_ = false;
margin_ = 1;
}

ContrastiveLossParameter::~ContrastiveLossParameter() {
  // @@protoc_insertion_point(destructor:caffe.ContrastiveLossParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ContrastiveLossParameter::ArenaDtor(void* object) {
  ContrastiveLossParameter* _this = reinterpret_cast< ContrastiveLossParameter* >(object);
  (void)_this;
}
void ContrastiveLossParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ContrastiveLossParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* ContrastiveLossParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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:
  _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:caffe.ContrastiveLossParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float margin = 1 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_margin(), target);
  }

  // optional bool legacy_version = 2 [default = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_legacy_version(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ContrastiveLossParameter)
  return target;
}

size_t ContrastiveLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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, &_cached_size_);
}

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

void ContrastiveLossParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ContrastiveLossParameter *>(to)->MergeFrom(
      static_cast<const ContrastiveLossParameter &>(from));
}


void ContrastiveLossParameter::MergeFrom(const ContrastiveLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ContrastiveLossParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      legacy_version_ = from.legacy_version_;
    }
    if (cached_has_bits & 0x00000002u) {
      margin_ = from.margin_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ContrastiveLossParameter::CopyFrom(const ContrastiveLossParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(legacy_version_, other->legacy_version_);
  swap(margin_, other->margin_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ContrastiveLossParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[45]);
}

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

class ConvolutionParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ConvolutionParameter>()._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] |= 65536u;
  }
  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] |= 131072u;
  }
  static const ::caffe::FillerParameter& weight_filler(const ConvolutionParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::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] |= 262144u;
  }
  static void set_has_force_nd_im2col(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_paramq(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_params(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_scale_in(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static void set_has_scale_out(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static void set_has_a_min(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static void set_has_a_max(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
};

const ::caffe::FillerParameter&
ConvolutionParameter::_Internal::weight_filler(const ConvolutionParameter* msg) {
  return *msg->weight_filler_;
}
const ::caffe::FillerParameter&
ConvolutionParameter::_Internal::bias_filler(const ConvolutionParameter* msg) {
  return *msg->bias_filler_;
}
ConvolutionParameter::ConvolutionParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  pad_(arena),
  kernel_size_(arena),
  stride_(arena),
  dilation_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ConvolutionParameter)
}
ConvolutionParameter::ConvolutionParameter(const ConvolutionParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      pad_(from.pad_),
      kernel_size_(from.kernel_size_),
      stride_(from.stride_),
      dilation_(from.dilation_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_weight_filler()) {
    weight_filler_ = new ::caffe::FillerParameter(*from.weight_filler_);
  } else {
    weight_filler_ = nullptr;
  }
  if (from._internal_has_bias_filler()) {
    bias_filler_ = new ::caffe::FillerParameter(*from.bias_filler_);
  } else {
    bias_filler_ = nullptr;
  }
  ::memcpy(&num_output_, &from.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&a_min_) -
    reinterpret_cast<char*>(&num_output_)) + sizeof(a_min_));
  // @@protoc_insertion_point(copy_constructor:caffe.ConvolutionParameter)
}

inline void ConvolutionParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&scale_out_) -
    reinterpret_cast<char*>(&weight_filler_)) + sizeof(scale_out_));
a_max_ = 127;
bias_term_ = true;
group_ = 1u;
axis_ = 1;
a_min_ = -128;
}

ConvolutionParameter::~ConvolutionParameter() {
  // @@protoc_insertion_point(destructor:caffe.ConvolutionParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void ConvolutionParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete weight_filler_;
  if (this != internal_default_instance()) delete bias_filler_;
}

void ConvolutionParameter::ArenaDtor(void* object) {
  ConvolutionParameter* _this = reinterpret_cast< ConvolutionParameter* >(object);
  (void)_this;
}
void ConvolutionParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ConvolutionParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  pad_.Clear();
  kernel_size_.Clear();
  stride_.Clear();
  dilation_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(weight_filler_ != nullptr);
      weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(bias_filler_ != nullptr);
      bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&stride_h_) -
        reinterpret_cast<char*>(&num_output_)) + sizeof(stride_h_));
  }
  if (cached_has_bits & 0x0000ff00u) {
    ::memset(&stride_w_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&scale_out_) -
        reinterpret_cast<char*>(&stride_w_)) + sizeof(scale_out_));
    a_max_ = 127;
  }
  if (cached_has_bits & 0x000f0000u) {
    bias_term_ = true;
    group_ = 1u;
    axis_ = 1;
    a_min_ = -128;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ConvolutionParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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 .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 .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);
          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);
          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);
          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);
          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);
          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);
          stride_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::ConvolutionParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::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);
          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);
          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;
      // optional uint32 paramq = 19;
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
          _Internal::set_has_paramq(&has_bits);
          paramq_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float params = 20 [default = 0];
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 165)) {
          _Internal::set_has_params(&has_bits);
          params_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float scale_in = 21;
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 173)) {
          _Internal::set_has_scale_in(&has_bits);
          scale_in_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float scale_out = 22;
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 181)) {
          _Internal::set_has_scale_out(&has_bits);
          scale_out_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 a_min = 23 [default = -128];
      case 23:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 184)) {
          _Internal::set_has_a_min(&has_bits);
          a_min_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 a_max = 24 [default = 127];
      case 24:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 192)) {
          _Internal::set_has_a_max(&has_bits);
          a_max_ = ::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:
  _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:caffe.ConvolutionParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 num_output = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional bool bias_term = 2 [default = true];
  if (cached_has_bits & 0x00010000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_kernel_size(i), target);
  }

  // optional uint32 group = 5 [default = 1];
  if (cached_has_bits & 0x00020000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_stride(i), target);
  }

  // optional .caffe.FillerParameter weight_filler = 7;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        7, _Internal::weight_filler(this), target, stream);
  }

  // optional .caffe.FillerParameter bias_filler = 8;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        8, _Internal::bias_filler(this), target, stream);
  }

  // optional uint32 pad_h = 9 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_pad_w(), target);
  }

  // optional uint32 kernel_h = 11;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(11, this->_internal_kernel_h(), target);
  }

  // optional uint32 kernel_w = 12;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(12, this->_internal_kernel_w(), target);
  }

  // optional uint32 stride_h = 13;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(13, this->_internal_stride_h(), target);
  }

  // optional uint32 stride_w = 14;
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(14, this->_internal_stride_w(), target);
  }

  // optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      15, this->_internal_engine(), target);
  }

  // optional int32 axis = 16 [default = 1];
  if (cached_has_bits & 0x00040000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(18, this->_internal_dilation(i), target);
  }

  // optional uint32 paramq = 19;
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(19, this->_internal_paramq(), target);
  }

  // optional float params = 20 [default = 0];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(20, this->_internal_params(), target);
  }

  // optional float scale_in = 21;
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(21, this->_internal_scale_in(), target);
  }

  // optional float scale_out = 22;
  if (cached_has_bits & 0x00004000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(22, this->_internal_scale_out(), target);
  }

  // optional int32 a_min = 23 [default = -128];
  if (cached_has_bits & 0x00080000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(23, this->_internal_a_min(), target);
  }

  // optional int32 a_max = 24 [default = 127];
  if (cached_has_bits & 0x00008000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(24, this->_internal_a_max(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ConvolutionParameter)
  return target;
}

size_t ConvolutionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->pad_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_pad_size());
    total_size += data_size;
  }

  // repeated uint32 kernel_size = 4;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->kernel_size_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_kernel_size_size());
    total_size += data_size;
  }

  // repeated uint32 stride = 6;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->stride_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_stride_size());
    total_size += data_size;
  }

  // repeated uint32 dilation = 18;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->dilation_);
    total_size += 2 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_dilation_size());
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .caffe.FillerParameter weight_filler = 7;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *weight_filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 8;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *bias_filler_);
    }

    // optional uint32 num_output = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

    // optional uint32 pad_h = 9 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_h());
    }

    // optional uint32 pad_w = 10 [default = 0];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_w());
    }

    // optional uint32 kernel_h = 11;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_h());
    }

    // optional uint32 kernel_w = 12;
    if (cached_has_bits & 0x00000040u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_w());
    }

    // optional uint32 stride_h = 13;
    if (cached_has_bits & 0x00000080u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_h());
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // optional uint32 stride_w = 14;
    if (cached_has_bits & 0x00000100u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_w());
    }

    // optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
    }

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

    // optional uint32 paramq = 19;
    if (cached_has_bits & 0x00000800u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_paramq());
    }

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

    // optional float scale_in = 21;
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 + 4;
    }

    // optional float scale_out = 22;
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 + 4;
    }

    // optional int32 a_max = 24 [default = 127];
    if (cached_has_bits & 0x00008000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_a_max());
    }

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

    // optional uint32 group = 5 [default = 1];
    if (cached_has_bits & 0x00020000u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_group());
    }

    // optional int32 axis = 16 [default = 1];
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_axis());
    }

    // optional int32 a_min = 23 [default = -128];
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_a_min());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ConvolutionParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ConvolutionParameter *>(to)->MergeFrom(
      static_cast<const ConvolutionParameter &>(from));
}


void ConvolutionParameter::MergeFrom(const ConvolutionParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ConvolutionParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  pad_.MergeFrom(from.pad_);
  kernel_size_.MergeFrom(from.kernel_size_);
  stride_.MergeFrom(from.stride_);
  dilation_.MergeFrom(from.dilation_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_weight_filler()->::caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      num_output_ = from.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      pad_h_ = from.pad_h_;
    }
    if (cached_has_bits & 0x00000010u) {
      pad_w_ = from.pad_w_;
    }
    if (cached_has_bits & 0x00000020u) {
      kernel_h_ = from.kernel_h_;
    }
    if (cached_has_bits & 0x00000040u) {
      kernel_w_ = from.kernel_w_;
    }
    if (cached_has_bits & 0x00000080u) {
      stride_h_ = from.stride_h_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      stride_w_ = from.stride_w_;
    }
    if (cached_has_bits & 0x00000200u) {
      engine_ = from.engine_;
    }
    if (cached_has_bits & 0x00000400u) {
      force_nd_im2col_ = from.force_nd_im2col_;
    }
    if (cached_has_bits & 0x00000800u) {
      paramq_ = from.paramq_;
    }
    if (cached_has_bits & 0x00001000u) {
      params_ = from.params_;
    }
    if (cached_has_bits & 0x00002000u) {
      scale_in_ = from.scale_in_;
    }
    if (cached_has_bits & 0x00004000u) {
      scale_out_ = from.scale_out_;
    }
    if (cached_has_bits & 0x00008000u) {
      a_max_ = from.a_max_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x000f0000u) {
    if (cached_has_bits & 0x00010000u) {
      bias_term_ = from.bias_term_;
    }
    if (cached_has_bits & 0x00020000u) {
      group_ = from.group_;
    }
    if (cached_has_bits & 0x00040000u) {
      axis_ = from.axis_;
    }
    if (cached_has_bits & 0x00080000u) {
      a_min_ = from.a_min_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ConvolutionParameter::CopyFrom(const ConvolutionParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  pad_.InternalSwap(&other->pad_);
  kernel_size_.InternalSwap(&other->kernel_size_);
  stride_.InternalSwap(&other->stride_);
  dilation_.InternalSwap(&other->dilation_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ConvolutionParameter, scale_out_)
      + sizeof(ConvolutionParameter::scale_out_)
      - PROTOBUF_FIELD_OFFSET(ConvolutionParameter, weight_filler_)>(
          reinterpret_cast<char*>(&weight_filler_),
          reinterpret_cast<char*>(&other->weight_filler_));
  swap(a_max_, other->a_max_);
  swap(bias_term_, other->bias_term_);
  swap(group_, other->group_);
  swap(axis_, other->axis_);
  swap(a_min_, other->a_min_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ConvolutionParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[46]);
}

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

class Convolution3DParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<Convolution3DParameter>()._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] |= 256u;
  }
  static void set_has_pad(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_kernel_size(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_group(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_kernel_depth(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_stride(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_temporal_stride(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static const ::caffe::FillerParameter& weight_filler(const Convolution3DParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::caffe::FillerParameter& bias_filler(const Convolution3DParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_filter_group(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_temporal_pad(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
};

const ::caffe::FillerParameter&
Convolution3DParameter::_Internal::weight_filler(const Convolution3DParameter* msg) {
  return *msg->weight_filler_;
}
const ::caffe::FillerParameter&
Convolution3DParameter::_Internal::bias_filler(const Convolution3DParameter* msg) {
  return *msg->bias_filler_;
}
Convolution3DParameter::Convolution3DParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.Convolution3DParameter)
}
Convolution3DParameter::Convolution3DParameter(const Convolution3DParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_weight_filler()) {
    weight_filler_ = new ::caffe::FillerParameter(*from.weight_filler_);
  } else {
    weight_filler_ = nullptr;
  }
  if (from._internal_has_bias_filler()) {
    bias_filler_ = new ::caffe::FillerParameter(*from.bias_filler_);
  } else {
    bias_filler_ = nullptr;
  }
  ::memcpy(&num_output_, &from.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&temporal_stride_) -
    reinterpret_cast<char*>(&num_output_)) + sizeof(temporal_stride_));
  // @@protoc_insertion_point(copy_constructor:caffe.Convolution3DParameter)
}

inline void Convolution3DParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&temporal_pad_) -
    reinterpret_cast<char*>(&weight_filler_)) + sizeof(temporal_pad_));
filter_group_ = 1u;
bias_term_ = true;
group_ = 1u;
stride_ = 1u;
temporal_stride_ = 1u;
}

Convolution3DParameter::~Convolution3DParameter() {
  // @@protoc_insertion_point(destructor:caffe.Convolution3DParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void Convolution3DParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete weight_filler_;
  if (this != internal_default_instance()) delete bias_filler_;
}

void Convolution3DParameter::ArenaDtor(void* object) {
  Convolution3DParameter* _this = reinterpret_cast< Convolution3DParameter* >(object);
  (void)_this;
}
void Convolution3DParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Convolution3DParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(weight_filler_ != nullptr);
      weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(bias_filler_ != nullptr);
      bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&temporal_pad_) -
        reinterpret_cast<char*>(&num_output_)) + sizeof(temporal_pad_));
    filter_group_ = 1u;
  }
  if (cached_has_bits & 0x00000f00u) {
    bias_term_ = true;
    group_ = 1u;
    stride_ = 1u;
    temporal_stride_ = 1u;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Convolution3DParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 pad = 3 [default = 0];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_pad(&has_bits);
          pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 kernel_size = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_kernel_size(&has_bits);
          kernel_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          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);
          group_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 kernel_depth = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_kernel_depth(&has_bits);
          kernel_depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 stride = 7 [default = 1];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_stride(&has_bits);
          stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 temporal_stride = 8 [default = 1];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_temporal_stride(&has_bits);
          temporal_stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.FillerParameter weight_filler = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
          ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.FillerParameter bias_filler = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
          ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 filter_group = 11 [default = 1];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_filter_group(&has_bits);
          filter_group_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 temporal_pad = 12 [default = 0];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_temporal_pad(&has_bits);
          temporal_pad_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional uint32 num_output = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional bool bias_term = 2 [default = true];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_bias_term(), target);
  }

  // optional uint32 pad = 3 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_pad(), target);
  }

  // optional uint32 kernel_size = 4;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_kernel_size(), target);
  }

  // optional uint32 group = 5 [default = 1];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_group(), target);
  }

  // optional uint32 kernel_depth = 6;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_kernel_depth(), target);
  }

  // optional uint32 stride = 7 [default = 1];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_stride(), target);
  }

  // optional uint32 temporal_stride = 8 [default = 1];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(8, this->_internal_temporal_stride(), target);
  }

  // optional .caffe.FillerParameter weight_filler = 9;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        9, _Internal::weight_filler(this), target, stream);
  }

  // optional .caffe.FillerParameter bias_filler = 10;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        10, _Internal::bias_filler(this), target, stream);
  }

  // optional uint32 filter_group = 11 [default = 1];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(11, this->_internal_filter_group(), target);
  }

  // optional uint32 temporal_pad = 12 [default = 0];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(12, this->_internal_temporal_pad(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.Convolution3DParameter)
  return target;
}

size_t Convolution3DParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.Convolution3DParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .caffe.FillerParameter weight_filler = 9;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *weight_filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 10;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *bias_filler_);
    }

    // optional uint32 num_output = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

    // optional uint32 pad = 3 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad());
    }

    // optional uint32 kernel_size = 4;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_size());
    }

    // optional uint32 kernel_depth = 6;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_depth());
    }

    // optional uint32 temporal_pad = 12 [default = 0];
    if (cached_has_bits & 0x00000040u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_temporal_pad());
    }

    // optional uint32 filter_group = 11 [default = 1];
    if (cached_has_bits & 0x00000080u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_filter_group());
    }

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

    // optional uint32 group = 5 [default = 1];
    if (cached_has_bits & 0x00000200u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_group());
    }

    // optional uint32 stride = 7 [default = 1];
    if (cached_has_bits & 0x00000400u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride());
    }

    // optional uint32 temporal_stride = 8 [default = 1];
    if (cached_has_bits & 0x00000800u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_temporal_stride());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void Convolution3DParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<Convolution3DParameter *>(to)->MergeFrom(
      static_cast<const Convolution3DParameter &>(from));
}


void Convolution3DParameter::MergeFrom(const Convolution3DParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.Convolution3DParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_weight_filler()->::caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      num_output_ = from.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      pad_ = from.pad_;
    }
    if (cached_has_bits & 0x00000010u) {
      kernel_size_ = from.kernel_size_;
    }
    if (cached_has_bits & 0x00000020u) {
      kernel_depth_ = from.kernel_depth_;
    }
    if (cached_has_bits & 0x00000040u) {
      temporal_pad_ = from.temporal_pad_;
    }
    if (cached_has_bits & 0x00000080u) {
      filter_group_ = from.filter_group_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000f00u) {
    if (cached_has_bits & 0x00000100u) {
      bias_term_ = from.bias_term_;
    }
    if (cached_has_bits & 0x00000200u) {
      group_ = from.group_;
    }
    if (cached_has_bits & 0x00000400u) {
      stride_ = from.stride_;
    }
    if (cached_has_bits & 0x00000800u) {
      temporal_stride_ = from.temporal_stride_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void Convolution3DParameter::InternalSwap(Convolution3DParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Convolution3DParameter, temporal_pad_)
      + sizeof(Convolution3DParameter::temporal_pad_)
      - PROTOBUF_FIELD_OFFSET(Convolution3DParameter, weight_filler_)>(
          reinterpret_cast<char*>(&weight_filler_),
          reinterpret_cast<char*>(&other->weight_filler_));
  swap(filter_group_, other->filter_group_);
  swap(bias_term_, other->bias_term_);
  swap(group_, other->group_);
  swap(stride_, other->stride_);
  swap(temporal_stride_, other->temporal_stride_);
}

::PROTOBUF_NAMESPACE_ID::Metadata Convolution3DParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[47]);
}

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

class CropParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<CropParameter>()._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),
  offset_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.CropParameter)
}
CropParameter::CropParameter(const CropParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      offset_(from.offset_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  axis_ = from.axis_;
  // @@protoc_insertion_point(copy_constructor:caffe.CropParameter)
}

inline void CropParameter::SharedCtor() {
axis_ = 2;
}

CropParameter::~CropParameter() {
  // @@protoc_insertion_point(destructor:caffe.CropParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void CropParameter::ArenaDtor(void* object) {
  CropParameter* _this = reinterpret_cast< CropParameter* >(object);
  (void)_this;
}
void CropParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void CropParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  offset_.Clear();
  axis_ = 2;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* CropParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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:
  _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:caffe.CropParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 axis = 1 [default = 2];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_offset(i), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.CropParameter)
  return target;
}

size_t CropParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->offset_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_offset_size());
    total_size += data_size;
  }

  // optional int32 axis = 1 [default = 2];
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void CropParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<CropParameter *>(to)->MergeFrom(
      static_cast<const CropParameter &>(from));
}


void CropParameter::MergeFrom(const CropParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.CropParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  offset_.MergeFrom(from.offset_);
  if (from._internal_has_axis()) {
    _internal_set_axis(from._internal_axis());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void CropParameter::CopyFrom(const CropParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  offset_.InternalSwap(&other->offset_);
  swap(axis_, other->axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata CropParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[48]);
}

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

class DataParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<DataParameter>()._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] |= 32u;
  }
  static void set_has_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  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_force_encoded_color(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_prefetch(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_label_size(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static void set_has_data_width(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_output_width(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
};

DataParameter::DataParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.DataParameter)
}
DataParameter::DataParameter(const DataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(), 
      GetArenaForAllocation());
  }
  mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_mean_file()) {
    mean_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_mean_file(), 
      GetArenaForAllocation());
  }
  ::memcpy(&batch_size_, &from.batch_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&prefetch_) -
    reinterpret_cast<char*>(&batch_size_)) + sizeof(prefetch_));
  // @@protoc_insertion_point(copy_constructor:caffe.DataParameter)
}

inline void DataParameter::SharedCtor() {
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&batch_size_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&data_width_) -
    reinterpret_cast<char*>(&batch_size_)) + sizeof(data_width_));
scale_ = 1;
prefetch_ = 4u;
}

DataParameter::~DataParameter() {
  // @@protoc_insertion_point(destructor:caffe.DataParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void DataParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  mean_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void DataParameter::ArenaDtor(void* object) {
  DataParameter* _this = reinterpret_cast< DataParameter* >(object);
  (void)_this;
}
void DataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DataParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      source_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      mean_file_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&batch_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&force_encoded_color_) -
        reinterpret_cast<char*>(&batch_size_)) + sizeof(force_encoded_color_));
  }
  if (cached_has_bits & 0x00001f00u) {
    ::memset(&output_width_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&data_width_) -
        reinterpret_cast<char*>(&output_width_)) + sizeof(data_width_));
    scale_ = 1;
    prefetch_ = 4u;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.DataParameter.source");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.DataParameter.mean_file");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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);
          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);
          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);
          rand_skip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::DataParameter_DB_IsValid(val))) {
            _internal_set_backend(static_cast<::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);
          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);
          prefetch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 label_size = 11 [default = 0];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_label_size(&has_bits);
          label_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 data_width = 12 [default = 0];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_data_width(&has_bits);
          data_width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool output_width = 13 [default = false];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_output_width(&has_bits);
          output_width_ = ::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:
  _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:caffe.DataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "caffe.DataParameter.source");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_source(), target);
  }

  // optional float scale = 2 [default = 1];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_crop_size(), target);
  }

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

  // optional uint32 rand_skip = 7 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_rand_skip(), target);
  }

  // optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      8, this->_internal_backend(), target);
  }

  // optional bool force_encoded_color = 9 [default = false];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_force_encoded_color(), target);
  }

  // optional uint32 prefetch = 10 [default = 4];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_prefetch(), target);
  }

  // optional uint32 label_size = 11 [default = 0];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(11, this->_internal_label_size(), target);
  }

  // optional uint32 data_width = 12 [default = 0];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(12, this->_internal_data_width(), target);
  }

  // optional bool output_width = 13 [default = false];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_output_width(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.DataParameter)
  return target;
}

size_t DataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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 += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
    }

    // optional uint32 crop_size = 5 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_size());
    }

    // optional uint32 rand_skip = 7 [default = 0];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_rand_skip());
    }

    // optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_backend());
    }

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

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

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

    // optional uint32 label_size = 11 [default = 0];
    if (cached_has_bits & 0x00000200u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_label_size());
    }

    // optional uint32 data_width = 12 [default = 0];
    if (cached_has_bits & 0x00000400u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_data_width());
    }

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

    // optional uint32 prefetch = 10 [default = 4];
    if (cached_has_bits & 0x00001000u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_prefetch());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void DataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<DataParameter *>(to)->MergeFrom(
      static_cast<const DataParameter &>(from));
}


void DataParameter::MergeFrom(const DataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.DataParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_source(from._internal_source());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_mean_file(from._internal_mean_file());
    }
    if (cached_has_bits & 0x00000004u) {
      batch_size_ = from.batch_size_;
    }
    if (cached_has_bits & 0x00000008u) {
      crop_size_ = from.crop_size_;
    }
    if (cached_has_bits & 0x00000010u) {
      rand_skip_ = from.rand_skip_;
    }
    if (cached_has_bits & 0x00000020u) {
      backend_ = from.backend_;
    }
    if (cached_has_bits & 0x00000040u) {
      mirror_ = from.mirror_;
    }
    if (cached_has_bits & 0x00000080u) {
      force_encoded_color_ = from.force_encoded_color_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00001f00u) {
    if (cached_has_bits & 0x00000100u) {
      output_width_ = from.output_width_;
    }
    if (cached_has_bits & 0x00000200u) {
      label_size_ = from.label_size_;
    }
    if (cached_has_bits & 0x00000400u) {
      data_width_ = from.data_width_;
    }
    if (cached_has_bits & 0x00000800u) {
      scale_ = from.scale_;
    }
    if (cached_has_bits & 0x00001000u) {
      prefetch_ = from.prefetch_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void DataParameter::CopyFrom(const DataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &source_, lhs_arena,
      &other->source_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &mean_file_, lhs_arena,
      &other->mean_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DataParameter, data_width_)
      + sizeof(DataParameter::data_width_)
      - PROTOBUF_FIELD_OFFSET(DataParameter, batch_size_)>(
          reinterpret_cast<char*>(&batch_size_),
          reinterpret_cast<char*>(&other->batch_size_));
  swap(scale_, other->scale_);
  swap(prefetch_, other->prefetch_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DataParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[49]);
}

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

class DetectionEvaluateParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<DetectionEvaluateParameter>()._has_bits_);
  static void set_has_num_classes(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_background_label_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_overlap_threshold(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_evaluate_difficult_gt(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_name_size_file(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::caffe::ResizeParameter& resize_param(const DetectionEvaluateParameter* msg);
  static void set_has_resize_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::caffe::ResizeParameter&
DetectionEvaluateParameter::_Internal::resize_param(const DetectionEvaluateParameter* msg) {
  return *msg->resize_param_;
}
DetectionEvaluateParameter::DetectionEvaluateParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.DetectionEvaluateParameter)
}
DetectionEvaluateParameter::DetectionEvaluateParameter(const DetectionEvaluateParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_size_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_size_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name_size_file()) {
    name_size_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name_size_file(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_resize_param()) {
    resize_param_ = new ::caffe::ResizeParameter(*from.resize_param_);
  } else {
    resize_param_ = nullptr;
  }
  ::memcpy(&num_classes_, &from.num_classes_,
    static_cast<size_t>(reinterpret_cast<char*>(&evaluate_difficult_gt_) -
    reinterpret_cast<char*>(&num_classes_)) + sizeof(evaluate_difficult_gt_));
  // @@protoc_insertion_point(copy_constructor:caffe.DetectionEvaluateParameter)
}

inline void DetectionEvaluateParameter::SharedCtor() {
name_size_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_size_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&resize_param_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&background_label_id_) -
    reinterpret_cast<char*>(&resize_param_)) + sizeof(background_label_id_));
overlap_threshold_ = 0.5f;
evaluate_difficult_gt_ = true;
}

DetectionEvaluateParameter::~DetectionEvaluateParameter() {
  // @@protoc_insertion_point(destructor:caffe.DetectionEvaluateParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void DetectionEvaluateParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_size_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete resize_param_;
}

void DetectionEvaluateParameter::ArenaDtor(void* object) {
  DetectionEvaluateParameter* _this = reinterpret_cast< DetectionEvaluateParameter* >(object);
  (void)_this;
}
void DetectionEvaluateParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DetectionEvaluateParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      name_size_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(resize_param_ != nullptr);
      resize_param_->Clear();
    }
  }
  if (cached_has_bits & 0x0000003cu) {
    ::memset(&num_classes_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&background_label_id_) -
        reinterpret_cast<char*>(&num_classes_)) + sizeof(background_label_id_));
    overlap_threshold_ = 0.5f;
    evaluate_difficult_gt_ = true;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DetectionEvaluateParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          num_classes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 background_label_id = 2 [default = 0];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
          _Internal::set_has_background_label_id(&has_bits);
          background_label_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float overlap_threshold = 3 [default = 0.5];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_overlap_threshold(&has_bits);
          overlap_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool evaluate_difficult_gt = 4 [default = true];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_evaluate_difficult_gt(&has_bits);
          evaluate_difficult_gt_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.DetectionEvaluateParameter.name_size_file");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.ResizeParameter resize_param = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_resize_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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

  // optional uint32 background_label_id = 2 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_background_label_id(), target);
  }

  // optional float overlap_threshold = 3 [default = 0.5];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_overlap_threshold(), target);
  }

  // optional bool evaluate_difficult_gt = 4 [default = true];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_evaluate_difficult_gt(), target);
  }

  // optional string name_size_file = 5;
  if (cached_has_bits & 0x00000001u) {
    ::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,
      "caffe.DetectionEvaluateParameter.name_size_file");
    target = stream->WriteStringMaybeAliased(
        5, this->_internal_name_size_file(), target);
  }

  // optional .caffe.ResizeParameter resize_param = 6;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::resize_param(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.DetectionEvaluateParameter)
  return target;
}

size_t DetectionEvaluateParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.DetectionEvaluateParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional string name_size_file = 5;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_name_size_file());
    }

    // optional .caffe.ResizeParameter resize_param = 6;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *resize_param_);
    }

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

    // optional uint32 background_label_id = 2 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_background_label_id());
    }

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

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void DetectionEvaluateParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<DetectionEvaluateParameter *>(to)->MergeFrom(
      static_cast<const DetectionEvaluateParameter &>(from));
}


void DetectionEvaluateParameter::MergeFrom(const DetectionEvaluateParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.DetectionEvaluateParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name_size_file(from._internal_name_size_file());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_resize_param()->::caffe::ResizeParameter::MergeFrom(from._internal_resize_param());
    }
    if (cached_has_bits & 0x00000004u) {
      num_classes_ = from.num_classes_;
    }
    if (cached_has_bits & 0x00000008u) {
      background_label_id_ = from.background_label_id_;
    }
    if (cached_has_bits & 0x00000010u) {
      overlap_threshold_ = from.overlap_threshold_;
    }
    if (cached_has_bits & 0x00000020u) {
      evaluate_difficult_gt_ = from.evaluate_difficult_gt_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void DetectionEvaluateParameter::InternalSwap(DetectionEvaluateParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_size_file_, lhs_arena,
      &other->name_size_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DetectionEvaluateParameter, background_label_id_)
      + sizeof(DetectionEvaluateParameter::background_label_id_)
      - PROTOBUF_FIELD_OFFSET(DetectionEvaluateParameter, resize_param_)>(
          reinterpret_cast<char*>(&resize_param_),
          reinterpret_cast<char*>(&other->resize_param_));
  swap(overlap_threshold_, other->overlap_threshold_);
  swap(evaluate_difficult_gt_, other->evaluate_difficult_gt_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DetectionEvaluateParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[50]);
}

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

class NonMaximumSuppressionParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<NonMaximumSuppressionParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.NonMaximumSuppressionParameter)
}
NonMaximumSuppressionParameter::NonMaximumSuppressionParameter(const NonMaximumSuppressionParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&top_k_, &from.top_k_,
    static_cast<size_t>(reinterpret_cast<char*>(&eta_) -
    reinterpret_cast<char*>(&top_k_)) + sizeof(eta_));
  // @@protoc_insertion_point(copy_constructor:caffe.NonMaximumSuppressionParameter)
}

inline void NonMaximumSuppressionParameter::SharedCtor() {
top_k_ = 0;
nms_threshold_ = 0.3f;
eta_ = 1;
}

NonMaximumSuppressionParameter::~NonMaximumSuppressionParameter() {
  // @@protoc_insertion_point(destructor:caffe.NonMaximumSuppressionParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void NonMaximumSuppressionParameter::ArenaDtor(void* object) {
  NonMaximumSuppressionParameter* _this = reinterpret_cast< NonMaximumSuppressionParameter* >(object);
  (void)_this;
}
void NonMaximumSuppressionParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NonMaximumSuppressionParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    top_k_ = 0;
    nms_threshold_ = 0.3f;
    eta_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* NonMaximumSuppressionParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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:
  _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:caffe.NonMaximumSuppressionParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float nms_threshold = 1 [default = 0.3];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_nms_threshold(), target);
  }

  // optional int32 top_k = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_top_k(), target);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.NonMaximumSuppressionParameter)
  return target;
}

size_t NonMaximumSuppressionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional int32 top_k = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

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

void NonMaximumSuppressionParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<NonMaximumSuppressionParameter *>(to)->MergeFrom(
      static_cast<const NonMaximumSuppressionParameter &>(from));
}


void NonMaximumSuppressionParameter::MergeFrom(const NonMaximumSuppressionParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NonMaximumSuppressionParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      top_k_ = from.top_k_;
    }
    if (cached_has_bits & 0x00000002u) {
      nms_threshold_ = from.nms_threshold_;
    }
    if (cached_has_bits & 0x00000004u) {
      eta_ = from.eta_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void NonMaximumSuppressionParameter::CopyFrom(const NonMaximumSuppressionParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(top_k_, other->top_k_);
  swap(nms_threshold_, other->nms_threshold_);
  swap(eta_, other->eta_);
}

::PROTOBUF_NAMESPACE_ID::Metadata NonMaximumSuppressionParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[51]);
}

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

class SaveOutputParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<SaveOutputParameter>()._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] |= 64u;
  }
  static const ::caffe::ResizeParameter& resize_param(const SaveOutputParameter* msg);
  static void set_has_resize_param(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
};

const ::caffe::ResizeParameter&
SaveOutputParameter::_Internal::resize_param(const SaveOutputParameter* msg) {
  return *msg->resize_param_;
}
SaveOutputParameter::SaveOutputParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.SaveOutputParameter)
}
SaveOutputParameter::SaveOutputParameter(const SaveOutputParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  output_directory_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    output_directory_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_output_directory()) {
    output_directory_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_output_directory(), 
      GetArenaForAllocation());
  }
  output_name_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    output_name_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_output_name_prefix()) {
    output_name_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_output_name_prefix(), 
      GetArenaForAllocation());
  }
  output_format_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    output_format_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_output_format()) {
    output_format_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_output_format(), 
      GetArenaForAllocation());
  }
  label_map_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    label_map_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_label_map_file()) {
    label_map_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_label_map_file(), 
      GetArenaForAllocation());
  }
  name_size_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_size_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name_size_file()) {
    name_size_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name_size_file(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_resize_param()) {
    resize_param_ = new ::caffe::ResizeParameter(*from.resize_param_);
  } else {
    resize_param_ = nullptr;
  }
  num_test_image_ = from.num_test_image_;
  // @@protoc_insertion_point(copy_constructor:caffe.SaveOutputParameter)
}

inline void SaveOutputParameter::SharedCtor() {
output_directory_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  output_directory_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_name_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  output_name_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_format_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  output_format_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
label_map_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  label_map_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_size_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_size_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&resize_param_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&num_test_image_) -
    reinterpret_cast<char*>(&resize_param_)) + sizeof(num_test_image_));
}

SaveOutputParameter::~SaveOutputParameter() {
  // @@protoc_insertion_point(destructor:caffe.SaveOutputParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void SaveOutputParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  output_directory_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  output_name_prefix_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  output_format_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  label_map_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  name_size_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete resize_param_;
}

void SaveOutputParameter::ArenaDtor(void* object) {
  SaveOutputParameter* _this = reinterpret_cast< SaveOutputParameter* >(object);
  (void)_this;
}
void SaveOutputParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SaveOutputParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      output_directory_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      output_name_prefix_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      output_format_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      label_map_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      name_size_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000020u) {
      GOOGLE_DCHECK(resize_param_ != nullptr);
      resize_param_->Clear();
    }
  }
  num_test_image_ = 0u;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SaveOutputParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SaveOutputParameter.output_directory");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SaveOutputParameter.output_name_prefix");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SaveOutputParameter.output_format");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SaveOutputParameter.label_map_file");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.SaveOutputParameter.name_size_file");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          num_test_image_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.ResizeParameter resize_param = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_resize_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:
  _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:caffe.SaveOutputParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "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,
      "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,
      "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,
      "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,
      "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 & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_num_test_image(), target);
  }

  // optional .caffe.ResizeParameter resize_param = 7;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        7, _Internal::resize_param(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.SaveOutputParameter)
  return target;
}

size_t SaveOutputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    // 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 .caffe.ResizeParameter resize_param = 7;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *resize_param_);
    }

    // optional uint32 num_test_image = 6;
    if (cached_has_bits & 0x00000040u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_test_image());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void SaveOutputParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SaveOutputParameter *>(to)->MergeFrom(
      static_cast<const SaveOutputParameter &>(from));
}


void SaveOutputParameter::MergeFrom(const SaveOutputParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SaveOutputParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_output_directory(from._internal_output_directory());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_output_name_prefix(from._internal_output_name_prefix());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_output_format(from._internal_output_format());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_set_label_map_file(from._internal_label_map_file());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_set_name_size_file(from._internal_name_size_file());
    }
    if (cached_has_bits & 0x00000020u) {
      _internal_mutable_resize_param()->::caffe::ResizeParameter::MergeFrom(from._internal_resize_param());
    }
    if (cached_has_bits & 0x00000040u) {
      num_test_image_ = from.num_test_image_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SaveOutputParameter::CopyFrom(const SaveOutputParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &output_directory_, lhs_arena,
      &other->output_directory_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &output_name_prefix_, lhs_arena,
      &other->output_name_prefix_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &output_format_, lhs_arena,
      &other->output_format_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &label_map_file_, lhs_arena,
      &other->label_map_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_size_file_, lhs_arena,
      &other->name_size_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SaveOutputParameter, num_test_image_)
      + sizeof(SaveOutputParameter::num_test_image_)
      - PROTOBUF_FIELD_OFFSET(SaveOutputParameter, resize_param_)>(
          reinterpret_cast<char*>(&resize_param_),
          reinterpret_cast<char*>(&other->resize_param_));
}

::PROTOBUF_NAMESPACE_ID::Metadata SaveOutputParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[52]);
}

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

class DetectionOutputParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<DetectionOutputParameter>()._has_bits_);
  static void set_has_num_classes(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  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] |= 16u;
  }
  static const ::caffe::NonMaximumSuppressionParameter& nms_param(const DetectionOutputParameter* msg);
  static void set_has_nms_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::caffe::SaveOutputParameter& save_output_param(const DetectionOutputParameter* msg);
  static void set_has_save_output_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_code_type(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_variance_encoded_in_target(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_keep_top_k(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static void set_has_confidence_threshold(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_visualize(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_visualize_threshold(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_save_file(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_objectness_score(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
};

const ::caffe::NonMaximumSuppressionParameter&
DetectionOutputParameter::_Internal::nms_param(const DetectionOutputParameter* msg) {
  return *msg->nms_param_;
}
const ::caffe::SaveOutputParameter&
DetectionOutputParameter::_Internal::save_output_param(const DetectionOutputParameter* msg) {
  return *msg->save_output_param_;
}
DetectionOutputParameter::DetectionOutputParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.DetectionOutputParameter)
}
DetectionOutputParameter::DetectionOutputParameter(const DetectionOutputParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  save_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    save_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_save_file()) {
    save_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_save_file(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_nms_param()) {
    nms_param_ = new ::caffe::NonMaximumSuppressionParameter(*from.nms_param_);
  } else {
    nms_param_ = nullptr;
  }
  if (from._internal_has_save_output_param()) {
    save_output_param_ = new ::caffe::SaveOutputParameter(*from.save_output_param_);
  } else {
    save_output_param_ = nullptr;
  }
  ::memcpy(&num_classes_, &from.num_classes_,
    static_cast<size_t>(reinterpret_cast<char*>(&objectness_score_) -
    reinterpret_cast<char*>(&num_classes_)) + sizeof(objectness_score_));
  // @@protoc_insertion_point(copy_constructor:caffe.DetectionOutputParameter)
}

inline void DetectionOutputParameter::SharedCtor() {
save_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  save_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&nms_param_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&visualize_threshold_) -
    reinterpret_cast<char*>(&nms_param_)) + sizeof(visualize_threshold_));
share_location_ = true;
code_type_ = 1;
keep_top_k_ = -1;
objectness_score_ = 0.01f;
}

DetectionOutputParameter::~DetectionOutputParameter() {
  // @@protoc_insertion_point(destructor:caffe.DetectionOutputParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void DetectionOutputParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  save_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete nms_param_;
  if (this != internal_default_instance()) delete save_output_param_;
}

void DetectionOutputParameter::ArenaDtor(void* object) {
  DetectionOutputParameter* _this = reinterpret_cast< DetectionOutputParameter* >(object);
  (void)_this;
}
void DetectionOutputParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DetectionOutputParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      save_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(nms_param_ != nullptr);
      nms_param_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(save_output_param_ != nullptr);
      save_output_param_->Clear();
    }
  }
  if (cached_has_bits & 0x000000f8u) {
    ::memset(&num_classes_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&visualize_) -
        reinterpret_cast<char*>(&num_classes_)) + sizeof(visualize_));
  }
  if (cached_has_bits & 0x00001f00u) {
    visualize_threshold_ = 0;
    share_location_ = true;
    code_type_ = 1;
    keep_top_k_ = -1;
    objectness_score_ = 0.01f;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DetectionOutputParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          background_label_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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 .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 .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(::caffe::PriorBoxParameter_CodeType_IsValid(val))) {
            _internal_set_code_type(static_cast<::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);
          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);
          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);
          confidence_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool visualize = 10 [default = false];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_visualize(&has_bits);
          visualize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float visualize_threshold = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 93)) {
          _Internal::set_has_visualize_threshold(&has_bits);
          visualize_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional string save_file = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
          auto str = _internal_mutable_save_file();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.DetectionOutputParameter.save_file");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float objectness_score = 24 [default = 0.01];
      case 24:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 197)) {
          _Internal::set_has_objectness_score(&has_bits);
          objectness_score_ = ::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:
  _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:caffe.DetectionOutputParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 num_classes = 1;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_share_location(), target);
  }

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

  // optional .caffe.NonMaximumSuppressionParameter nms_param = 4;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::nms_param(this), target, stream);
  }

  // optional .caffe.SaveOutputParameter save_output_param = 5;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::save_output_param(this), target, stream);
  }

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

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

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

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

  // optional bool visualize = 10 [default = false];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_visualize(), target);
  }

  // optional float visualize_threshold = 11;
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_visualize_threshold(), target);
  }

  // optional string save_file = 12;
  if (cached_has_bits & 0x00000001u) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
      this->_internal_save_file().data(), static_cast<int>(this->_internal_save_file().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
      "caffe.DetectionOutputParameter.save_file");
    target = stream->WriteStringMaybeAliased(
        12, this->_internal_save_file(), target);
  }

  // optional float objectness_score = 24 [default = 0.01];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(24, this->_internal_objectness_score(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.DetectionOutputParameter)
  return target;
}

size_t DetectionOutputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional string save_file = 12;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_save_file());
    }

    // optional .caffe.NonMaximumSuppressionParameter nms_param = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *nms_param_);
    }

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

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

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

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

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

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

  }
  if (cached_has_bits & 0x00001f00u) {
    // optional float visualize_threshold = 11;
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 + 4;
    }

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

    // optional .caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_code_type());
    }

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

    // optional float objectness_score = 24 [default = 0.01];
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void DetectionOutputParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<DetectionOutputParameter *>(to)->MergeFrom(
      static_cast<const DetectionOutputParameter &>(from));
}


void DetectionOutputParameter::MergeFrom(const DetectionOutputParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.DetectionOutputParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_save_file(from._internal_save_file());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_nms_param()->::caffe::NonMaximumSuppressionParameter::MergeFrom(from._internal_nms_param());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_save_output_param()->::caffe::SaveOutputParameter::MergeFrom(from._internal_save_output_param());
    }
    if (cached_has_bits & 0x00000008u) {
      num_classes_ = from.num_classes_;
    }
    if (cached_has_bits & 0x00000010u) {
      background_label_id_ = from.background_label_id_;
    }
    if (cached_has_bits & 0x00000020u) {
      confidence_threshold_ = from.confidence_threshold_;
    }
    if (cached_has_bits & 0x00000040u) {
      variance_encoded_in_target_ = from.variance_encoded_in_target_;
    }
    if (cached_has_bits & 0x00000080u) {
      visualize_ = from.visualize_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00001f00u) {
    if (cached_has_bits & 0x00000100u) {
      visualize_threshold_ = from.visualize_threshold_;
    }
    if (cached_has_bits & 0x00000200u) {
      share_location_ = from.share_location_;
    }
    if (cached_has_bits & 0x00000400u) {
      code_type_ = from.code_type_;
    }
    if (cached_has_bits & 0x00000800u) {
      keep_top_k_ = from.keep_top_k_;
    }
    if (cached_has_bits & 0x00001000u) {
      objectness_score_ = from.objectness_score_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void DetectionOutputParameter::InternalSwap(DetectionOutputParameter* other) {
  using std::swap;
  auto* lhs_arena = GetArenaForAllocation();
  auto* rhs_arena = other->GetArenaForAllocation();
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &save_file_, lhs_arena,
      &other->save_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(DetectionOutputParameter, visualize_threshold_)
      + sizeof(DetectionOutputParameter::visualize_threshold_)
      - PROTOBUF_FIELD_OFFSET(DetectionOutputParameter, nms_param_)>(
          reinterpret_cast<char*>(&nms_param_),
          reinterpret_cast<char*>(&other->nms_param_));
  swap(share_location_, other->share_location_);
  swap(code_type_, other->code_type_);
  swap(keep_top_k_, other->keep_top_k_);
  swap(objectness_score_, other->objectness_score_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DetectionOutputParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[53]);
}

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

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

DropoutParameter::DropoutParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.DropoutParameter)
}
DropoutParameter::DropoutParameter(const DropoutParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  dropout_ratio_ = from.dropout_ratio_;
  // @@protoc_insertion_point(copy_constructor:caffe.DropoutParameter)
}

inline void DropoutParameter::SharedCtor() {
dropout_ratio_ = 0.5f;
}

DropoutParameter::~DropoutParameter() {
  // @@protoc_insertion_point(destructor:caffe.DropoutParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void DropoutParameter::ArenaDtor(void* object) {
  DropoutParameter* _this = reinterpret_cast< DropoutParameter* >(object);
  (void)_this;
}
void DropoutParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DropoutParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  dropout_ratio_ = 0.5f;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DropoutParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          dropout_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      default:
        goto handle_unusual;
    }  // switch
  handle_unusual:
    if ((tag == 0) || ((tag & 7) == 4)) {
      CHK_(ptr);
      ctx->SetLastTag(tag);
      goto message_done;
    }
    ptr = UnknownFieldParse(
        tag,
        _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
        ptr, ctx);
    CHK_(ptr != nullptr);
  }  // while
message_done:
  _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:caffe.DropoutParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float dropout_ratio = 1 [default = 0.5];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_dropout_ratio(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.DropoutParameter)
  return target;
}

size_t DropoutParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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;

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

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void DropoutParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<DropoutParameter *>(to)->MergeFrom(
      static_cast<const DropoutParameter &>(from));
}


void DropoutParameter::MergeFrom(const DropoutParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.DropoutParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_dropout_ratio()) {
    _internal_set_dropout_ratio(from._internal_dropout_ratio());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void DropoutParameter::CopyFrom(const DropoutParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(dropout_ratio_, other->dropout_ratio_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DropoutParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[54]);
}

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

class DummyDataParameter::_Internal {
 public:
};

DummyDataParameter::DummyDataParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  data_filler_(arena),
  num_(arena),
  channels_(arena),
  height_(arena),
  width_(arena),
  shape_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.DummyDataParameter)
}
DummyDataParameter::DummyDataParameter(const DummyDataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      data_filler_(from.data_filler_),
      num_(from.num_),
      channels_(from.channels_),
      height_(from.height_),
      width_(from.width_),
      shape_(from.shape_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:caffe.DummyDataParameter)
}

inline void DummyDataParameter::SharedCtor() {
}

DummyDataParameter::~DummyDataParameter() {
  // @@protoc_insertion_point(destructor:caffe.DummyDataParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void DummyDataParameter::ArenaDtor(void* object) {
  DummyDataParameter* _this = reinterpret_cast< DummyDataParameter* >(object);
  (void)_this;
}
void DummyDataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DummyDataParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  data_filler_.Clear();
  num_.Clear();
  channels_.Clear();
  height_.Clear();
  width_.Clear();
  shape_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* DummyDataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .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 .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:caffe.DummyDataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .caffe.FillerParameter data_filler = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_data_filler_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_data_filler(i), target, stream);
  }

  // repeated uint32 num = 2;
  for (int i = 0, n = this->_internal_num_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_width(i), target);
  }

  // repeated .caffe.BlobShape shape = 6;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_shape_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, this->_internal_shape(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.DummyDataParameter)
  return target;
}

size_t DummyDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 .caffe.FillerParameter data_filler = 1;
  total_size += 1UL * this->_internal_data_filler_size();
  for (const auto& msg : this->data_filler_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated uint32 num = 2;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->num_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_num_size());
    total_size += data_size;
  }

  // repeated uint32 channels = 3;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->channels_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_channels_size());
    total_size += data_size;
  }

  // repeated uint32 height = 4;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->height_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_height_size());
    total_size += data_size;
  }

  // repeated uint32 width = 5;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->width_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_width_size());
    total_size += data_size;
  }

  // repeated .caffe.BlobShape shape = 6;
  total_size += 1UL * this->_internal_shape_size();
  for (const auto& msg : this->shape_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void DummyDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<DummyDataParameter *>(to)->MergeFrom(
      static_cast<const DummyDataParameter &>(from));
}


void DummyDataParameter::MergeFrom(const DummyDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.DummyDataParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  data_filler_.MergeFrom(from.data_filler_);
  num_.MergeFrom(from.num_);
  channels_.MergeFrom(from.channels_);
  height_.MergeFrom(from.height_);
  width_.MergeFrom(from.width_);
  shape_.MergeFrom(from.shape_);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void DummyDataParameter::CopyFrom(const DummyDataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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_);
  data_filler_.InternalSwap(&other->data_filler_);
  num_.InternalSwap(&other->num_);
  channels_.InternalSwap(&other->channels_);
  height_.InternalSwap(&other->height_);
  width_.InternalSwap(&other->width_);
  shape_.InternalSwap(&other->shape_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DummyDataParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[55]);
}

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

class EltwiseParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<EltwiseParameter>()._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),
  coeff_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.EltwiseParameter)
}
EltwiseParameter::EltwiseParameter(const EltwiseParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      coeff_(from.coeff_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&operation_, &from.operation_,
    static_cast<size_t>(reinterpret_cast<char*>(&stable_prod_grad_) -
    reinterpret_cast<char*>(&operation_)) + sizeof(stable_prod_grad_));
  // @@protoc_insertion_point(copy_constructor:caffe.EltwiseParameter)
}

inline void EltwiseParameter::SharedCtor() {
operation_ = 1;
stable_prod_grad_ = true;
}

EltwiseParameter::~EltwiseParameter() {
  // @@protoc_insertion_point(destructor:caffe.EltwiseParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void EltwiseParameter::ArenaDtor(void* object) {
  EltwiseParameter* _this = reinterpret_cast< EltwiseParameter* >(object);
  (void)_this;
}
void EltwiseParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void EltwiseParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  coeff_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    operation_ = 1;
    stable_prod_grad_ = true;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* EltwiseParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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(::caffe::EltwiseParameter_EltwiseOp_IsValid(val))) {
            _internal_set_operation(static_cast<::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);
          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:
  _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:caffe.EltwiseParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_stable_prod_grad(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.EltwiseParameter)
  return target;
}

size_t EltwiseParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_coeff_size());
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

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

void EltwiseParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<EltwiseParameter *>(to)->MergeFrom(
      static_cast<const EltwiseParameter &>(from));
}


void EltwiseParameter::MergeFrom(const EltwiseParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.EltwiseParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  coeff_.MergeFrom(from.coeff_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      operation_ = from.operation_;
    }
    if (cached_has_bits & 0x00000002u) {
      stable_prod_grad_ = from.stable_prod_grad_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void EltwiseParameter::CopyFrom(const EltwiseParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  coeff_.InternalSwap(&other->coeff_);
  swap(operation_, other->operation_);
  swap(stable_prod_grad_, other->stable_prod_grad_);
}

::PROTOBUF_NAMESPACE_ID::Metadata EltwiseParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[56]);
}

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

class ELUParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ELUParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ELUParameter)
}
ELUParameter::ELUParameter(const ELUParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  alpha_ = from.alpha_;
  // @@protoc_insertion_point(copy_constructor:caffe.ELUParameter)
}

inline void ELUParameter::SharedCtor() {
alpha_ = 1;
}

ELUParameter::~ELUParameter() {
  // @@protoc_insertion_point(destructor:caffe.ELUParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ELUParameter::ArenaDtor(void* object) {
  ELUParameter* _this = reinterpret_cast< ELUParameter* >(object);
  (void)_this;
}
void ELUParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ELUParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  alpha_ = 1;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ELUParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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:
  _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:caffe.ELUParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ELUParameter)
  return target;
}

size_t ELUParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 + 4;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ELUParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ELUParameter *>(to)->MergeFrom(
      static_cast<const ELUParameter &>(from));
}


void ELUParameter::MergeFrom(const ELUParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ELUParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_alpha()) {
    _internal_set_alpha(from._internal_alpha());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ELUParameter::CopyFrom(const ELUParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(alpha_, other->alpha_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ELUParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[57]);
}

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

class EmbedParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<EmbedParameter>()._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 ::caffe::FillerParameter& weight_filler(const EmbedParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::caffe::FillerParameter& bias_filler(const EmbedParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::caffe::FillerParameter&
EmbedParameter::_Internal::weight_filler(const EmbedParameter* msg) {
  return *msg->weight_filler_;
}
const ::caffe::FillerParameter&
EmbedParameter::_Internal::bias_filler(const EmbedParameter* msg) {
  return *msg->bias_filler_;
}
EmbedParameter::EmbedParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.EmbedParameter)
}
EmbedParameter::EmbedParameter(const EmbedParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_weight_filler()) {
    weight_filler_ = new ::caffe::FillerParameter(*from.weight_filler_);
  } else {
    weight_filler_ = nullptr;
  }
  if (from._internal_has_bias_filler()) {
    bias_filler_ = new ::caffe::FillerParameter(*from.bias_filler_);
  } else {
    bias_filler_ = nullptr;
  }
  ::memcpy(&num_output_, &from.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&bias_term_) -
    reinterpret_cast<char*>(&num_output_)) + sizeof(bias_term_));
  // @@protoc_insertion_point(copy_constructor:caffe.EmbedParameter)
}

inline void EmbedParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&input_dim_) -
    reinterpret_cast<char*>(&weight_filler_)) + sizeof(input_dim_));
bias_term_ = true;
}

EmbedParameter::~EmbedParameter() {
  // @@protoc_insertion_point(destructor:caffe.EmbedParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void EmbedParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete weight_filler_;
  if (this != internal_default_instance()) delete bias_filler_;
}

void EmbedParameter::ArenaDtor(void* object) {
  EmbedParameter* _this = reinterpret_cast< EmbedParameter* >(object);
  (void)_this;
}
void EmbedParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void EmbedParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(weight_filler_ != nullptr);
      weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(bias_filler_ != nullptr);
      bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x0000001cu) {
    ::memset(&num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&input_dim_) -
        reinterpret_cast<char*>(&num_output_)) + sizeof(input_dim_));
    bias_term_ = true;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* EmbedParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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 .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:
  _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:caffe.EmbedParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 num_output = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional uint32 input_dim = 2;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_bias_term(), target);
  }

  // optional .caffe.FillerParameter weight_filler = 4;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::weight_filler(this), target, stream);
  }

  // optional .caffe.FillerParameter bias_filler = 5;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::bias_filler(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.EmbedParameter)
  return target;
}

size_t EmbedParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional .caffe.FillerParameter weight_filler = 4;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *weight_filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 5;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *bias_filler_);
    }

    // optional uint32 num_output = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

    // optional uint32 input_dim = 2;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

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

void EmbedParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<EmbedParameter *>(to)->MergeFrom(
      static_cast<const EmbedParameter &>(from));
}


void EmbedParameter::MergeFrom(const EmbedParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.EmbedParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_weight_filler()->::caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      num_output_ = from.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      input_dim_ = from.input_dim_;
    }
    if (cached_has_bits & 0x00000010u) {
      bias_term_ = from.bias_term_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void EmbedParameter::CopyFrom(const EmbedParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(EmbedParameter, input_dim_)
      + sizeof(EmbedParameter::input_dim_)
      - PROTOBUF_FIELD_OFFSET(EmbedParameter, weight_filler_)>(
          reinterpret_cast<char*>(&weight_filler_),
          reinterpret_cast<char*>(&other->weight_filler_));
  swap(bias_term_, other->bias_term_);
}

::PROTOBUF_NAMESPACE_ID::Metadata EmbedParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[58]);
}

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

class ExpParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ExpParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ExpParameter)
}
ExpParameter::ExpParameter(const ExpParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&shift_, &from.shift_,
    static_cast<size_t>(reinterpret_cast<char*>(&scale_) -
    reinterpret_cast<char*>(&shift_)) + sizeof(scale_));
  // @@protoc_insertion_point(copy_constructor:caffe.ExpParameter)
}

inline void ExpParameter::SharedCtor() {
shift_ = 0;
base_ = -1;
scale_ = 1;
}

ExpParameter::~ExpParameter() {
  // @@protoc_insertion_point(destructor:caffe.ExpParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ExpParameter::ArenaDtor(void* object) {
  ExpParameter* _this = reinterpret_cast< ExpParameter* >(object);
  (void)_this;
}
void ExpParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ExpParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    shift_ = 0;
    base_ = -1;
    scale_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ExpParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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:
  _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:caffe.ExpParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float base = 1 [default = -1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_base(), target);
  }

  // optional float scale = 2 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_scale(), target);
  }

  // optional float shift = 3 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_shift(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ExpParameter)
  return target;
}

size_t ExpParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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, &_cached_size_);
}

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

void ExpParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ExpParameter *>(to)->MergeFrom(
      static_cast<const ExpParameter &>(from));
}


void ExpParameter::MergeFrom(const ExpParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ExpParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      shift_ = from.shift_;
    }
    if (cached_has_bits & 0x00000002u) {
      base_ = from.base_;
    }
    if (cached_has_bits & 0x00000004u) {
      scale_ = from.scale_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ExpParameter::CopyFrom(const ExpParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(shift_, other->shift_);
  swap(base_, other->base_);
  swap(scale_, other->scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ExpParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[59]);
}

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

class FlattenParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<FlattenParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.FlattenParameter)
}
FlattenParameter::FlattenParameter(const FlattenParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&axis_, &from.axis_,
    static_cast<size_t>(reinterpret_cast<char*>(&end_axis_) -
    reinterpret_cast<char*>(&axis_)) + sizeof(end_axis_));
  // @@protoc_insertion_point(copy_constructor:caffe.FlattenParameter)
}

inline void FlattenParameter::SharedCtor() {
axis_ = 1;
end_axis_ = -1;
}

FlattenParameter::~FlattenParameter() {
  // @@protoc_insertion_point(destructor:caffe.FlattenParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void FlattenParameter::ArenaDtor(void* object) {
  FlattenParameter* _this = reinterpret_cast< FlattenParameter* >(object);
  (void)_this;
}
void FlattenParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void FlattenParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    axis_ = 1;
    end_axis_ = -1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* FlattenParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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:
  _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:caffe.FlattenParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 axis = 1 [default = 1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
  }

  // optional int32 end_axis = 2 [default = -1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_end_axis(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.FlattenParameter)
  return target;
}

size_t FlattenParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional int32 axis = 1 [default = 1];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

    // optional int32 end_axis = 2 [default = -1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_end_axis());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void FlattenParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<FlattenParameter *>(to)->MergeFrom(
      static_cast<const FlattenParameter &>(from));
}


void FlattenParameter::MergeFrom(const FlattenParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.FlattenParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      axis_ = from.axis_;
    }
    if (cached_has_bits & 0x00000002u) {
      end_axis_ = from.end_axis_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void FlattenParameter::CopyFrom(const FlattenParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(axis_, other->axis_);
  swap(end_axis_, other->end_axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata FlattenParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[60]);
}

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

class HDF5DataParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<HDF5DataParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.HDF5DataParameter)
}
HDF5DataParameter::HDF5DataParameter(const HDF5DataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(), 
      GetArenaForAllocation());
  }
  ::memcpy(&batch_size_, &from.batch_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&shuffle_) -
    reinterpret_cast<char*>(&batch_size_)) + sizeof(shuffle_));
  // @@protoc_insertion_point(copy_constructor:caffe.HDF5DataParameter)
}

inline void HDF5DataParameter::SharedCtor() {
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&batch_size_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&shuffle_) -
    reinterpret_cast<char*>(&batch_size_)) + sizeof(shuffle_));
}

HDF5DataParameter::~HDF5DataParameter() {
  // @@protoc_insertion_point(destructor:caffe.HDF5DataParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void HDF5DataParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void HDF5DataParameter::ArenaDtor(void* object) {
  HDF5DataParameter* _this = reinterpret_cast< HDF5DataParameter* >(object);
  (void)_this;
}
void HDF5DataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void HDF5DataParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* HDF5DataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.HDF5DataParameter.source");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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);
          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:
  _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:caffe.HDF5DataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_batch_size(), target);
  }

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.HDF5DataParameter)
  return target;
}

size_t HDF5DataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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 += ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

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

void HDF5DataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<HDF5DataParameter *>(to)->MergeFrom(
      static_cast<const HDF5DataParameter &>(from));
}


void HDF5DataParameter::MergeFrom(const HDF5DataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.HDF5DataParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_source(from._internal_source());
    }
    if (cached_has_bits & 0x00000002u) {
      batch_size_ = from.batch_size_;
    }
    if (cached_has_bits & 0x00000004u) {
      shuffle_ = from.shuffle_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void HDF5DataParameter::CopyFrom(const HDF5DataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &source_, lhs_arena,
      &other->source_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(HDF5DataParameter, shuffle_)
      + sizeof(HDF5DataParameter::shuffle_)
      - PROTOBUF_FIELD_OFFSET(HDF5DataParameter, batch_size_)>(
          reinterpret_cast<char*>(&batch_size_),
          reinterpret_cast<char*>(&other->batch_size_));
}

::PROTOBUF_NAMESPACE_ID::Metadata HDF5DataParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[61]);
}

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

class HDF5OutputParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<HDF5OutputParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.HDF5OutputParameter)
}
HDF5OutputParameter::HDF5OutputParameter(const HDF5OutputParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_file_name()) {
    file_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_file_name(), 
      GetArenaForAllocation());
  }
  // @@protoc_insertion_point(copy_constructor:caffe.HDF5OutputParameter)
}

inline void HDF5OutputParameter::SharedCtor() {
file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}

HDF5OutputParameter::~HDF5OutputParameter() {
  // @@protoc_insertion_point(destructor:caffe.HDF5OutputParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void HDF5OutputParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  file_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void HDF5OutputParameter::ArenaDtor(void* object) {
  HDF5OutputParameter* _this = reinterpret_cast< HDF5OutputParameter* >(object);
  (void)_this;
}
void HDF5OutputParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void HDF5OutputParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    file_name_.ClearNonDefaultToEmpty();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* HDF5OutputParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.HDF5OutputParameter.file_name");
          #endif  // !NDEBUG
          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:
  _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:caffe.HDF5OutputParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "caffe.HDF5OutputParameter.file_name");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_file_name(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.HDF5OutputParameter)
  return target;
}

size_t HDF5OutputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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, &_cached_size_);
}

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

void HDF5OutputParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<HDF5OutputParameter *>(to)->MergeFrom(
      static_cast<const HDF5OutputParameter &>(from));
}


void HDF5OutputParameter::MergeFrom(const HDF5OutputParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.HDF5OutputParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_file_name()) {
    _internal_set_file_name(from._internal_file_name());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void HDF5OutputParameter::CopyFrom(const HDF5OutputParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &file_name_, lhs_arena,
      &other->file_name_, rhs_arena
  );
}

::PROTOBUF_NAMESPACE_ID::Metadata HDF5OutputParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[62]);
}

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

class HingeLossParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<HingeLossParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.HingeLossParameter)
}
HingeLossParameter::HingeLossParameter(const HingeLossParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  norm_ = from.norm_;
  // @@protoc_insertion_point(copy_constructor:caffe.HingeLossParameter)
}

inline void HingeLossParameter::SharedCtor() {
norm_ = 1;
}

HingeLossParameter::~HingeLossParameter() {
  // @@protoc_insertion_point(destructor:caffe.HingeLossParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void HingeLossParameter::ArenaDtor(void* object) {
  HingeLossParameter* _this = reinterpret_cast< HingeLossParameter* >(object);
  (void)_this;
}
void HingeLossParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void HingeLossParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  norm_ = 1;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* HingeLossParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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(::caffe::HingeLossParameter_Norm_IsValid(val))) {
            _internal_set_norm(static_cast<::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:
  _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:caffe.HingeLossParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_norm(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.HingeLossParameter)
  return target;
}

size_t HingeLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_norm());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void HingeLossParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<HingeLossParameter *>(to)->MergeFrom(
      static_cast<const HingeLossParameter &>(from));
}


void HingeLossParameter::MergeFrom(const HingeLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.HingeLossParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_norm()) {
    _internal_set_norm(from._internal_norm());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void HingeLossParameter::CopyFrom(const HingeLossParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(norm_, other->norm_);
}

::PROTOBUF_NAMESPACE_ID::Metadata HingeLossParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[63]);
}

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

class ImageDataParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ImageDataParameter>()._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] |= 4096u;
  }
  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;
  }
  static void set_has_label_num(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static void set_has_att_num(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
};

ImageDataParameter::ImageDataParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ImageDataParameter)
}
ImageDataParameter::ImageDataParameter(const ImageDataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(), 
      GetArenaForAllocation());
  }
  mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_mean_file()) {
    mean_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_mean_file(), 
      GetArenaForAllocation());
  }
  root_folder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    root_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_root_folder()) {
    root_folder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_root_folder(), 
      GetArenaForAllocation());
  }
  ::memcpy(&crop_size_, &from.crop_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&label_num_) -
    reinterpret_cast<char*>(&crop_size_)) + sizeof(label_num_));
  // @@protoc_insertion_point(copy_constructor:caffe.ImageDataParameter)
}

inline void ImageDataParameter::SharedCtor() {
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
root_folder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  root_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&crop_size_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&new_width_) -
    reinterpret_cast<char*>(&crop_size_)) + sizeof(new_width_));
att_num_ = 1u;
scale_ = 1;
batch_size_ = 1u;
is_color_ = true;
label_num_ = 1u;
}

ImageDataParameter::~ImageDataParameter() {
  // @@protoc_insertion_point(destructor:caffe.ImageDataParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void ImageDataParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  mean_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  root_folder_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void ImageDataParameter::ArenaDtor(void* object) {
  ImageDataParameter* _this = reinterpret_cast< ImageDataParameter* >(object);
  (void)_this;
}
void ImageDataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ImageDataParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      source_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      mean_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      root_folder_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x000000f8u) {
    ::memset(&crop_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&new_height_) -
        reinterpret_cast<char*>(&crop_size_)) + sizeof(new_height_));
  }
  if (cached_has_bits & 0x00003f00u) {
    new_width_ = 0u;
    att_num_ = 1u;
    scale_ = 1;
    batch_size_ = 1u;
    is_color_ = true;
    label_num_ = 1u;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ImageDataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.ImageDataParameter.source");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.ImageDataParameter.mean_file");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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);
          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);
          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);
          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);
          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);
          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);
          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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.ImageDataParameter.root_folder");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 label_num = 13 [default = 1];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_label_num(&has_bits);
          label_num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 att_num = 14 [default = 1];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
          _Internal::set_has_att_num(&has_bits);
          att_num_ = ::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:
  _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:caffe.ImageDataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_crop_size(), target);
  }

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

  // optional uint32 rand_skip = 7 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_rand_skip(), target);
  }

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

  // optional uint32 new_height = 9 [default = 0];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_new_width(), target);
  }

  // optional bool is_color = 11 [default = true];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "caffe.ImageDataParameter.root_folder");
    target = stream->WriteStringMaybeAliased(
        12, this->_internal_root_folder(), target);
  }

  // optional uint32 label_num = 13 [default = 1];
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(13, this->_internal_label_num(), target);
  }

  // optional uint32 att_num = 14 [default = 1];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(14, this->_internal_att_num(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ImageDataParameter)
  return target;
}

size_t ImageDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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 += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_size());
    }

    // optional uint32 rand_skip = 7 [default = 0];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::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 += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_new_height());
    }

  }
  if (cached_has_bits & 0x00003f00u) {
    // optional uint32 new_width = 10 [default = 0];
    if (cached_has_bits & 0x00000100u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_new_width());
    }

    // optional uint32 att_num = 14 [default = 1];
    if (cached_has_bits & 0x00000200u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_att_num());
    }

    // 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 += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
    }

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

    // optional uint32 label_num = 13 [default = 1];
    if (cached_has_bits & 0x00002000u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_label_num());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ImageDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ImageDataParameter *>(to)->MergeFrom(
      static_cast<const ImageDataParameter &>(from));
}


void ImageDataParameter::MergeFrom(const ImageDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ImageDataParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_source(from._internal_source());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_mean_file(from._internal_mean_file());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_root_folder(from._internal_root_folder());
    }
    if (cached_has_bits & 0x00000008u) {
      crop_size_ = from.crop_size_;
    }
    if (cached_has_bits & 0x00000010u) {
      rand_skip_ = from.rand_skip_;
    }
    if (cached_has_bits & 0x00000020u) {
      shuffle_ = from.shuffle_;
    }
    if (cached_has_bits & 0x00000040u) {
      mirror_ = from.mirror_;
    }
    if (cached_has_bits & 0x00000080u) {
      new_height_ = from.new_height_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00003f00u) {
    if (cached_has_bits & 0x00000100u) {
      new_width_ = from.new_width_;
    }
    if (cached_has_bits & 0x00000200u) {
      att_num_ = from.att_num_;
    }
    if (cached_has_bits & 0x00000400u) {
      scale_ = from.scale_;
    }
    if (cached_has_bits & 0x00000800u) {
      batch_size_ = from.batch_size_;
    }
    if (cached_has_bits & 0x00001000u) {
      is_color_ = from.is_color_;
    }
    if (cached_has_bits & 0x00002000u) {
      label_num_ = from.label_num_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ImageDataParameter::CopyFrom(const ImageDataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &source_, lhs_arena,
      &other->source_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &mean_file_, lhs_arena,
      &other->mean_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &root_folder_, lhs_arena,
      &other->root_folder_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ImageDataParameter, new_width_)
      + sizeof(ImageDataParameter::new_width_)
      - PROTOBUF_FIELD_OFFSET(ImageDataParameter, crop_size_)>(
          reinterpret_cast<char*>(&crop_size_),
          reinterpret_cast<char*>(&other->crop_size_));
  swap(att_num_, other->att_num_);
  swap(scale_, other->scale_);
  swap(batch_size_, other->batch_size_);
  swap(is_color_, other->is_color_);
  swap(label_num_, other->label_num_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ImageDataParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[64]);
}

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

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

InfogainLossParameter::InfogainLossParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.InfogainLossParameter)
}
InfogainLossParameter::InfogainLossParameter(const InfogainLossParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(), 
      GetArenaForAllocation());
  }
  axis_ = from.axis_;
  // @@protoc_insertion_point(copy_constructor:caffe.InfogainLossParameter)
}

inline void InfogainLossParameter::SharedCtor() {
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
axis_ = 1;
}

InfogainLossParameter::~InfogainLossParameter() {
  // @@protoc_insertion_point(destructor:caffe.InfogainLossParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void InfogainLossParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void InfogainLossParameter::ArenaDtor(void* object) {
  InfogainLossParameter* _this = reinterpret_cast< InfogainLossParameter* >(object);
  (void)_this;
}
void InfogainLossParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void InfogainLossParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      source_.ClearNonDefaultToEmpty();
    }
    axis_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* InfogainLossParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.InfogainLossParameter.source");
          #endif  // !NDEBUG
          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);
          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:
  _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:caffe.InfogainLossParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "caffe.InfogainLossParameter.source");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_source(), target);
  }

  // optional int32 axis = 2 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.InfogainLossParameter)
  return target;
}

size_t InfogainLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional string source = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_source());
    }

    // optional int32 axis = 2 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void InfogainLossParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<InfogainLossParameter *>(to)->MergeFrom(
      static_cast<const InfogainLossParameter &>(from));
}


void InfogainLossParameter::MergeFrom(const InfogainLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.InfogainLossParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_source(from._internal_source());
    }
    if (cached_has_bits & 0x00000002u) {
      axis_ = from.axis_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void InfogainLossParameter::CopyFrom(const InfogainLossParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &source_, lhs_arena,
      &other->source_, rhs_arena
  );
  swap(axis_, other->axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata InfogainLossParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[65]);
}

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

class InnerProductParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<InnerProductParameter>()._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] |= 256u;
  }
  static const ::caffe::FillerParameter& weight_filler(const InnerProductParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::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] |= 512u;
  }
  static void set_has_transpose(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_paramq(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_params(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_scale_in(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_scale_out(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_a_min(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_a_max(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
};

const ::caffe::FillerParameter&
InnerProductParameter::_Internal::weight_filler(const InnerProductParameter* msg) {
  return *msg->weight_filler_;
}
const ::caffe::FillerParameter&
InnerProductParameter::_Internal::bias_filler(const InnerProductParameter* msg) {
  return *msg->bias_filler_;
}
InnerProductParameter::InnerProductParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.InnerProductParameter)
}
InnerProductParameter::InnerProductParameter(const InnerProductParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_weight_filler()) {
    weight_filler_ = new ::caffe::FillerParameter(*from.weight_filler_);
  } else {
    weight_filler_ = nullptr;
  }
  if (from._internal_has_bias_filler()) {
    bias_filler_ = new ::caffe::FillerParameter(*from.bias_filler_);
  } else {
    bias_filler_ = nullptr;
  }
  ::memcpy(&num_output_, &from.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&a_max_) -
    reinterpret_cast<char*>(&num_output_)) + sizeof(a_max_));
  // @@protoc_insertion_point(copy_constructor:caffe.InnerProductParameter)
}

inline void InnerProductParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&scale_out_) -
    reinterpret_cast<char*>(&weight_filler_)) + sizeof(scale_out_));
bias_term_ = true;
axis_ = 1;
a_min_ = -128;
a_max_ = 127;
}

InnerProductParameter::~InnerProductParameter() {
  // @@protoc_insertion_point(destructor:caffe.InnerProductParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void InnerProductParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete weight_filler_;
  if (this != internal_default_instance()) delete bias_filler_;
}

void InnerProductParameter::ArenaDtor(void* object) {
  InnerProductParameter* _this = reinterpret_cast< InnerProductParameter* >(object);
  (void)_this;
}
void InnerProductParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void InnerProductParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(weight_filler_ != nullptr);
      weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(bias_filler_ != nullptr);
      bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x000000fcu) {
    ::memset(&num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&scale_out_) -
        reinterpret_cast<char*>(&num_output_)) + sizeof(scale_out_));
  }
  if (cached_has_bits & 0x00000f00u) {
    bias_term_ = true;
    axis_ = 1;
    a_min_ = -128;
    a_max_ = 127;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* InnerProductParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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 .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);
          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);
          transpose_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 paramq = 7 [default = 0];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_paramq(&has_bits);
          paramq_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float params = 8 [default = 0];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
          _Internal::set_has_params(&has_bits);
          params_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float scale_in = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 77)) {
          _Internal::set_has_scale_in(&has_bits);
          scale_in_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float scale_out = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 85)) {
          _Internal::set_has_scale_out(&has_bits);
          scale_out_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional int32 a_min = 11 [default = -128];
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_a_min(&has_bits);
          a_min_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 a_max = 12 [default = 127];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
          _Internal::set_has_a_max(&has_bits);
          a_max_ = ::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:
  _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:caffe.InnerProductParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 num_output = 1;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional bool bias_term = 2 [default = true];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_bias_term(), target);
  }

  // optional .caffe.FillerParameter weight_filler = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::weight_filler(this), target, stream);
  }

  // optional .caffe.FillerParameter bias_filler = 4;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::bias_filler(this), target, stream);
  }

  // optional int32 axis = 5 [default = 1];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_axis(), target);
  }

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

  // optional uint32 paramq = 7 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_paramq(), target);
  }

  // optional float params = 8 [default = 0];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_params(), target);
  }

  // optional float scale_in = 9;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(9, this->_internal_scale_in(), target);
  }

  // optional float scale_out = 10;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_scale_out(), target);
  }

  // optional int32 a_min = 11 [default = -128];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(11, this->_internal_a_min(), target);
  }

  // optional int32 a_max = 12 [default = 127];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(12, this->_internal_a_max(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.InnerProductParameter)
  return target;
}

size_t InnerProductParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .caffe.FillerParameter weight_filler = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *weight_filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 4;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *bias_filler_);
    }

    // optional uint32 num_output = 1;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

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

    // optional uint32 paramq = 7 [default = 0];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_paramq());
    }

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

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

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

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

    // optional int32 axis = 5 [default = 1];
    if (cached_has_bits & 0x00000200u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

    // optional int32 a_min = 11 [default = -128];
    if (cached_has_bits & 0x00000400u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_a_min());
    }

    // optional int32 a_max = 12 [default = 127];
    if (cached_has_bits & 0x00000800u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_a_max());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void InnerProductParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<InnerProductParameter *>(to)->MergeFrom(
      static_cast<const InnerProductParameter &>(from));
}


void InnerProductParameter::MergeFrom(const InnerProductParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.InnerProductParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_weight_filler()->::caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      num_output_ = from.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      transpose_ = from.transpose_;
    }
    if (cached_has_bits & 0x00000010u) {
      paramq_ = from.paramq_;
    }
    if (cached_has_bits & 0x00000020u) {
      params_ = from.params_;
    }
    if (cached_has_bits & 0x00000040u) {
      scale_in_ = from.scale_in_;
    }
    if (cached_has_bits & 0x00000080u) {
      scale_out_ = from.scale_out_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00000f00u) {
    if (cached_has_bits & 0x00000100u) {
      bias_term_ = from.bias_term_;
    }
    if (cached_has_bits & 0x00000200u) {
      axis_ = from.axis_;
    }
    if (cached_has_bits & 0x00000400u) {
      a_min_ = from.a_min_;
    }
    if (cached_has_bits & 0x00000800u) {
      a_max_ = from.a_max_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void InnerProductParameter::CopyFrom(const InnerProductParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(InnerProductParameter, scale_out_)
      + sizeof(InnerProductParameter::scale_out_)
      - PROTOBUF_FIELD_OFFSET(InnerProductParameter, weight_filler_)>(
          reinterpret_cast<char*>(&weight_filler_),
          reinterpret_cast<char*>(&other->weight_filler_));
  swap(bias_term_, other->bias_term_);
  swap(axis_, other->axis_);
  swap(a_min_, other->a_min_);
  swap(a_max_, other->a_max_);
}

::PROTOBUF_NAMESPACE_ID::Metadata InnerProductParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[66]);
}

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

class InputParameter::_Internal {
 public:
};

InputParameter::InputParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  shape_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.InputParameter)
}
InputParameter::InputParameter(const InputParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      shape_(from.shape_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:caffe.InputParameter)
}

inline void InputParameter::SharedCtor() {
}

InputParameter::~InputParameter() {
  // @@protoc_insertion_point(destructor:caffe.InputParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void InputParameter::ArenaDtor(void* object) {
  InputParameter* _this = reinterpret_cast< InputParameter* >(object);
  (void)_this;
}
void InputParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void InputParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* InputParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // repeated .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:caffe.InputParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .caffe.BlobShape shape = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_shape_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(1, this->_internal_shape(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.InputParameter)
  return target;
}

size_t InputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 .caffe.BlobShape shape = 1;
  total_size += 1UL * this->_internal_shape_size();
  for (const auto& msg : this->shape_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void InputParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<InputParameter *>(to)->MergeFrom(
      static_cast<const InputParameter &>(from));
}


void InputParameter::MergeFrom(const InputParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.InputParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  shape_.MergeFrom(from.shape_);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void InputParameter::CopyFrom(const InputParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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_);
  shape_.InternalSwap(&other->shape_);
}

::PROTOBUF_NAMESPACE_ID::Metadata InputParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[67]);
}

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

class LogParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<LogParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.LogParameter)
}
LogParameter::LogParameter(const LogParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&shift_, &from.shift_,
    static_cast<size_t>(reinterpret_cast<char*>(&scale_) -
    reinterpret_cast<char*>(&shift_)) + sizeof(scale_));
  // @@protoc_insertion_point(copy_constructor:caffe.LogParameter)
}

inline void LogParameter::SharedCtor() {
shift_ = 0;
base_ = -1;
scale_ = 1;
}

LogParameter::~LogParameter() {
  // @@protoc_insertion_point(destructor:caffe.LogParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void LogParameter::ArenaDtor(void* object) {
  LogParameter* _this = reinterpret_cast< LogParameter* >(object);
  (void)_this;
}
void LogParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LogParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    shift_ = 0;
    base_ = -1;
    scale_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* LogParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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:
  _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:caffe.LogParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float base = 1 [default = -1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_base(), target);
  }

  // optional float scale = 2 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_scale(), target);
  }

  // optional float shift = 3 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_shift(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.LogParameter)
  return target;
}

size_t LogParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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, &_cached_size_);
}

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

void LogParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<LogParameter *>(to)->MergeFrom(
      static_cast<const LogParameter &>(from));
}


void LogParameter::MergeFrom(const LogParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LogParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      shift_ = from.shift_;
    }
    if (cached_has_bits & 0x00000002u) {
      base_ = from.base_;
    }
    if (cached_has_bits & 0x00000004u) {
      scale_ = from.scale_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void LogParameter::CopyFrom(const LogParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(shift_, other->shift_);
  swap(base_, other->base_);
  swap(scale_, other->scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata LogParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[68]);
}

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

class LRNParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<LRNParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.LRNParameter)
}
LRNParameter::LRNParameter(const LRNParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&norm_region_, &from.norm_region_,
    static_cast<size_t>(reinterpret_cast<char*>(&k_) -
    reinterpret_cast<char*>(&norm_region_)) + sizeof(k_));
  // @@protoc_insertion_point(copy_constructor:caffe.LRNParameter)
}

inline void LRNParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&norm_region_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&engine_) -
    reinterpret_cast<char*>(&norm_region_)) + sizeof(engine_));
local_size_ = 5u;
alpha_ = 1;
beta_ = 0.75f;
k_ = 1;
}

LRNParameter::~LRNParameter() {
  // @@protoc_insertion_point(destructor:caffe.LRNParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void LRNParameter::ArenaDtor(void* object) {
  LRNParameter* _this = reinterpret_cast< LRNParameter* >(object);
  (void)_this;
}
void LRNParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LRNParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    ::memset(&norm_region_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&engine_) -
        reinterpret_cast<char*>(&norm_region_)) + sizeof(engine_));
    local_size_ = 5u;
    alpha_ = 1;
    beta_ = 0.75f;
    k_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* LRNParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          beta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::LRNParameter_NormRegion_IsValid(val))) {
            _internal_set_norm_region(static_cast<::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);
          k_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::LRNParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::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:
  _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:caffe.LRNParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 local_size = 1 [default = 5];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_local_size(), target);
  }

  // optional float alpha = 2 [default = 1];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_alpha(), target);
  }

  // optional float beta = 3 [default = 0.75];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_beta(), target);
  }

  // optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      4, this->_internal_norm_region(), target);
  }

  // optional float k = 5 [default = 1];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_k(), target);
  }

  // optional .caffe.LRNParameter.Engine engine = 6 [default = DEFAULT];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      6, this->_internal_engine(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.LRNParameter)
  return target;
}

size_t LRNParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    // optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_norm_region());
    }

    // optional .caffe.LRNParameter.Engine engine = 6 [default = DEFAULT];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
    }

    // optional uint32 local_size = 1 [default = 5];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

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

void LRNParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<LRNParameter *>(to)->MergeFrom(
      static_cast<const LRNParameter &>(from));
}


void LRNParameter::MergeFrom(const LRNParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LRNParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000003fu) {
    if (cached_has_bits & 0x00000001u) {
      norm_region_ = from.norm_region_;
    }
    if (cached_has_bits & 0x00000002u) {
      engine_ = from.engine_;
    }
    if (cached_has_bits & 0x00000004u) {
      local_size_ = from.local_size_;
    }
    if (cached_has_bits & 0x00000008u) {
      alpha_ = from.alpha_;
    }
    if (cached_has_bits & 0x00000010u) {
      beta_ = from.beta_;
    }
    if (cached_has_bits & 0x00000020u) {
      k_ = from.k_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void LRNParameter::CopyFrom(const LRNParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(LRNParameter, engine_)
      + sizeof(LRNParameter::engine_)
      - PROTOBUF_FIELD_OFFSET(LRNParameter, norm_region_)>(
          reinterpret_cast<char*>(&norm_region_),
          reinterpret_cast<char*>(&other->norm_region_));
  swap(local_size_, other->local_size_);
  swap(alpha_, other->alpha_);
  swap(beta_, other->beta_);
  swap(k_, other->k_);
}

::PROTOBUF_NAMESPACE_ID::Metadata LRNParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[69]);
}

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

class MemoryDataParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<MemoryDataParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.MemoryDataParameter)
}
MemoryDataParameter::MemoryDataParameter(const MemoryDataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&batch_size_, &from.batch_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&width_) -
    reinterpret_cast<char*>(&batch_size_)) + sizeof(width_));
  // @@protoc_insertion_point(copy_constructor:caffe.MemoryDataParameter)
}

inline void MemoryDataParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&batch_size_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&width_) -
    reinterpret_cast<char*>(&batch_size_)) + sizeof(width_));
}

MemoryDataParameter::~MemoryDataParameter() {
  // @@protoc_insertion_point(destructor:caffe.MemoryDataParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void MemoryDataParameter::ArenaDtor(void* object) {
  MemoryDataParameter* _this = reinterpret_cast< MemoryDataParameter* >(object);
  (void)_this;
}
void MemoryDataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void MemoryDataParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* MemoryDataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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);
          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:
  _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:caffe.MemoryDataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 batch_size = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_batch_size(), target);
  }

  // optional uint32 channels = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_channels(), target);
  }

  // optional uint32 height = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_height(), target);
  }

  // optional uint32 width = 4;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_width(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.MemoryDataParameter)
  return target;
}

size_t MemoryDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional uint32 batch_size = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
    }

    // optional uint32 channels = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_channels());
    }

    // optional uint32 height = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_height());
    }

    // optional uint32 width = 4;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_width());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void MemoryDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<MemoryDataParameter *>(to)->MergeFrom(
      static_cast<const MemoryDataParameter &>(from));
}


void MemoryDataParameter::MergeFrom(const MemoryDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.MemoryDataParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      batch_size_ = from.batch_size_;
    }
    if (cached_has_bits & 0x00000002u) {
      channels_ = from.channels_;
    }
    if (cached_has_bits & 0x00000004u) {
      height_ = from.height_;
    }
    if (cached_has_bits & 0x00000008u) {
      width_ = from.width_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void MemoryDataParameter::CopyFrom(const MemoryDataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(MemoryDataParameter, width_)
      + sizeof(MemoryDataParameter::width_)
      - PROTOBUF_FIELD_OFFSET(MemoryDataParameter, batch_size_)>(
          reinterpret_cast<char*>(&batch_size_),
          reinterpret_cast<char*>(&other->batch_size_));
}

::PROTOBUF_NAMESPACE_ID::Metadata MemoryDataParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[70]);
}

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

class MultiBoxLossParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<MultiBoxLossParameter>()._has_bits_);
  static void set_has_loc_loss_type(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static void set_has_conf_loss_type(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_loc_weight(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  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] |= 16384u;
  }
  static void set_has_match_type(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static void set_has_overlap_threshold(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static void set_has_use_prior_for_matching(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static void set_has_background_label_id(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_use_difficult_gt(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static void set_has_do_neg_mining(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_neg_pos_ratio(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static void set_has_neg_overlap(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static void set_has_code_type(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static void set_has_encode_variance_in_target(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_map_object_to_agnostic(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_ignore_cross_boundary_bbox(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_bp_inside(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static void set_has_mining_type(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static const ::caffe::NonMaximumSuppressionParameter& nms_param(const MultiBoxLossParameter* msg);
  static void set_has_nms_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_sample_size(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
  static void set_has_use_prior_for_nms(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
};

const ::caffe::NonMaximumSuppressionParameter&
MultiBoxLossParameter::_Internal::nms_param(const MultiBoxLossParameter* msg) {
  return *msg->nms_param_;
}
MultiBoxLossParameter::MultiBoxLossParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.MultiBoxLossParameter)
}
MultiBoxLossParameter::MultiBoxLossParameter(const MultiBoxLossParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_nms_param()) {
    nms_param_ = new ::caffe::NonMaximumSuppressionParameter(*from.nms_param_);
  } else {
    nms_param_ = nullptr;
  }
  ::memcpy(&conf_loss_type_, &from.conf_loss_type_,
    static_cast<size_t>(reinterpret_cast<char*>(&sample_size_) -
    reinterpret_cast<char*>(&conf_loss_type_)) + sizeof(sample_size_));
  // @@protoc_insertion_point(copy_constructor:caffe.MultiBoxLossParameter)
}

inline void MultiBoxLossParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&nms_param_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&use_prior_for_nms_) -
    reinterpret_cast<char*>(&nms_param_)) + sizeof(use_prior_for_nms_));
loc_loss_type_ = 1;
loc_weight_ = 1;
match_type_ = 1;
overlap_threshold_ = 0.5f;
share_location_ = true;
use_prior_for_matching_ = true;
use_difficult_gt_ = true;
neg_pos_ratio_ = 3;
neg_overlap_ = 0.5f;
code_type_ = 1;
mining_type_ = 1;
sample_size_ = 64;
}

MultiBoxLossParameter::~MultiBoxLossParameter() {
  // @@protoc_insertion_point(destructor:caffe.MultiBoxLossParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void MultiBoxLossParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete nms_param_;
}

void MultiBoxLossParameter::ArenaDtor(void* object) {
  MultiBoxLossParameter* _this = reinterpret_cast< MultiBoxLossParameter* >(object);
  (void)_this;
}
void MultiBoxLossParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void MultiBoxLossParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(nms_param_ != nullptr);
    nms_param_->Clear();
  }
  if (cached_has_bits & 0x000000feu) {
    ::memset(&conf_loss_type_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&ignore_cross_boundary_bbox_) -
        reinterpret_cast<char*>(&conf_loss_type_)) + sizeof(ignore_cross_boundary_bbox_));
  }
  if (cached_has_bits & 0x0000ff00u) {
    ::memset(&bp_inside_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&use_prior_for_nms_) -
        reinterpret_cast<char*>(&bp_inside_)) + sizeof(use_prior_for_nms_));
    loc_loss_type_ = 1;
    loc_weight_ = 1;
    match_type_ = 1;
    overlap_threshold_ = 0.5f;
    share_location_ = true;
    use_prior_for_matching_ = true;
  }
  if (cached_has_bits & 0x003f0000u) {
    use_difficult_gt_ = true;
    neg_pos_ratio_ = 3;
    neg_overlap_ = 0.5f;
    code_type_ = 1;
    mining_type_ = 1;
    sample_size_ = 64;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* MultiBoxLossParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .caffe.MultiBoxLossParameter.LocLossType loc_loss_type = 1 [default = SMOOTH_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(::caffe::MultiBoxLossParameter_LocLossType_IsValid(val))) {
            _internal_set_loc_loss_type(static_cast<::caffe::MultiBoxLossParameter_LocLossType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.MultiBoxLossParameter.ConfLossType conf_loss_type = 2 [default = SOFTMAX];
      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(::caffe::MultiBoxLossParameter_ConfLossType_IsValid(val))) {
            _internal_set_conf_loss_type(static_cast<::caffe::MultiBoxLossParameter_ConfLossType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional float loc_weight = 3 [default = 1];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_loc_weight(&has_bits);
          loc_weight_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 num_classes = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_num_classes(&has_bits);
          num_classes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool share_location = 5 [default = true];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_share_location(&has_bits);
          share_location_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.MultiBoxLossParameter.MatchType match_type = 6 [default = PER_PREDICTION];
      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(::caffe::MultiBoxLossParameter_MatchType_IsValid(val))) {
            _internal_set_match_type(static_cast<::caffe::MultiBoxLossParameter_MatchType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional float overlap_threshold = 7 [default = 0.5];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
          _Internal::set_has_overlap_threshold(&has_bits);
          overlap_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_prior_for_matching = 8 [default = true];
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          _Internal::set_has_use_prior_for_matching(&has_bits);
          use_prior_for_matching_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 background_label_id = 9 [default = 0];
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          _Internal::set_has_background_label_id(&has_bits);
          background_label_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_difficult_gt = 10 [default = true];
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          _Internal::set_has_use_difficult_gt(&has_bits);
          use_difficult_gt_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool do_neg_mining = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          _Internal::set_has_do_neg_mining(&has_bits);
          do_neg_mining_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float neg_pos_ratio = 12 [default = 3];
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 101)) {
          _Internal::set_has_neg_pos_ratio(&has_bits);
          neg_pos_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float neg_overlap = 13 [default = 0.5];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 109)) {
          _Internal::set_has_neg_overlap(&has_bits);
          neg_overlap_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.PriorBoxParameter.CodeType code_type = 14 [default = CORNER];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::caffe::PriorBoxParameter_CodeType_IsValid(val))) {
            _internal_set_code_type(static_cast<::caffe::PriorBoxParameter_CodeType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(14, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional bool encode_variance_in_target = 16 [default = false];
      case 16:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
          _Internal::set_has_encode_variance_in_target(&has_bits);
          encode_variance_in_target_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool map_object_to_agnostic = 17 [default = false];
      case 17:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
          _Internal::set_has_map_object_to_agnostic(&has_bits);
          map_object_to_agnostic_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool ignore_cross_boundary_bbox = 18 [default = false];
      case 18:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
          _Internal::set_has_ignore_cross_boundary_bbox(&has_bits);
          ignore_cross_boundary_bbox_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool bp_inside = 19 [default = false];
      case 19:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
          _Internal::set_has_bp_inside(&has_bits);
          bp_inside_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.MultiBoxLossParameter.MiningType mining_type = 20 [default = MAX_NEGATIVE];
      case 20:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::caffe::MultiBoxLossParameter_MiningType_IsValid(val))) {
            _internal_set_mining_type(static_cast<::caffe::MultiBoxLossParameter_MiningType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(20, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.NonMaximumSuppressionParameter nms_param = 21;
      case 21:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
          ptr = ctx->ParseMessage(_internal_mutable_nms_param(), ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional int32 sample_size = 22 [default = 64];
      case 22:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 176)) {
          _Internal::set_has_sample_size(&has_bits);
          sample_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool use_prior_for_nms = 23 [default = false];
      case 23:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 184)) {
          _Internal::set_has_use_prior_for_nms(&has_bits);
          use_prior_for_nms_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .caffe.MultiBoxLossParameter.LocLossType loc_loss_type = 1 [default = SMOOTH_L1];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_loc_loss_type(), target);
  }

  // optional .caffe.MultiBoxLossParameter.ConfLossType conf_loss_type = 2 [default = SOFTMAX];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      2, this->_internal_conf_loss_type(), target);
  }

  // optional float loc_weight = 3 [default = 1];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_loc_weight(), target);
  }

  // optional uint32 num_classes = 4;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_num_classes(), target);
  }

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

  // optional .caffe.MultiBoxLossParameter.MatchType match_type = 6 [default = PER_PREDICTION];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      6, this->_internal_match_type(), target);
  }

  // optional float overlap_threshold = 7 [default = 0.5];
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_overlap_threshold(), target);
  }

  // optional bool use_prior_for_matching = 8 [default = true];
  if (cached_has_bits & 0x00008000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_use_prior_for_matching(), target);
  }

  // optional uint32 background_label_id = 9 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(9, this->_internal_background_label_id(), target);
  }

  // optional bool use_difficult_gt = 10 [default = true];
  if (cached_has_bits & 0x00010000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_use_difficult_gt(), target);
  }

  // optional bool do_neg_mining = 11;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_do_neg_mining(), target);
  }

  // optional float neg_pos_ratio = 12 [default = 3];
  if (cached_has_bits & 0x00020000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(12, this->_internal_neg_pos_ratio(), target);
  }

  // optional float neg_overlap = 13 [default = 0.5];
  if (cached_has_bits & 0x00040000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(13, this->_internal_neg_overlap(), target);
  }

  // optional .caffe.PriorBoxParameter.CodeType code_type = 14 [default = CORNER];
  if (cached_has_bits & 0x00080000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      14, this->_internal_code_type(), target);
  }

  // optional bool encode_variance_in_target = 16 [default = false];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_encode_variance_in_target(), target);
  }

  // optional bool map_object_to_agnostic = 17 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_map_object_to_agnostic(), target);
  }

  // optional bool ignore_cross_boundary_bbox = 18 [default = false];
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(18, this->_internal_ignore_cross_boundary_bbox(), target);
  }

  // optional bool bp_inside = 19 [default = false];
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_bp_inside(), target);
  }

  // optional .caffe.MultiBoxLossParameter.MiningType mining_type = 20 [default = MAX_NEGATIVE];
  if (cached_has_bits & 0x00100000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      20, this->_internal_mining_type(), target);
  }

  // optional .caffe.NonMaximumSuppressionParameter nms_param = 21;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        21, _Internal::nms_param(this), target, stream);
  }

  // optional int32 sample_size = 22 [default = 64];
  if (cached_has_bits & 0x00200000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(22, this->_internal_sample_size(), target);
  }

  // optional bool use_prior_for_nms = 23 [default = false];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_use_prior_for_nms(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.MultiBoxLossParameter)
  return target;
}

size_t MultiBoxLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.MultiBoxLossParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .caffe.NonMaximumSuppressionParameter nms_param = 21;
    if (cached_has_bits & 0x00000001u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *nms_param_);
    }

    // optional .caffe.MultiBoxLossParameter.ConfLossType conf_loss_type = 2 [default = SOFTMAX];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_conf_loss_type());
    }

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

    // optional uint32 background_label_id = 9 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_background_label_id());
    }

    // optional bool do_neg_mining = 11;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 1;
    }

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

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

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

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

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

    // optional .caffe.MultiBoxLossParameter.LocLossType loc_loss_type = 1 [default = SMOOTH_L1];
    if (cached_has_bits & 0x00000400u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_loc_loss_type());
    }

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

    // optional .caffe.MultiBoxLossParameter.MatchType match_type = 6 [default = PER_PREDICTION];
    if (cached_has_bits & 0x00001000u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_match_type());
    }

    // optional float overlap_threshold = 7 [default = 0.5];
    if (cached_has_bits & 0x00002000u) {
      total_size += 1 + 4;
    }

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

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

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

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

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

    // optional .caffe.PriorBoxParameter.CodeType code_type = 14 [default = CORNER];
    if (cached_has_bits & 0x00080000u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_code_type());
    }

    // optional .caffe.MultiBoxLossParameter.MiningType mining_type = 20 [default = MAX_NEGATIVE];
    if (cached_has_bits & 0x00100000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_mining_type());
    }

    // optional int32 sample_size = 22 [default = 64];
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_sample_size());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void MultiBoxLossParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<MultiBoxLossParameter *>(to)->MergeFrom(
      static_cast<const MultiBoxLossParameter &>(from));
}


void MultiBoxLossParameter::MergeFrom(const MultiBoxLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.MultiBoxLossParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_nms_param()->::caffe::NonMaximumSuppressionParameter::MergeFrom(from._internal_nms_param());
    }
    if (cached_has_bits & 0x00000002u) {
      conf_loss_type_ = from.conf_loss_type_;
    }
    if (cached_has_bits & 0x00000004u) {
      num_classes_ = from.num_classes_;
    }
    if (cached_has_bits & 0x00000008u) {
      background_label_id_ = from.background_label_id_;
    }
    if (cached_has_bits & 0x00000010u) {
      do_neg_mining_ = from.do_neg_mining_;
    }
    if (cached_has_bits & 0x00000020u) {
      encode_variance_in_target_ = from.encode_variance_in_target_;
    }
    if (cached_has_bits & 0x00000040u) {
      map_object_to_agnostic_ = from.map_object_to_agnostic_;
    }
    if (cached_has_bits & 0x00000080u) {
      ignore_cross_boundary_bbox_ = from.ignore_cross_boundary_bbox_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      bp_inside_ = from.bp_inside_;
    }
    if (cached_has_bits & 0x00000200u) {
      use_prior_for_nms_ = from.use_prior_for_nms_;
    }
    if (cached_has_bits & 0x00000400u) {
      loc_loss_type_ = from.loc_loss_type_;
    }
    if (cached_has_bits & 0x00000800u) {
      loc_weight_ = from.loc_weight_;
    }
    if (cached_has_bits & 0x00001000u) {
      match_type_ = from.match_type_;
    }
    if (cached_has_bits & 0x00002000u) {
      overlap_threshold_ = from.overlap_threshold_;
    }
    if (cached_has_bits & 0x00004000u) {
      share_location_ = from.share_location_;
    }
    if (cached_has_bits & 0x00008000u) {
      use_prior_for_matching_ = from.use_prior_for_matching_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x003f0000u) {
    if (cached_has_bits & 0x00010000u) {
      use_difficult_gt_ = from.use_difficult_gt_;
    }
    if (cached_has_bits & 0x00020000u) {
      neg_pos_ratio_ = from.neg_pos_ratio_;
    }
    if (cached_has_bits & 0x00040000u) {
      neg_overlap_ = from.neg_overlap_;
    }
    if (cached_has_bits & 0x00080000u) {
      code_type_ = from.code_type_;
    }
    if (cached_has_bits & 0x00100000u) {
      mining_type_ = from.mining_type_;
    }
    if (cached_has_bits & 0x00200000u) {
      sample_size_ = from.sample_size_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void MultiBoxLossParameter::InternalSwap(MultiBoxLossParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(MultiBoxLossParameter, use_prior_for_nms_)
      + sizeof(MultiBoxLossParameter::use_prior_for_nms_)
      - PROTOBUF_FIELD_OFFSET(MultiBoxLossParameter, nms_param_)>(
          reinterpret_cast<char*>(&nms_param_),
          reinterpret_cast<char*>(&other->nms_param_));
  swap(loc_loss_type_, other->loc_loss_type_);
  swap(loc_weight_, other->loc_weight_);
  swap(match_type_, other->match_type_);
  swap(overlap_threshold_, other->overlap_threshold_);
  swap(share_location_, other->share_location_);
  swap(use_prior_for_matching_, other->use_prior_for_matching_);
  swap(use_difficult_gt_, other->use_difficult_gt_);
  swap(neg_pos_ratio_, other->neg_pos_ratio_);
  swap(neg_overlap_, other->neg_overlap_);
  swap(code_type_, other->code_type_);
  swap(mining_type_, other->mining_type_);
  swap(sample_size_, other->sample_size_);
}

::PROTOBUF_NAMESPACE_ID::Metadata MultiBoxLossParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[71]);
}

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

class MVNParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<MVNParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.MVNParameter)
}
MVNParameter::MVNParameter(const MVNParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&across_channels_, &from.across_channels_,
    static_cast<size_t>(reinterpret_cast<char*>(&eps_) -
    reinterpret_cast<char*>(&across_channels_)) + sizeof(eps_));
  // @@protoc_insertion_point(copy_constructor:caffe.MVNParameter)
}

inline void MVNParameter::SharedCtor() {
across_channels_ = false;
normalize_variance_ = true;
eps_ = 1e-09f;
}

MVNParameter::~MVNParameter() {
  // @@protoc_insertion_point(destructor:caffe.MVNParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void MVNParameter::ArenaDtor(void* object) {
  MVNParameter* _this = reinterpret_cast< MVNParameter* >(object);
  (void)_this;
}
void MVNParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void MVNParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    across_channels_ = false;
    normalize_variance_ = true;
    eps_ = 1e-09f;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* MVNParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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:
  _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:caffe.MVNParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional bool normalize_variance = 1 [default = true];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_eps(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.MVNParameter)
  return target;
}

size_t MVNParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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, &_cached_size_);
}

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

void MVNParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<MVNParameter *>(to)->MergeFrom(
      static_cast<const MVNParameter &>(from));
}


void MVNParameter::MergeFrom(const MVNParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.MVNParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      across_channels_ = from.across_channels_;
    }
    if (cached_has_bits & 0x00000002u) {
      normalize_variance_ = from.normalize_variance_;
    }
    if (cached_has_bits & 0x00000004u) {
      eps_ = from.eps_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void MVNParameter::CopyFrom(const MVNParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(across_channels_, other->across_channels_);
  swap(normalize_variance_, other->normalize_variance_);
  swap(eps_, other->eps_);
}

::PROTOBUF_NAMESPACE_ID::Metadata MVNParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[72]);
}

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

class NormalizeParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<NormalizeParameter>()._has_bits_);
  static void set_has_across_spatial(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static const ::caffe::FillerParameter& scale_filler(const NormalizeParameter* 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 ::caffe::FillerParameter&
NormalizeParameter::_Internal::scale_filler(const NormalizeParameter* msg) {
  return *msg->scale_filler_;
}
NormalizeParameter::NormalizeParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.NormalizeParameter)
}
NormalizeParameter::NormalizeParameter(const NormalizeParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_scale_filler()) {
    scale_filler_ = new ::caffe::FillerParameter(*from.scale_filler_);
  } else {
    scale_filler_ = nullptr;
  }
  ::memcpy(&across_spatial_, &from.across_spatial_,
    static_cast<size_t>(reinterpret_cast<char*>(&eps_) -
    reinterpret_cast<char*>(&across_spatial_)) + sizeof(eps_));
  // @@protoc_insertion_point(copy_constructor:caffe.NormalizeParameter)
}

inline void NormalizeParameter::SharedCtor() {
scale_filler_ = nullptr;
across_spatial_ = true;
channel_shared_ = true;
eps_ = 1e-10f;
}

NormalizeParameter::~NormalizeParameter() {
  // @@protoc_insertion_point(destructor:caffe.NormalizeParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void NormalizeParameter::ArenaDtor(void* object) {
  NormalizeParameter* _this = reinterpret_cast< NormalizeParameter* >(object);
  (void)_this;
}
void NormalizeParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NormalizeParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(scale_filler_ != nullptr);
      scale_filler_->Clear();
    }
    across_spatial_ = true;
    channel_shared_ = true;
    eps_ = 1e-10f;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* NormalizeParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          across_spatial_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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);
          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);
          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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

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

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

  // optional bool channel_shared = 3 [default = true];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_eps(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.NormalizeParameter)
  return target;
}

size_t NormalizeParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.NormalizeParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    // optional .caffe.FillerParameter scale_filler = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *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, &_cached_size_);
}

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

void NormalizeParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<NormalizeParameter *>(to)->MergeFrom(
      static_cast<const NormalizeParameter &>(from));
}


void NormalizeParameter::MergeFrom(const NormalizeParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NormalizeParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_scale_filler()->::caffe::FillerParameter::MergeFrom(from._internal_scale_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      across_spatial_ = from.across_spatial_;
    }
    if (cached_has_bits & 0x00000004u) {
      channel_shared_ = from.channel_shared_;
    }
    if (cached_has_bits & 0x00000008u) {
      eps_ = from.eps_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

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

::PROTOBUF_NAMESPACE_ID::Metadata NormalizeParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[73]);
}

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

class ParameterParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ParameterParameter>()._has_bits_);
  static const ::caffe::BlobShape& shape(const ParameterParameter* msg);
  static void set_has_shape(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

const ::caffe::BlobShape&
ParameterParameter::_Internal::shape(const ParameterParameter* msg) {
  return *msg->shape_;
}
ParameterParameter::ParameterParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ParameterParameter)
}
ParameterParameter::ParameterParameter(const ParameterParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_shape()) {
    shape_ = new ::caffe::BlobShape(*from.shape_);
  } else {
    shape_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:caffe.ParameterParameter)
}

inline void ParameterParameter::SharedCtor() {
shape_ = nullptr;
}

ParameterParameter::~ParameterParameter() {
  // @@protoc_insertion_point(destructor:caffe.ParameterParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void ParameterParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete shape_;
}

void ParameterParameter::ArenaDtor(void* object) {
  ParameterParameter* _this = reinterpret_cast< ParameterParameter* >(object);
  (void)_this;
}
void ParameterParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ParameterParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(shape_ != nullptr);
    shape_->Clear();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ParameterParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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:
  _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:caffe.ParameterParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.BlobShape shape = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::shape(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ParameterParameter)
  return target;
}

size_t ParameterParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 .caffe.BlobShape shape = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *shape_);
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ParameterParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ParameterParameter *>(to)->MergeFrom(
      static_cast<const ParameterParameter &>(from));
}


void ParameterParameter::MergeFrom(const ParameterParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ParameterParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_shape()) {
    _internal_mutable_shape()->::caffe::BlobShape::MergeFrom(from._internal_shape());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ParameterParameter::CopyFrom(const ParameterParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(shape_, other->shape_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ParameterParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[74]);
}

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

class PermuteParameter::_Internal {
 public:
};

PermuteParameter::PermuteParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  order_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.PermuteParameter)
}
PermuteParameter::PermuteParameter(const PermuteParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      order_(from.order_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:caffe.PermuteParameter)
}

inline void PermuteParameter::SharedCtor() {
}

PermuteParameter::~PermuteParameter() {
  // @@protoc_insertion_point(destructor:caffe.PermuteParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void PermuteParameter::ArenaDtor(void* object) {
  PermuteParameter* _this = reinterpret_cast< PermuteParameter* >(object);
  (void)_this;
}
void PermuteParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PermuteParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* PermuteParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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: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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_order(i), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.PermuteParameter)
  return target;
}

size_t PermuteParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->order_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_order_size());
    total_size += data_size;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void PermuteParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<PermuteParameter *>(to)->MergeFrom(
      static_cast<const PermuteParameter &>(from));
}


void PermuteParameter::MergeFrom(const PermuteParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PermuteParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void PermuteParameter::CopyFrom(const PermuteParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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_);
  order_.InternalSwap(&other->order_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PermuteParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[75]);
}

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

class PoolingParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<PoolingParameter>()._has_bits_);
  static void set_has_avg_include_pad(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  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] |= 4096u;
  }
  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_round_mode(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
};

PoolingParameter::PoolingParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.PoolingParameter)
}
PoolingParameter::PoolingParameter(const PoolingParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&pool_, &from.pool_,
    static_cast<size_t>(reinterpret_cast<char*>(&avg_include_pad_) -
    reinterpret_cast<char*>(&pool_)) + sizeof(avg_include_pad_));
  // @@protoc_insertion_point(copy_constructor:caffe.PoolingParameter)
}

inline void PoolingParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&pool_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&round_mode_) -
    reinterpret_cast<char*>(&pool_)) + sizeof(round_mode_));
stride_ = 1u;
avg_include_pad_ = true;
}

PoolingParameter::~PoolingParameter() {
  // @@protoc_insertion_point(destructor:caffe.PoolingParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void PoolingParameter::ArenaDtor(void* object) {
  PoolingParameter* _this = reinterpret_cast< PoolingParameter* >(object);
  (void)_this;
}
void PoolingParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PoolingParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    ::memset(&pool_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&pad_h_) -
        reinterpret_cast<char*>(&pool_)) + sizeof(pad_h_));
  }
  if (cached_has_bits & 0x00003f00u) {
    ::memset(&pad_w_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&round_mode_) -
        reinterpret_cast<char*>(&pad_w_)) + sizeof(round_mode_));
    stride_ = 1u;
    avg_include_pad_ = true;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PoolingParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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(::caffe::PoolingParameter_PoolMethod_IsValid(val))) {
            _internal_set_pool(static_cast<::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);
          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);
          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);
          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);
          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);
          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);
          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);
          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);
          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);
          pad_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::PoolingParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::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);
          global_pooling_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool avg_include_pad = 13 [default = true];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
          _Internal::set_has_avg_include_pad(&has_bits);
          avg_include_pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .caffe.PoolingParameter.RoundMode round_mode = 14 [default = CEIL];
      case 14:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
          uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
          if (PROTOBUF_PREDICT_TRUE(::caffe::PoolingParameter_RoundMode_IsValid(val))) {
            _internal_set_round_mode(static_cast<::caffe::PoolingParameter_RoundMode>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(14, 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:
  _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:caffe.PoolingParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_pool(), target);
  }

  // optional uint32 kernel_size = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_kernel_size(), target);
  }

  // optional uint32 stride = 3 [default = 1];
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_stride(), target);
  }

  // optional uint32 pad = 4 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_pad(), target);
  }

  // optional uint32 kernel_h = 5;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_kernel_h(), target);
  }

  // optional uint32 kernel_w = 6;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_kernel_w(), target);
  }

  // optional uint32 stride_h = 7;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_stride_h(), target);
  }

  // optional uint32 stride_w = 8;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_pad_w(), target);
  }

  // optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      11, this->_internal_engine(), target);
  }

  // optional bool global_pooling = 12 [default = false];
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_global_pooling(), target);
  }

  // optional bool avg_include_pad = 13 [default = true];
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_avg_include_pad(), target);
  }

  // optional .caffe.PoolingParameter.RoundMode round_mode = 14 [default = CEIL];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      14, this->_internal_round_mode(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.PoolingParameter)
  return target;
}

size_t PoolingParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_pool());
    }

    // optional uint32 kernel_size = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_size());
    }

    // optional uint32 pad = 4 [default = 0];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad());
    }

    // optional uint32 kernel_h = 5;
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_h());
    }

    // optional uint32 kernel_w = 6;
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_w());
    }

    // optional uint32 stride_h = 7;
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_h());
    }

    // optional uint32 stride_w = 8;
    if (cached_has_bits & 0x00000040u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_w());
    }

    // optional uint32 pad_h = 9 [default = 0];
    if (cached_has_bits & 0x00000080u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_h());
    }

  }
  if (cached_has_bits & 0x00003f00u) {
    // optional uint32 pad_w = 10 [default = 0];
    if (cached_has_bits & 0x00000100u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_w());
    }

    // optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
    if (cached_has_bits & 0x00000200u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
    }

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

    // optional .caffe.PoolingParameter.RoundMode round_mode = 14 [default = CEIL];
    if (cached_has_bits & 0x00000800u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_round_mode());
    }

    // optional uint32 stride = 3 [default = 1];
    if (cached_has_bits & 0x00001000u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride());
    }

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void PoolingParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<PoolingParameter *>(to)->MergeFrom(
      static_cast<const PoolingParameter &>(from));
}


void PoolingParameter::MergeFrom(const PoolingParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PoolingParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      pool_ = from.pool_;
    }
    if (cached_has_bits & 0x00000002u) {
      kernel_size_ = from.kernel_size_;
    }
    if (cached_has_bits & 0x00000004u) {
      pad_ = from.pad_;
    }
    if (cached_has_bits & 0x00000008u) {
      kernel_h_ = from.kernel_h_;
    }
    if (cached_has_bits & 0x00000010u) {
      kernel_w_ = from.kernel_w_;
    }
    if (cached_has_bits & 0x00000020u) {
      stride_h_ = from.stride_h_;
    }
    if (cached_has_bits & 0x00000040u) {
      stride_w_ = from.stride_w_;
    }
    if (cached_has_bits & 0x00000080u) {
      pad_h_ = from.pad_h_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00003f00u) {
    if (cached_has_bits & 0x00000100u) {
      pad_w_ = from.pad_w_;
    }
    if (cached_has_bits & 0x00000200u) {
      engine_ = from.engine_;
    }
    if (cached_has_bits & 0x00000400u) {
      global_pooling_ = from.global_pooling_;
    }
    if (cached_has_bits & 0x00000800u) {
      round_mode_ = from.round_mode_;
    }
    if (cached_has_bits & 0x00001000u) {
      stride_ = from.stride_;
    }
    if (cached_has_bits & 0x00002000u) {
      avg_include_pad_ = from.avg_include_pad_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void PoolingParameter::CopyFrom(const PoolingParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PoolingParameter, round_mode_)
      + sizeof(PoolingParameter::round_mode_)
      - PROTOBUF_FIELD_OFFSET(PoolingParameter, pool_)>(
          reinterpret_cast<char*>(&pool_),
          reinterpret_cast<char*>(&other->pool_));
  swap(stride_, other->stride_);
  swap(avg_include_pad_, other->avg_include_pad_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PoolingParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[76]);
}

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

class Pooling3DParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<Pooling3DParameter>()._has_bits_);
  static void set_has_pool(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_kernel_size(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_kernel_depth(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_stride(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_temporal_stride(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static void set_has_pad(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_temporal_pad(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
};

Pooling3DParameter::Pooling3DParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.Pooling3DParameter)
}
Pooling3DParameter::Pooling3DParameter(const Pooling3DParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&pool_, &from.pool_,
    static_cast<size_t>(reinterpret_cast<char*>(&temporal_stride_) -
    reinterpret_cast<char*>(&pool_)) + sizeof(temporal_stride_));
  // @@protoc_insertion_point(copy_constructor:caffe.Pooling3DParameter)
}

inline void Pooling3DParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&pool_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&temporal_pad_) -
    reinterpret_cast<char*>(&pool_)) + sizeof(temporal_pad_));
stride_ = 1u;
temporal_stride_ = 1u;
}

Pooling3DParameter::~Pooling3DParameter() {
  // @@protoc_insertion_point(destructor:caffe.Pooling3DParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void Pooling3DParameter::ArenaDtor(void* object) {
  Pooling3DParameter* _this = reinterpret_cast< Pooling3DParameter* >(object);
  (void)_this;
}
void Pooling3DParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Pooling3DParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    ::memset(&pool_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&temporal_pad_) -
        reinterpret_cast<char*>(&pool_)) + sizeof(temporal_pad_));
    stride_ = 1u;
    temporal_stride_ = 1u;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* Pooling3DParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .caffe.Pooling3DParameter.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(::caffe::Pooling3DParameter_PoolMethod_IsValid(val))) {
            _internal_set_pool(static_cast<::caffe::Pooling3DParameter_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);
          kernel_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 kernel_depth = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
          _Internal::set_has_kernel_depth(&has_bits);
          kernel_depth_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 stride = 4 [default = 1];
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
          _Internal::set_has_stride(&has_bits);
          stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 temporal_stride = 5 [default = 1];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_temporal_stride(&has_bits);
          temporal_stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 pad = 6 [default = 0];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
          _Internal::set_has_pad(&has_bits);
          pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional uint32 temporal_pad = 7 [default = 0];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
          _Internal::set_has_temporal_pad(&has_bits);
          temporal_pad_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

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

  cached_has_bits = _has_bits_[0];
  // optional .caffe.Pooling3DParameter.PoolMethod pool = 1 [default = MAX];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_pool(), target);
  }

  // optional uint32 kernel_size = 2;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_kernel_size(), target);
  }

  // optional uint32 kernel_depth = 3;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_kernel_depth(), target);
  }

  // optional uint32 stride = 4 [default = 1];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_stride(), target);
  }

  // optional uint32 temporal_stride = 5 [default = 1];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_temporal_stride(), target);
  }

  // optional uint32 pad = 6 [default = 0];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_pad(), target);
  }

  // optional uint32 temporal_pad = 7 [default = 0];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_temporal_pad(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.Pooling3DParameter)
  return target;
}

size_t Pooling3DParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.Pooling3DParameter)
  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 = _has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    // optional .caffe.Pooling3DParameter.PoolMethod pool = 1 [default = MAX];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_pool());
    }

    // optional uint32 kernel_size = 2;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_size());
    }

    // optional uint32 kernel_depth = 3;
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_depth());
    }

    // optional uint32 pad = 6 [default = 0];
    if (cached_has_bits & 0x00000008u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad());
    }

    // optional uint32 temporal_pad = 7 [default = 0];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_temporal_pad());
    }

    // optional uint32 stride = 4 [default = 1];
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride());
    }

    // optional uint32 temporal_stride = 5 [default = 1];
    if (cached_has_bits & 0x00000040u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_temporal_stride());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void Pooling3DParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<Pooling3DParameter *>(to)->MergeFrom(
      static_cast<const Pooling3DParameter &>(from));
}


void Pooling3DParameter::MergeFrom(const Pooling3DParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.Pooling3DParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      pool_ = from.pool_;
    }
    if (cached_has_bits & 0x00000002u) {
      kernel_size_ = from.kernel_size_;
    }
    if (cached_has_bits & 0x00000004u) {
      kernel_depth_ = from.kernel_depth_;
    }
    if (cached_has_bits & 0x00000008u) {
      pad_ = from.pad_;
    }
    if (cached_has_bits & 0x00000010u) {
      temporal_pad_ = from.temporal_pad_;
    }
    if (cached_has_bits & 0x00000020u) {
      stride_ = from.stride_;
    }
    if (cached_has_bits & 0x00000040u) {
      temporal_stride_ = from.temporal_stride_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

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

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

void Pooling3DParameter::InternalSwap(Pooling3DParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(Pooling3DParameter, temporal_pad_)
      + sizeof(Pooling3DParameter::temporal_pad_)
      - PROTOBUF_FIELD_OFFSET(Pooling3DParameter, pool_)>(
          reinterpret_cast<char*>(&pool_),
          reinterpret_cast<char*>(&other->pool_));
  swap(stride_, other->stride_);
  swap(temporal_stride_, other->temporal_stride_);
}

::PROTOBUF_NAMESPACE_ID::Metadata Pooling3DParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[77]);
}

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

class PowerParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<PowerParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.PowerParameter)
}
PowerParameter::PowerParameter(const PowerParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&shift_, &from.shift_,
    static_cast<size_t>(reinterpret_cast<char*>(&scale_) -
    reinterpret_cast<char*>(&shift_)) + sizeof(scale_));
  // @@protoc_insertion_point(copy_constructor:caffe.PowerParameter)
}

inline void PowerParameter::SharedCtor() {
shift_ = 0;
power_ = 1;
scale_ = 1;
}

PowerParameter::~PowerParameter() {
  // @@protoc_insertion_point(destructor:caffe.PowerParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void PowerParameter::ArenaDtor(void* object) {
  PowerParameter* _this = reinterpret_cast< PowerParameter* >(object);
  (void)_this;
}
void PowerParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PowerParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    shift_ = 0;
    power_ = 1;
    scale_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PowerParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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);
          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:
  _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:caffe.PowerParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float power = 1 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_power(), target);
  }

  // optional float scale = 2 [default = 1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_scale(), target);
  }

  // optional float shift = 3 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_shift(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.PowerParameter)
  return target;
}

size_t PowerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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, &_cached_size_);
}

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

void PowerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<PowerParameter *>(to)->MergeFrom(
      static_cast<const PowerParameter &>(from));
}


void PowerParameter::MergeFrom(const PowerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PowerParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      shift_ = from.shift_;
    }
    if (cached_has_bits & 0x00000002u) {
      power_ = from.power_;
    }
    if (cached_has_bits & 0x00000004u) {
      scale_ = from.scale_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void PowerParameter::CopyFrom(const PowerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(shift_, other->shift_);
  swap(power_, other->power_);
  swap(scale_, other->scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PowerParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[78]);
}

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

class PriorBoxParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<PriorBoxParameter>()._has_bits_);
  static void set_has_flip(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static void set_has_clip(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_img_size(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_img_h(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_img_w(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_step(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_step_h(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_step_w(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  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),
  min_size_(arena),
  max_size_(arena),
  aspect_ratio_(arena),
  variance_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.PriorBoxParameter)
}
PriorBoxParameter::PriorBoxParameter(const PriorBoxParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      min_size_(from.min_size_),
      max_size_(from.max_size_),
      aspect_ratio_(from.aspect_ratio_),
      variance_(from.variance_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&clip_, &from.clip_,
    static_cast<size_t>(reinterpret_cast<char*>(&offset_) -
    reinterpret_cast<char*>(&clip_)) + sizeof(offset_));
  // @@protoc_insertion_point(copy_constructor:caffe.PriorBoxParameter)
}

inline void PriorBoxParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&clip_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&step_w_) -
    reinterpret_cast<char*>(&clip_)) + sizeof(step_w_));
flip_ = true;
offset_ = 0.5f;
}

PriorBoxParameter::~PriorBoxParameter() {
  // @@protoc_insertion_point(destructor:caffe.PriorBoxParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void PriorBoxParameter::ArenaDtor(void* object) {
  PriorBoxParameter* _this = reinterpret_cast< PriorBoxParameter* >(object);
  (void)_this;
}
void PriorBoxParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PriorBoxParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* PriorBoxParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          flip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool clip = 5 [default = false];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_clip(&has_bits);
          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);
          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);
          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);
          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);
          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);
          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);
          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);
          offset_ = ::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:
  _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: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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_aspect_ratio(i), target);
  }

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

  // optional bool clip = 5 [default = false];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_variance(i), target);
  }

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

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

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

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

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

  // optional float step_w = 12;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(13, this->_internal_offset(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.PriorBoxParameter)
  return target;
}

size_t PriorBoxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_variance_size());
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    // optional bool clip = 5 [default = false];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 1;
    }

    // optional uint32 img_size = 7;
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_img_size());
    }

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

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

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

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

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

    // optional bool flip = 4 [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, &_cached_size_);
}

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

void PriorBoxParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<PriorBoxParameter *>(to)->MergeFrom(
      static_cast<const PriorBoxParameter &>(from));
}


void PriorBoxParameter::MergeFrom(const PriorBoxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PriorBoxParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

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

void PriorBoxParameter::CopyFrom(const PriorBoxParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  min_size_.InternalSwap(&other->min_size_);
  max_size_.InternalSwap(&other->max_size_);
  aspect_ratio_.InternalSwap(&other->aspect_ratio_);
  variance_.InternalSwap(&other->variance_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PriorBoxParameter, step_w_)
      + sizeof(PriorBoxParameter::step_w_)
      - PROTOBUF_FIELD_OFFSET(PriorBoxParameter, clip_)>(
          reinterpret_cast<char*>(&clip_),
          reinterpret_cast<char*>(&other->clip_));
  swap(flip_, other->flip_);
  swap(offset_, other->offset_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PriorBoxParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[79]);
}

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

class PythonParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<PythonParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.PythonParameter)
}
PythonParameter::PythonParameter(const PythonParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  module_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    module_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_module()) {
    module_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_module(), 
      GetArenaForAllocation());
  }
  layer_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    layer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_layer()) {
    layer_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_layer(), 
      GetArenaForAllocation());
  }
  param_str_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    param_str_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_param_str()) {
    param_str_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_param_str(), 
      GetArenaForAllocation());
  }
  share_in_parallel_ = from.share_in_parallel_;
  // @@protoc_insertion_point(copy_constructor:caffe.PythonParameter)
}

inline void PythonParameter::SharedCtor() {
module_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  module_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
layer_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  layer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
param_str_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  param_str_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
share_in_parallel_ = false;
}

PythonParameter::~PythonParameter() {
  // @@protoc_insertion_point(destructor:caffe.PythonParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void PythonParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  module_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  layer_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  param_str_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void PythonParameter::ArenaDtor(void* object) {
  PythonParameter* _this = reinterpret_cast< PythonParameter* >(object);
  (void)_this;
}
void PythonParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PythonParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      module_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      layer_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      param_str_.ClearNonDefaultToEmpty();
    }
  }
  share_in_parallel_ = false;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PythonParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.PythonParameter.module");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.PythonParameter.layer");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.PythonParameter.param_str");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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:
  _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:caffe.PythonParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "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,
      "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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_share_in_parallel(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.PythonParameter)
  return target;
}

size_t PythonParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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, &_cached_size_);
}

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

void PythonParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<PythonParameter *>(to)->MergeFrom(
      static_cast<const PythonParameter &>(from));
}


void PythonParameter::MergeFrom(const PythonParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PythonParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_module(from._internal_module());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_layer(from._internal_layer());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_param_str(from._internal_param_str());
    }
    if (cached_has_bits & 0x00000008u) {
      share_in_parallel_ = from.share_in_parallel_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void PythonParameter::CopyFrom(const PythonParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &module_, lhs_arena,
      &other->module_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &layer_, lhs_arena,
      &other->layer_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &param_str_, lhs_arena,
      &other->param_str_, rhs_arena
  );
  swap(share_in_parallel_, other->share_in_parallel_);
}

::PROTOBUF_NAMESPACE_ID::Metadata PythonParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[80]);
}

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

class RecurrentParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<RecurrentParameter>()._has_bits_);
  static void set_has_num_output(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::caffe::FillerParameter& weight_filler(const RecurrentParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static const ::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 ::caffe::FillerParameter&
RecurrentParameter::_Internal::weight_filler(const RecurrentParameter* msg) {
  return *msg->weight_filler_;
}
const ::caffe::FillerParameter&
RecurrentParameter::_Internal::bias_filler(const RecurrentParameter* msg) {
  return *msg->bias_filler_;
}
RecurrentParameter::RecurrentParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.RecurrentParameter)
}
RecurrentParameter::RecurrentParameter(const RecurrentParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_weight_filler()) {
    weight_filler_ = new ::caffe::FillerParameter(*from.weight_filler_);
  } else {
    weight_filler_ = nullptr;
  }
  if (from._internal_has_bias_filler()) {
    bias_filler_ = new ::caffe::FillerParameter(*from.bias_filler_);
  } else {
    bias_filler_ = nullptr;
  }
  ::memcpy(&num_output_, &from.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&expose_hidden_) -
    reinterpret_cast<char*>(&num_output_)) + sizeof(expose_hidden_));
  // @@protoc_insertion_point(copy_constructor:caffe.RecurrentParameter)
}

inline void RecurrentParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&expose_hidden_) -
    reinterpret_cast<char*>(&weight_filler_)) + sizeof(expose_hidden_));
}

RecurrentParameter::~RecurrentParameter() {
  // @@protoc_insertion_point(destructor:caffe.RecurrentParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void RecurrentParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete weight_filler_;
  if (this != internal_default_instance()) delete bias_filler_;
}

void RecurrentParameter::ArenaDtor(void* object) {
  RecurrentParameter* _this = reinterpret_cast< RecurrentParameter* >(object);
  (void)_this;
}
void RecurrentParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void RecurrentParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(weight_filler_ != nullptr);
      weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(bias_filler_ != nullptr);
      bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x0000001cu) {
    ::memset(&num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&expose_hidden_) -
        reinterpret_cast<char*>(&num_output_)) + sizeof(expose_hidden_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* RecurrentParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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 .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);
          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);
          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:
  _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:caffe.RecurrentParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 num_output = 1 [default = 0];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
  }

  // optional .caffe.FillerParameter weight_filler = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::weight_filler(this), target, stream);
  }

  // optional .caffe.FillerParameter bias_filler = 3;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::bias_filler(this), target, stream);
  }

  // optional bool debug_info = 4 [default = false];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_expose_hidden(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.RecurrentParameter)
  return target;
}

size_t RecurrentParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional .caffe.FillerParameter weight_filler = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *weight_filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 3;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *bias_filler_);
    }

    // optional uint32 num_output = 1 [default = 0];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

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

void RecurrentParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<RecurrentParameter *>(to)->MergeFrom(
      static_cast<const RecurrentParameter &>(from));
}


void RecurrentParameter::MergeFrom(const RecurrentParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.RecurrentParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_weight_filler()->::caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      num_output_ = from.num_output_;
    }
    if (cached_has_bits & 0x00000008u) {
      debug_info_ = from.debug_info_;
    }
    if (cached_has_bits & 0x00000010u) {
      expose_hidden_ = from.expose_hidden_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void RecurrentParameter::CopyFrom(const RecurrentParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(RecurrentParameter, expose_hidden_)
      + sizeof(RecurrentParameter::expose_hidden_)
      - PROTOBUF_FIELD_OFFSET(RecurrentParameter, weight_filler_)>(
          reinterpret_cast<char*>(&weight_filler_),
          reinterpret_cast<char*>(&other->weight_filler_));
}

::PROTOBUF_NAMESPACE_ID::Metadata RecurrentParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[81]);
}

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

class ReductionParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ReductionParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ReductionParameter)
}
ReductionParameter::ReductionParameter(const ReductionParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&axis_, &from.axis_,
    static_cast<size_t>(reinterpret_cast<char*>(&coeff_) -
    reinterpret_cast<char*>(&axis_)) + sizeof(coeff_));
  // @@protoc_insertion_point(copy_constructor:caffe.ReductionParameter)
}

inline void ReductionParameter::SharedCtor() {
axis_ = 0;
operation_ = 1;
coeff_ = 1;
}

ReductionParameter::~ReductionParameter() {
  // @@protoc_insertion_point(destructor:caffe.ReductionParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ReductionParameter::ArenaDtor(void* object) {
  ReductionParameter* _this = reinterpret_cast< ReductionParameter* >(object);
  (void)_this;
}
void ReductionParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ReductionParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* ReductionParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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(::caffe::ReductionParameter_ReductionOp_IsValid(val))) {
            _internal_set_operation(static_cast<::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);
          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);
          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:
  _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:caffe.ReductionParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_operation(), target);
  }

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

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

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ReductionParameter)
  return target;
}

size_t ReductionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional int32 axis = 2 [default = 0];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

    // optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_operation());
    }

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

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ReductionParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ReductionParameter *>(to)->MergeFrom(
      static_cast<const ReductionParameter &>(from));
}


void ReductionParameter::MergeFrom(const ReductionParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ReductionParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      axis_ = from.axis_;
    }
    if (cached_has_bits & 0x00000002u) {
      operation_ = from.operation_;
    }
    if (cached_has_bits & 0x00000004u) {
      coeff_ = from.coeff_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ReductionParameter::CopyFrom(const ReductionParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(axis_, other->axis_);
  swap(operation_, other->operation_);
  swap(coeff_, other->coeff_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ReductionParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[82]);
}

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

class ReLUParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ReLUParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ReLUParameter)
}
ReLUParameter::ReLUParameter(const ReLUParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&negative_slope_, &from.negative_slope_,
    static_cast<size_t>(reinterpret_cast<char*>(&engine_) -
    reinterpret_cast<char*>(&negative_slope_)) + sizeof(engine_));
  // @@protoc_insertion_point(copy_constructor:caffe.ReLUParameter)
}

inline void ReLUParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&negative_slope_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&engine_) -
    reinterpret_cast<char*>(&negative_slope_)) + sizeof(engine_));
}

ReLUParameter::~ReLUParameter() {
  // @@protoc_insertion_point(destructor:caffe.ReLUParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void ReLUParameter::ArenaDtor(void* object) {
  ReLUParameter* _this = reinterpret_cast< ReLUParameter* >(object);
  (void)_this;
}
void ReLUParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ReLUParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

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

const char* ReLUParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          negative_slope_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::ReLUParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::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:
  _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:caffe.ReLUParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float negative_slope = 1 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_negative_slope(), target);
  }

  // optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      2, this->_internal_engine(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ReLUParameter)
  return target;
}

size_t ReLUParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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 .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ReLUParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ReLUParameter *>(to)->MergeFrom(
      static_cast<const ReLUParameter &>(from));
}


void ReLUParameter::MergeFrom(const ReLUParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ReLUParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      negative_slope_ = from.negative_slope_;
    }
    if (cached_has_bits & 0x00000002u) {
      engine_ = from.engine_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ReLUParameter::CopyFrom(const ReLUParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ReLUParameter, engine_)
      + sizeof(ReLUParameter::engine_)
      - PROTOBUF_FIELD_OFFSET(ReLUParameter, negative_slope_)>(
          reinterpret_cast<char*>(&negative_slope_),
          reinterpret_cast<char*>(&other->negative_slope_));
}

::PROTOBUF_NAMESPACE_ID::Metadata ReLUParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[83]);
}

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

class ReshapeParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ReshapeParameter>()._has_bits_);
  static const ::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 ::caffe::BlobShape&
ReshapeParameter::_Internal::shape(const ReshapeParameter* msg) {
  return *msg->shape_;
}
ReshapeParameter::ReshapeParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ReshapeParameter)
}
ReshapeParameter::ReshapeParameter(const ReshapeParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_shape()) {
    shape_ = new ::caffe::BlobShape(*from.shape_);
  } else {
    shape_ = nullptr;
  }
  ::memcpy(&axis_, &from.axis_,
    static_cast<size_t>(reinterpret_cast<char*>(&num_axes_) -
    reinterpret_cast<char*>(&axis_)) + sizeof(num_axes_));
  // @@protoc_insertion_point(copy_constructor:caffe.ReshapeParameter)
}

inline void ReshapeParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&shape_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
    reinterpret_cast<char*>(&shape_)) + sizeof(axis_));
num_axes_ = -1;
}

ReshapeParameter::~ReshapeParameter() {
  // @@protoc_insertion_point(destructor:caffe.ReshapeParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void ReshapeParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete shape_;
}

void ReshapeParameter::ArenaDtor(void* object) {
  ReshapeParameter* _this = reinterpret_cast< ReshapeParameter* >(object);
  (void)_this;
}
void ReshapeParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ReshapeParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(shape_ != nullptr);
    shape_->Clear();
  }
  if (cached_has_bits & 0x00000006u) {
    axis_ = 0;
    num_axes_ = -1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ReshapeParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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);
          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);
          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:
  _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:caffe.ReshapeParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.BlobShape shape = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::shape(this), target, stream);
  }

  // optional int32 axis = 2 [default = 0];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), target);
  }

  // optional int32 num_axes = 3 [default = -1];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_axes(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ReshapeParameter)
  return target;
}

size_t ReshapeParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional .caffe.BlobShape shape = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *shape_);
    }

    // optional int32 axis = 2 [default = 0];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

    // optional int32 num_axes = 3 [default = -1];
    if (cached_has_bits & 0x00000004u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_axes());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ReshapeParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ReshapeParameter *>(to)->MergeFrom(
      static_cast<const ReshapeParameter &>(from));
}


void ReshapeParameter::MergeFrom(const ReshapeParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ReshapeParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_shape()->::caffe::BlobShape::MergeFrom(from._internal_shape());
    }
    if (cached_has_bits & 0x00000002u) {
      axis_ = from.axis_;
    }
    if (cached_has_bits & 0x00000004u) {
      num_axes_ = from.num_axes_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ReshapeParameter::CopyFrom(const ReshapeParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ReshapeParameter, axis_)
      + sizeof(ReshapeParameter::axis_)
      - PROTOBUF_FIELD_OFFSET(ReshapeParameter, shape_)>(
          reinterpret_cast<char*>(&shape_),
          reinterpret_cast<char*>(&other->shape_));
  swap(num_axes_, other->num_axes_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ReshapeParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[84]);
}

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

class ScaleParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ScaleParameter>()._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 ::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 ::caffe::FillerParameter& bias_filler(const ScaleParameter* msg);
  static void set_has_bias_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::caffe::FillerParameter&
ScaleParameter::_Internal::filler(const ScaleParameter* msg) {
  return *msg->filler_;
}
const ::caffe::FillerParameter&
ScaleParameter::_Internal::bias_filler(const ScaleParameter* msg) {
  return *msg->bias_filler_;
}
ScaleParameter::ScaleParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ScaleParameter)
}
ScaleParameter::ScaleParameter(const ScaleParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_filler()) {
    filler_ = new ::caffe::FillerParameter(*from.filler_);
  } else {
    filler_ = nullptr;
  }
  if (from._internal_has_bias_filler()) {
    bias_filler_ = new ::caffe::FillerParameter(*from.bias_filler_);
  } else {
    bias_filler_ = nullptr;
  }
  ::memcpy(&bias_term_, &from.bias_term_,
    static_cast<size_t>(reinterpret_cast<char*>(&num_axes_) -
    reinterpret_cast<char*>(&bias_term_)) + sizeof(num_axes_));
  // @@protoc_insertion_point(copy_constructor:caffe.ScaleParameter)
}

inline void ScaleParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&bias_term_) -
    reinterpret_cast<char*>(&filler_)) + sizeof(bias_term_));
axis_ = 1;
num_axes_ = 1;
}

ScaleParameter::~ScaleParameter() {
  // @@protoc_insertion_point(destructor:caffe.ScaleParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void ScaleParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete filler_;
  if (this != internal_default_instance()) delete bias_filler_;
}

void ScaleParameter::ArenaDtor(void* object) {
  ScaleParameter* _this = reinterpret_cast< ScaleParameter* >(object);
  (void)_this;
}
void ScaleParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ScaleParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      GOOGLE_DCHECK(filler_ != nullptr);
      filler_->Clear();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(bias_filler_ != nullptr);
      bias_filler_->Clear();
    }
  }
  if (cached_has_bits & 0x0000001cu) {
    bias_term_ = false;
    axis_ = 1;
    num_axes_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ScaleParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          num_axes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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);
          bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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:
  _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:caffe.ScaleParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 axis = 1 [default = 1];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
  }

  // optional int32 num_axes = 2 [default = 1];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_axes(), target);
  }

  // optional .caffe.FillerParameter filler = 3;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::filler(this), target, stream);
  }

  // optional bool bias_term = 4 [default = false];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_bias_term(), target);
  }

  // optional .caffe.FillerParameter bias_filler = 5;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::bias_filler(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ScaleParameter)
  return target;
}

size_t ScaleParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    // optional .caffe.FillerParameter filler = 3;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 5;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *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 += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

    // optional int32 num_axes = 2 [default = 1];
    if (cached_has_bits & 0x00000010u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_axes());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void ScaleParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ScaleParameter *>(to)->MergeFrom(
      static_cast<const ScaleParameter &>(from));
}


void ScaleParameter::MergeFrom(const ScaleParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ScaleParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x0000001fu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_filler()->::caffe::FillerParameter::MergeFrom(from._internal_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000004u) {
      bias_term_ = from.bias_term_;
    }
    if (cached_has_bits & 0x00000008u) {
      axis_ = from.axis_;
    }
    if (cached_has_bits & 0x00000010u) {
      num_axes_ = from.num_axes_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ScaleParameter::CopyFrom(const ScaleParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ScaleParameter, bias_term_)
      + sizeof(ScaleParameter::bias_term_)
      - PROTOBUF_FIELD_OFFSET(ScaleParameter, filler_)>(
          reinterpret_cast<char*>(&filler_),
          reinterpret_cast<char*>(&other->filler_));
  swap(axis_, other->axis_);
  swap(num_axes_, other->num_axes_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ScaleParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[85]);
}

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

class SigmoidParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<SigmoidParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.SigmoidParameter)
}
SigmoidParameter::SigmoidParameter(const SigmoidParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  engine_ = from.engine_;
  // @@protoc_insertion_point(copy_constructor:caffe.SigmoidParameter)
}

inline void SigmoidParameter::SharedCtor() {
engine_ = 0;
}

SigmoidParameter::~SigmoidParameter() {
  // @@protoc_insertion_point(destructor:caffe.SigmoidParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void SigmoidParameter::ArenaDtor(void* object) {
  SigmoidParameter* _this = reinterpret_cast< SigmoidParameter* >(object);
  (void)_this;
}
void SigmoidParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SigmoidParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  engine_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SigmoidParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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(::caffe::SigmoidParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::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:
  _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:caffe.SigmoidParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_engine(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.SigmoidParameter)
  return target;
}

size_t SigmoidParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void SigmoidParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SigmoidParameter *>(to)->MergeFrom(
      static_cast<const SigmoidParameter &>(from));
}


void SigmoidParameter::MergeFrom(const SigmoidParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SigmoidParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_engine()) {
    _internal_set_engine(from._internal_engine());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SigmoidParameter::CopyFrom(const SigmoidParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(engine_, other->engine_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SigmoidParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[86]);
}

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

class SliceParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<SliceParameter>()._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),
  slice_point_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.SliceParameter)
}
SliceParameter::SliceParameter(const SliceParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      slice_point_(from.slice_point_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&slice_dim_, &from.slice_dim_,
    static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
    reinterpret_cast<char*>(&slice_dim_)) + sizeof(axis_));
  // @@protoc_insertion_point(copy_constructor:caffe.SliceParameter)
}

inline void SliceParameter::SharedCtor() {
slice_dim_ = 1u;
axis_ = 1;
}

SliceParameter::~SliceParameter() {
  // @@protoc_insertion_point(destructor:caffe.SliceParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void SliceParameter::ArenaDtor(void* object) {
  SliceParameter* _this = reinterpret_cast< SliceParameter* >(object);
  (void)_this;
}
void SliceParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SliceParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  slice_point_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    slice_dim_ = 1u;
    axis_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SliceParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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:
  _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:caffe.SliceParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 slice_dim = 1 [default = 1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_axis(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.SliceParameter)
  return target;
}

size_t SliceParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      UInt32Size(this->slice_point_);
    total_size += 1 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_slice_point_size());
    total_size += data_size;
  }

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional uint32 slice_dim = 1 [default = 1];
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_slice_dim());
    }

    // optional int32 axis = 3 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void SliceParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SliceParameter *>(to)->MergeFrom(
      static_cast<const SliceParameter &>(from));
}


void SliceParameter::MergeFrom(const SliceParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SliceParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  slice_point_.MergeFrom(from.slice_point_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      slice_dim_ = from.slice_dim_;
    }
    if (cached_has_bits & 0x00000002u) {
      axis_ = from.axis_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SliceParameter::CopyFrom(const SliceParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  slice_point_.InternalSwap(&other->slice_point_);
  swap(slice_dim_, other->slice_dim_);
  swap(axis_, other->axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SliceParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[87]);
}

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

class SoftmaxParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<SoftmaxParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.SoftmaxParameter)
}
SoftmaxParameter::SoftmaxParameter(const SoftmaxParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&engine_, &from.engine_,
    static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
    reinterpret_cast<char*>(&engine_)) + sizeof(axis_));
  // @@protoc_insertion_point(copy_constructor:caffe.SoftmaxParameter)
}

inline void SoftmaxParameter::SharedCtor() {
engine_ = 0;
axis_ = 1;
}

SoftmaxParameter::~SoftmaxParameter() {
  // @@protoc_insertion_point(destructor:caffe.SoftmaxParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void SoftmaxParameter::ArenaDtor(void* object) {
  SoftmaxParameter* _this = reinterpret_cast< SoftmaxParameter* >(object);
  (void)_this;
}
void SoftmaxParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SoftmaxParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    engine_ = 0;
    axis_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SoftmaxParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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(::caffe::SoftmaxParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::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);
          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:
  _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:caffe.SoftmaxParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_engine(), target);
  }

  // optional int32 axis = 2 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.SoftmaxParameter)
  return target;
}

size_t SoftmaxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
    }

    // optional int32 axis = 2 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void SoftmaxParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SoftmaxParameter *>(to)->MergeFrom(
      static_cast<const SoftmaxParameter &>(from));
}


void SoftmaxParameter::MergeFrom(const SoftmaxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SoftmaxParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      engine_ = from.engine_;
    }
    if (cached_has_bits & 0x00000002u) {
      axis_ = from.axis_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SoftmaxParameter::CopyFrom(const SoftmaxParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(engine_, other->engine_);
  swap(axis_, other->axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SoftmaxParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[88]);
}

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

class TanHParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<TanHParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.TanHParameter)
}
TanHParameter::TanHParameter(const TanHParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  engine_ = from.engine_;
  // @@protoc_insertion_point(copy_constructor:caffe.TanHParameter)
}

inline void TanHParameter::SharedCtor() {
engine_ = 0;
}

TanHParameter::~TanHParameter() {
  // @@protoc_insertion_point(destructor:caffe.TanHParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void TanHParameter::ArenaDtor(void* object) {
  TanHParameter* _this = reinterpret_cast< TanHParameter* >(object);
  (void)_this;
}
void TanHParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TanHParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  engine_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TanHParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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(::caffe::TanHParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::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:
  _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:caffe.TanHParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      1, this->_internal_engine(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.TanHParameter)
  return target;
}

size_t TanHParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void TanHParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<TanHParameter *>(to)->MergeFrom(
      static_cast<const TanHParameter &>(from));
}


void TanHParameter::MergeFrom(const TanHParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.TanHParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_engine()) {
    _internal_set_engine(from._internal_engine());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TanHParameter::CopyFrom(const TanHParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(engine_, other->engine_);
}

::PROTOBUF_NAMESPACE_ID::Metadata TanHParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[89]);
}

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

class TileParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<TileParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.TileParameter)
}
TileParameter::TileParameter(const TileParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&tiles_, &from.tiles_,
    static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
    reinterpret_cast<char*>(&tiles_)) + sizeof(axis_));
  // @@protoc_insertion_point(copy_constructor:caffe.TileParameter)
}

inline void TileParameter::SharedCtor() {
tiles_ = 0;
axis_ = 1;
}

TileParameter::~TileParameter() {
  // @@protoc_insertion_point(destructor:caffe.TileParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

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

void TileParameter::ArenaDtor(void* object) {
  TileParameter* _this = reinterpret_cast< TileParameter* >(object);
  (void)_this;
}
void TileParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TileParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

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

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    tiles_ = 0;
    axis_ = 1;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* TileParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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);
          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:
  _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:caffe.TileParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int32 axis = 1 [default = 1];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
  }

  // optional int32 tiles = 2;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_tiles(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.TileParameter)
  return target;
}

size_t TileParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional int32 tiles = 2;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_tiles());
    }

    // optional int32 axis = 1 [default = 1];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

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

void TileParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<TileParameter *>(to)->MergeFrom(
      static_cast<const TileParameter &>(from));
}


void TileParameter::MergeFrom(const TileParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.TileParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      tiles_ = from.tiles_;
    }
    if (cached_has_bits & 0x00000002u) {
      axis_ = from.axis_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void TileParameter::CopyFrom(const TileParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(tiles_, other->tiles_);
  swap(axis_, other->axis_);
}

::PROTOBUF_NAMESPACE_ID::Metadata TileParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[90]);
}

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

class ThresholdParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ThresholdParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ThresholdParameter)
}
ThresholdParameter::ThresholdParameter(const ThresholdParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  threshold_ = from.threshold_;
  // @@protoc_insertion_point(copy_constructor:caffe.ThresholdParameter)
}

inline void ThresholdParameter::SharedCtor() {
threshold_ = 0;
}

ThresholdParameter::~ThresholdParameter() {
  // @@protoc_insertion_point(destructor:caffe.ThresholdParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void ThresholdParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void ThresholdParameter::ArenaDtor(void* object) {
  ThresholdParameter* _this = reinterpret_cast< ThresholdParameter* >(object);
  (void)_this;
}
void ThresholdParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ThresholdParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void ThresholdParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ThresholdParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  threshold_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ThresholdParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          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:
  _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:caffe.ThresholdParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float threshold = 1 [default = 0];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_threshold(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ThresholdParameter)
  return target;
}

size_t ThresholdParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 + 4;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ThresholdParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    ThresholdParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ThresholdParameter::GetClassData() const { return &_class_data_; }

void ThresholdParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ThresholdParameter *>(to)->MergeFrom(
      static_cast<const ThresholdParameter &>(from));
}


void ThresholdParameter::MergeFrom(const ThresholdParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ThresholdParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_threshold()) {
    _internal_set_threshold(from._internal_threshold());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ThresholdParameter::CopyFrom(const ThresholdParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(threshold_, other->threshold_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ThresholdParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[91]);
}

// ===================================================================

class WindowDataParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<WindowDataParameter>()._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::_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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.WindowDataParameter)
}
WindowDataParameter::WindowDataParameter(const WindowDataParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(), 
      GetArenaForAllocation());
  }
  mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_mean_file()) {
    mean_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_mean_file(), 
      GetArenaForAllocation());
  }
  crop_mode_.UnsafeSetDefault(nullptr);
  if (from._internal_has_crop_mode()) {
    crop_mode_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_crop_mode(), 
      GetArenaForAllocation());
  }
  root_folder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    root_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_root_folder()) {
    root_folder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_root_folder(), 
      GetArenaForAllocation());
  }
  ::memcpy(&batch_size_, &from.batch_size_,
    static_cast<size_t>(reinterpret_cast<char*>(&fg_fraction_) -
    reinterpret_cast<char*>(&batch_size_)) + sizeof(fg_fraction_));
  // @@protoc_insertion_point(copy_constructor:caffe.WindowDataParameter)
}

inline void WindowDataParameter::SharedCtor() {
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
crop_mode_.UnsafeSetDefault(nullptr);
root_folder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  root_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&batch_size_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&context_pad_) -
    reinterpret_cast<char*>(&batch_size_)) + sizeof(context_pad_));
scale_ = 1;
fg_threshold_ = 0.5f;
bg_threshold_ = 0.5f;
fg_fraction_ = 0.25f;
}

WindowDataParameter::~WindowDataParameter() {
  // @@protoc_insertion_point(destructor:caffe.WindowDataParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void WindowDataParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  mean_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  crop_mode_.DestroyNoArena(nullptr);
  root_folder_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void WindowDataParameter::ArenaDtor(void* object) {
  WindowDataParameter* _this = reinterpret_cast< WindowDataParameter* >(object);
  (void)_this;
}
void WindowDataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void WindowDataParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void WindowDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.WindowDataParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x0000000fu) {
    if (cached_has_bits & 0x00000001u) {
      source_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      mean_file_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      crop_mode_.ClearToDefault(::caffe::WindowDataParameter::_i_give_permission_to_break_this_code_default_crop_mode_, GetArenaForAllocation());
       }
    if (cached_has_bits & 0x00000008u) {
      root_folder_.ClearNonDefaultToEmpty();
    }
  }
  if (cached_has_bits & 0x000000f0u) {
    ::memset(&batch_size_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&cache_images_) -
        reinterpret_cast<char*>(&batch_size_)) + sizeof(cache_images_));
  }
  if (cached_has_bits & 0x00001f00u) {
    context_pad_ = 0u;
    scale_ = 1;
    fg_threshold_ = 0.5f;
    bg_threshold_ = 0.5f;
    fg_fraction_ = 0.25f;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* WindowDataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.WindowDataParameter.source");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.WindowDataParameter.mean_file");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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);
          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);
          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);
          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);
          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);
          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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.WindowDataParameter.crop_mode");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.WindowDataParameter.root_folder");
          #endif  // !NDEBUG
          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:
  _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:caffe.WindowDataParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_crop_size(), target);
  }

  // optional bool mirror = 6 [default = false];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "caffe.WindowDataParameter.root_folder");
    target = stream->WriteStringMaybeAliased(
        13, this->_internal_root_folder(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.WindowDataParameter)
  return target;
}

size_t WindowDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _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 += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
    }

    // optional uint32 crop_size = 5 [default = 0];
    if (cached_has_bits & 0x00000020u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::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 += ::PROTOBUF_NAMESPACE_ID::internal::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, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WindowDataParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    WindowDataParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WindowDataParameter::GetClassData() const { return &_class_data_; }

void WindowDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<WindowDataParameter *>(to)->MergeFrom(
      static_cast<const WindowDataParameter &>(from));
}


void WindowDataParameter::MergeFrom(const WindowDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.WindowDataParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_source(from._internal_source());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_mean_file(from._internal_mean_file());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_crop_mode(from._internal_crop_mode());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_set_root_folder(from._internal_root_folder());
    }
    if (cached_has_bits & 0x00000010u) {
      batch_size_ = from.batch_size_;
    }
    if (cached_has_bits & 0x00000020u) {
      crop_size_ = from.crop_size_;
    }
    if (cached_has_bits & 0x00000040u) {
      mirror_ = from.mirror_;
    }
    if (cached_has_bits & 0x00000080u) {
      cache_images_ = from.cache_images_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00001f00u) {
    if (cached_has_bits & 0x00000100u) {
      context_pad_ = from.context_pad_;
    }
    if (cached_has_bits & 0x00000200u) {
      scale_ = from.scale_;
    }
    if (cached_has_bits & 0x00000400u) {
      fg_threshold_ = from.fg_threshold_;
    }
    if (cached_has_bits & 0x00000800u) {
      bg_threshold_ = from.bg_threshold_;
    }
    if (cached_has_bits & 0x00001000u) {
      fg_fraction_ = from.fg_fraction_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void WindowDataParameter::CopyFrom(const WindowDataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &source_, lhs_arena,
      &other->source_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &mean_file_, lhs_arena,
      &other->mean_file_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      nullptr,
      &crop_mode_, lhs_arena,
      &other->crop_mode_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &root_folder_, lhs_arena,
      &other->root_folder_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(WindowDataParameter, context_pad_)
      + sizeof(WindowDataParameter::context_pad_)
      - PROTOBUF_FIELD_OFFSET(WindowDataParameter, batch_size_)>(
          reinterpret_cast<char*>(&batch_size_),
          reinterpret_cast<char*>(&other->batch_size_));
  swap(scale_, other->scale_);
  swap(fg_threshold_, other->fg_threshold_);
  swap(bg_threshold_, other->bg_threshold_);
  swap(fg_fraction_, other->fg_fraction_);
}

::PROTOBUF_NAMESPACE_ID::Metadata WindowDataParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[92]);
}

// ===================================================================

class SPPParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<SPPParameter>()._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();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.SPPParameter)
}
SPPParameter::SPPParameter(const SPPParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&pyramid_height_, &from.pyramid_height_,
    static_cast<size_t>(reinterpret_cast<char*>(&engine_) -
    reinterpret_cast<char*>(&pyramid_height_)) + sizeof(engine_));
  // @@protoc_insertion_point(copy_constructor:caffe.SPPParameter)
}

inline void SPPParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&pyramid_height_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&engine_) -
    reinterpret_cast<char*>(&pyramid_height_)) + sizeof(engine_));
}

SPPParameter::~SPPParameter() {
  // @@protoc_insertion_point(destructor:caffe.SPPParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void SPPParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void SPPParameter::ArenaDtor(void* object) {
  SPPParameter* _this = reinterpret_cast< SPPParameter* >(object);
  (void)_this;
}
void SPPParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SPPParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void SPPParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.SPPParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    ::memset(&pyramid_height_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&engine_) -
        reinterpret_cast<char*>(&pyramid_height_)) + sizeof(engine_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SPPParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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);
          pyramid_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::SPPParameter_PoolMethod_IsValid(val))) {
            _internal_set_pool(static_cast<::caffe::SPPParameter_PoolMethod>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::SPPParameter_Engine_IsValid(val))) {
            _internal_set_engine(static_cast<::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:
  _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:caffe.SPPParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 pyramid_height = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_pyramid_height(), target);
  }

  // optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      2, this->_internal_pool(), target);
  }

  // optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      6, this->_internal_engine(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.SPPParameter)
  return target;
}

size_t SPPParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    // optional uint32 pyramid_height = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pyramid_height());
    }

    // optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_pool());
    }

    // optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SPPParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    SPPParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SPPParameter::GetClassData() const { return &_class_data_; }

void SPPParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<SPPParameter *>(to)->MergeFrom(
      static_cast<const SPPParameter &>(from));
}


void SPPParameter::MergeFrom(const SPPParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SPPParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      pyramid_height_ = from.pyramid_height_;
    }
    if (cached_has_bits & 0x00000002u) {
      pool_ = from.pool_;
    }
    if (cached_has_bits & 0x00000004u) {
      engine_ = from.engine_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SPPParameter::CopyFrom(const SPPParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SPPParameter, engine_)
      + sizeof(SPPParameter::engine_)
      - PROTOBUF_FIELD_OFFSET(SPPParameter, pyramid_height_)>(
          reinterpret_cast<char*>(&pyramid_height_),
          reinterpret_cast<char*>(&other->pyramid_height_));
}

::PROTOBUF_NAMESPACE_ID::Metadata SPPParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[93]);
}

// ===================================================================

class V1LayerParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<V1LayerParameter>()._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 ::caffe::AccuracyParameter& accuracy_param(const V1LayerParameter* msg);
  static void set_has_accuracy_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static const ::caffe::ArgMaxParameter& argmax_param(const V1LayerParameter* msg);
  static void set_has_argmax_param(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static const ::caffe::ConcatParameter& concat_param(const V1LayerParameter* msg);
  static void set_has_concat_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static const ::caffe::ContrastiveLossParameter& contrastive_loss_param(const V1LayerParameter* msg);
  static void set_has_contrastive_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 536870912u;
  }
  static const ::caffe::ConvolutionParameter& convolution_param(const V1LayerParameter* msg);
  static void set_has_convolution_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static const ::caffe::DataParameter& data_param(const V1LayerParameter* msg);
  static void set_has_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static const ::caffe::DropoutParameter& dropout_param(const V1LayerParameter* msg);
  static void set_has_dropout_param(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::caffe::DummyDataParameter& dummy_data_param(const V1LayerParameter* msg);
  static void set_has_dummy_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 524288u;
  }
  static const ::caffe::EltwiseParameter& eltwise_param(const V1LayerParameter* msg);
  static void set_has_eltwise_param(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  static const ::caffe::ExpParameter& exp_param(const V1LayerParameter* msg);
  static void set_has_exp_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1073741824u;
  }
  static const ::caffe::HDF5DataParameter& hdf5_data_param(const V1LayerParameter* msg);
  static void set_has_hdf5_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
  static const ::caffe::HDF5OutputParameter& hdf5_output_param(const V1LayerParameter* msg);
  static void set_has_hdf5_output_param(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
  static const ::caffe::HingeLossParameter& hinge_loss_param(const V1LayerParameter* msg);
  static void set_has_hinge_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
  static const ::caffe::ImageDataParameter& image_data_param(const V1LayerParameter* msg);
  static void set_has_image_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 256u;
  }
  static const ::caffe::InfogainLossParameter& infogain_loss_param(const V1LayerParameter* msg);
  static void set_has_infogain_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 512u;
  }
  static const ::caffe::InnerProductParameter& inner_product_param(const V1LayerParameter* msg);
  static void set_has_inner_product_param(HasBits* has_bits) {
    (*has_bits)[0] |= 1024u;
  }
  static const ::caffe::LRNParameter& lrn_param(const V1LayerParameter* msg);
  static void set_has_lrn_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2048u;
  }
  static const ::caffe::MemoryDataParameter& memory_data_param(const V1LayerParameter* msg);
  static void set_has_memory_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 32768u;
  }
  static const ::caffe::MVNParameter& mvn_param(const V1LayerParameter* msg);
  static void set_has_mvn_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16777216u;
  }
  static const ::caffe::PoolingParameter& pooling_param(const V1LayerParameter* msg);
  static void set_has_pooling_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4096u;
  }
  static const ::caffe::PowerParameter& power_param(const V1LayerParameter* msg);
  static void set_has_power_param(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static const ::caffe::ReLUParameter& relu_param(const V1LayerParameter* msg);
  static void set_has_relu_param(HasBits* has_bits) {
    (*has_bits)[0] |= 4194304u;
  }
  static const ::caffe::SigmoidParameter& sigmoid_param(const V1LayerParameter* msg);
  static void set_has_sigmoid_param(HasBits* has_bits) {
    (*has_bits)[0] |= 134217728u;
  }
  static const ::caffe::SoftmaxParameter& softmax_param(const V1LayerParameter* msg);
  static void set_has_softmax_param(HasBits* has_bits) {
    (*has_bits)[0] |= 268435456u;
  }
  static const ::caffe::SliceParameter& slice_param(const V1LayerParameter* msg);
  static void set_has_slice_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8388608u;
  }
  static const ::caffe::TanHParameter& tanh_param(const V1LayerParameter* msg);
  static void set_has_tanh_param(HasBits* has_bits) {
    (*has_bits)[0] |= 67108864u;
  }
  static const ::caffe::ThresholdParameter& threshold_param(const V1LayerParameter* msg);
  static void set_has_threshold_param(HasBits* has_bits) {
    (*has_bits)[0] |= 262144u;
  }
  static const ::caffe::WindowDataParameter& window_data_param(const V1LayerParameter* msg);
  static void set_has_window_data_param(HasBits* has_bits) {
    (*has_bits)[0] |= 8192u;
  }
  static const ::caffe::TransformationParameter& transform_param(const V1LayerParameter* msg);
  static void set_has_transform_param(HasBits* has_bits) {
    (*has_bits)[0] |= 33554432u;
  }
  static const ::caffe::LossParameter& loss_param(const V1LayerParameter* msg);
  static void set_has_loss_param(HasBits* has_bits) {
    (*has_bits)[0] |= 2147483648u;
  }
  static const ::caffe::V0LayerParameter& layer(const V1LayerParameter* msg);
  static void set_has_layer(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
};

const ::caffe::AccuracyParameter&
V1LayerParameter::_Internal::accuracy_param(const V1LayerParameter* msg) {
  return *msg->accuracy_param_;
}
const ::caffe::ArgMaxParameter&
V1LayerParameter::_Internal::argmax_param(const V1LayerParameter* msg) {
  return *msg->argmax_param_;
}
const ::caffe::ConcatParameter&
V1LayerParameter::_Internal::concat_param(const V1LayerParameter* msg) {
  return *msg->concat_param_;
}
const ::caffe::ContrastiveLossParameter&
V1LayerParameter::_Internal::contrastive_loss_param(const V1LayerParameter* msg) {
  return *msg->contrastive_loss_param_;
}
const ::caffe::ConvolutionParameter&
V1LayerParameter::_Internal::convolution_param(const V1LayerParameter* msg) {
  return *msg->convolution_param_;
}
const ::caffe::DataParameter&
V1LayerParameter::_Internal::data_param(const V1LayerParameter* msg) {
  return *msg->data_param_;
}
const ::caffe::DropoutParameter&
V1LayerParameter::_Internal::dropout_param(const V1LayerParameter* msg) {
  return *msg->dropout_param_;
}
const ::caffe::DummyDataParameter&
V1LayerParameter::_Internal::dummy_data_param(const V1LayerParameter* msg) {
  return *msg->dummy_data_param_;
}
const ::caffe::EltwiseParameter&
V1LayerParameter::_Internal::eltwise_param(const V1LayerParameter* msg) {
  return *msg->eltwise_param_;
}
const ::caffe::ExpParameter&
V1LayerParameter::_Internal::exp_param(const V1LayerParameter* msg) {
  return *msg->exp_param_;
}
const ::caffe::HDF5DataParameter&
V1LayerParameter::_Internal::hdf5_data_param(const V1LayerParameter* msg) {
  return *msg->hdf5_data_param_;
}
const ::caffe::HDF5OutputParameter&
V1LayerParameter::_Internal::hdf5_output_param(const V1LayerParameter* msg) {
  return *msg->hdf5_output_param_;
}
const ::caffe::HingeLossParameter&
V1LayerParameter::_Internal::hinge_loss_param(const V1LayerParameter* msg) {
  return *msg->hinge_loss_param_;
}
const ::caffe::ImageDataParameter&
V1LayerParameter::_Internal::image_data_param(const V1LayerParameter* msg) {
  return *msg->image_data_param_;
}
const ::caffe::InfogainLossParameter&
V1LayerParameter::_Internal::infogain_loss_param(const V1LayerParameter* msg) {
  return *msg->infogain_loss_param_;
}
const ::caffe::InnerProductParameter&
V1LayerParameter::_Internal::inner_product_param(const V1LayerParameter* msg) {
  return *msg->inner_product_param_;
}
const ::caffe::LRNParameter&
V1LayerParameter::_Internal::lrn_param(const V1LayerParameter* msg) {
  return *msg->lrn_param_;
}
const ::caffe::MemoryDataParameter&
V1LayerParameter::_Internal::memory_data_param(const V1LayerParameter* msg) {
  return *msg->memory_data_param_;
}
const ::caffe::MVNParameter&
V1LayerParameter::_Internal::mvn_param(const V1LayerParameter* msg) {
  return *msg->mvn_param_;
}
const ::caffe::PoolingParameter&
V1LayerParameter::_Internal::pooling_param(const V1LayerParameter* msg) {
  return *msg->pooling_param_;
}
const ::caffe::PowerParameter&
V1LayerParameter::_Internal::power_param(const V1LayerParameter* msg) {
  return *msg->power_param_;
}
const ::caffe::ReLUParameter&
V1LayerParameter::_Internal::relu_param(const V1LayerParameter* msg) {
  return *msg->relu_param_;
}
const ::caffe::SigmoidParameter&
V1LayerParameter::_Internal::sigmoid_param(const V1LayerParameter* msg) {
  return *msg->sigmoid_param_;
}
const ::caffe::SoftmaxParameter&
V1LayerParameter::_Internal::softmax_param(const V1LayerParameter* msg) {
  return *msg->softmax_param_;
}
const ::caffe::SliceParameter&
V1LayerParameter::_Internal::slice_param(const V1LayerParameter* msg) {
  return *msg->slice_param_;
}
const ::caffe::TanHParameter&
V1LayerParameter::_Internal::tanh_param(const V1LayerParameter* msg) {
  return *msg->tanh_param_;
}
const ::caffe::ThresholdParameter&
V1LayerParameter::_Internal::threshold_param(const V1LayerParameter* msg) {
  return *msg->threshold_param_;
}
const ::caffe::WindowDataParameter&
V1LayerParameter::_Internal::window_data_param(const V1LayerParameter* msg) {
  return *msg->window_data_param_;
}
const ::caffe::TransformationParameter&
V1LayerParameter::_Internal::transform_param(const V1LayerParameter* msg) {
  return *msg->transform_param_;
}
const ::caffe::LossParameter&
V1LayerParameter::_Internal::loss_param(const V1LayerParameter* msg) {
  return *msg->loss_param_;
}
const ::caffe::V0LayerParameter&
V1LayerParameter::_Internal::layer(const V1LayerParameter* msg) {
  return *msg->layer_;
}
V1LayerParameter::V1LayerParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
  bottom_(arena),
  top_(arena),
  blobs_(arena),
  blobs_lr_(arena),
  weight_decay_(arena),
  include_(arena),
  exclude_(arena),
  loss_weight_(arena),
  param_(arena),
  blob_share_mode_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.V1LayerParameter)
}
V1LayerParameter::V1LayerParameter(const V1LayerParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      bottom_(from.bottom_),
      top_(from.top_),
      blobs_(from.blobs_),
      blobs_lr_(from.blobs_lr_),
      weight_decay_(from.weight_decay_),
      include_(from.include_),
      exclude_(from.exclude_),
      loss_weight_(from.loss_weight_),
      param_(from.param_),
      blob_share_mode_(from.blob_share_mode_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_layer()) {
    layer_ = new ::caffe::V0LayerParameter(*from.layer_);
  } else {
    layer_ = nullptr;
  }
  if (from._internal_has_concat_param()) {
    concat_param_ = new ::caffe::ConcatParameter(*from.concat_param_);
  } else {
    concat_param_ = nullptr;
  }
  if (from._internal_has_convolution_param()) {
    convolution_param_ = new ::caffe::ConvolutionParameter(*from.convolution_param_);
  } else {
    convolution_param_ = nullptr;
  }
  if (from._internal_has_data_param()) {
    data_param_ = new ::caffe::DataParameter(*from.data_param_);
  } else {
    data_param_ = nullptr;
  }
  if (from._internal_has_dropout_param()) {
    dropout_param_ = new ::caffe::DropoutParameter(*from.dropout_param_);
  } else {
    dropout_param_ = nullptr;
  }
  if (from._internal_has_hdf5_data_param()) {
    hdf5_data_param_ = new ::caffe::HDF5DataParameter(*from.hdf5_data_param_);
  } else {
    hdf5_data_param_ = nullptr;
  }
  if (from._internal_has_hdf5_output_param()) {
    hdf5_output_param_ = new ::caffe::HDF5OutputParameter(*from.hdf5_output_param_);
  } else {
    hdf5_output_param_ = nullptr;
  }
  if (from._internal_has_image_data_param()) {
    image_data_param_ = new ::caffe::ImageDataParameter(*from.image_data_param_);
  } else {
    image_data_param_ = nullptr;
  }
  if (from._internal_has_infogain_loss_param()) {
    infogain_loss_param_ = new ::caffe::InfogainLossParameter(*from.infogain_loss_param_);
  } else {
    infogain_loss_param_ = nullptr;
  }
  if (from._internal_has_inner_product_param()) {
    inner_product_param_ = new ::caffe::InnerProductParameter(*from.inner_product_param_);
  } else {
    inner_product_param_ = nullptr;
  }
  if (from._internal_has_lrn_param()) {
    lrn_param_ = new ::caffe::LRNParameter(*from.lrn_param_);
  } else {
    lrn_param_ = nullptr;
  }
  if (from._internal_has_pooling_param()) {
    pooling_param_ = new ::caffe::PoolingParameter(*from.pooling_param_);
  } else {
    pooling_param_ = nullptr;
  }
  if (from._internal_has_window_data_param()) {
    window_data_param_ = new ::caffe::WindowDataParameter(*from.window_data_param_);
  } else {
    window_data_param_ = nullptr;
  }
  if (from._internal_has_power_param()) {
    power_param_ = new ::caffe::PowerParameter(*from.power_param_);
  } else {
    power_param_ = nullptr;
  }
  if (from._internal_has_memory_data_param()) {
    memory_data_param_ = new ::caffe::MemoryDataParameter(*from.memory_data_param_);
  } else {
    memory_data_param_ = nullptr;
  }
  if (from._internal_has_argmax_param()) {
    argmax_param_ = new ::caffe::ArgMaxParameter(*from.argmax_param_);
  } else {
    argmax_param_ = nullptr;
  }
  if (from._internal_has_eltwise_param()) {
    eltwise_param_ = new ::caffe::EltwiseParameter(*from.eltwise_param_);
  } else {
    eltwise_param_ = nullptr;
  }
  if (from._internal_has_threshold_param()) {
    threshold_param_ = new ::caffe::ThresholdParameter(*from.threshold_param_);
  } else {
    threshold_param_ = nullptr;
  }
  if (from._internal_has_dummy_data_param()) {
    dummy_data_param_ = new ::caffe::DummyDataParameter(*from.dummy_data_param_);
  } else {
    dummy_data_param_ = nullptr;
  }
  if (from._internal_has_accuracy_param()) {
    accuracy_param_ = new ::caffe::AccuracyParameter(*from.accuracy_param_);
  } else {
    accuracy_param_ = nullptr;
  }
  if (from._internal_has_hinge_loss_param()) {
    hinge_loss_param_ = new ::caffe::HingeLossParameter(*from.hinge_loss_param_);
  } else {
    hinge_loss_param_ = nullptr;
  }
  if (from._internal_has_relu_param()) {
    relu_param_ = new ::caffe::ReLUParameter(*from.relu_param_);
  } else {
    relu_param_ = nullptr;
  }
  if (from._internal_has_slice_param()) {
    slice_param_ = new ::caffe::SliceParameter(*from.slice_param_);
  } else {
    slice_param_ = nullptr;
  }
  if (from._internal_has_mvn_param()) {
    mvn_param_ = new ::caffe::MVNParameter(*from.mvn_param_);
  } else {
    mvn_param_ = nullptr;
  }
  if (from._internal_has_transform_param()) {
    transform_param_ = new ::caffe::TransformationParameter(*from.transform_param_);
  } else {
    transform_param_ = nullptr;
  }
  if (from._internal_has_tanh_param()) {
    tanh_param_ = new ::caffe::TanHParameter(*from.tanh_param_);
  } else {
    tanh_param_ = nullptr;
  }
  if (from._internal_has_sigmoid_param()) {
    sigmoid_param_ = new ::caffe::SigmoidParameter(*from.sigmoid_param_);
  } else {
    sigmoid_param_ = nullptr;
  }
  if (from._internal_has_softmax_param()) {
    softmax_param_ = new ::caffe::SoftmaxParameter(*from.softmax_param_);
  } else {
    softmax_param_ = nullptr;
  }
  if (from._internal_has_contrastive_loss_param()) {
    contrastive_loss_param_ = new ::caffe::ContrastiveLossParameter(*from.contrastive_loss_param_);
  } else {
    contrastive_loss_param_ = nullptr;
  }
  if (from._internal_has_exp_param()) {
    exp_param_ = new ::caffe::ExpParameter(*from.exp_param_);
  } else {
    exp_param_ = nullptr;
  }
  if (from._internal_has_loss_param()) {
    loss_param_ = new ::caffe::LossParameter(*from.loss_param_);
  } else {
    loss_param_ = nullptr;
  }
  type_ = from.type_;
  // @@protoc_insertion_point(copy_constructor:caffe.V1LayerParameter)
}

inline void V1LayerParameter::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&layer_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&type_) -
    reinterpret_cast<char*>(&layer_)) + sizeof(type_));
}

V1LayerParameter::~V1LayerParameter() {
  // @@protoc_insertion_point(destructor:caffe.V1LayerParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void V1LayerParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete layer_;
  if (this != internal_default_instance()) delete concat_param_;
  if (this != internal_default_instance()) delete convolution_param_;
  if (this != internal_default_instance()) delete data_param_;
  if (this != internal_default_instance()) delete dropout_param_;
  if (this != internal_default_instance()) delete hdf5_data_param_;
  if (this != internal_default_instance()) delete hdf5_output_param_;
  if (this != internal_default_instance()) delete image_data_param_;
  if (this != internal_default_instance()) delete infogain_loss_param_;
  if (this != internal_default_instance()) delete inner_product_param_;
  if (this != internal_default_instance()) delete lrn_param_;
  if (this != internal_default_instance()) delete pooling_param_;
  if (this != internal_default_instance()) delete window_data_param_;
  if (this != internal_default_instance()) delete power_param_;
  if (this != internal_default_instance()) delete memory_data_param_;
  if (this != internal_default_instance()) delete argmax_param_;
  if (this != internal_default_instance()) delete eltwise_param_;
  if (this != internal_default_instance()) delete threshold_param_;
  if (this != internal_default_instance()) delete dummy_data_param_;
  if (this != internal_default_instance()) delete accuracy_param_;
  if (this != internal_default_instance()) delete hinge_loss_param_;
  if (this != internal_default_instance()) delete relu_param_;
  if (this != internal_default_instance()) delete slice_param_;
  if (this != internal_default_instance()) delete mvn_param_;
  if (this != internal_default_instance()) delete transform_param_;
  if (this != internal_default_instance()) delete tanh_param_;
  if (this != internal_default_instance()) delete sigmoid_param_;
  if (this != internal_default_instance()) delete softmax_param_;
  if (this != internal_default_instance()) delete contrastive_loss_param_;
  if (this != internal_default_instance()) delete exp_param_;
  if (this != internal_default_instance()) delete loss_param_;
}

void V1LayerParameter::ArenaDtor(void* object) {
  V1LayerParameter* _this = reinterpret_cast< V1LayerParameter* >(object);
  (void)_this;
}
void V1LayerParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void V1LayerParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void V1LayerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.V1LayerParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  bottom_.Clear();
  top_.Clear();
  blobs_.Clear();
  blobs_lr_.Clear();
  weight_decay_.Clear();
  include_.Clear();
  exclude_.Clear();
  loss_weight_.Clear();
  param_.Clear();
  blob_share_mode_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(layer_ != nullptr);
      layer_->Clear();
    }
    if (cached_has_bits & 0x00000004u) {
      GOOGLE_DCHECK(concat_param_ != nullptr);
      concat_param_->Clear();
    }
    if (cached_has_bits & 0x00000008u) {
      GOOGLE_DCHECK(convolution_param_ != nullptr);
      convolution_param_->Clear();
    }
    if (cached_has_bits & 0x00000010u) {
      GOOGLE_DCHECK(data_param_ != nullptr);
      data_param_->Clear();
    }
    if (cached_has_bits & 0x00000020u) {
      GOOGLE_DCHECK(dropout_param_ != nullptr);
      dropout_param_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      GOOGLE_DCHECK(hdf5_data_param_ != nullptr);
      hdf5_data_param_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      GOOGLE_DCHECK(hdf5_output_param_ != nullptr);
      hdf5_output_param_->Clear();
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      GOOGLE_DCHECK(image_data_param_ != nullptr);
      image_data_param_->Clear();
    }
    if (cached_has_bits & 0x00000200u) {
      GOOGLE_DCHECK(infogain_loss_param_ != nullptr);
      infogain_loss_param_->Clear();
    }
    if (cached_has_bits & 0x00000400u) {
      GOOGLE_DCHECK(inner_product_param_ != nullptr);
      inner_product_param_->Clear();
    }
    if (cached_has_bits & 0x00000800u) {
      GOOGLE_DCHECK(lrn_param_ != nullptr);
      lrn_param_->Clear();
    }
    if (cached_has_bits & 0x00001000u) {
      GOOGLE_DCHECK(pooling_param_ != nullptr);
      pooling_param_->Clear();
    }
    if (cached_has_bits & 0x00002000u) {
      GOOGLE_DCHECK(window_data_param_ != nullptr);
      window_data_param_->Clear();
    }
    if (cached_has_bits & 0x00004000u) {
      GOOGLE_DCHECK(power_param_ != nullptr);
      power_param_->Clear();
    }
    if (cached_has_bits & 0x00008000u) {
      GOOGLE_DCHECK(memory_data_param_ != nullptr);
      memory_data_param_->Clear();
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      GOOGLE_DCHECK(argmax_param_ != nullptr);
      argmax_param_->Clear();
    }
    if (cached_has_bits & 0x00020000u) {
      GOOGLE_DCHECK(eltwise_param_ != nullptr);
      eltwise_param_->Clear();
    }
    if (cached_has_bits & 0x00040000u) {
      GOOGLE_DCHECK(threshold_param_ != nullptr);
      threshold_param_->Clear();
    }
    if (cached_has_bits & 0x00080000u) {
      GOOGLE_DCHECK(dummy_data_param_ != nullptr);
      dummy_data_param_->Clear();
    }
    if (cached_has_bits & 0x00100000u) {
      GOOGLE_DCHECK(accuracy_param_ != nullptr);
      accuracy_param_->Clear();
    }
    if (cached_has_bits & 0x00200000u) {
      GOOGLE_DCHECK(hinge_loss_param_ != nullptr);
      hinge_loss_param_->Clear();
    }
    if (cached_has_bits & 0x00400000u) {
      GOOGLE_DCHECK(relu_param_ != nullptr);
      relu_param_->Clear();
    }
    if (cached_has_bits & 0x00800000u) {
      GOOGLE_DCHECK(slice_param_ != nullptr);
      slice_param_->Clear();
    }
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      GOOGLE_DCHECK(mvn_param_ != nullptr);
      mvn_param_->Clear();
    }
    if (cached_has_bits & 0x02000000u) {
      GOOGLE_DCHECK(transform_param_ != nullptr);
      transform_param_->Clear();
    }
    if (cached_has_bits & 0x04000000u) {
      GOOGLE_DCHECK(tanh_param_ != nullptr);
      tanh_param_->Clear();
    }
    if (cached_has_bits & 0x08000000u) {
      GOOGLE_DCHECK(sigmoid_param_ != nullptr);
      sigmoid_param_->Clear();
    }
    if (cached_has_bits & 0x10000000u) {
      GOOGLE_DCHECK(softmax_param_ != nullptr);
      softmax_param_->Clear();
    }
    if (cached_has_bits & 0x20000000u) {
      GOOGLE_DCHECK(contrastive_loss_param_ != nullptr);
      contrastive_loss_param_->Clear();
    }
    if (cached_has_bits & 0x40000000u) {
      GOOGLE_DCHECK(exp_param_ != nullptr);
      exp_param_->Clear();
    }
    if (cached_has_bits & 0x80000000u) {
      GOOGLE_DCHECK(loss_param_ != nullptr);
      loss_param_->Clear();
    }
  }
  type_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* V1LayerParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.V1LayerParameter.bottom");
            #endif  // !NDEBUG
            CHK_(ptr);
            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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.V1LayerParameter.top");
            #endif  // !NDEBUG
            CHK_(ptr);
            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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.V1LayerParameter.name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::V1LayerParameter_LayerType_IsValid(val))) {
            _internal_set_type(static_cast<::caffe::V1LayerParameter_LayerType>(val));
          } else {
            ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
          }
        } else
          goto handle_unusual;
        continue;
      // repeated .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 .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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
            #ifndef NDEBUG
            ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.V1LayerParameter.param");
            #endif  // !NDEBUG
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8010>(ptr));
        } else
          goto handle_unusual;
        continue;
      // repeated .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(::caffe::V1LayerParameter_DimCheckMode_IsValid(val))) {
              _internal_add_blob_share_mode(static_cast<::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, ::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:caffe.V1LayerParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.V0LayerParameter layer = 1;
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::layer(this), 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,
      "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,
      "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,
      "caffe.V1LayerParameter.name");
    target = stream->WriteStringMaybeAliased(
        4, this->_internal_name(), target);
  }

  cached_has_bits = _has_bits_[1];
  // optional .caffe.V1LayerParameter.LayerType type = 5;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      5, this->_internal_type(), target);
  }

  // repeated .caffe.BlobProto blobs = 6;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_blobs_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, this->_internal_blobs(i), 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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_weight_decay(i), target);
  }

  cached_has_bits = _has_bits_[0];
  // optional .caffe.ConcatParameter concat_param = 9;
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        9, _Internal::concat_param(this), target, stream);
  }

  // optional .caffe.ConvolutionParameter convolution_param = 10;
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        10, _Internal::convolution_param(this), target, stream);
  }

  // optional .caffe.DataParameter data_param = 11;
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        11, _Internal::data_param(this), target, stream);
  }

  // optional .caffe.DropoutParameter dropout_param = 12;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        12, _Internal::dropout_param(this), target, stream);
  }

  // optional .caffe.HDF5DataParameter hdf5_data_param = 13;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        13, _Internal::hdf5_data_param(this), target, stream);
  }

  // optional .caffe.HDF5OutputParameter hdf5_output_param = 14;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        14, _Internal::hdf5_output_param(this), target, stream);
  }

  // optional .caffe.ImageDataParameter image_data_param = 15;
  if (cached_has_bits & 0x00000100u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        15, _Internal::image_data_param(this), target, stream);
  }

  // optional .caffe.InfogainLossParameter infogain_loss_param = 16;
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        16, _Internal::infogain_loss_param(this), target, stream);
  }

  // optional .caffe.InnerProductParameter inner_product_param = 17;
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        17, _Internal::inner_product_param(this), target, stream);
  }

  // optional .caffe.LRNParameter lrn_param = 18;
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        18, _Internal::lrn_param(this), target, stream);
  }

  // optional .caffe.PoolingParameter pooling_param = 19;
  if (cached_has_bits & 0x00001000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        19, _Internal::pooling_param(this), target, stream);
  }

  // optional .caffe.WindowDataParameter window_data_param = 20;
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        20, _Internal::window_data_param(this), target, stream);
  }

  // optional .caffe.PowerParameter power_param = 21;
  if (cached_has_bits & 0x00004000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        21, _Internal::power_param(this), target, stream);
  }

  // optional .caffe.MemoryDataParameter memory_data_param = 22;
  if (cached_has_bits & 0x00008000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        22, _Internal::memory_data_param(this), target, stream);
  }

  // optional .caffe.ArgMaxParameter argmax_param = 23;
  if (cached_has_bits & 0x00010000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        23, _Internal::argmax_param(this), target, stream);
  }

  // optional .caffe.EltwiseParameter eltwise_param = 24;
  if (cached_has_bits & 0x00020000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        24, _Internal::eltwise_param(this), target, stream);
  }

  // optional .caffe.ThresholdParameter threshold_param = 25;
  if (cached_has_bits & 0x00040000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        25, _Internal::threshold_param(this), target, stream);
  }

  // optional .caffe.DummyDataParameter dummy_data_param = 26;
  if (cached_has_bits & 0x00080000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        26, _Internal::dummy_data_param(this), target, stream);
  }

  // optional .caffe.AccuracyParameter accuracy_param = 27;
  if (cached_has_bits & 0x00100000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        27, _Internal::accuracy_param(this), target, stream);
  }

  // optional .caffe.HingeLossParameter hinge_loss_param = 29;
  if (cached_has_bits & 0x00200000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        29, _Internal::hinge_loss_param(this), target, stream);
  }

  // optional .caffe.ReLUParameter relu_param = 30;
  if (cached_has_bits & 0x00400000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        30, _Internal::relu_param(this), target, stream);
  }

  // optional .caffe.SliceParameter slice_param = 31;
  if (cached_has_bits & 0x00800000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        31, _Internal::slice_param(this), target, stream);
  }

  // repeated .caffe.NetStateRule include = 32;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_include_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(32, this->_internal_include(i), target, stream);
  }

  // repeated .caffe.NetStateRule exclude = 33;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_exclude_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(33, this->_internal_exclude(i), target, stream);
  }

  // optional .caffe.MVNParameter mvn_param = 34;
  if (cached_has_bits & 0x01000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        34, _Internal::mvn_param(this), 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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(35, this->_internal_loss_weight(i), target);
  }

  // optional .caffe.TransformationParameter transform_param = 36;
  if (cached_has_bits & 0x02000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        36, _Internal::transform_param(this), target, stream);
  }

  // optional .caffe.TanHParameter tanh_param = 37;
  if (cached_has_bits & 0x04000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        37, _Internal::tanh_param(this), target, stream);
  }

  // optional .caffe.SigmoidParameter sigmoid_param = 38;
  if (cached_has_bits & 0x08000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        38, _Internal::sigmoid_param(this), target, stream);
  }

  // optional .caffe.SoftmaxParameter softmax_param = 39;
  if (cached_has_bits & 0x10000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        39, _Internal::softmax_param(this), target, stream);
  }

  // optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40;
  if (cached_has_bits & 0x20000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        40, _Internal::contrastive_loss_param(this), target, stream);
  }

  // optional .caffe.ExpParameter exp_param = 41;
  if (cached_has_bits & 0x40000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        41, _Internal::exp_param(this), target, stream);
  }

  // optional .caffe.LossParameter loss_param = 42;
  if (cached_has_bits & 0x80000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        42, _Internal::loss_param(this), 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,
      "caffe.V1LayerParameter.param");
    target = stream->WriteString(1001, s, target);
  }

  // repeated .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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
        1002, this->_internal_blob_share_mode(i), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.V1LayerParameter)
  return target;
}

size_t V1LayerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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(bottom_.size());
  for (int i = 0, n = bottom_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      bottom_.Get(i));
  }

  // repeated string top = 3;
  total_size += 1 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(top_.size());
  for (int i = 0, n = top_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      top_.Get(i));
  }

  // repeated .caffe.BlobProto blobs = 6;
  total_size += 1UL * this->_internal_blobs_size();
  for (const auto& msg : this->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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_weight_decay_size());
    total_size += data_size;
  }

  // repeated .caffe.NetStateRule include = 32;
  total_size += 2UL * this->_internal_include_size();
  for (const auto& msg : this->include_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // repeated .caffe.NetStateRule exclude = 33;
  total_size += 2UL * this->_internal_exclude_size();
  for (const auto& msg : this->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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_loss_weight_size());
    total_size += data_size;
  }

  // repeated string param = 1001;
  total_size += 2 *
      ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(param_.size());
  for (int i = 0, n = param_.size(); i < n; i++) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
      param_.Get(i));
  }

  // repeated .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 += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
        this->_internal_blob_share_mode(static_cast<int>(i)));
    }
    total_size += (2UL * count) + data_size;
  }

  cached_has_bits = _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 .caffe.V0LayerParameter layer = 1;
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *layer_);
    }

    // optional .caffe.ConcatParameter concat_param = 9;
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *concat_param_);
    }

    // optional .caffe.ConvolutionParameter convolution_param = 10;
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *convolution_param_);
    }

    // optional .caffe.DataParameter data_param = 11;
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *data_param_);
    }

    // optional .caffe.DropoutParameter dropout_param = 12;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *dropout_param_);
    }

    // optional .caffe.HDF5DataParameter hdf5_data_param = 13;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *hdf5_data_param_);
    }

    // optional .caffe.HDF5OutputParameter hdf5_output_param = 14;
    if (cached_has_bits & 0x00000080u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *hdf5_output_param_);
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // optional .caffe.ImageDataParameter image_data_param = 15;
    if (cached_has_bits & 0x00000100u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *image_data_param_);
    }

    // optional .caffe.InfogainLossParameter infogain_loss_param = 16;
    if (cached_has_bits & 0x00000200u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *infogain_loss_param_);
    }

    // optional .caffe.InnerProductParameter inner_product_param = 17;
    if (cached_has_bits & 0x00000400u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *inner_product_param_);
    }

    // optional .caffe.LRNParameter lrn_param = 18;
    if (cached_has_bits & 0x00000800u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *lrn_param_);
    }

    // optional .caffe.PoolingParameter pooling_param = 19;
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *pooling_param_);
    }

    // optional .caffe.WindowDataParameter window_data_param = 20;
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *window_data_param_);
    }

    // optional .caffe.PowerParameter power_param = 21;
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *power_param_);
    }

    // optional .caffe.MemoryDataParameter memory_data_param = 22;
    if (cached_has_bits & 0x00008000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *memory_data_param_);
    }

  }
  if (cached_has_bits & 0x00ff0000u) {
    // optional .caffe.ArgMaxParameter argmax_param = 23;
    if (cached_has_bits & 0x00010000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *argmax_param_);
    }

    // optional .caffe.EltwiseParameter eltwise_param = 24;
    if (cached_has_bits & 0x00020000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *eltwise_param_);
    }

    // optional .caffe.ThresholdParameter threshold_param = 25;
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *threshold_param_);
    }

    // optional .caffe.DummyDataParameter dummy_data_param = 26;
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *dummy_data_param_);
    }

    // optional .caffe.AccuracyParameter accuracy_param = 27;
    if (cached_has_bits & 0x00100000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *accuracy_param_);
    }

    // optional .caffe.HingeLossParameter hinge_loss_param = 29;
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *hinge_loss_param_);
    }

    // optional .caffe.ReLUParameter relu_param = 30;
    if (cached_has_bits & 0x00400000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *relu_param_);
    }

    // optional .caffe.SliceParameter slice_param = 31;
    if (cached_has_bits & 0x00800000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *slice_param_);
    }

  }
  if (cached_has_bits & 0xff000000u) {
    // optional .caffe.MVNParameter mvn_param = 34;
    if (cached_has_bits & 0x01000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *mvn_param_);
    }

    // optional .caffe.TransformationParameter transform_param = 36;
    if (cached_has_bits & 0x02000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *transform_param_);
    }

    // optional .caffe.TanHParameter tanh_param = 37;
    if (cached_has_bits & 0x04000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *tanh_param_);
    }

    // optional .caffe.SigmoidParameter sigmoid_param = 38;
    if (cached_has_bits & 0x08000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *sigmoid_param_);
    }

    // optional .caffe.SoftmaxParameter softmax_param = 39;
    if (cached_has_bits & 0x10000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *softmax_param_);
    }

    // optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40;
    if (cached_has_bits & 0x20000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *contrastive_loss_param_);
    }

    // optional .caffe.ExpParameter exp_param = 41;
    if (cached_has_bits & 0x40000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *exp_param_);
    }

    // optional .caffe.LossParameter loss_param = 42;
    if (cached_has_bits & 0x80000000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *loss_param_);
    }

  }
  // optional .caffe.V1LayerParameter.LayerType type = 5;
  cached_has_bits = _has_bits_[1];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData V1LayerParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    V1LayerParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*V1LayerParameter::GetClassData() const { return &_class_data_; }

void V1LayerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<V1LayerParameter *>(to)->MergeFrom(
      static_cast<const V1LayerParameter &>(from));
}


void V1LayerParameter::MergeFrom(const V1LayerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.V1LayerParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  bottom_.MergeFrom(from.bottom_);
  top_.MergeFrom(from.top_);
  blobs_.MergeFrom(from.blobs_);
  blobs_lr_.MergeFrom(from.blobs_lr_);
  weight_decay_.MergeFrom(from.weight_decay_);
  include_.MergeFrom(from.include_);
  exclude_.MergeFrom(from.exclude_);
  loss_weight_.MergeFrom(from.loss_weight_);
  param_.MergeFrom(from.param_);
  blob_share_mode_.MergeFrom(from.blob_share_mode_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_mutable_layer()->::caffe::V0LayerParameter::MergeFrom(from._internal_layer());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_mutable_concat_param()->::caffe::ConcatParameter::MergeFrom(from._internal_concat_param());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_mutable_convolution_param()->::caffe::ConvolutionParameter::MergeFrom(from._internal_convolution_param());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_mutable_data_param()->::caffe::DataParameter::MergeFrom(from._internal_data_param());
    }
    if (cached_has_bits & 0x00000020u) {
      _internal_mutable_dropout_param()->::caffe::DropoutParameter::MergeFrom(from._internal_dropout_param());
    }
    if (cached_has_bits & 0x00000040u) {
      _internal_mutable_hdf5_data_param()->::caffe::HDF5DataParameter::MergeFrom(from._internal_hdf5_data_param());
    }
    if (cached_has_bits & 0x00000080u) {
      _internal_mutable_hdf5_output_param()->::caffe::HDF5OutputParameter::MergeFrom(from._internal_hdf5_output_param());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      _internal_mutable_image_data_param()->::caffe::ImageDataParameter::MergeFrom(from._internal_image_data_param());
    }
    if (cached_has_bits & 0x00000200u) {
      _internal_mutable_infogain_loss_param()->::caffe::InfogainLossParameter::MergeFrom(from._internal_infogain_loss_param());
    }
    if (cached_has_bits & 0x00000400u) {
      _internal_mutable_inner_product_param()->::caffe::InnerProductParameter::MergeFrom(from._internal_inner_product_param());
    }
    if (cached_has_bits & 0x00000800u) {
      _internal_mutable_lrn_param()->::caffe::LRNParameter::MergeFrom(from._internal_lrn_param());
    }
    if (cached_has_bits & 0x00001000u) {
      _internal_mutable_pooling_param()->::caffe::PoolingParameter::MergeFrom(from._internal_pooling_param());
    }
    if (cached_has_bits & 0x00002000u) {
      _internal_mutable_window_data_param()->::caffe::WindowDataParameter::MergeFrom(from._internal_window_data_param());
    }
    if (cached_has_bits & 0x00004000u) {
      _internal_mutable_power_param()->::caffe::PowerParameter::MergeFrom(from._internal_power_param());
    }
    if (cached_has_bits & 0x00008000u) {
      _internal_mutable_memory_data_param()->::caffe::MemoryDataParameter::MergeFrom(from._internal_memory_data_param());
    }
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      _internal_mutable_argmax_param()->::caffe::ArgMaxParameter::MergeFrom(from._internal_argmax_param());
    }
    if (cached_has_bits & 0x00020000u) {
      _internal_mutable_eltwise_param()->::caffe::EltwiseParameter::MergeFrom(from._internal_eltwise_param());
    }
    if (cached_has_bits & 0x00040000u) {
      _internal_mutable_threshold_param()->::caffe::ThresholdParameter::MergeFrom(from._internal_threshold_param());
    }
    if (cached_has_bits & 0x00080000u) {
      _internal_mutable_dummy_data_param()->::caffe::DummyDataParameter::MergeFrom(from._internal_dummy_data_param());
    }
    if (cached_has_bits & 0x00100000u) {
      _internal_mutable_accuracy_param()->::caffe::AccuracyParameter::MergeFrom(from._internal_accuracy_param());
    }
    if (cached_has_bits & 0x00200000u) {
      _internal_mutable_hinge_loss_param()->::caffe::HingeLossParameter::MergeFrom(from._internal_hinge_loss_param());
    }
    if (cached_has_bits & 0x00400000u) {
      _internal_mutable_relu_param()->::caffe::ReLUParameter::MergeFrom(from._internal_relu_param());
    }
    if (cached_has_bits & 0x00800000u) {
      _internal_mutable_slice_param()->::caffe::SliceParameter::MergeFrom(from._internal_slice_param());
    }
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      _internal_mutable_mvn_param()->::caffe::MVNParameter::MergeFrom(from._internal_mvn_param());
    }
    if (cached_has_bits & 0x02000000u) {
      _internal_mutable_transform_param()->::caffe::TransformationParameter::MergeFrom(from._internal_transform_param());
    }
    if (cached_has_bits & 0x04000000u) {
      _internal_mutable_tanh_param()->::caffe::TanHParameter::MergeFrom(from._internal_tanh_param());
    }
    if (cached_has_bits & 0x08000000u) {
      _internal_mutable_sigmoid_param()->::caffe::SigmoidParameter::MergeFrom(from._internal_sigmoid_param());
    }
    if (cached_has_bits & 0x10000000u) {
      _internal_mutable_softmax_param()->::caffe::SoftmaxParameter::MergeFrom(from._internal_softmax_param());
    }
    if (cached_has_bits & 0x20000000u) {
      _internal_mutable_contrastive_loss_param()->::caffe::ContrastiveLossParameter::MergeFrom(from._internal_contrastive_loss_param());
    }
    if (cached_has_bits & 0x40000000u) {
      _internal_mutable_exp_param()->::caffe::ExpParameter::MergeFrom(from._internal_exp_param());
    }
    if (cached_has_bits & 0x80000000u) {
      _internal_mutable_loss_param()->::caffe::LossParameter::MergeFrom(from._internal_loss_param());
    }
  }
  if (from._internal_has_type()) {
    _internal_set_type(from._internal_type());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void V1LayerParameter::CopyFrom(const V1LayerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(_has_bits_[1], other->_has_bits_[1]);
  bottom_.InternalSwap(&other->bottom_);
  top_.InternalSwap(&other->top_);
  blobs_.InternalSwap(&other->blobs_);
  blobs_lr_.InternalSwap(&other->blobs_lr_);
  weight_decay_.InternalSwap(&other->weight_decay_);
  include_.InternalSwap(&other->include_);
  exclude_.InternalSwap(&other->exclude_);
  loss_weight_.InternalSwap(&other->loss_weight_);
  param_.InternalSwap(&other->param_);
  blob_share_mode_.InternalSwap(&other->blob_share_mode_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(V1LayerParameter, type_)
      + sizeof(V1LayerParameter::type_)
      - PROTOBUF_FIELD_OFFSET(V1LayerParameter, layer_)>(
          reinterpret_cast<char*>(&layer_),
          reinterpret_cast<char*>(&other->layer_));
}

::PROTOBUF_NAMESPACE_ID::Metadata V1LayerParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[94]);
}

// ===================================================================

class V0LayerParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<V0LayerParameter>()._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 ::caffe::FillerParameter& weight_filler(const V0LayerParameter* msg);
  static void set_has_weight_filler(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static const ::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] |= 32768u;
  }
  static void set_has_rand_skip(HasBits* has_bits) {
    (*has_bits)[0] |= 131072u;
  }
  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] |= 262144u;
  }
  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] |= 524288u;
  }
  static void set_has_new_channels(HasBits* has_bits) {
    (*has_bits)[0] |= 1048576u;
  }
  static void set_has_new_height(HasBits* has_bits) {
    (*has_bits)[0] |= 2097152u;
  }
  static void set_has_new_width(HasBits* has_bits) {
    (*has_bits)[0] |= 16384u;
  }
  static void set_has_shuffle_images(HasBits* has_bits) {
    (*has_bits)[0] |= 65536u;
  }
  static void set_has_concat_dim(HasBits* has_bits) {
    (*has_bits)[0] |= 4194304u;
  }
  static const ::caffe::HDF5OutputParameter& hdf5_output_param(const V0LayerParameter* msg);
  static void set_has_hdf5_output_param(HasBits* has_bits) {
    (*has_bits)[0] |= 128u;
  }
};

const ::caffe::FillerParameter&
V0LayerParameter::_Internal::weight_filler(const V0LayerParameter* msg) {
  return *msg->weight_filler_;
}
const ::caffe::FillerParameter&
V0LayerParameter::_Internal::bias_filler(const V0LayerParameter* msg) {
  return *msg->bias_filler_;
}
const ::caffe::HDF5OutputParameter&
V0LayerParameter::_Internal::hdf5_output_param(const V0LayerParameter* msg) {
  return *msg->hdf5_output_param_;
}
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString V0LayerParameter::_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),
  blobs_(arena),
  blobs_lr_(arena),
  weight_decay_(arena) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.V0LayerParameter)
}
V0LayerParameter::V0LayerParameter(const V0LayerParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_),
      blobs_(from.blobs_),
      blobs_lr_(from.blobs_lr_),
      weight_decay_(from.weight_decay_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_name()) {
    name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(), 
      GetArenaForAllocation());
  }
  type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_type()) {
    type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type(), 
      GetArenaForAllocation());
  }
  source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_source()) {
    source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(), 
      GetArenaForAllocation());
  }
  meanfile_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
    meanfile_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
  #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
  if (from._internal_has_meanfile()) {
    meanfile_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_meanfile(), 
      GetArenaForAllocation());
  }
  det_crop_mode_.UnsafeSetDefault(nullptr);
  if (from._internal_has_det_crop_mode()) {
    det_crop_mode_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_det_crop_mode(), 
      GetArenaForAllocation());
  }
  if (from._internal_has_weight_filler()) {
    weight_filler_ = new ::caffe::FillerParameter(*from.weight_filler_);
  } else {
    weight_filler_ = nullptr;
  }
  if (from._internal_has_bias_filler()) {
    bias_filler_ = new ::caffe::FillerParameter(*from.bias_filler_);
  } else {
    bias_filler_ = nullptr;
  }
  if (from._internal_has_hdf5_output_param()) {
    hdf5_output_param_ = new ::caffe::HDF5OutputParameter(*from.hdf5_output_param_);
  } else {
    hdf5_output_param_ = nullptr;
  }
  ::memcpy(&num_output_, &from.num_output_,
    static_cast<size_t>(reinterpret_cast<char*>(&det_fg_fraction_) -
    reinterpret_cast<char*>(&num_output_)) + sizeof(det_fg_fraction_));
  // @@protoc_insertion_point(copy_constructor:caffe.V0LayerParameter)
}

inline void V0LayerParameter::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
meanfile_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
  meanfile_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
det_crop_mode_.UnsafeSetDefault(nullptr);
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&new_height_) -
    reinterpret_cast<char*>(&weight_filler_)) + sizeof(new_height_));
concat_dim_ = 1u;
biasterm_ = true;
group_ = 1u;
stride_ = 1u;
dropout_ratio_ = 0.5f;
local_size_ = 5u;
alpha_ = 1;
beta_ = 0.75f;
scale_ = 1;
k_ = 1;
det_fg_threshold_ = 0.5f;
det_bg_threshold_ = 0.5f;
det_fg_fraction_ = 0.25f;
}

V0LayerParameter::~V0LayerParameter() {
  // @@protoc_insertion_point(destructor:caffe.V0LayerParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void V0LayerParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  meanfile_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  det_crop_mode_.DestroyNoArena(nullptr);
  if (this != internal_default_instance()) delete weight_filler_;
  if (this != internal_default_instance()) delete bias_filler_;
  if (this != internal_default_instance()) delete hdf5_output_param_;
}

void V0LayerParameter::ArenaDtor(void* object) {
  V0LayerParameter* _this = reinterpret_cast< V0LayerParameter* >(object);
  (void)_this;
}
void V0LayerParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void V0LayerParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void V0LayerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.V0LayerParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  blobs_.Clear();
  blobs_lr_.Clear();
  weight_decay_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000002u) {
      type_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000004u) {
      source_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000008u) {
      meanfile_.ClearNonDefaultToEmpty();
    }
    if (cached_has_bits & 0x00000010u) {
      det_crop_mode_.ClearToDefault(::caffe::V0LayerParameter::_i_give_permission_to_break_this_code_default_det_crop_mode_, GetArenaForAllocation());
       }
    if (cached_has_bits & 0x00000020u) {
      GOOGLE_DCHECK(weight_filler_ != nullptr);
      weight_filler_->Clear();
    }
    if (cached_has_bits & 0x00000040u) {
      GOOGLE_DCHECK(bias_filler_ != nullptr);
      bias_filler_->Clear();
    }
    if (cached_has_bits & 0x00000080u) {
      GOOGLE_DCHECK(hdf5_output_param_ != nullptr);
      hdf5_output_param_->Clear();
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    ::memset(&num_output_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&mirror_) -
        reinterpret_cast<char*>(&num_output_)) + sizeof(mirror_));
  }
  if (cached_has_bits & 0x00ff0000u) {
    ::memset(&shuffle_images_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&new_height_) -
        reinterpret_cast<char*>(&shuffle_images_)) + sizeof(new_height_));
    concat_dim_ = 1u;
    biasterm_ = true;
  }
  if (cached_has_bits & 0xff000000u) {
    group_ = 1u;
    stride_ = 1u;
    dropout_ratio_ = 0.5f;
    local_size_ = 5u;
    alpha_ = 1;
    beta_ = 0.75f;
    scale_ = 1;
    k_ = 1;
  }
  cached_has_bits = _has_bits_[1];
  if (cached_has_bits & 0x00000007u) {
    det_fg_threshold_ = 0.5f;
    det_bg_threshold_ = 0.5f;
    det_fg_fraction_ = 0.25f;
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* V0LayerParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.V0LayerParameter.name");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.V0LayerParameter.type");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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(&_has_bits_);
          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(&_has_bits_);
          biasterm_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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 .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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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(::caffe::V0LayerParameter_PoolMethod_IsValid(val))) {
            _internal_set_pool(static_cast<::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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.V0LayerParameter.source");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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(&_has_bits_);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.V0LayerParameter.meanfile");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          k_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated .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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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 = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          #ifndef NDEBUG
          ::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "caffe.V0LayerParameter.det_crop_mode");
          #endif  // !NDEBUG
          CHK_(ptr);
        } 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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          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(&_has_bits_);
          concat_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional .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:caffe.V0LayerParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _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,
      "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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_num_output(), target);
  }

  // optional bool biasterm = 4 [default = true];
  if (cached_has_bits & 0x00800000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_biasterm(), target);
  }

  // optional .caffe.FillerParameter weight_filler = 5;
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::weight_filler(this), target, stream);
  }

  // optional .caffe.FillerParameter bias_filler = 6;
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::bias_filler(this), target, stream);
  }

  // optional uint32 pad = 7 [default = 0];
  if (cached_has_bits & 0x00000200u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_pad(), target);
  }

  // optional uint32 kernelsize = 8;
  if (cached_has_bits & 0x00000400u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(8, this->_internal_kernelsize(), target);
  }

  // optional uint32 group = 9 [default = 1];
  if (cached_has_bits & 0x01000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(9, this->_internal_group(), target);
  }

  // optional uint32 stride = 10 [default = 1];
  if (cached_has_bits & 0x02000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_stride(), target);
  }

  // optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
  if (cached_has_bits & 0x00000800u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(13, this->_internal_local_size(), target);
  }

  // optional float alpha = 14 [default = 1];
  if (cached_has_bits & 0x10000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(14, this->_internal_alpha(), target);
  }

  // optional float beta = 15 [default = 0.75];
  if (cached_has_bits & 0x20000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(19, this->_internal_batchsize(), target);
  }

  // optional uint32 cropsize = 20 [default = 0];
  if (cached_has_bits & 0x00002000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(20, this->_internal_cropsize(), target);
  }

  // optional bool mirror = 21 [default = false];
  if (cached_has_bits & 0x00008000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(21, this->_internal_mirror(), target);
  }

  // optional float k = 22 [default = 1];
  if (cached_has_bits & 0x80000000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(22, this->_internal_k(), target);
  }

  // repeated .caffe.BlobProto blobs = 50;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_blobs_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(50, this->_internal_blobs(i), 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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(52, this->_internal_weight_decay(i), target);
  }

  // optional uint32 rand_skip = 53 [default = 0];
  if (cached_has_bits & 0x00020000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(53, this->_internal_rand_skip(), target);
  }

  cached_has_bits = _has_bits_[1];
  // optional float det_fg_threshold = 54 [default = 0.5];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(56, this->_internal_det_fg_fraction(), target);
  }

  cached_has_bits = _has_bits_[0];
  // optional uint32 det_context_pad = 58 [default = 0];
  if (cached_has_bits & 0x00040000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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,
      "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 & 0x00080000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(60, this->_internal_new_num(), target);
  }

  // optional int32 new_channels = 61 [default = 0];
  if (cached_has_bits & 0x00100000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(61, this->_internal_new_channels(), target);
  }

  // optional int32 new_height = 62 [default = 0];
  if (cached_has_bits & 0x00200000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(62, this->_internal_new_height(), target);
  }

  // optional int32 new_width = 63 [default = 0];
  if (cached_has_bits & 0x00004000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(63, this->_internal_new_width(), target);
  }

  // optional bool shuffle_images = 64 [default = false];
  if (cached_has_bits & 0x00010000u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::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 = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(65, this->_internal_concat_dim(), target);
  }

  // optional .caffe.HDF5OutputParameter hdf5_output_param = 1001;
  if (cached_has_bits & 0x00000080u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1001, _Internal::hdf5_output_param(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.V0LayerParameter)
  return target;
}

size_t V0LayerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 .caffe.BlobProto blobs = 50;
  total_size += 2UL * this->_internal_blobs_size();
  for (const auto& msg : this->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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::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 *
                  ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_weight_decay_size());
    total_size += data_size;
  }

  cached_has_bits = _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 .caffe.FillerParameter weight_filler = 5;
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *weight_filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 6;
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *bias_filler_);
    }

    // optional .caffe.HDF5OutputParameter hdf5_output_param = 1001;
    if (cached_has_bits & 0x00000080u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *hdf5_output_param_);
    }

  }
  if (cached_has_bits & 0x0000ff00u) {
    // optional uint32 num_output = 3;
    if (cached_has_bits & 0x00000100u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
    }

    // optional uint32 pad = 7 [default = 0];
    if (cached_has_bits & 0x00000200u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad());
    }

    // optional uint32 kernelsize = 8;
    if (cached_has_bits & 0x00000400u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernelsize());
    }

    // optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
    if (cached_has_bits & 0x00000800u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_pool());
    }

    // optional uint32 batchsize = 19;
    if (cached_has_bits & 0x00001000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_batchsize());
    }

    // optional uint32 cropsize = 20 [default = 0];
    if (cached_has_bits & 0x00002000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_cropsize());
    }

    // optional int32 new_width = 63 [default = 0];
    if (cached_has_bits & 0x00004000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_new_width());
    }

    // optional bool mirror = 21 [default = false];
    if (cached_has_bits & 0x00008000u) {
      total_size += 2 + 1;
    }

  }
  if (cached_has_bits & 0x00ff0000u) {
    // optional bool shuffle_images = 64 [default = false];
    if (cached_has_bits & 0x00010000u) {
      total_size += 2 + 1;
    }

    // optional uint32 rand_skip = 53 [default = 0];
    if (cached_has_bits & 0x00020000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_rand_skip());
    }

    // optional uint32 det_context_pad = 58 [default = 0];
    if (cached_has_bits & 0x00040000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
          this->_internal_det_context_pad());
    }

    // optional int32 new_num = 60 [default = 0];
    if (cached_has_bits & 0x00080000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_new_num());
    }

    // optional int32 new_channels = 61 [default = 0];
    if (cached_has_bits & 0x00100000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_new_channels());
    }

    // optional int32 new_height = 62 [default = 0];
    if (cached_has_bits & 0x00200000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
          this->_internal_new_height());
    }

    // optional uint32 concat_dim = 65 [default = 1];
    if (cached_has_bits & 0x00400000u) {
      total_size += 2 +
        ::PROTOBUF_NAMESPACE_ID::internal::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 += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_group());
    }

    // optional uint32 stride = 10 [default = 1];
    if (cached_has_bits & 0x02000000u) {
      total_size += ::PROTOBUF_NAMESPACE_ID::internal::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 += ::PROTOBUF_NAMESPACE_ID::internal::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 = _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, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData V0LayerParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    V0LayerParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*V0LayerParameter::GetClassData() const { return &_class_data_; }

void V0LayerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<V0LayerParameter *>(to)->MergeFrom(
      static_cast<const V0LayerParameter &>(from));
}


void V0LayerParameter::MergeFrom(const V0LayerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.V0LayerParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  blobs_.MergeFrom(from.blobs_);
  blobs_lr_.MergeFrom(from.blobs_lr_);
  weight_decay_.MergeFrom(from.weight_decay_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x000000ffu) {
    if (cached_has_bits & 0x00000001u) {
      _internal_set_name(from._internal_name());
    }
    if (cached_has_bits & 0x00000002u) {
      _internal_set_type(from._internal_type());
    }
    if (cached_has_bits & 0x00000004u) {
      _internal_set_source(from._internal_source());
    }
    if (cached_has_bits & 0x00000008u) {
      _internal_set_meanfile(from._internal_meanfile());
    }
    if (cached_has_bits & 0x00000010u) {
      _internal_set_det_crop_mode(from._internal_det_crop_mode());
    }
    if (cached_has_bits & 0x00000020u) {
      _internal_mutable_weight_filler()->::caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
    }
    if (cached_has_bits & 0x00000040u) {
      _internal_mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
    }
    if (cached_has_bits & 0x00000080u) {
      _internal_mutable_hdf5_output_param()->::caffe::HDF5OutputParameter::MergeFrom(from._internal_hdf5_output_param());
    }
  }
  if (cached_has_bits & 0x0000ff00u) {
    if (cached_has_bits & 0x00000100u) {
      num_output_ = from.num_output_;
    }
    if (cached_has_bits & 0x00000200u) {
      pad_ = from.pad_;
    }
    if (cached_has_bits & 0x00000400u) {
      kernelsize_ = from.kernelsize_;
    }
    if (cached_has_bits & 0x00000800u) {
      pool_ = from.pool_;
    }
    if (cached_has_bits & 0x00001000u) {
      batchsize_ = from.batchsize_;
    }
    if (cached_has_bits & 0x00002000u) {
      cropsize_ = from.cropsize_;
    }
    if (cached_has_bits & 0x00004000u) {
      new_width_ = from.new_width_;
    }
    if (cached_has_bits & 0x00008000u) {
      mirror_ = from.mirror_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0x00ff0000u) {
    if (cached_has_bits & 0x00010000u) {
      shuffle_images_ = from.shuffle_images_;
    }
    if (cached_has_bits & 0x00020000u) {
      rand_skip_ = from.rand_skip_;
    }
    if (cached_has_bits & 0x00040000u) {
      det_context_pad_ = from.det_context_pad_;
    }
    if (cached_has_bits & 0x00080000u) {
      new_num_ = from.new_num_;
    }
    if (cached_has_bits & 0x00100000u) {
      new_channels_ = from.new_channels_;
    }
    if (cached_has_bits & 0x00200000u) {
      new_height_ = from.new_height_;
    }
    if (cached_has_bits & 0x00400000u) {
      concat_dim_ = from.concat_dim_;
    }
    if (cached_has_bits & 0x00800000u) {
      biasterm_ = from.biasterm_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 0xff000000u) {
    if (cached_has_bits & 0x01000000u) {
      group_ = from.group_;
    }
    if (cached_has_bits & 0x02000000u) {
      stride_ = from.stride_;
    }
    if (cached_has_bits & 0x04000000u) {
      dropout_ratio_ = from.dropout_ratio_;
    }
    if (cached_has_bits & 0x08000000u) {
      local_size_ = from.local_size_;
    }
    if (cached_has_bits & 0x10000000u) {
      alpha_ = from.alpha_;
    }
    if (cached_has_bits & 0x20000000u) {
      beta_ = from.beta_;
    }
    if (cached_has_bits & 0x40000000u) {
      scale_ = from.scale_;
    }
    if (cached_has_bits & 0x80000000u) {
      k_ = from.k_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  cached_has_bits = from._has_bits_[1];
  if (cached_has_bits & 0x00000007u) {
    if (cached_has_bits & 0x00000001u) {
      det_fg_threshold_ = from.det_fg_threshold_;
    }
    if (cached_has_bits & 0x00000002u) {
      det_bg_threshold_ = from.det_bg_threshold_;
    }
    if (cached_has_bits & 0x00000004u) {
      det_fg_fraction_ = from.det_fg_fraction_;
    }
    _has_bits_[1] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void V0LayerParameter::CopyFrom(const V0LayerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  swap(_has_bits_[1], other->_has_bits_[1]);
  blobs_.InternalSwap(&other->blobs_);
  blobs_lr_.InternalSwap(&other->blobs_lr_);
  weight_decay_.InternalSwap(&other->weight_decay_);
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &name_, lhs_arena,
      &other->name_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &type_, lhs_arena,
      &other->type_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &source_, lhs_arena,
      &other->source_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
      &meanfile_, lhs_arena,
      &other->meanfile_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
      nullptr,
      &det_crop_mode_, lhs_arena,
      &other->det_crop_mode_, rhs_arena
  );
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(V0LayerParameter, new_height_)
      + sizeof(V0LayerParameter::new_height_)
      - PROTOBUF_FIELD_OFFSET(V0LayerParameter, weight_filler_)>(
          reinterpret_cast<char*>(&weight_filler_),
          reinterpret_cast<char*>(&other->weight_filler_));
  swap(concat_dim_, other->concat_dim_);
  swap(biasterm_, other->biasterm_);
  swap(group_, other->group_);
  swap(stride_, other->stride_);
  swap(dropout_ratio_, other->dropout_ratio_);
  swap(local_size_, other->local_size_);
  swap(alpha_, other->alpha_);
  swap(beta_, other->beta_);
  swap(scale_, other->scale_);
  swap(k_, other->k_);
  swap(det_fg_threshold_, other->det_fg_threshold_);
  swap(det_bg_threshold_, other->det_bg_threshold_);
  swap(det_fg_fraction_, other->det_fg_fraction_);
}

::PROTOBUF_NAMESPACE_ID::Metadata V0LayerParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[95]);
}

// ===================================================================

class PReLUParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<PReLUParameter>()._has_bits_);
  static const ::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 ::caffe::FillerParameter&
PReLUParameter::_Internal::filler(const PReLUParameter* msg) {
  return *msg->filler_;
}
PReLUParameter::PReLUParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.PReLUParameter)
}
PReLUParameter::PReLUParameter(const PReLUParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_filler()) {
    filler_ = new ::caffe::FillerParameter(*from.filler_);
  } else {
    filler_ = nullptr;
  }
  channel_shared_ = from.channel_shared_;
  // @@protoc_insertion_point(copy_constructor:caffe.PReLUParameter)
}

inline void PReLUParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
    reinterpret_cast<char*>(&filler_) - reinterpret_cast<char*>(this)),
    0, static_cast<size_t>(reinterpret_cast<char*>(&channel_shared_) -
    reinterpret_cast<char*>(&filler_)) + sizeof(channel_shared_));
}

PReLUParameter::~PReLUParameter() {
  // @@protoc_insertion_point(destructor:caffe.PReLUParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void PReLUParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  if (this != internal_default_instance()) delete filler_;
}

void PReLUParameter::ArenaDtor(void* object) {
  PReLUParameter* _this = reinterpret_cast< PReLUParameter* >(object);
  (void)_this;
}
void PReLUParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PReLUParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void PReLUParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.PReLUParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    GOOGLE_DCHECK(filler_ != nullptr);
    filler_->Clear();
  }
  channel_shared_ = false;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* PReLUParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional .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);
          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:
  _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:caffe.PReLUParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .caffe.FillerParameter filler = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::filler(this), target, stream);
  }

  // optional bool channel_shared = 2 [default = false];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_channel_shared(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.PReLUParameter)
  return target;
}

size_t PReLUParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start: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 = _has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    // optional .caffe.FillerParameter filler = 1;
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *filler_);
    }

    // optional bool channel_shared = 2 [default = false];
    if (cached_has_bits & 0x00000002u) {
      total_size += 1 + 1;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PReLUParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    PReLUParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PReLUParameter::GetClassData() const { return &_class_data_; }

void PReLUParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<PReLUParameter *>(to)->MergeFrom(
      static_cast<const PReLUParameter &>(from));
}


void PReLUParameter::MergeFrom(const PReLUParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PReLUParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 0x00000003u) {
    if (cached_has_bits & 0x00000001u) {
      _internal_mutable_filler()->::caffe::FillerParameter::MergeFrom(from._internal_filler());
    }
    if (cached_has_bits & 0x00000002u) {
      channel_shared_ = from.channel_shared_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void PReLUParameter::CopyFrom(const PReLUParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start: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(_has_bits_[0], other->_has_bits_[0]);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(PReLUParameter, channel_shared_)
      + sizeof(PReLUParameter::channel_shared_)
      - PROTOBUF_FIELD_OFFSET(PReLUParameter, filler_)>(
          reinterpret_cast<char*>(&filler_),
          reinterpret_cast<char*>(&other->filler_));
}

::PROTOBUF_NAMESPACE_ID::Metadata PReLUParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[96]);
}

// ===================================================================

class ShuffleChannelParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<ShuffleChannelParameter>()._has_bits_);
  static void set_has_group(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

ShuffleChannelParameter::ShuffleChannelParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.ShuffleChannelParameter)
}
ShuffleChannelParameter::ShuffleChannelParameter(const ShuffleChannelParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  group_ = from.group_;
  // @@protoc_insertion_point(copy_constructor:caffe.ShuffleChannelParameter)
}

inline void ShuffleChannelParameter::SharedCtor() {
group_ = 1u;
}

ShuffleChannelParameter::~ShuffleChannelParameter() {
  // @@protoc_insertion_point(destructor:caffe.ShuffleChannelParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void ShuffleChannelParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void ShuffleChannelParameter::ArenaDtor(void* object) {
  ShuffleChannelParameter* _this = reinterpret_cast< ShuffleChannelParameter* >(object);
  (void)_this;
}
void ShuffleChannelParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ShuffleChannelParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void ShuffleChannelParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ShuffleChannelParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  group_ = 1u;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ShuffleChannelParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional uint32 group = 1 [default = 1];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_group(&has_bits);
          group_ = ::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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* ShuffleChannelParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ShuffleChannelParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional uint32 group = 1 [default = 1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_group(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.ShuffleChannelParameter)
  return target;
}

size_t ShuffleChannelParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.ShuffleChannelParameter)
  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 uint32 group = 1 [default = 1];
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_group());
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ShuffleChannelParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    ShuffleChannelParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ShuffleChannelParameter::GetClassData() const { return &_class_data_; }

void ShuffleChannelParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<ShuffleChannelParameter *>(to)->MergeFrom(
      static_cast<const ShuffleChannelParameter &>(from));
}


void ShuffleChannelParameter::MergeFrom(const ShuffleChannelParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ShuffleChannelParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_group()) {
    _internal_set_group(from._internal_group());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void ShuffleChannelParameter::CopyFrom(const ShuffleChannelParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:caffe.ShuffleChannelParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ShuffleChannelParameter::IsInitialized() const {
  return true;
}

void ShuffleChannelParameter::InternalSwap(ShuffleChannelParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(group_, other->group_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ShuffleChannelParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[97]);
}

// ===================================================================

class UpsampleParameter::_Internal {
 public:
  using HasBits = decltype(std::declval<UpsampleParameter>()._has_bits_);
  static void set_has_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
};

UpsampleParameter::UpsampleParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor();
  if (!is_message_owned) {
    RegisterArenaDtor(arena);
  }
  // @@protoc_insertion_point(arena_constructor:caffe.UpsampleParameter)
}
UpsampleParameter::UpsampleParameter(const UpsampleParameter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  scale_ = from.scale_;
  // @@protoc_insertion_point(copy_constructor:caffe.UpsampleParameter)
}

inline void UpsampleParameter::SharedCtor() {
scale_ = 0;
}

UpsampleParameter::~UpsampleParameter() {
  // @@protoc_insertion_point(destructor:caffe.UpsampleParameter)
  if (GetArenaForAllocation() != nullptr) return;
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

inline void UpsampleParameter::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}

void UpsampleParameter::ArenaDtor(void* object) {
  UpsampleParameter* _this = reinterpret_cast< UpsampleParameter* >(object);
  (void)_this;
}
void UpsampleParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void UpsampleParameter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}

void UpsampleParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.UpsampleParameter)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  scale_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* UpsampleParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  _Internal::HasBits has_bits{};
  while (!ctx->Done(&ptr)) {
    uint32_t tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    switch (tag >> 3) {
      // optional float scale = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
          _Internal::set_has_scale(&has_bits);
          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:
  _has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* UpsampleParameter::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:caffe.UpsampleParameter)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float scale = 1;
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_scale(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:caffe.UpsampleParameter)
  return target;
}

size_t UpsampleParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe.UpsampleParameter)
  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 scale = 1;
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    total_size += 1 + 4;
  }

  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData UpsampleParameter::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
    UpsampleParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*UpsampleParameter::GetClassData() const { return &_class_data_; }

void UpsampleParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
                      const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  static_cast<UpsampleParameter *>(to)->MergeFrom(
      static_cast<const UpsampleParameter &>(from));
}


void UpsampleParameter::MergeFrom(const UpsampleParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.UpsampleParameter)
  GOOGLE_DCHECK_NE(&from, this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  if (from._internal_has_scale()) {
    _internal_set_scale(from._internal_scale());
  }
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void UpsampleParameter::CopyFrom(const UpsampleParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:caffe.UpsampleParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool UpsampleParameter::IsInitialized() const {
  return true;
}

void UpsampleParameter::InternalSwap(UpsampleParameter* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  swap(scale_, other->scale_);
}

::PROTOBUF_NAMESPACE_ID::Metadata UpsampleParameter::GetMetadata() const {
  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
      &descriptor_table_caffe_2eproto_getter, &descriptor_table_caffe_2eproto_once,
      file_level_metadata_caffe_2eproto[98]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace caffe
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::caffe::BlobShape* Arena::CreateMaybeMessage< ::caffe::BlobShape >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::BlobShape >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::BlobProto* Arena::CreateMaybeMessage< ::caffe::BlobProto >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::BlobProto >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::BlobProtoVector* Arena::CreateMaybeMessage< ::caffe::BlobProtoVector >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::BlobProtoVector >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::Datum* Arena::CreateMaybeMessage< ::caffe::Datum >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::Datum >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::MTCNNBBox* Arena::CreateMaybeMessage< ::caffe::MTCNNBBox >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::MTCNNBBox >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::MTCNNDatum* Arena::CreateMaybeMessage< ::caffe::MTCNNDatum >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::MTCNNDatum >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::LabelMapItem* Arena::CreateMaybeMessage< ::caffe::LabelMapItem >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::LabelMapItem >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::LabelMap* Arena::CreateMaybeMessage< ::caffe::LabelMap >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::LabelMap >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::Sampler* Arena::CreateMaybeMessage< ::caffe::Sampler >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::Sampler >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::SampleConstraint* Arena::CreateMaybeMessage< ::caffe::SampleConstraint >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::SampleConstraint >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::BatchSampler* Arena::CreateMaybeMessage< ::caffe::BatchSampler >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::BatchSampler >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::EmitConstraint* Arena::CreateMaybeMessage< ::caffe::EmitConstraint >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::EmitConstraint >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::NormalizedBBox* Arena::CreateMaybeMessage< ::caffe::NormalizedBBox >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::NormalizedBBox >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::Annotation* Arena::CreateMaybeMessage< ::caffe::Annotation >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::Annotation >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::AnnotationGroup* Arena::CreateMaybeMessage< ::caffe::AnnotationGroup >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::AnnotationGroup >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::AnnotatedDatum* Arena::CreateMaybeMessage< ::caffe::AnnotatedDatum >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::AnnotatedDatum >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::FillerParameter* Arena::CreateMaybeMessage< ::caffe::FillerParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::FillerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::NetParameter* Arena::CreateMaybeMessage< ::caffe::NetParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::NetParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::SolverParameter* Arena::CreateMaybeMessage< ::caffe::SolverParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::SolverParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::SolverState* Arena::CreateMaybeMessage< ::caffe::SolverState >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::SolverState >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::NetState* Arena::CreateMaybeMessage< ::caffe::NetState >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::NetState >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::NetStateRule* Arena::CreateMaybeMessage< ::caffe::NetStateRule >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::NetStateRule >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ParamSpec* Arena::CreateMaybeMessage< ::caffe::ParamSpec >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ParamSpec >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::LayerParameter* Arena::CreateMaybeMessage< ::caffe::LayerParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::LayerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ClipParameter* Arena::CreateMaybeMessage< ::caffe::ClipParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ClipParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ROIPoolingParameter* Arena::CreateMaybeMessage< ::caffe::ROIPoolingParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ROIPoolingParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::InterpParameter* Arena::CreateMaybeMessage< ::caffe::InterpParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::InterpParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::LSTMParameter* Arena::CreateMaybeMessage< ::caffe::LSTMParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::LSTMParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::Im2seqParameter* Arena::CreateMaybeMessage< ::caffe::Im2seqParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::Im2seqParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::CenterLossParameter* Arena::CreateMaybeMessage< ::caffe::CenterLossParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::CenterLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::Seq2outParameter* Arena::CreateMaybeMessage< ::caffe::Seq2outParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::Seq2outParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ImgSizeParameter* Arena::CreateMaybeMessage< ::caffe::ImgSizeParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ImgSizeParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::TransformationParameter* Arena::CreateMaybeMessage< ::caffe::TransformationParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::TransformationParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ResizeParameter* Arena::CreateMaybeMessage< ::caffe::ResizeParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ResizeParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::SaltPepperParameter* Arena::CreateMaybeMessage< ::caffe::SaltPepperParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::SaltPepperParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::NoiseParameter* Arena::CreateMaybeMessage< ::caffe::NoiseParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::NoiseParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::DistortionParameter* Arena::CreateMaybeMessage< ::caffe::DistortionParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::DistortionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ExpansionParameter* Arena::CreateMaybeMessage< ::caffe::ExpansionParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ExpansionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::LossParameter* Arena::CreateMaybeMessage< ::caffe::LossParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::LossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::AccuracyParameter* Arena::CreateMaybeMessage< ::caffe::AccuracyParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::AccuracyParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::AnnotatedDataParameter* Arena::CreateMaybeMessage< ::caffe::AnnotatedDataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::AnnotatedDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ArgMaxParameter* Arena::CreateMaybeMessage< ::caffe::ArgMaxParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ArgMaxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ConcatParameter* Arena::CreateMaybeMessage< ::caffe::ConcatParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ConcatParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::BatchNormParameter* Arena::CreateMaybeMessage< ::caffe::BatchNormParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::BatchNormParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::BiasParameter* Arena::CreateMaybeMessage< ::caffe::BiasParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::BiasParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ContrastiveLossParameter* Arena::CreateMaybeMessage< ::caffe::ContrastiveLossParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ContrastiveLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ConvolutionParameter* Arena::CreateMaybeMessage< ::caffe::ConvolutionParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ConvolutionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::Convolution3DParameter* Arena::CreateMaybeMessage< ::caffe::Convolution3DParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::Convolution3DParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::CropParameter* Arena::CreateMaybeMessage< ::caffe::CropParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::CropParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::DataParameter* Arena::CreateMaybeMessage< ::caffe::DataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::DataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::DetectionEvaluateParameter* Arena::CreateMaybeMessage< ::caffe::DetectionEvaluateParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::DetectionEvaluateParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::NonMaximumSuppressionParameter* Arena::CreateMaybeMessage< ::caffe::NonMaximumSuppressionParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::NonMaximumSuppressionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::SaveOutputParameter* Arena::CreateMaybeMessage< ::caffe::SaveOutputParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::SaveOutputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::DetectionOutputParameter* Arena::CreateMaybeMessage< ::caffe::DetectionOutputParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::DetectionOutputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::DropoutParameter* Arena::CreateMaybeMessage< ::caffe::DropoutParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::DropoutParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::DummyDataParameter* Arena::CreateMaybeMessage< ::caffe::DummyDataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::DummyDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::EltwiseParameter* Arena::CreateMaybeMessage< ::caffe::EltwiseParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::EltwiseParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ELUParameter* Arena::CreateMaybeMessage< ::caffe::ELUParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ELUParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::EmbedParameter* Arena::CreateMaybeMessage< ::caffe::EmbedParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::EmbedParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ExpParameter* Arena::CreateMaybeMessage< ::caffe::ExpParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ExpParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::FlattenParameter* Arena::CreateMaybeMessage< ::caffe::FlattenParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::FlattenParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::HDF5DataParameter* Arena::CreateMaybeMessage< ::caffe::HDF5DataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::HDF5DataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::HDF5OutputParameter* Arena::CreateMaybeMessage< ::caffe::HDF5OutputParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::HDF5OutputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::HingeLossParameter* Arena::CreateMaybeMessage< ::caffe::HingeLossParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::HingeLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ImageDataParameter* Arena::CreateMaybeMessage< ::caffe::ImageDataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ImageDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::InfogainLossParameter* Arena::CreateMaybeMessage< ::caffe::InfogainLossParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::InfogainLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::InnerProductParameter* Arena::CreateMaybeMessage< ::caffe::InnerProductParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::InnerProductParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::InputParameter* Arena::CreateMaybeMessage< ::caffe::InputParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::InputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::LogParameter* Arena::CreateMaybeMessage< ::caffe::LogParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::LogParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::LRNParameter* Arena::CreateMaybeMessage< ::caffe::LRNParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::LRNParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::MemoryDataParameter* Arena::CreateMaybeMessage< ::caffe::MemoryDataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::MemoryDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::MultiBoxLossParameter* Arena::CreateMaybeMessage< ::caffe::MultiBoxLossParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::MultiBoxLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::MVNParameter* Arena::CreateMaybeMessage< ::caffe::MVNParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::MVNParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::NormalizeParameter* Arena::CreateMaybeMessage< ::caffe::NormalizeParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::NormalizeParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ParameterParameter* Arena::CreateMaybeMessage< ::caffe::ParameterParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ParameterParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::PermuteParameter* Arena::CreateMaybeMessage< ::caffe::PermuteParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::PermuteParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::PoolingParameter* Arena::CreateMaybeMessage< ::caffe::PoolingParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::PoolingParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::Pooling3DParameter* Arena::CreateMaybeMessage< ::caffe::Pooling3DParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::Pooling3DParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::PowerParameter* Arena::CreateMaybeMessage< ::caffe::PowerParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::PowerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::PriorBoxParameter* Arena::CreateMaybeMessage< ::caffe::PriorBoxParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::PriorBoxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::PythonParameter* Arena::CreateMaybeMessage< ::caffe::PythonParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::PythonParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::RecurrentParameter* Arena::CreateMaybeMessage< ::caffe::RecurrentParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::RecurrentParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ReductionParameter* Arena::CreateMaybeMessage< ::caffe::ReductionParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ReductionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ReLUParameter* Arena::CreateMaybeMessage< ::caffe::ReLUParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ReLUParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ReshapeParameter* Arena::CreateMaybeMessage< ::caffe::ReshapeParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ReshapeParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ScaleParameter* Arena::CreateMaybeMessage< ::caffe::ScaleParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ScaleParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::SigmoidParameter* Arena::CreateMaybeMessage< ::caffe::SigmoidParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::SigmoidParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::SliceParameter* Arena::CreateMaybeMessage< ::caffe::SliceParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::SliceParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::SoftmaxParameter* Arena::CreateMaybeMessage< ::caffe::SoftmaxParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::SoftmaxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::TanHParameter* Arena::CreateMaybeMessage< ::caffe::TanHParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::TanHParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::TileParameter* Arena::CreateMaybeMessage< ::caffe::TileParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::TileParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ThresholdParameter* Arena::CreateMaybeMessage< ::caffe::ThresholdParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ThresholdParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::WindowDataParameter* Arena::CreateMaybeMessage< ::caffe::WindowDataParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::WindowDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::SPPParameter* Arena::CreateMaybeMessage< ::caffe::SPPParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::SPPParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::V1LayerParameter* Arena::CreateMaybeMessage< ::caffe::V1LayerParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::V1LayerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::V0LayerParameter* Arena::CreateMaybeMessage< ::caffe::V0LayerParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::V0LayerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::PReLUParameter* Arena::CreateMaybeMessage< ::caffe::PReLUParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::PReLUParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::ShuffleChannelParameter* Arena::CreateMaybeMessage< ::caffe::ShuffleChannelParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::ShuffleChannelParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::caffe::UpsampleParameter* Arena::CreateMaybeMessage< ::caffe::UpsampleParameter >(Arena* arena) {
  return Arena::CreateMessageInternal< ::caffe::UpsampleParameter >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
