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

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "caffe.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.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)

namespace caffe {

namespace {

const ::google::protobuf::Descriptor* BlobShape_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  BlobShape_reflection_ = NULL;
const ::google::protobuf::Descriptor* BlobProto_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  BlobProto_reflection_ = NULL;
const ::google::protobuf::Descriptor* BlobProtoVector_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  BlobProtoVector_reflection_ = NULL;
const ::google::protobuf::Descriptor* CropParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  CropParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* PermuteParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  PermuteParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* NormalizeBBoxParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  NormalizeBBoxParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* PriorBoxParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  PriorBoxParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* PriorBoxParameter_CodeType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* DetectionOutputParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DetectionOutputParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* Datum_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  Datum_reflection_ = NULL;
const ::google::protobuf::Descriptor* FillerParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  FillerParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* FillerParameter_VarianceNorm_descriptor_ = NULL;
const ::google::protobuf::Descriptor* NetParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  NetParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* SolverParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SolverParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* SolverParameter_SolverMode_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* SolverParameter_SolverType_descriptor_ = NULL;
const ::google::protobuf::Descriptor* SolverState_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SolverState_reflection_ = NULL;
const ::google::protobuf::Descriptor* NetState_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  NetState_reflection_ = NULL;
const ::google::protobuf::Descriptor* NetStateRule_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  NetStateRule_reflection_ = NULL;
const ::google::protobuf::Descriptor* ParamSpec_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ParamSpec_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* ParamSpec_DimCheckMode_descriptor_ = NULL;
const ::google::protobuf::Descriptor* LayerParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  LayerParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* TransformationParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TransformationParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* LossParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  LossParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* AccuracyParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  AccuracyParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* ArgMaxParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ArgMaxParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* ConcatParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ConcatParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* ContrastiveLossParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ContrastiveLossParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* ConvolutionParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ConvolutionParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* ConvolutionParameter_Engine_descriptor_ = NULL;
const ::google::protobuf::Descriptor* DataParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DataParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* DataParameter_DB_descriptor_ = NULL;
const ::google::protobuf::Descriptor* DropoutParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DropoutParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* DummyDataParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  DummyDataParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* EltwiseParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  EltwiseParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* EltwiseParameter_EltwiseOp_descriptor_ = NULL;
const ::google::protobuf::Descriptor* ExpParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ExpParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* FlattenParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  FlattenParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* HDF5DataParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  HDF5DataParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* HDF5OutputParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  HDF5OutputParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* HingeLossParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  HingeLossParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* HingeLossParameter_Norm_descriptor_ = NULL;
const ::google::protobuf::Descriptor* ImageDataParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ImageDataParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* InfogainLossParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  InfogainLossParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* InnerProductParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  InnerProductParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* LogParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  LogParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* LRNParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  LRNParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* LRNParameter_NormRegion_descriptor_ = NULL;
const ::google::protobuf::Descriptor* MemoryDataParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  MemoryDataParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* MVNParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  MVNParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* PoolingParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  PoolingParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* PoolingParameter_PoolMethod_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* PoolingParameter_Engine_descriptor_ = NULL;
const ::google::protobuf::Descriptor* PowerParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  PowerParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* PythonParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  PythonParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* ReductionParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ReductionParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* ReductionParameter_ReductionOp_descriptor_ = NULL;
const ::google::protobuf::Descriptor* ReLUParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ReLUParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* ReLUParameter_Engine_descriptor_ = NULL;
const ::google::protobuf::Descriptor* ReshapeParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ReshapeParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* SigmoidParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SigmoidParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* SigmoidParameter_Engine_descriptor_ = NULL;
const ::google::protobuf::Descriptor* SliceParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SliceParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* SoftmaxParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SoftmaxParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* SoftmaxParameter_Engine_descriptor_ = NULL;
const ::google::protobuf::Descriptor* TanHParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  TanHParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* TanHParameter_Engine_descriptor_ = NULL;
const ::google::protobuf::Descriptor* ThresholdParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  ThresholdParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* WindowDataParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  WindowDataParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* SPPParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  SPPParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* SPPParameter_PoolMethod_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* SPPParameter_Engine_descriptor_ = NULL;
const ::google::protobuf::Descriptor* V1LayerParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  V1LayerParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* V1LayerParameter_LayerType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* V1LayerParameter_DimCheckMode_descriptor_ = NULL;
const ::google::protobuf::Descriptor* V0LayerParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  V0LayerParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* V0LayerParameter_PoolMethod_descriptor_ = NULL;
const ::google::protobuf::Descriptor* PReLUParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  PReLUParameter_reflection_ = NULL;
const ::google::protobuf::Descriptor* NormalizedBBox_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
  NormalizedBBox_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* Phase_descriptor_ = NULL;

}  // namespace


void protobuf_AssignDesc_caffe_2eproto() GOOGLE_ATTRIBUTE_COLD;
void protobuf_AssignDesc_caffe_2eproto() {
  protobuf_AddDesc_caffe_2eproto();
  const ::google::protobuf::FileDescriptor* file =
    ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
      "caffe.proto");
  GOOGLE_CHECK(file != NULL);
  BlobShape_descriptor_ = file->message_type(0);
  static const int BlobShape_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobShape, dim_),
  };
  BlobShape_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      BlobShape_descriptor_,
      BlobShape::internal_default_instance(),
      BlobShape_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobShape, _has_bits_),
      -1,
      -1,
      sizeof(BlobShape),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobShape, _internal_metadata_));
  BlobProto_descriptor_ = file->message_type(1);
  static const int BlobProto_offsets_[7] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, shape_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, data_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, diff_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, num_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, channels_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, height_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, width_),
  };
  BlobProto_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      BlobProto_descriptor_,
      BlobProto::internal_default_instance(),
      BlobProto_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, _has_bits_),
      -1,
      -1,
      sizeof(BlobProto),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, _internal_metadata_));
  BlobProtoVector_descriptor_ = file->message_type(2);
  static const int BlobProtoVector_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProtoVector, blobs_),
  };
  BlobProtoVector_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      BlobProtoVector_descriptor_,
      BlobProtoVector::internal_default_instance(),
      BlobProtoVector_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProtoVector, _has_bits_),
      -1,
      -1,
      sizeof(BlobProtoVector),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProtoVector, _internal_metadata_));
  CropParameter_descriptor_ = file->message_type(3);
  static const int CropParameter_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CropParameter, axis_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CropParameter, offset_),
  };
  CropParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      CropParameter_descriptor_,
      CropParameter::internal_default_instance(),
      CropParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CropParameter, _has_bits_),
      -1,
      -1,
      sizeof(CropParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(CropParameter, _internal_metadata_));
  PermuteParameter_descriptor_ = file->message_type(4);
  static const int PermuteParameter_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermuteParameter, order_),
  };
  PermuteParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      PermuteParameter_descriptor_,
      PermuteParameter::internal_default_instance(),
      PermuteParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermuteParameter, _has_bits_),
      -1,
      -1,
      sizeof(PermuteParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PermuteParameter, _internal_metadata_));
  NormalizeBBoxParameter_descriptor_ = file->message_type(5);
  static const int NormalizeBBoxParameter_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizeBBoxParameter, across_spatial_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizeBBoxParameter, scale_filler_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizeBBoxParameter, channel_shared_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizeBBoxParameter, eps_),
  };
  NormalizeBBoxParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      NormalizeBBoxParameter_descriptor_,
      NormalizeBBoxParameter::internal_default_instance(),
      NormalizeBBoxParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizeBBoxParameter, _has_bits_),
      -1,
      -1,
      sizeof(NormalizeBBoxParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizeBBoxParameter, _internal_metadata_));
  PriorBoxParameter_descriptor_ = file->message_type(6);
  static const int PriorBoxParameter_offsets_[6] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PriorBoxParameter, min_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PriorBoxParameter, max_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PriorBoxParameter, aspect_ratio_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PriorBoxParameter, flip_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PriorBoxParameter, clip_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PriorBoxParameter, variance_),
  };
  PriorBoxParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      PriorBoxParameter_descriptor_,
      PriorBoxParameter::internal_default_instance(),
      PriorBoxParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PriorBoxParameter, _has_bits_),
      -1,
      -1,
      sizeof(PriorBoxParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PriorBoxParameter, _internal_metadata_));
  PriorBoxParameter_CodeType_descriptor_ = PriorBoxParameter_descriptor_->enum_type(0);
  DetectionOutputParameter_descriptor_ = file->message_type(7);
  static const int DetectionOutputParameter_offsets_[9] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, num_classes_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, share_location_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, background_label_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, code_type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, variance_encoded_in_target_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, keep_top_k_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, confidence_threshold_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, nms_threshold_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, top_k_),
  };
  DetectionOutputParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      DetectionOutputParameter_descriptor_,
      DetectionOutputParameter::internal_default_instance(),
      DetectionOutputParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, _has_bits_),
      -1,
      -1,
      sizeof(DetectionOutputParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DetectionOutputParameter, _internal_metadata_));
  Datum_descriptor_ = file->message_type(8);
  static const int Datum_offsets_[7] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, channels_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, height_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, width_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, data_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, label_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, float_data_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, encoded_),
  };
  Datum_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      Datum_descriptor_,
      Datum::internal_default_instance(),
      Datum_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, _has_bits_),
      -1,
      -1,
      sizeof(Datum),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, _internal_metadata_));
  FillerParameter_descriptor_ = file->message_type(9);
  static const int FillerParameter_offsets_[8] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, value_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, min_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, max_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, mean_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, std_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, sparse_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, variance_norm_),
  };
  FillerParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      FillerParameter_descriptor_,
      FillerParameter::internal_default_instance(),
      FillerParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, _has_bits_),
      -1,
      -1,
      sizeof(FillerParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, _internal_metadata_));
  FillerParameter_VarianceNorm_descriptor_ = FillerParameter_descriptor_->enum_type(0);
  NetParameter_descriptor_ = file->message_type(10);
  static const int NetParameter_offsets_[9] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, input_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, input_shape_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, input_dim_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, force_backward_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, state_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, debug_info_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, layer_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, layers_),
  };
  NetParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      NetParameter_descriptor_,
      NetParameter::internal_default_instance(),
      NetParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, _has_bits_),
      -1,
      -1,
      sizeof(NetParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, _internal_metadata_));
  SolverParameter_descriptor_ = file->message_type(11);
  static const int SolverParameter_offsets_[36] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, net_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, net_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, train_net_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, test_net_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, train_net_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, test_net_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, train_state_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, test_state_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, test_iter_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, test_interval_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, test_compute_loss_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, test_initialization_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, base_lr_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, display_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, average_loss_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, max_iter_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, iter_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, lr_policy_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, gamma_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, power_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, momentum_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, weight_decay_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, regularization_type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, stepsize_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, stepvalue_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, clip_gradients_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, snapshot_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, snapshot_prefix_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, snapshot_diff_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, solver_mode_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, device_id_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, random_seed_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, solver_type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, delta_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, debug_info_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, snapshot_after_train_),
  };
  SolverParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      SolverParameter_descriptor_,
      SolverParameter::internal_default_instance(),
      SolverParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, _has_bits_),
      -1,
      -1,
      sizeof(SolverParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, _internal_metadata_));
  SolverParameter_SolverMode_descriptor_ = SolverParameter_descriptor_->enum_type(0);
  SolverParameter_SolverType_descriptor_ = SolverParameter_descriptor_->enum_type(1);
  SolverState_descriptor_ = file->message_type(12);
  static const int SolverState_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverState, iter_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverState, learned_net_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverState, history_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverState, current_step_),
  };
  SolverState_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      SolverState_descriptor_,
      SolverState::internal_default_instance(),
      SolverState_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverState, _has_bits_),
      -1,
      -1,
      sizeof(SolverState),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverState, _internal_metadata_));
  NetState_descriptor_ = file->message_type(13);
  static const int NetState_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetState, phase_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetState, level_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetState, stage_),
  };
  NetState_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      NetState_descriptor_,
      NetState::internal_default_instance(),
      NetState_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetState, _has_bits_),
      -1,
      -1,
      sizeof(NetState),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetState, _internal_metadata_));
  NetStateRule_descriptor_ = file->message_type(14);
  static const int NetStateRule_offsets_[5] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetStateRule, phase_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetStateRule, min_level_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetStateRule, max_level_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetStateRule, stage_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetStateRule, not_stage_),
  };
  NetStateRule_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      NetStateRule_descriptor_,
      NetStateRule::internal_default_instance(),
      NetStateRule_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetStateRule, _has_bits_),
      -1,
      -1,
      sizeof(NetStateRule),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetStateRule, _internal_metadata_));
  ParamSpec_descriptor_ = file->message_type(15);
  static const int ParamSpec_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParamSpec, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParamSpec, share_mode_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParamSpec, lr_mult_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParamSpec, decay_mult_),
  };
  ParamSpec_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ParamSpec_descriptor_,
      ParamSpec::internal_default_instance(),
      ParamSpec_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParamSpec, _has_bits_),
      -1,
      -1,
      sizeof(ParamSpec),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ParamSpec, _internal_metadata_));
  ParamSpec_DimCheckMode_descriptor_ = ParamSpec_descriptor_->enum_type(0);
  LayerParameter_descriptor_ = file->message_type(16);
  static const int LayerParameter_offsets_[53] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, bottom_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, top_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, phase_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, loss_weight_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, blobs_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, propagate_down_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, include_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, exclude_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, transform_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, loss_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, accuracy_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, argmax_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, concat_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, contrastive_loss_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, convolution_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, crop_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, detection_output_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, dropout_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, dummy_data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, eltwise_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, exp_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, flatten_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, hdf5_data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, hdf5_output_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, hinge_loss_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, image_data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, infogain_loss_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, inner_product_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, log_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, lrn_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, memory_data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, mvn_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, normalize_bbox_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, permute_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, pooling_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, power_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, prelu_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, prior_box_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, python_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, reduction_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, relu_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, reshape_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, sigmoid_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, slice_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, softmax_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, spp_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, tanh_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, threshold_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, window_data_param_),
  };
  LayerParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      LayerParameter_descriptor_,
      LayerParameter::internal_default_instance(),
      LayerParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, _has_bits_),
      -1,
      -1,
      sizeof(LayerParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, _internal_metadata_));
  TransformationParameter_descriptor_ = file->message_type(17);
  static const int TransformationParameter_offsets_[7] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, scale_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, mirror_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, crop_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, mean_file_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, mean_value_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, force_color_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, force_gray_),
  };
  TransformationParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      TransformationParameter_descriptor_,
      TransformationParameter::internal_default_instance(),
      TransformationParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, _has_bits_),
      -1,
      -1,
      sizeof(TransformationParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, _internal_metadata_));
  LossParameter_descriptor_ = file->message_type(18);
  static const int LossParameter_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LossParameter, ignore_label_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LossParameter, normalize_),
  };
  LossParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      LossParameter_descriptor_,
      LossParameter::internal_default_instance(),
      LossParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LossParameter, _has_bits_),
      -1,
      -1,
      sizeof(LossParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LossParameter, _internal_metadata_));
  AccuracyParameter_descriptor_ = file->message_type(19);
  static const int AccuracyParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AccuracyParameter, top_k_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AccuracyParameter, axis_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AccuracyParameter, ignore_label_),
  };
  AccuracyParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      AccuracyParameter_descriptor_,
      AccuracyParameter::internal_default_instance(),
      AccuracyParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AccuracyParameter, _has_bits_),
      -1,
      -1,
      sizeof(AccuracyParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AccuracyParameter, _internal_metadata_));
  ArgMaxParameter_descriptor_ = file->message_type(20);
  static const int ArgMaxParameter_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArgMaxParameter, out_max_val_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArgMaxParameter, top_k_),
  };
  ArgMaxParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ArgMaxParameter_descriptor_,
      ArgMaxParameter::internal_default_instance(),
      ArgMaxParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArgMaxParameter, _has_bits_),
      -1,
      -1,
      sizeof(ArgMaxParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArgMaxParameter, _internal_metadata_));
  ConcatParameter_descriptor_ = file->message_type(21);
  static const int ConcatParameter_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConcatParameter, axis_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConcatParameter, concat_dim_),
  };
  ConcatParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ConcatParameter_descriptor_,
      ConcatParameter::internal_default_instance(),
      ConcatParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConcatParameter, _has_bits_),
      -1,
      -1,
      sizeof(ConcatParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConcatParameter, _internal_metadata_));
  ContrastiveLossParameter_descriptor_ = file->message_type(22);
  static const int ContrastiveLossParameter_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContrastiveLossParameter, margin_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContrastiveLossParameter, legacy_version_),
  };
  ContrastiveLossParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ContrastiveLossParameter_descriptor_,
      ContrastiveLossParameter::internal_default_instance(),
      ContrastiveLossParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContrastiveLossParameter, _has_bits_),
      -1,
      -1,
      sizeof(ContrastiveLossParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContrastiveLossParameter, _internal_metadata_));
  ConvolutionParameter_descriptor_ = file->message_type(23);
  static const int ConvolutionParameter_offsets_[18] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, num_output_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, bias_term_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, pad_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, pad_h_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, pad_w_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, kernel_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, kernel_h_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, kernel_w_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, group_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, stride_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, stride_h_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, stride_w_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, weight_filler_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, bias_filler_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, engine_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, dilation_h_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, dilation_w_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, dilation_),
  };
  ConvolutionParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ConvolutionParameter_descriptor_,
      ConvolutionParameter::internal_default_instance(),
      ConvolutionParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, _has_bits_),
      -1,
      -1,
      sizeof(ConvolutionParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, _internal_metadata_));
  ConvolutionParameter_Engine_descriptor_ = ConvolutionParameter_descriptor_->enum_type(0);
  DataParameter_descriptor_ = file->message_type(24);
  static const int DataParameter_offsets_[9] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, source_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, batch_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, rand_skip_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, backend_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, scale_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, mean_file_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, crop_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, mirror_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, force_encoded_color_),
  };
  DataParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      DataParameter_descriptor_,
      DataParameter::internal_default_instance(),
      DataParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, _has_bits_),
      -1,
      -1,
      sizeof(DataParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, _internal_metadata_));
  DataParameter_DB_descriptor_ = DataParameter_descriptor_->enum_type(0);
  DropoutParameter_descriptor_ = file->message_type(25);
  static const int DropoutParameter_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DropoutParameter, dropout_ratio_),
  };
  DropoutParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      DropoutParameter_descriptor_,
      DropoutParameter::internal_default_instance(),
      DropoutParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DropoutParameter, _has_bits_),
      -1,
      -1,
      sizeof(DropoutParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DropoutParameter, _internal_metadata_));
  DummyDataParameter_descriptor_ = file->message_type(26);
  static const int DummyDataParameter_offsets_[6] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, data_filler_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, shape_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, num_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, channels_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, height_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, width_),
  };
  DummyDataParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      DummyDataParameter_descriptor_,
      DummyDataParameter::internal_default_instance(),
      DummyDataParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, _has_bits_),
      -1,
      -1,
      sizeof(DummyDataParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, _internal_metadata_));
  EltwiseParameter_descriptor_ = file->message_type(27);
  static const int EltwiseParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EltwiseParameter, operation_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EltwiseParameter, coeff_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EltwiseParameter, stable_prod_grad_),
  };
  EltwiseParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      EltwiseParameter_descriptor_,
      EltwiseParameter::internal_default_instance(),
      EltwiseParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EltwiseParameter, _has_bits_),
      -1,
      -1,
      sizeof(EltwiseParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EltwiseParameter, _internal_metadata_));
  EltwiseParameter_EltwiseOp_descriptor_ = EltwiseParameter_descriptor_->enum_type(0);
  ExpParameter_descriptor_ = file->message_type(28);
  static const int ExpParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExpParameter, base_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExpParameter, scale_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExpParameter, shift_),
  };
  ExpParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ExpParameter_descriptor_,
      ExpParameter::internal_default_instance(),
      ExpParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExpParameter, _has_bits_),
      -1,
      -1,
      sizeof(ExpParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExpParameter, _internal_metadata_));
  FlattenParameter_descriptor_ = file->message_type(29);
  static const int FlattenParameter_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FlattenParameter, axis_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FlattenParameter, end_axis_),
  };
  FlattenParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      FlattenParameter_descriptor_,
      FlattenParameter::internal_default_instance(),
      FlattenParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FlattenParameter, _has_bits_),
      -1,
      -1,
      sizeof(FlattenParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FlattenParameter, _internal_metadata_));
  HDF5DataParameter_descriptor_ = file->message_type(30);
  static const int HDF5DataParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5DataParameter, source_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5DataParameter, batch_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5DataParameter, shuffle_),
  };
  HDF5DataParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      HDF5DataParameter_descriptor_,
      HDF5DataParameter::internal_default_instance(),
      HDF5DataParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5DataParameter, _has_bits_),
      -1,
      -1,
      sizeof(HDF5DataParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5DataParameter, _internal_metadata_));
  HDF5OutputParameter_descriptor_ = file->message_type(31);
  static const int HDF5OutputParameter_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5OutputParameter, file_name_),
  };
  HDF5OutputParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      HDF5OutputParameter_descriptor_,
      HDF5OutputParameter::internal_default_instance(),
      HDF5OutputParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5OutputParameter, _has_bits_),
      -1,
      -1,
      sizeof(HDF5OutputParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5OutputParameter, _internal_metadata_));
  HingeLossParameter_descriptor_ = file->message_type(32);
  static const int HingeLossParameter_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HingeLossParameter, norm_),
  };
  HingeLossParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      HingeLossParameter_descriptor_,
      HingeLossParameter::internal_default_instance(),
      HingeLossParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HingeLossParameter, _has_bits_),
      -1,
      -1,
      sizeof(HingeLossParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HingeLossParameter, _internal_metadata_));
  HingeLossParameter_Norm_descriptor_ = HingeLossParameter_descriptor_->enum_type(0);
  ImageDataParameter_descriptor_ = file->message_type(33);
  static const int ImageDataParameter_offsets_[12] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, source_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, batch_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, rand_skip_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, shuffle_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, new_height_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, new_width_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, is_color_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, scale_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, mean_file_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, crop_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, mirror_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, root_folder_),
  };
  ImageDataParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ImageDataParameter_descriptor_,
      ImageDataParameter::internal_default_instance(),
      ImageDataParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, _has_bits_),
      -1,
      -1,
      sizeof(ImageDataParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, _internal_metadata_));
  InfogainLossParameter_descriptor_ = file->message_type(34);
  static const int InfogainLossParameter_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InfogainLossParameter, source_),
  };
  InfogainLossParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      InfogainLossParameter_descriptor_,
      InfogainLossParameter::internal_default_instance(),
      InfogainLossParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InfogainLossParameter, _has_bits_),
      -1,
      -1,
      sizeof(InfogainLossParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InfogainLossParameter, _internal_metadata_));
  InnerProductParameter_descriptor_ = file->message_type(35);
  static const int InnerProductParameter_offsets_[5] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InnerProductParameter, num_output_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InnerProductParameter, bias_term_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InnerProductParameter, weight_filler_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InnerProductParameter, bias_filler_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InnerProductParameter, axis_),
  };
  InnerProductParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      InnerProductParameter_descriptor_,
      InnerProductParameter::internal_default_instance(),
      InnerProductParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InnerProductParameter, _has_bits_),
      -1,
      -1,
      sizeof(InnerProductParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InnerProductParameter, _internal_metadata_));
  LogParameter_descriptor_ = file->message_type(36);
  static const int LogParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LogParameter, base_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LogParameter, scale_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LogParameter, shift_),
  };
  LogParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      LogParameter_descriptor_,
      LogParameter::internal_default_instance(),
      LogParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LogParameter, _has_bits_),
      -1,
      -1,
      sizeof(LogParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LogParameter, _internal_metadata_));
  LRNParameter_descriptor_ = file->message_type(37);
  static const int LRNParameter_offsets_[5] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LRNParameter, local_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LRNParameter, alpha_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LRNParameter, beta_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LRNParameter, norm_region_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LRNParameter, k_),
  };
  LRNParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      LRNParameter_descriptor_,
      LRNParameter::internal_default_instance(),
      LRNParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LRNParameter, _has_bits_),
      -1,
      -1,
      sizeof(LRNParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LRNParameter, _internal_metadata_));
  LRNParameter_NormRegion_descriptor_ = LRNParameter_descriptor_->enum_type(0);
  MemoryDataParameter_descriptor_ = file->message_type(38);
  static const int MemoryDataParameter_offsets_[4] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MemoryDataParameter, batch_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MemoryDataParameter, channels_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MemoryDataParameter, height_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MemoryDataParameter, width_),
  };
  MemoryDataParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      MemoryDataParameter_descriptor_,
      MemoryDataParameter::internal_default_instance(),
      MemoryDataParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MemoryDataParameter, _has_bits_),
      -1,
      -1,
      sizeof(MemoryDataParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MemoryDataParameter, _internal_metadata_));
  MVNParameter_descriptor_ = file->message_type(39);
  static const int MVNParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MVNParameter, normalize_variance_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MVNParameter, across_channels_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MVNParameter, eps_),
  };
  MVNParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      MVNParameter_descriptor_,
      MVNParameter::internal_default_instance(),
      MVNParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MVNParameter, _has_bits_),
      -1,
      -1,
      sizeof(MVNParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MVNParameter, _internal_metadata_));
  PoolingParameter_descriptor_ = file->message_type(40);
  static const int PoolingParameter_offsets_[12] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, pool_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, pad_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, pad_h_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, pad_w_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, kernel_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, kernel_h_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, kernel_w_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, stride_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, stride_h_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, stride_w_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, engine_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, global_pooling_),
  };
  PoolingParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      PoolingParameter_descriptor_,
      PoolingParameter::internal_default_instance(),
      PoolingParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, _has_bits_),
      -1,
      -1,
      sizeof(PoolingParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, _internal_metadata_));
  PoolingParameter_PoolMethod_descriptor_ = PoolingParameter_descriptor_->enum_type(0);
  PoolingParameter_Engine_descriptor_ = PoolingParameter_descriptor_->enum_type(1);
  PowerParameter_descriptor_ = file->message_type(41);
  static const int PowerParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PowerParameter, power_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PowerParameter, scale_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PowerParameter, shift_),
  };
  PowerParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      PowerParameter_descriptor_,
      PowerParameter::internal_default_instance(),
      PowerParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PowerParameter, _has_bits_),
      -1,
      -1,
      sizeof(PowerParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PowerParameter, _internal_metadata_));
  PythonParameter_descriptor_ = file->message_type(42);
  static const int PythonParameter_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PythonParameter, module_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PythonParameter, layer_),
  };
  PythonParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      PythonParameter_descriptor_,
      PythonParameter::internal_default_instance(),
      PythonParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PythonParameter, _has_bits_),
      -1,
      -1,
      sizeof(PythonParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PythonParameter, _internal_metadata_));
  ReductionParameter_descriptor_ = file->message_type(43);
  static const int ReductionParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReductionParameter, operation_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReductionParameter, axis_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReductionParameter, coeff_),
  };
  ReductionParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ReductionParameter_descriptor_,
      ReductionParameter::internal_default_instance(),
      ReductionParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReductionParameter, _has_bits_),
      -1,
      -1,
      sizeof(ReductionParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReductionParameter, _internal_metadata_));
  ReductionParameter_ReductionOp_descriptor_ = ReductionParameter_descriptor_->enum_type(0);
  ReLUParameter_descriptor_ = file->message_type(44);
  static const int ReLUParameter_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReLUParameter, negative_slope_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReLUParameter, engine_),
  };
  ReLUParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ReLUParameter_descriptor_,
      ReLUParameter::internal_default_instance(),
      ReLUParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReLUParameter, _has_bits_),
      -1,
      -1,
      sizeof(ReLUParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReLUParameter, _internal_metadata_));
  ReLUParameter_Engine_descriptor_ = ReLUParameter_descriptor_->enum_type(0);
  ReshapeParameter_descriptor_ = file->message_type(45);
  static const int ReshapeParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReshapeParameter, shape_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReshapeParameter, axis_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReshapeParameter, num_axes_),
  };
  ReshapeParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ReshapeParameter_descriptor_,
      ReshapeParameter::internal_default_instance(),
      ReshapeParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReshapeParameter, _has_bits_),
      -1,
      -1,
      sizeof(ReshapeParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReshapeParameter, _internal_metadata_));
  SigmoidParameter_descriptor_ = file->message_type(46);
  static const int SigmoidParameter_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SigmoidParameter, engine_),
  };
  SigmoidParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      SigmoidParameter_descriptor_,
      SigmoidParameter::internal_default_instance(),
      SigmoidParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SigmoidParameter, _has_bits_),
      -1,
      -1,
      sizeof(SigmoidParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SigmoidParameter, _internal_metadata_));
  SigmoidParameter_Engine_descriptor_ = SigmoidParameter_descriptor_->enum_type(0);
  SliceParameter_descriptor_ = file->message_type(47);
  static const int SliceParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SliceParameter, axis_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SliceParameter, slice_point_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SliceParameter, slice_dim_),
  };
  SliceParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      SliceParameter_descriptor_,
      SliceParameter::internal_default_instance(),
      SliceParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SliceParameter, _has_bits_),
      -1,
      -1,
      sizeof(SliceParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SliceParameter, _internal_metadata_));
  SoftmaxParameter_descriptor_ = file->message_type(48);
  static const int SoftmaxParameter_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SoftmaxParameter, engine_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SoftmaxParameter, axis_),
  };
  SoftmaxParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      SoftmaxParameter_descriptor_,
      SoftmaxParameter::internal_default_instance(),
      SoftmaxParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SoftmaxParameter, _has_bits_),
      -1,
      -1,
      sizeof(SoftmaxParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SoftmaxParameter, _internal_metadata_));
  SoftmaxParameter_Engine_descriptor_ = SoftmaxParameter_descriptor_->enum_type(0);
  TanHParameter_descriptor_ = file->message_type(49);
  static const int TanHParameter_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TanHParameter, engine_),
  };
  TanHParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      TanHParameter_descriptor_,
      TanHParameter::internal_default_instance(),
      TanHParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TanHParameter, _has_bits_),
      -1,
      -1,
      sizeof(TanHParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TanHParameter, _internal_metadata_));
  TanHParameter_Engine_descriptor_ = TanHParameter_descriptor_->enum_type(0);
  ThresholdParameter_descriptor_ = file->message_type(50);
  static const int ThresholdParameter_offsets_[1] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThresholdParameter, threshold_),
  };
  ThresholdParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      ThresholdParameter_descriptor_,
      ThresholdParameter::internal_default_instance(),
      ThresholdParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThresholdParameter, _has_bits_),
      -1,
      -1,
      sizeof(ThresholdParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThresholdParameter, _internal_metadata_));
  WindowDataParameter_descriptor_ = file->message_type(51);
  static const int WindowDataParameter_offsets_[13] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, source_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, scale_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, mean_file_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, batch_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, crop_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, mirror_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, fg_threshold_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, bg_threshold_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, fg_fraction_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, context_pad_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, crop_mode_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, cache_images_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, root_folder_),
  };
  WindowDataParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      WindowDataParameter_descriptor_,
      WindowDataParameter::internal_default_instance(),
      WindowDataParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, _has_bits_),
      -1,
      -1,
      sizeof(WindowDataParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, _internal_metadata_));
  SPPParameter_descriptor_ = file->message_type(52);
  static const int SPPParameter_offsets_[3] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SPPParameter, pyramid_height_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SPPParameter, pool_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SPPParameter, engine_),
  };
  SPPParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      SPPParameter_descriptor_,
      SPPParameter::internal_default_instance(),
      SPPParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SPPParameter, _has_bits_),
      -1,
      -1,
      sizeof(SPPParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SPPParameter, _internal_metadata_));
  SPPParameter_PoolMethod_descriptor_ = SPPParameter_descriptor_->enum_type(0);
  SPPParameter_Engine_descriptor_ = SPPParameter_descriptor_->enum_type(1);
  V1LayerParameter_descriptor_ = file->message_type(53);
  static const int V1LayerParameter_offsets_[43] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, bottom_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, top_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, include_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, exclude_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, blobs_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, blob_share_mode_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, blobs_lr_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, weight_decay_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, loss_weight_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, accuracy_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, argmax_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, concat_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, contrastive_loss_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, convolution_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, dropout_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, dummy_data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, eltwise_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, exp_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, hdf5_data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, hdf5_output_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, hinge_loss_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, image_data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, infogain_loss_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, inner_product_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, lrn_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, memory_data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, mvn_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, pooling_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, power_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, relu_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, sigmoid_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, softmax_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, slice_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, tanh_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, threshold_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, window_data_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, transform_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, loss_param_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, layer_),
  };
  V1LayerParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      V1LayerParameter_descriptor_,
      V1LayerParameter::internal_default_instance(),
      V1LayerParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, _has_bits_),
      -1,
      -1,
      sizeof(V1LayerParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V1LayerParameter, _internal_metadata_));
  V1LayerParameter_LayerType_descriptor_ = V1LayerParameter_descriptor_->enum_type(0);
  V1LayerParameter_DimCheckMode_descriptor_ = V1LayerParameter_descriptor_->enum_type(1);
  V0LayerParameter_descriptor_ = file->message_type(54);
  static const int V0LayerParameter_offsets_[38] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, name_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, type_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, num_output_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, biasterm_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, weight_filler_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, bias_filler_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, pad_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, kernelsize_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, group_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, stride_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, pool_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, dropout_ratio_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, local_size_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, alpha_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, beta_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, k_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, source_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, scale_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, meanfile_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, batchsize_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, cropsize_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, mirror_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, blobs_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, blobs_lr_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, weight_decay_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, rand_skip_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, det_fg_threshold_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, det_bg_threshold_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, det_fg_fraction_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, det_context_pad_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, det_crop_mode_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, new_num_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, new_channels_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, new_height_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, new_width_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, shuffle_images_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, concat_dim_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, hdf5_output_param_),
  };
  V0LayerParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      V0LayerParameter_descriptor_,
      V0LayerParameter::internal_default_instance(),
      V0LayerParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, _has_bits_),
      -1,
      -1,
      sizeof(V0LayerParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, _internal_metadata_));
  V0LayerParameter_PoolMethod_descriptor_ = V0LayerParameter_descriptor_->enum_type(0);
  PReLUParameter_descriptor_ = file->message_type(55);
  static const int PReLUParameter_offsets_[2] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PReLUParameter, filler_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PReLUParameter, channel_shared_),
  };
  PReLUParameter_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      PReLUParameter_descriptor_,
      PReLUParameter::internal_default_instance(),
      PReLUParameter_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PReLUParameter, _has_bits_),
      -1,
      -1,
      sizeof(PReLUParameter),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PReLUParameter, _internal_metadata_));
  NormalizedBBox_descriptor_ = file->message_type(56);
  static const int NormalizedBBox_offsets_[8] = {
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizedBBox, xmin_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizedBBox, ymin_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizedBBox, xmax_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizedBBox, ymax_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizedBBox, label_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizedBBox, difficult_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizedBBox, score_),
    GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizedBBox, size_),
  };
  NormalizedBBox_reflection_ =
    ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
      NormalizedBBox_descriptor_,
      NormalizedBBox::internal_default_instance(),
      NormalizedBBox_offsets_,
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizedBBox, _has_bits_),
      -1,
      -1,
      sizeof(NormalizedBBox),
      GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NormalizedBBox, _internal_metadata_));
  Phase_descriptor_ = file->enum_type(0);
}

namespace {

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
void protobuf_AssignDescriptorsOnce() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
                 &protobuf_AssignDesc_caffe_2eproto);
}

void protobuf_RegisterTypes(const ::std::string&) GOOGLE_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      BlobShape_descriptor_, BlobShape::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      BlobProto_descriptor_, BlobProto::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      BlobProtoVector_descriptor_, BlobProtoVector::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      CropParameter_descriptor_, CropParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      PermuteParameter_descriptor_, PermuteParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      NormalizeBBoxParameter_descriptor_, NormalizeBBoxParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      PriorBoxParameter_descriptor_, PriorBoxParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      DetectionOutputParameter_descriptor_, DetectionOutputParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      Datum_descriptor_, Datum::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      FillerParameter_descriptor_, FillerParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      NetParameter_descriptor_, NetParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      SolverParameter_descriptor_, SolverParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      SolverState_descriptor_, SolverState::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      NetState_descriptor_, NetState::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      NetStateRule_descriptor_, NetStateRule::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ParamSpec_descriptor_, ParamSpec::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      LayerParameter_descriptor_, LayerParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      TransformationParameter_descriptor_, TransformationParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      LossParameter_descriptor_, LossParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      AccuracyParameter_descriptor_, AccuracyParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ArgMaxParameter_descriptor_, ArgMaxParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ConcatParameter_descriptor_, ConcatParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ContrastiveLossParameter_descriptor_, ContrastiveLossParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ConvolutionParameter_descriptor_, ConvolutionParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      DataParameter_descriptor_, DataParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      DropoutParameter_descriptor_, DropoutParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      DummyDataParameter_descriptor_, DummyDataParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      EltwiseParameter_descriptor_, EltwiseParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ExpParameter_descriptor_, ExpParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      FlattenParameter_descriptor_, FlattenParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      HDF5DataParameter_descriptor_, HDF5DataParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      HDF5OutputParameter_descriptor_, HDF5OutputParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      HingeLossParameter_descriptor_, HingeLossParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ImageDataParameter_descriptor_, ImageDataParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      InfogainLossParameter_descriptor_, InfogainLossParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      InnerProductParameter_descriptor_, InnerProductParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      LogParameter_descriptor_, LogParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      LRNParameter_descriptor_, LRNParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      MemoryDataParameter_descriptor_, MemoryDataParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      MVNParameter_descriptor_, MVNParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      PoolingParameter_descriptor_, PoolingParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      PowerParameter_descriptor_, PowerParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      PythonParameter_descriptor_, PythonParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ReductionParameter_descriptor_, ReductionParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ReLUParameter_descriptor_, ReLUParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ReshapeParameter_descriptor_, ReshapeParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      SigmoidParameter_descriptor_, SigmoidParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      SliceParameter_descriptor_, SliceParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      SoftmaxParameter_descriptor_, SoftmaxParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      TanHParameter_descriptor_, TanHParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      ThresholdParameter_descriptor_, ThresholdParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      WindowDataParameter_descriptor_, WindowDataParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      SPPParameter_descriptor_, SPPParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      V1LayerParameter_descriptor_, V1LayerParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      V0LayerParameter_descriptor_, V0LayerParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      PReLUParameter_descriptor_, PReLUParameter::internal_default_instance());
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
      NormalizedBBox_descriptor_, NormalizedBBox::internal_default_instance());
}

}  // namespace

void protobuf_ShutdownFile_caffe_2eproto() {
  BlobShape_default_instance_.Shutdown();
  delete BlobShape_reflection_;
  BlobProto_default_instance_.Shutdown();
  delete BlobProto_reflection_;
  BlobProtoVector_default_instance_.Shutdown();
  delete BlobProtoVector_reflection_;
  CropParameter_default_instance_.Shutdown();
  delete CropParameter_reflection_;
  PermuteParameter_default_instance_.Shutdown();
  delete PermuteParameter_reflection_;
  NormalizeBBoxParameter_default_instance_.Shutdown();
  delete NormalizeBBoxParameter_reflection_;
  PriorBoxParameter_default_instance_.Shutdown();
  delete PriorBoxParameter_reflection_;
  DetectionOutputParameter_default_instance_.Shutdown();
  delete DetectionOutputParameter_reflection_;
  Datum_default_instance_.Shutdown();
  delete Datum_reflection_;
  FillerParameter_default_instance_.Shutdown();
  delete FillerParameter_reflection_;
  delete FillerParameter::_default_type_;
  NetParameter_default_instance_.Shutdown();
  delete NetParameter_reflection_;
  SolverParameter_default_instance_.Shutdown();
  delete SolverParameter_reflection_;
  delete SolverParameter::_default_regularization_type_;
  SolverState_default_instance_.Shutdown();
  delete SolverState_reflection_;
  NetState_default_instance_.Shutdown();
  delete NetState_reflection_;
  NetStateRule_default_instance_.Shutdown();
  delete NetStateRule_reflection_;
  ParamSpec_default_instance_.Shutdown();
  delete ParamSpec_reflection_;
  LayerParameter_default_instance_.Shutdown();
  delete LayerParameter_reflection_;
  TransformationParameter_default_instance_.Shutdown();
  delete TransformationParameter_reflection_;
  LossParameter_default_instance_.Shutdown();
  delete LossParameter_reflection_;
  AccuracyParameter_default_instance_.Shutdown();
  delete AccuracyParameter_reflection_;
  ArgMaxParameter_default_instance_.Shutdown();
  delete ArgMaxParameter_reflection_;
  ConcatParameter_default_instance_.Shutdown();
  delete ConcatParameter_reflection_;
  ContrastiveLossParameter_default_instance_.Shutdown();
  delete ContrastiveLossParameter_reflection_;
  ConvolutionParameter_default_instance_.Shutdown();
  delete ConvolutionParameter_reflection_;
  DataParameter_default_instance_.Shutdown();
  delete DataParameter_reflection_;
  DropoutParameter_default_instance_.Shutdown();
  delete DropoutParameter_reflection_;
  DummyDataParameter_default_instance_.Shutdown();
  delete DummyDataParameter_reflection_;
  EltwiseParameter_default_instance_.Shutdown();
  delete EltwiseParameter_reflection_;
  ExpParameter_default_instance_.Shutdown();
  delete ExpParameter_reflection_;
  FlattenParameter_default_instance_.Shutdown();
  delete FlattenParameter_reflection_;
  HDF5DataParameter_default_instance_.Shutdown();
  delete HDF5DataParameter_reflection_;
  HDF5OutputParameter_default_instance_.Shutdown();
  delete HDF5OutputParameter_reflection_;
  HingeLossParameter_default_instance_.Shutdown();
  delete HingeLossParameter_reflection_;
  ImageDataParameter_default_instance_.Shutdown();
  delete ImageDataParameter_reflection_;
  InfogainLossParameter_default_instance_.Shutdown();
  delete InfogainLossParameter_reflection_;
  InnerProductParameter_default_instance_.Shutdown();
  delete InnerProductParameter_reflection_;
  LogParameter_default_instance_.Shutdown();
  delete LogParameter_reflection_;
  LRNParameter_default_instance_.Shutdown();
  delete LRNParameter_reflection_;
  MemoryDataParameter_default_instance_.Shutdown();
  delete MemoryDataParameter_reflection_;
  MVNParameter_default_instance_.Shutdown();
  delete MVNParameter_reflection_;
  PoolingParameter_default_instance_.Shutdown();
  delete PoolingParameter_reflection_;
  PowerParameter_default_instance_.Shutdown();
  delete PowerParameter_reflection_;
  PythonParameter_default_instance_.Shutdown();
  delete PythonParameter_reflection_;
  ReductionParameter_default_instance_.Shutdown();
  delete ReductionParameter_reflection_;
  ReLUParameter_default_instance_.Shutdown();
  delete ReLUParameter_reflection_;
  ReshapeParameter_default_instance_.Shutdown();
  delete ReshapeParameter_reflection_;
  SigmoidParameter_default_instance_.Shutdown();
  delete SigmoidParameter_reflection_;
  SliceParameter_default_instance_.Shutdown();
  delete SliceParameter_reflection_;
  SoftmaxParameter_default_instance_.Shutdown();
  delete SoftmaxParameter_reflection_;
  TanHParameter_default_instance_.Shutdown();
  delete TanHParameter_reflection_;
  ThresholdParameter_default_instance_.Shutdown();
  delete ThresholdParameter_reflection_;
  WindowDataParameter_default_instance_.Shutdown();
  delete WindowDataParameter_reflection_;
  delete WindowDataParameter::_default_crop_mode_;
  SPPParameter_default_instance_.Shutdown();
  delete SPPParameter_reflection_;
  V1LayerParameter_default_instance_.Shutdown();
  delete V1LayerParameter_reflection_;
  V0LayerParameter_default_instance_.Shutdown();
  delete V0LayerParameter_reflection_;
  delete V0LayerParameter::_default_det_crop_mode_;
  PReLUParameter_default_instance_.Shutdown();
  delete PReLUParameter_reflection_;
  NormalizedBBox_default_instance_.Shutdown();
  delete NormalizedBBox_reflection_;
}

void protobuf_InitDefaults_caffe_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  BlobShape_default_instance_.DefaultConstruct();
  BlobProto_default_instance_.DefaultConstruct();
  BlobProtoVector_default_instance_.DefaultConstruct();
  CropParameter_default_instance_.DefaultConstruct();
  PermuteParameter_default_instance_.DefaultConstruct();
  NormalizeBBoxParameter_default_instance_.DefaultConstruct();
  PriorBoxParameter_default_instance_.DefaultConstruct();
  DetectionOutputParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  Datum_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  FillerParameter::_default_type_ =
      new ::std::string("constant", 8);
  FillerParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  NetParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  SolverParameter::_default_regularization_type_ =
      new ::std::string("L2", 2);
  SolverParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  SolverState_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  NetState_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  NetStateRule_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  ParamSpec_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  LayerParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  TransformationParameter_default_instance_.DefaultConstruct();
  LossParameter_default_instance_.DefaultConstruct();
  AccuracyParameter_default_instance_.DefaultConstruct();
  ArgMaxParameter_default_instance_.DefaultConstruct();
  ConcatParameter_default_instance_.DefaultConstruct();
  ContrastiveLossParameter_default_instance_.DefaultConstruct();
  ConvolutionParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  DataParameter_default_instance_.DefaultConstruct();
  DropoutParameter_default_instance_.DefaultConstruct();
  DummyDataParameter_default_instance_.DefaultConstruct();
  EltwiseParameter_default_instance_.DefaultConstruct();
  ExpParameter_default_instance_.DefaultConstruct();
  FlattenParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  HDF5DataParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  HDF5OutputParameter_default_instance_.DefaultConstruct();
  HingeLossParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  ImageDataParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  InfogainLossParameter_default_instance_.DefaultConstruct();
  InnerProductParameter_default_instance_.DefaultConstruct();
  LogParameter_default_instance_.DefaultConstruct();
  LRNParameter_default_instance_.DefaultConstruct();
  MemoryDataParameter_default_instance_.DefaultConstruct();
  MVNParameter_default_instance_.DefaultConstruct();
  PoolingParameter_default_instance_.DefaultConstruct();
  PowerParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  PythonParameter_default_instance_.DefaultConstruct();
  ReductionParameter_default_instance_.DefaultConstruct();
  ReLUParameter_default_instance_.DefaultConstruct();
  ReshapeParameter_default_instance_.DefaultConstruct();
  SigmoidParameter_default_instance_.DefaultConstruct();
  SliceParameter_default_instance_.DefaultConstruct();
  SoftmaxParameter_default_instance_.DefaultConstruct();
  TanHParameter_default_instance_.DefaultConstruct();
  ThresholdParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  WindowDataParameter::_default_crop_mode_ =
      new ::std::string("warp", 4);
  WindowDataParameter_default_instance_.DefaultConstruct();
  SPPParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  V1LayerParameter_default_instance_.DefaultConstruct();
  ::google::protobuf::internal::GetEmptyString();
  V0LayerParameter::_default_det_crop_mode_ =
      new ::std::string("warp", 4);
  V0LayerParameter_default_instance_.DefaultConstruct();
  PReLUParameter_default_instance_.DefaultConstruct();
  NormalizedBBox_default_instance_.DefaultConstruct();
  BlobShape_default_instance_.get_mutable()->InitAsDefaultInstance();
  BlobProto_default_instance_.get_mutable()->InitAsDefaultInstance();
  BlobProtoVector_default_instance_.get_mutable()->InitAsDefaultInstance();
  CropParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  PermuteParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  NormalizeBBoxParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  PriorBoxParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  DetectionOutputParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  Datum_default_instance_.get_mutable()->InitAsDefaultInstance();
  FillerParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  NetParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  SolverParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  SolverState_default_instance_.get_mutable()->InitAsDefaultInstance();
  NetState_default_instance_.get_mutable()->InitAsDefaultInstance();
  NetStateRule_default_instance_.get_mutable()->InitAsDefaultInstance();
  ParamSpec_default_instance_.get_mutable()->InitAsDefaultInstance();
  LayerParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  TransformationParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  LossParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  AccuracyParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  ArgMaxParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  ConcatParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  ContrastiveLossParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  ConvolutionParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  DataParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  DropoutParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  DummyDataParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  EltwiseParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  ExpParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  FlattenParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  HDF5DataParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  HDF5OutputParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  HingeLossParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  ImageDataParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  InfogainLossParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  InnerProductParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  LogParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  LRNParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  MemoryDataParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  MVNParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  PoolingParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  PowerParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  PythonParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  ReductionParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  ReLUParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  ReshapeParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  SigmoidParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  SliceParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  SoftmaxParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  TanHParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  ThresholdParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  WindowDataParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  SPPParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  V1LayerParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  V0LayerParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  PReLUParameter_default_instance_.get_mutable()->InitAsDefaultInstance();
  NormalizedBBox_default_instance_.get_mutable()->InitAsDefaultInstance();
}

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_InitDefaults_caffe_2eproto_once_);
void protobuf_InitDefaults_caffe_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_InitDefaults_caffe_2eproto_once_,
                 &protobuf_InitDefaults_caffe_2eproto_impl);
}
void protobuf_AddDesc_caffe_2eproto_impl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  protobuf_InitDefaults_caffe_2eproto();
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
    "\n\013caffe.proto\022\005caffe\"\034\n\tBlobShape\022\017\n\003dim"
    "\030\001 \003(\003B\002\020\001\"\232\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\016\n\003num\030\001 \001(\005:\0010\022\023\n\010channel"
    "s\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\005blobs\030\001 \003("
    "\0132\020.caffe.BlobProto\"0\n\rCropParameter\022\017\n\004"
    "axis\030\001 \001(\005:\0012\022\016\n\006offset\030\002 \003(\r\"!\n\020Permute"
    "Parameter\022\r\n\005order\030\001 \003(\r\"\226\001\n\026NormalizeBB"
    "oxParameter\022\034\n\016across_spatial\030\001 \001(\010:\004tru"
    "e\022,\n\014scale_filler\030\002 \001(\0132\026.caffe.FillerPa"
    "rameter\022\034\n\016channel_shared\030\003 \001(\010:\004true\022\022\n"
    "\003eps\030\004 \001(\002:\0051e-10\"\260\001\n\021PriorBoxParameter\022"
    "\020\n\010min_size\030\001 \001(\002\022\020\n\010max_size\030\002 \001(\002\022\024\n\014a"
    "spect_ratio\030\003 \003(\002\022\022\n\004flip\030\004 \001(\010:\004true\022\022\n"
    "\004clip\030\005 \001(\010:\004true\022\020\n\010variance\030\006 \003(\002\"\'\n\010C"
    "odeType\022\n\n\006CORNER\020\001\022\017\n\013CENTER_SIZE\020\002\"\267\002\n"
    "\030DetectionOutputParameter\022\023\n\013num_classes"
    "\030\001 \001(\r\022\034\n\016share_location\030\002 \001(\010:\004true\022\036\n\023"
    "background_label_id\030\003 \001(\005:\0010\022<\n\tcode_typ"
    "e\030\006 \001(\0162!.caffe.PriorBoxParameter.CodeTy"
    "pe:\006CORNER\022)\n\032variance_encoded_in_target"
    "\030\010 \001(\010:\005false\022\026\n\nkeep_top_k\030\007 \001(\005:\002-1\022\034\n"
    "\024confidence_threshold\030\t \001(\002\022\032\n\rnms_thres"
    "hold\030\n \001(\002:\0030.3\022\r\n\005top_k\030\013 \001(\005\"\201\001\n\005Datum"
    "\022\020\n\010channels\030\001 \001(\005\022\016\n\006height\030\002 \001(\005\022\r\n\005wi"
    "dth\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:\005fal"
    "se\"\212\002\n\017FillerParameter\022\026\n\004type\030\001 \001(\t:\010co"
    "nstant\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\rvarianc"
    "e_norm\030\010 \001(\0162#.caffe.FillerParameter.Var"
    "ianceNorm:\006FAN_IN\"4\n\014VarianceNorm\022\n\n\006FAN"
    "_IN\020\000\022\013\n\007FAN_OUT\020\001\022\013\n\007AVERAGE\020\002\"\216\002\n\014NetP"
    "arameter\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.BlobShape\022\021\n\t"
    "input_dim\030\004 \003(\005\022\035\n\016force_backward\030\005 \001(\010:"
    "\005false\022\036\n\005state\030\006 \001(\0132\017.caffe.NetState\022\031"
    "\n\ndebug_info\030\007 \001(\010:\005false\022$\n\005layer\030d \003(\013"
    "2\025.caffe.LayerParameter\022\'\n\006layers\030\002 \003(\0132"
    "\027.caffe.V1LayerParameter\"\275\010\n\017SolverParam"
    "eter\022\013\n\003net\030\030 \001(\t\022&\n\tnet_param\030\031 \001(\0132\023.c"
    "affe.NetParameter\022\021\n\ttrain_net\030\001 \001(\t\022\020\n\010"
    "test_net\030\002 \003(\t\022,\n\017train_net_param\030\025 \001(\0132"
    "\023.caffe.NetParameter\022+\n\016test_net_param\030\026"
    " \003(\0132\023.caffe.NetParameter\022$\n\013train_state"
    "\030\032 \001(\0132\017.caffe.NetState\022#\n\ntest_state\030\033 "
    "\003(\0132\017.caffe.NetState\022\021\n\ttest_iter\030\003 \003(\005\022"
    "\030\n\rtest_interval\030\004 \001(\005:\0010\022 \n\021test_comput"
    "e_loss\030\023 \001(\010:\005false\022!\n\023test_initializati"
    "on\030  \001(\010:\004true\022\017\n\007base_lr\030\005 \001(\002\022\017\n\007displ"
    "ay\030\006 \001(\005\022\027\n\014average_loss\030! \001(\005:\0011\022\020\n\010max"
    "_iter\030\007 \001(\005\022\024\n\titer_size\030$ \001(\005:\0011\022\021\n\tlr_"
    "policy\030\010 \001(\t\022\r\n\005gamma\030\t \001(\002\022\r\n\005power\030\n \001"
    "(\002\022\020\n\010momentum\030\013 \001(\002\022\024\n\014weight_decay\030\014 \001"
    "(\002\022\037\n\023regularization_type\030\035 \001(\t:\002L2\022\020\n\010s"
    "tepsize\030\r \001(\005\022\021\n\tstepvalue\030\" \003(\005\022\032\n\016clip"
    "_gradients\030# \001(\002:\002-1\022\023\n\010snapshot\030\016 \001(\005:\001"
    "0\022\027\n\017snapshot_prefix\030\017 \001(\t\022\034\n\rsnapshot_d"
    "iff\030\020 \001(\010:\005false\022;\n\013solver_mode\030\021 \001(\0162!."
    "caffe.SolverParameter.SolverMode:\003GPU\022\024\n"
    "\tdevice_id\030\022 \001(\005:\0010\022\027\n\013random_seed\030\024 \001(\003"
    ":\002-1\022;\n\013solver_type\030\036 \001(\0162!.caffe.Solver"
    "Parameter.SolverType:\003SGD\022\024\n\005delta\030\037 \001(\002"
    ":\0051e-08\022\031\n\ndebug_info\030\027 \001(\010:\005false\022\"\n\024sn"
    "apshot_after_train\030\034 \001(\010:\004true\"\036\n\nSolver"
    "Mode\022\007\n\003CPU\020\000\022\007\n\003GPU\020\001\"0\n\nSolverType\022\007\n\003"
    "SGD\020\000\022\014\n\010NESTEROV\020\001\022\013\n\007ADAGRAD\020\002\"l\n\013Solv"
    "erState\022\014\n\004iter\030\001 \001(\005\022\023\n\013learned_net\030\002 \001"
    "(\t\022!\n\007history\030\003 \003(\0132\020.caffe.BlobProto\022\027\n"
    "\014current_step\030\004 \001(\005:\0010\"N\n\010NetState\022!\n\005ph"
    "ase\030\001 \001(\0162\014.caffe.Phase:\004TEST\022\020\n\005level\030\002"
    " \001(\005:\0010\022\r\n\005stage\030\003 \003(\t\"s\n\014NetStateRule\022\033"
    "\n\005phase\030\001 \001(\0162\014.caffe.Phase\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\tParamSpec\022\014\n\004nam"
    "e\030\001 \001(\t\0221\n\nshare_mode\030\002 \001(\0162\035.caffe.Para"
    "mSpec.DimCheckMode\022\022\n\007lr_mult\030\003 \001(\002:\0011\022\025"
    "\n\ndecay_mult\030\004 \001(\002:\0011\"*\n\014DimCheckMode\022\n\n"
    "\006STRICT\020\000\022\016\n\nPERMISSIVE\020\001\"\301\022\n\016LayerParam"
    "eter\022\014\n\004name\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\016\n\006bott"
    "om\030\003 \003(\t\022\013\n\003top\030\004 \003(\t\022\033\n\005phase\030\n \001(\0162\014.c"
    "affe.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\016propagate_down\030\013 \003("
    "\010\022$\n\007include\030\010 \003(\0132\023.caffe.NetStateRule\022"
    "$\n\007exclude\030\t \003(\0132\023.caffe.NetStateRule\0227\n"
    "\017transform_param\030d \001(\0132\036.caffe.Transform"
    "ationParameter\022(\n\nloss_param\030e \001(\0132\024.caf"
    "fe.LossParameter\0220\n\016accuracy_param\030f \001(\013"
    "2\030.caffe.AccuracyParameter\022,\n\014argmax_par"
    "am\030g \001(\0132\026.caffe.ArgMaxParameter\022,\n\014conc"
    "at_param\030h \001(\0132\026.caffe.ConcatParameter\022\?"
    "\n\026contrastive_loss_param\030i \001(\0132\037.caffe.C"
    "ontrastiveLossParameter\0226\n\021convolution_p"
    "aram\030j \001(\0132\033.caffe.ConvolutionParameter\022"
    ")\n\ncrop_param\030\211\001 \001(\0132\024.caffe.CropParamet"
    "er\022(\n\ndata_param\030k \001(\0132\024.caffe.DataParam"
    "eter\022@\n\026detection_output_param\030\215\001 \001(\0132\037."
    "caffe.DetectionOutputParameter\022.\n\rdropou"
    "t_param\030l \001(\0132\027.caffe.DropoutParameter\0223"
    "\n\020dummy_data_param\030m \001(\0132\031.caffe.DummyDa"
    "taParameter\022.\n\reltwise_param\030n \001(\0132\027.caf"
    "fe.EltwiseParameter\022&\n\texp_param\030o \001(\0132\023"
    ".caffe.ExpParameter\022/\n\rflatten_param\030\207\001 "
    "\001(\0132\027.caffe.FlattenParameter\0221\n\017hdf5_dat"
    "a_param\030p \001(\0132\030.caffe.HDF5DataParameter\022"
    "5\n\021hdf5_output_param\030q \001(\0132\032.caffe.HDF5O"
    "utputParameter\0223\n\020hinge_loss_param\030r \001(\013"
    "2\031.caffe.HingeLossParameter\0223\n\020image_dat"
    "a_param\030s \001(\0132\031.caffe.ImageDataParameter"
    "\0229\n\023infogain_loss_param\030t \001(\0132\034.caffe.In"
    "fogainLossParameter\0229\n\023inner_product_par"
    "am\030u \001(\0132\034.caffe.InnerProductParameter\022\'"
    "\n\tlog_param\030\206\001 \001(\0132\023.caffe.LogParameter\022"
    "&\n\tlrn_param\030v \001(\0132\023.caffe.LRNParameter\022"
    "5\n\021memory_data_param\030w \001(\0132\032.caffe.Memor"
    "yDataParameter\022&\n\tmvn_param\030x \001(\0132\023.caff"
    "e.MVNParameter\022<\n\024normalize_bbox_param\030\213"
    "\001 \001(\0132\035.caffe.NormalizeBBoxParameter\022/\n\r"
    "permute_param\030\212\001 \001(\0132\027.caffe.PermutePara"
    "meter\022.\n\rpooling_param\030y \001(\0132\027.caffe.Poo"
    "lingParameter\022*\n\013power_param\030z \001(\0132\025.caf"
    "fe.PowerParameter\022+\n\013prelu_param\030\203\001 \001(\0132"
    "\025.caffe.PReLUParameter\0222\n\017prior_box_para"
    "m\030\214\001 \001(\0132\030.caffe.PriorBoxParameter\022-\n\014py"
    "thon_param\030\202\001 \001(\0132\026.caffe.PythonParamete"
    "r\0223\n\017reduction_param\030\210\001 \001(\0132\031.caffe.Redu"
    "ctionParameter\022(\n\nrelu_param\030{ \001(\0132\024.caf"
    "fe.ReLUParameter\022/\n\rreshape_param\030\205\001 \001(\013"
    "2\027.caffe.ReshapeParameter\022.\n\rsigmoid_par"
    "am\030| \001(\0132\027.caffe.SigmoidParameter\022*\n\013sli"
    "ce_param\030~ \001(\0132\025.caffe.SliceParameter\022.\n"
    "\rsoftmax_param\030} \001(\0132\027.caffe.SoftmaxPara"
    "meter\022\'\n\tspp_param\030\204\001 \001(\0132\023.caffe.SPPPar"
    "ameter\022(\n\ntanh_param\030\177 \001(\0132\024.caffe.TanHP"
    "arameter\0223\n\017threshold_param\030\200\001 \001(\0132\031.caf"
    "fe.ThresholdParameter\0226\n\021window_data_par"
    "am\030\201\001 \001(\0132\032.caffe.WindowDataParameter\"\266\001"
    "\n\027TransformationParameter\022\020\n\005scale\030\001 \001(\002"
    ":\0011\022\025\n\006mirror\030\002 \001(\010:\005false\022\024\n\tcrop_size\030"
    "\003 \001(\r:\0010\022\021\n\tmean_file\030\004 \001(\t\022\022\n\nmean_valu"
    "e\030\005 \003(\002\022\032\n\013force_color\030\006 \001(\010:\005false\022\031\n\nf"
    "orce_gray\030\007 \001(\010:\005false\">\n\rLossParameter\022"
    "\024\n\014ignore_label\030\001 \001(\005\022\027\n\tnormalize\030\002 \001(\010"
    ":\004true\"L\n\021AccuracyParameter\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\"\?\n\017ArgMaxParameter\022\032\n\013out_max_val\030\001"
    " \001(\010:\005false\022\020\n\005top_k\030\002 \001(\r:\0011\"9\n\017ConcatP"
    "arameter\022\017\n\004axis\030\002 \001(\005:\0011\022\025\n\nconcat_dim\030"
    "\001 \001(\r:\0011\"L\n\030ContrastiveLossParameter\022\021\n\006"
    "margin\030\001 \001(\002:\0011\022\035\n\016legacy_version\030\002 \001(\010:"
    "\005false\"\371\003\n\024ConvolutionParameter\022\022\n\nnum_o"
    "utput\030\001 \001(\r\022\027\n\tbias_term\030\002 \001(\010:\004true\022\016\n\003"
    "pad\030\003 \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\004 \001(\r\022\020\n\010kernel_"
    "h\030\013 \001(\r\022\020\n\010kernel_w\030\014 \001(\r\022\020\n\005group\030\005 \001(\r"
    ":\0011\022\021\n\006stride\030\006 \001(\r:\0011\022\020\n\010stride_h\030\r \001(\r"
    "\022\020\n\010stride_w\030\016 \001(\r\022-\n\rweight_filler\030\007 \001("
    "\0132\026.caffe.FillerParameter\022+\n\013bias_filler"
    "\030\010 \001(\0132\026.caffe.FillerParameter\022;\n\006engine"
    "\030\017 \001(\0162\".caffe.ConvolutionParameter.Engi"
    "ne:\007DEFAULT\022\022\n\ndilation_h\030\022 \001(\r\022\022\n\ndilat"
    "ion_w\030\023 \001(\r\022\020\n\010dilation\030\024 \001(\r\"+\n\006Engine\022"
    "\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"\217\002\n\rD"
    "ataParameter\022\016\n\006source\030\001 \001(\t\022\022\n\nbatch_si"
    "ze\030\004 \001(\r\022\024\n\trand_skip\030\007 \001(\r:\0010\0221\n\007backen"
    "d\030\010 \001(\0162\027.caffe.DataParameter.DB:\007LEVELD"
    "B\022\020\n\005scale\030\002 \001(\002:\0011\022\021\n\tmean_file\030\003 \001(\t\022\024"
    "\n\tcrop_size\030\005 \001(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005fa"
    "lse\022\"\n\023force_encoded_color\030\t \001(\010:\005false\""
    "\033\n\002DB\022\013\n\007LEVELDB\020\000\022\010\n\004LMDB\020\001\".\n\020DropoutP"
    "arameter\022\032\n\rdropout_ratio\030\001 \001(\002:\0030.5\"\240\001\n"
    "\022DummyDataParameter\022+\n\013data_filler\030\001 \003(\013"
    "2\026.caffe.FillerParameter\022\037\n\005shape\030\006 \003(\0132"
    "\020.caffe.BlobShape\022\013\n\003num\030\002 \003(\r\022\020\n\010channe"
    "ls\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.EltwiseParameter.EltwiseOp:\003SUM\022"
    "\r\n\005coeff\030\002 \003(\002\022\036\n\020stable_prod_grad\030\003 \001(\010"
    ":\004true\"\'\n\tEltwiseOp\022\010\n\004PROD\020\000\022\007\n\003SUM\020\001\022\007"
    "\n\003MAX\020\002\"D\n\014ExpParameter\022\020\n\004base\030\001 \001(\002:\002-"
    "1\022\020\n\005scale\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"9\n"
    "\020FlattenParameter\022\017\n\004axis\030\001 \001(\005:\0011\022\024\n\010en"
    "d_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\007shu"
    "ffle\030\003 \001(\010:\005false\"(\n\023HDF5OutputParameter"
    "\022\021\n\tfile_name\030\001 \001(\t\"^\n\022HingeLossParamete"
    "r\0220\n\004norm\030\001 \001(\0162\036.caffe.HingeLossParamet"
    "er.Norm:\002L1\"\026\n\004Norm\022\006\n\002L1\020\001\022\006\n\002L2\020\002\"\224\002\n\022"
    "ImageDataParameter\022\016\n\006source\030\001 \001(\t\022\022\n\nba"
    "tch_size\030\004 \001(\r\022\024\n\trand_skip\030\007 \001(\r:\0010\022\026\n\007"
    "shuffle\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\tcrop_size\030\005 \001(\r:\0010\022\025\n\006mirror\030\006"
    " \001(\010:\005false\022\025\n\013root_folder\030\014 \001(\t:\000\"\'\n\025In"
    "fogainLossParameter\022\016\n\006source\030\001 \001(\t\"\261\001\n\025"
    "InnerProductParameter\022\022\n\nnum_output\030\001 \001("
    "\r\022\027\n\tbias_term\030\002 \001(\010:\004true\022-\n\rweight_fil"
    "ler\030\003 \001(\0132\026.caffe.FillerParameter\022+\n\013bia"
    "s_filler\030\004 \001(\0132\026.caffe.FillerParameter\022\017"
    "\n\004axis\030\005 \001(\005:\0011\"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\"\326\001\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:\0040"
    ".75\022D\n\013norm_region\030\004 \001(\0162\036.caffe.LRNPara"
    "meter.NormRegion:\017ACROSS_CHANNELS\022\014\n\001k\030\005"
    " \001(\002:\0011\"5\n\nNormRegion\022\023\n\017ACROSS_CHANNELS"
    "\020\000\022\022\n\016WITHIN_CHANNEL\020\001\"Z\n\023MemoryDataPara"
    "meter\022\022\n\nbatch_size\030\001 \001(\r\022\020\n\010channels\030\002 "
    "\001(\r\022\016\n\006height\030\003 \001(\r\022\r\n\005width\030\004 \001(\r\"d\n\014MV"
    "NParameter\022 \n\022normalize_variance\030\001 \001(\010:\004"
    "true\022\036\n\017across_channels\030\002 \001(\010:\005false\022\022\n\003"
    "eps\030\003 \001(\002:\0051e-09\"\242\003\n\020PoolingParameter\0225\n"
    "\004pool\030\001 \001(\0162\".caffe.PoolingParameter.Poo"
    "lMethod:\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\006engine\030\013 \001(\0162\036.caffe"
    ".PoolingParameter.Engine:\007DEFAULT\022\035\n\016glo"
    "bal_pooling\030\014 \001(\010:\005false\".\n\nPoolMethod\022\007"
    "\n\003MAX\020\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Engi"
    "ne\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"F\n"
    "\016PowerParameter\022\020\n\005power\030\001 \001(\002:\0011\022\020\n\005sca"
    "le\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"0\n\017PythonP"
    "arameter\022\016\n\006module\030\001 \001(\t\022\r\n\005layer\030\002 \001(\t\""
    "\255\001\n\022ReductionParameter\022=\n\toperation\030\001 \001("
    "\0162%.caffe.ReductionParameter.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\005SU"
    "MSQ\020\003\022\010\n\004MEAN\020\004\"\215\001\n\rReLUParameter\022\031\n\016neg"
    "ative_slope\030\001 \001(\002:\0010\0224\n\006engine\030\002 \001(\0162\033.c"
    "affe.ReLUParameter.Engine:\007DEFAULT\"+\n\006En"
    "gine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\""
    "Z\n\020ReshapeParameter\022\037\n\005shape\030\001 \001(\0132\020.caf"
    "fe.BlobShape\022\017\n\004axis\030\002 \001(\005:\0010\022\024\n\010num_axe"
    "s\030\003 \001(\005:\002-1\"x\n\020SigmoidParameter\0227\n\006engin"
    "e\030\001 \001(\0162\036.caffe.SigmoidParameter.Engine:"
    "\007DEFAULT\"+\n\006Engine\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\013slice_point\030\002 \003(\r\022\024\n\tslice_d"
    "im\030\001 \001(\r:\0011\"\211\001\n\020SoftmaxParameter\0227\n\006engi"
    "ne\030\001 \001(\0162\036.caffe.SoftmaxParameter.Engine"
    ":\007DEFAULT\022\017\n\004axis\030\002 \001(\005:\0011\"+\n\006Engine\022\013\n\007"
    "DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"r\n\rTanHP"
    "arameter\0224\n\006engine\030\001 \001(\0162\033.caffe.TanHPar"
    "ameter.Engine:\007DEFAULT\"+\n\006Engine\022\013\n\007DEFA"
    "ULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"*\n\022Threshold"
    "Parameter\022\024\n\tthreshold\030\001 \001(\002:\0010\"\301\002\n\023Wind"
    "owDataParameter\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_si"
    "ze\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_fracti"
    "on\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:\005false\022\025\n\013root_folder\030\r \001(\t:\000\"\353\001\n\014"
    "SPPParameter\022\026\n\016pyramid_height\030\001 \001(\r\0221\n\004"
    "pool\030\002 \001(\0162\036.caffe.SPPParameter.PoolMeth"
    "od:\003MAX\0223\n\006engine\030\006 \001(\0162\032.caffe.SPPParam"
    "eter.Engine:\007DEFAULT\".\n\nPoolMethod\022\007\n\003MA"
    "X\020\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Engine\022\013"
    "\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"\340\023\n\020V1"
    "LayerParameter\022\016\n\006bottom\030\002 \003(\t\022\013\n\003top\030\003 "
    "\003(\t\022\014\n\004name\030\004 \001(\t\022$\n\007include\030  \003(\0132\023.caf"
    "fe.NetStateRule\022$\n\007exclude\030! \003(\0132\023.caffe"
    ".NetStateRule\022/\n\004type\030\005 \001(\0162!.caffe.V1La"
    "yerParameter.LayerType\022\037\n\005blobs\030\006 \003(\0132\020."
    "caffe.BlobProto\022\016\n\005param\030\351\007 \003(\t\022>\n\017blob_"
    "share_mode\030\352\007 \003(\0162$.caffe.V1LayerParamet"
    "er.DimCheckMode\022\020\n\010blobs_lr\030\007 \003(\002\022\024\n\014wei"
    "ght_decay\030\010 \003(\002\022\023\n\013loss_weight\030# \003(\002\0220\n\016"
    "accuracy_param\030\033 \001(\0132\030.caffe.AccuracyPar"
    "ameter\022,\n\014argmax_param\030\027 \001(\0132\026.caffe.Arg"
    "MaxParameter\022,\n\014concat_param\030\t \001(\0132\026.caf"
    "fe.ConcatParameter\022\?\n\026contrastive_loss_p"
    "aram\030( \001(\0132\037.caffe.ContrastiveLossParame"
    "ter\0226\n\021convolution_param\030\n \001(\0132\033.caffe.C"
    "onvolutionParameter\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_d"
    "ata_param\030\032 \001(\0132\031.caffe.DummyDataParamet"
    "er\022.\n\reltwise_param\030\030 \001(\0132\027.caffe.Eltwis"
    "eParameter\022&\n\texp_param\030) \001(\0132\023.caffe.Ex"
    "pParameter\0221\n\017hdf5_data_param\030\r \001(\0132\030.ca"
    "ffe.HDF5DataParameter\0225\n\021hdf5_output_par"
    "am\030\016 \001(\0132\032.caffe.HDF5OutputParameter\0223\n\020"
    "hinge_loss_param\030\035 \001(\0132\031.caffe.HingeLoss"
    "Parameter\0223\n\020image_data_param\030\017 \001(\0132\031.ca"
    "ffe.ImageDataParameter\0229\n\023infogain_loss_"
    "param\030\020 \001(\0132\034.caffe.InfogainLossParamete"
    "r\0229\n\023inner_product_param\030\021 \001(\0132\034.caffe.I"
    "nnerProductParameter\022&\n\tlrn_param\030\022 \001(\0132"
    "\023.caffe.LRNParameter\0225\n\021memory_data_para"
    "m\030\026 \001(\0132\032.caffe.MemoryDataParameter\022&\n\tm"
    "vn_param\030\" \001(\0132\023.caffe.MVNParameter\022.\n\rp"
    "ooling_param\030\023 \001(\0132\027.caffe.PoolingParame"
    "ter\022*\n\013power_param\030\025 \001(\0132\025.caffe.PowerPa"
    "rameter\022(\n\nrelu_param\030\036 \001(\0132\024.caffe.ReLU"
    "Parameter\022.\n\rsigmoid_param\030& \001(\0132\027.caffe"
    ".SigmoidParameter\022.\n\rsoftmax_param\030\' \001(\013"
    "2\027.caffe.SoftmaxParameter\022*\n\013slice_param"
    "\030\037 \001(\0132\025.caffe.SliceParameter\022(\n\ntanh_pa"
    "ram\030% \001(\0132\024.caffe.TanHParameter\0222\n\017thres"
    "hold_param\030\031 \001(\0132\031.caffe.ThresholdParame"
    "ter\0225\n\021window_data_param\030\024 \001(\0132\032.caffe.W"
    "indowDataParameter\0227\n\017transform_param\030$ "
    "\001(\0132\036.caffe.TransformationParameter\022(\n\nl"
    "oss_param\030* \001(\0132\024.caffe.LossParameter\022&\n"
    "\005layer\030\001 \001(\0132\027.caffe.V0LayerParameter\"\330\004"
    "\n\tLayerType\022\010\n\004NONE\020\000\022\n\n\006ABSVAL\020#\022\014\n\010ACC"
    "URACY\020\001\022\n\n\006ARGMAX\020\036\022\010\n\004BNLL\020\002\022\n\n\006CONCAT\020"
    "\003\022\024\n\020CONTRASTIVE_LOSS\020%\022\017\n\013CONVOLUTION\020\004"
    "\022\010\n\004DATA\020\005\022\021\n\rDECONVOLUTION\020\'\022\013\n\007DROPOUT"
    "\020\006\022\016\n\nDUMMY_DATA\020 \022\022\n\016EUCLIDEAN_LOSS\020\007\022\013"
    "\n\007ELTWISE\020\031\022\007\n\003EXP\020&\022\013\n\007FLATTEN\020\010\022\r\n\tHDF"
    "5_DATA\020\t\022\017\n\013HDF5_OUTPUT\020\n\022\016\n\nHINGE_LOSS\020"
    "\034\022\n\n\006IM2COL\020\013\022\016\n\nIMAGE_DATA\020\014\022\021\n\rINFOGAI"
    "N_LOSS\020\r\022\021\n\rINNER_PRODUCT\020\016\022\007\n\003LRN\020\017\022\017\n\013"
    "MEMORY_DATA\020\035\022\035\n\031MULTINOMIAL_LOGISTIC_LO"
    "SS\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_EN"
    "TROPY_LOSS\020\033\022\013\n\007SILENCE\020$\022\013\n\007SOFTMAX\020\024\022\020"
    "\n\014SOFTMAX_LOSS\020\025\022\t\n\005SPLIT\020\026\022\t\n\005SLICE\020!\022\010"
    "\n\004TANH\020\027\022\017\n\013WINDOW_DATA\020\030\022\r\n\tTHRESHOLD\020\037"
    "\"*\n\014DimCheckMode\022\n\n\006STRICT\020\000\022\016\n\nPERMISSI"
    "VE\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\010bia"
    "sterm\030\004 \001(\010:\004true\022-\n\rweight_filler\030\005 \001(\013"
    "2\026.caffe.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\006stride\030\n \001(\r:\0011\0225\n\004pool\030\013 \001(\0162\".c"
    "affe.V0LayerParameter.PoolMethod:\003MAX\022\032\n"
    "\rdropout_ratio\030\014 \001(\002:\0030.5\022\025\n\nlocal_size\030"
    "\r \001(\r:\0015\022\020\n\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\005"
    "scale\030\021 \001(\002:\0011\022\020\n\010meanfile\030\022 \001(\t\022\021\n\tbatc"
    "hsize\030\023 \001(\r\022\023\n\010cropsize\030\024 \001(\r:\0010\022\025\n\006mirr"
    "or\030\025 \001(\010:\005false\022\037\n\005blobs\0302 \003(\0132\020.caffe.B"
    "lobProto\022\020\n\010blobs_lr\0303 \003(\002\022\024\n\014weight_dec"
    "ay\0304 \003(\002\022\024\n\trand_skip\0305 \001(\r:\0010\022\035\n\020det_fg"
    "_threshold\0306 \001(\002:\0030.5\022\035\n\020det_bg_threshol"
    "d\0307 \001(\002:\0030.5\022\035\n\017det_fg_fraction\0308 \001(\002:\0040"
    ".25\022\032\n\017det_context_pad\030: \001(\r:\0010\022\033\n\rdet_c"
    "rop_mode\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:\0010\022\024\n\tnew_width\030\? \001(\005:\0010\022\035\n\016shuffl"
    "e_images\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"
    ".HDF5OutputParameter\".\n\nPoolMethod\022\007\n\003MA"
    "X\020\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"W\n\016PReLUPar"
    "ameter\022&\n\006filler\030\001 \001(\0132\026.caffe.FillerPar"
    "ameter\022\035\n\016channel_shared\030\002 \001(\010:\005false\"\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\005labe"
    "l\030\005 \001(\005\022\021\n\tdifficult\030\006 \001(\010\022\r\n\005score\030\007 \001("
    "\002\022\014\n\004size\030\010 \001(\002*\034\n\005Phase\022\t\n\005TRAIN\020\000\022\010\n\004T"
    "EST\020\001", 14445);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "caffe.proto", &protobuf_RegisterTypes);
  ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_caffe_2eproto);
}

GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AddDesc_caffe_2eproto_once_);
void protobuf_AddDesc_caffe_2eproto() {
  ::google::protobuf::GoogleOnceInit(&protobuf_AddDesc_caffe_2eproto_once_,
                 &protobuf_AddDesc_caffe_2eproto_impl);
}
// Force AddDescriptors() to be called at static initialization time.
struct StaticDescriptorInitializer_caffe_2eproto {
  StaticDescriptorInitializer_caffe_2eproto() {
    protobuf_AddDesc_caffe_2eproto();
  }
} static_descriptor_initializer_caffe_2eproto_;
const ::google::protobuf::EnumDescriptor* Phase_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Phase_descriptor_;
}
bool Phase_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}


namespace {

static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD GOOGLE_ATTRIBUTE_NORETURN;
static void MergeFromFail(int line) {
  ::google::protobuf::internal::MergeFromFail(__FILE__, line);
}

}  // namespace


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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int BlobShape::kDimFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

BlobShape::BlobShape()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.BlobShape)
}

void BlobShape::InitAsDefaultInstance() {
}

BlobShape::BlobShape(const BlobShape& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.BlobShape)
}

void BlobShape::SharedCtor() {
  _cached_size_ = 0;
}

BlobShape::~BlobShape() {
  // @@protoc_insertion_point(destructor:caffe.BlobShape)
  SharedDtor();
}

void BlobShape::SharedDtor() {
}

void BlobShape::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* BlobShape::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return BlobShape_descriptor_;
}

const BlobShape& BlobShape::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<BlobShape> BlobShape_default_instance_;

BlobShape* BlobShape::New(::google::protobuf::Arena* arena) const {
  BlobShape* n = new BlobShape;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void BlobShape::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.BlobShape)
  dim_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool BlobShape::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.BlobShape)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated int64 dim = 1 [packed = true];
      case 1: {
        if (tag == 10) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, this->mutable_dim())));
        } else if (tag == 8) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 1, 10, input, this->mutable_dim())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.BlobShape)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.BlobShape)
  return false;
#undef DO_
}

void BlobShape::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.BlobShape)
  // repeated int64 dim = 1 [packed = true];
  if (this->dim_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_dim_cached_byte_size_);
  }
  for (int i = 0; i < this->dim_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64NoTag(
      this->dim(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.BlobShape)
}

::google::protobuf::uint8* BlobShape::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.BlobShape)
  // repeated int64 dim = 1 [packed = true];
  if (this->dim_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      1,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _dim_cached_byte_size_, target);
  }
  for (int i = 0; i < this->dim_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt64NoTagToArray(this->dim(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // repeated int64 dim = 1 [packed = true];
  {
    size_t data_size = 0;
    unsigned int count = this->dim_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int64Size(this->dim(i));
    }
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _dim_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void BlobShape::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.BlobShape)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const BlobShape* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const BlobShape>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.BlobShape)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.BlobShape)
    UnsafeMergeFrom(*source);
  }
}

void BlobShape::MergeFrom(const BlobShape& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.BlobShape)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void BlobShape::UnsafeMergeFrom(const BlobShape& from) {
  GOOGLE_DCHECK(&from != this);
  dim_.UnsafeMergeFrom(from.dim_);
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void BlobShape::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.BlobShape)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool BlobShape::IsInitialized() const {

  return true;
}

void BlobShape::Swap(BlobShape* other) {
  if (other == this) return;
  InternalSwap(other);
}
void BlobShape::InternalSwap(BlobShape* other) {
  dim_.UnsafeArenaSwap(&other->dim_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata BlobShape::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = BlobShape_descriptor_;
  metadata.reflection = BlobShape_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// BlobShape

// repeated int64 dim = 1 [packed = true];
int BlobShape::dim_size() const {
  return dim_.size();
}
void BlobShape::clear_dim() {
  dim_.Clear();
}
::google::protobuf::int64 BlobShape::dim(int index) const {
  // @@protoc_insertion_point(field_get:caffe.BlobShape.dim)
  return dim_.Get(index);
}
void BlobShape::set_dim(int index, ::google::protobuf::int64 value) {
  dim_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.BlobShape.dim)
}
void BlobShape::add_dim(::google::protobuf::int64 value) {
  dim_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.BlobShape.dim)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >&
BlobShape::dim() const {
  // @@protoc_insertion_point(field_list:caffe.BlobShape.dim)
  return dim_;
}
::google::protobuf::RepeatedField< ::google::protobuf::int64 >*
BlobShape::mutable_dim() {
  // @@protoc_insertion_point(field_mutable_list:caffe.BlobShape.dim)
  return &dim_;
}

inline const BlobShape* BlobShape::internal_default_instance() {
  return &BlobShape_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int BlobProto::kShapeFieldNumber;
const int BlobProto::kDataFieldNumber;
const int BlobProto::kDiffFieldNumber;
const int BlobProto::kNumFieldNumber;
const int BlobProto::kChannelsFieldNumber;
const int BlobProto::kHeightFieldNumber;
const int BlobProto::kWidthFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

BlobProto::BlobProto()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.BlobProto)
}

void BlobProto::InitAsDefaultInstance() {
  shape_ = const_cast< ::caffe::BlobShape*>(
      ::caffe::BlobShape::internal_default_instance());
}

BlobProto::BlobProto(const BlobProto& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.BlobProto)
}

void BlobProto::SharedCtor() {
  _cached_size_ = 0;
  shape_ = NULL;
  ::memset(&num_, 0, reinterpret_cast<char*>(&width_) -
    reinterpret_cast<char*>(&num_) + sizeof(width_));
}

BlobProto::~BlobProto() {
  // @@protoc_insertion_point(destructor:caffe.BlobProto)
  SharedDtor();
}

void BlobProto::SharedDtor() {
  if (this != &BlobProto_default_instance_.get()) {
    delete shape_;
  }
}

void BlobProto::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* BlobProto::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return BlobProto_descriptor_;
}

const BlobProto& BlobProto::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<BlobProto> BlobProto_default_instance_;

BlobProto* BlobProto::New(::google::protobuf::Arena* arena) const {
  BlobProto* n = new BlobProto;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void BlobProto::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.BlobProto)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(BlobProto, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<BlobProto*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 121u) {
    ZR_(num_, width_);
    if (has_shape()) {
      if (shape_ != NULL) shape_->::caffe::BlobShape::Clear();
    }
  }

#undef ZR_HELPER_
#undef ZR_

  data_.Clear();
  diff_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool BlobProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.BlobProto)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 num = 1 [default = 0];
      case 1: {
        if (tag == 8) {
          set_has_num();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &num_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_channels;
        break;
      }

      // optional int32 channels = 2 [default = 0];
      case 2: {
        if (tag == 16) {
         parse_channels:
          set_has_channels();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &channels_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_height;
        break;
      }

      // optional int32 height = 3 [default = 0];
      case 3: {
        if (tag == 24) {
         parse_height:
          set_has_height();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &height_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_width;
        break;
      }

      // optional int32 width = 4 [default = 0];
      case 4: {
        if (tag == 32) {
         parse_width:
          set_has_width();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &width_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(42)) goto parse_data;
        break;
      }

      // repeated float data = 5 [packed = true];
      case 5: {
        if (tag == 42) {
         parse_data:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_data())));
        } else if (tag == 45) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 42, input, this->mutable_data())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(50)) goto parse_diff;
        break;
      }

      // repeated float diff = 6 [packed = true];
      case 6: {
        if (tag == 50) {
         parse_diff:
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_diff())));
        } else if (tag == 53) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 50, input, this->mutable_diff())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(58)) goto parse_shape;
        break;
      }

      // optional .caffe.BlobShape shape = 7;
      case 7: {
        if (tag == 58) {
         parse_shape:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_shape()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.BlobProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.BlobProto)
  return false;
#undef DO_
}

void BlobProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.BlobProto)
  // optional int32 num = 1 [default = 0];
  if (has_num()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->num(), output);
  }

  // optional int32 channels = 2 [default = 0];
  if (has_channels()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->channels(), output);
  }

  // optional int32 height = 3 [default = 0];
  if (has_height()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->height(), output);
  }

  // optional int32 width = 4 [default = 0];
  if (has_width()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->width(), output);
  }

  // repeated float data = 5 [packed = true];
  if (this->data_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(5, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_data_cached_byte_size_);
  }
  for (int i = 0; i < this->data_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag(
      this->data(i), output);
  }

  // repeated float diff = 6 [packed = true];
  if (this->diff_size() > 0) {
    ::google::protobuf::internal::WireFormatLite::WriteTag(6, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output);
    output->WriteVarint32(_diff_cached_byte_size_);
  }
  for (int i = 0; i < this->diff_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloatNoTag(
      this->diff(i), output);
  }

  // optional .caffe.BlobShape shape = 7;
  if (has_shape()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, *this->shape_, output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.BlobProto)
}

::google::protobuf::uint8* BlobProto::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.BlobProto)
  // optional int32 num = 1 [default = 0];
  if (has_num()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->num(), target);
  }

  // optional int32 channels = 2 [default = 0];
  if (has_channels()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->channels(), target);
  }

  // optional int32 height = 3 [default = 0];
  if (has_height()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->height(), target);
  }

  // optional int32 width = 4 [default = 0];
  if (has_width()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->width(), target);
  }

  // repeated float data = 5 [packed = true];
  if (this->data_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      5,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _data_cached_byte_size_, target);
  }
  for (int i = 0; i < this->data_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->data(i), target);
  }

  // repeated float diff = 6 [packed = true];
  if (this->diff_size() > 0) {
    target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray(
      6,
      ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED,
      target);
    target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(
      _diff_cached_byte_size_, target);
  }
  for (int i = 0; i < this->diff_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatNoTagToArray(this->diff(i), target);
  }

  // optional .caffe.BlobShape shape = 7;
  if (has_shape()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        7, *this->shape_, false, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 121u) {
    // optional .caffe.BlobShape shape = 7;
    if (has_shape()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->shape_);
    }

    // optional int32 num = 1 [default = 0];
    if (has_num()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->num());
    }

    // optional int32 channels = 2 [default = 0];
    if (has_channels()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->channels());
    }

    // optional int32 height = 3 [default = 0];
    if (has_height()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->height());
    }

    // optional int32 width = 4 [default = 0];
    if (has_width()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->width());
    }

  }
  // repeated float data = 5 [packed = true];
  {
    size_t data_size = 0;
    unsigned int count = this->data_size();
    data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _data_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  // repeated float diff = 6 [packed = true];
  {
    size_t data_size = 0;
    unsigned int count = this->diff_size();
    data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
    }
    int cached_size = ::google::protobuf::internal::ToCachedSize(data_size);
    GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    _diff_cached_byte_size_ = cached_size;
    GOOGLE_SAFE_CONCURRENT_WRITES_END();
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void BlobProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.BlobProto)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const BlobProto* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const BlobProto>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.BlobProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.BlobProto)
    UnsafeMergeFrom(*source);
  }
}

void BlobProto::MergeFrom(const BlobProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.BlobProto)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void BlobProto::UnsafeMergeFrom(const BlobProto& from) {
  GOOGLE_DCHECK(&from != this);
  data_.UnsafeMergeFrom(from.data_);
  diff_.UnsafeMergeFrom(from.diff_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_shape()) {
      mutable_shape()->::caffe::BlobShape::MergeFrom(from.shape());
    }
    if (from.has_num()) {
      set_num(from.num());
    }
    if (from.has_channels()) {
      set_channels(from.channels());
    }
    if (from.has_height()) {
      set_height(from.height());
    }
    if (from.has_width()) {
      set_width(from.width());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

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

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

bool BlobProto::IsInitialized() const {

  return true;
}

void BlobProto::Swap(BlobProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void BlobProto::InternalSwap(BlobProto* other) {
  std::swap(shape_, other->shape_);
  data_.UnsafeArenaSwap(&other->data_);
  diff_.UnsafeArenaSwap(&other->diff_);
  std::swap(num_, other->num_);
  std::swap(channels_, other->channels_);
  std::swap(height_, other->height_);
  std::swap(width_, other->width_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata BlobProto::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = BlobProto_descriptor_;
  metadata.reflection = BlobProto_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// BlobProto

// optional .caffe.BlobShape shape = 7;
bool BlobProto::has_shape() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void BlobProto::set_has_shape() {
  _has_bits_[0] |= 0x00000001u;
}
void BlobProto::clear_has_shape() {
  _has_bits_[0] &= ~0x00000001u;
}
void BlobProto::clear_shape() {
  if (shape_ != NULL) shape_->::caffe::BlobShape::Clear();
  clear_has_shape();
}
const ::caffe::BlobShape& BlobProto::shape() const {
  // @@protoc_insertion_point(field_get:caffe.BlobProto.shape)
  return shape_ != NULL ? *shape_
                         : *::caffe::BlobShape::internal_default_instance();
}
::caffe::BlobShape* BlobProto::mutable_shape() {
  set_has_shape();
  if (shape_ == NULL) {
    shape_ = new ::caffe::BlobShape;
  }
  // @@protoc_insertion_point(field_mutable:caffe.BlobProto.shape)
  return shape_;
}
::caffe::BlobShape* BlobProto::release_shape() {
  // @@protoc_insertion_point(field_release:caffe.BlobProto.shape)
  clear_has_shape();
  ::caffe::BlobShape* temp = shape_;
  shape_ = NULL;
  return temp;
}
void BlobProto::set_allocated_shape(::caffe::BlobShape* shape) {
  delete shape_;
  shape_ = shape;
  if (shape) {
    set_has_shape();
  } else {
    clear_has_shape();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.BlobProto.shape)
}

// repeated float data = 5 [packed = true];
int BlobProto::data_size() const {
  return data_.size();
}
void BlobProto::clear_data() {
  data_.Clear();
}
float BlobProto::data(int index) const {
  // @@protoc_insertion_point(field_get:caffe.BlobProto.data)
  return data_.Get(index);
}
void BlobProto::set_data(int index, float value) {
  data_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.BlobProto.data)
}
void BlobProto::add_data(float value) {
  data_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.BlobProto.data)
}
const ::google::protobuf::RepeatedField< float >&
BlobProto::data() const {
  // @@protoc_insertion_point(field_list:caffe.BlobProto.data)
  return data_;
}
::google::protobuf::RepeatedField< float >*
BlobProto::mutable_data() {
  // @@protoc_insertion_point(field_mutable_list:caffe.BlobProto.data)
  return &data_;
}

// repeated float diff = 6 [packed = true];
int BlobProto::diff_size() const {
  return diff_.size();
}
void BlobProto::clear_diff() {
  diff_.Clear();
}
float BlobProto::diff(int index) const {
  // @@protoc_insertion_point(field_get:caffe.BlobProto.diff)
  return diff_.Get(index);
}
void BlobProto::set_diff(int index, float value) {
  diff_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.BlobProto.diff)
}
void BlobProto::add_diff(float value) {
  diff_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.BlobProto.diff)
}
const ::google::protobuf::RepeatedField< float >&
BlobProto::diff() const {
  // @@protoc_insertion_point(field_list:caffe.BlobProto.diff)
  return diff_;
}
::google::protobuf::RepeatedField< float >*
BlobProto::mutable_diff() {
  // @@protoc_insertion_point(field_mutable_list:caffe.BlobProto.diff)
  return &diff_;
}

// optional int32 num = 1 [default = 0];
bool BlobProto::has_num() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void BlobProto::set_has_num() {
  _has_bits_[0] |= 0x00000008u;
}
void BlobProto::clear_has_num() {
  _has_bits_[0] &= ~0x00000008u;
}
void BlobProto::clear_num() {
  num_ = 0;
  clear_has_num();
}
::google::protobuf::int32 BlobProto::num() const {
  // @@protoc_insertion_point(field_get:caffe.BlobProto.num)
  return num_;
}
void BlobProto::set_num(::google::protobuf::int32 value) {
  set_has_num();
  num_ = value;
  // @@protoc_insertion_point(field_set:caffe.BlobProto.num)
}

// optional int32 channels = 2 [default = 0];
bool BlobProto::has_channels() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void BlobProto::set_has_channels() {
  _has_bits_[0] |= 0x00000010u;
}
void BlobProto::clear_has_channels() {
  _has_bits_[0] &= ~0x00000010u;
}
void BlobProto::clear_channels() {
  channels_ = 0;
  clear_has_channels();
}
::google::protobuf::int32 BlobProto::channels() const {
  // @@protoc_insertion_point(field_get:caffe.BlobProto.channels)
  return channels_;
}
void BlobProto::set_channels(::google::protobuf::int32 value) {
  set_has_channels();
  channels_ = value;
  // @@protoc_insertion_point(field_set:caffe.BlobProto.channels)
}

// optional int32 height = 3 [default = 0];
bool BlobProto::has_height() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void BlobProto::set_has_height() {
  _has_bits_[0] |= 0x00000020u;
}
void BlobProto::clear_has_height() {
  _has_bits_[0] &= ~0x00000020u;
}
void BlobProto::clear_height() {
  height_ = 0;
  clear_has_height();
}
::google::protobuf::int32 BlobProto::height() const {
  // @@protoc_insertion_point(field_get:caffe.BlobProto.height)
  return height_;
}
void BlobProto::set_height(::google::protobuf::int32 value) {
  set_has_height();
  height_ = value;
  // @@protoc_insertion_point(field_set:caffe.BlobProto.height)
}

// optional int32 width = 4 [default = 0];
bool BlobProto::has_width() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void BlobProto::set_has_width() {
  _has_bits_[0] |= 0x00000040u;
}
void BlobProto::clear_has_width() {
  _has_bits_[0] &= ~0x00000040u;
}
void BlobProto::clear_width() {
  width_ = 0;
  clear_has_width();
}
::google::protobuf::int32 BlobProto::width() const {
  // @@protoc_insertion_point(field_get:caffe.BlobProto.width)
  return width_;
}
void BlobProto::set_width(::google::protobuf::int32 value) {
  set_has_width();
  width_ = value;
  // @@protoc_insertion_point(field_set:caffe.BlobProto.width)
}

inline const BlobProto* BlobProto::internal_default_instance() {
  return &BlobProto_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int BlobProtoVector::kBlobsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

BlobProtoVector::BlobProtoVector()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.BlobProtoVector)
}

void BlobProtoVector::InitAsDefaultInstance() {
}

BlobProtoVector::BlobProtoVector(const BlobProtoVector& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.BlobProtoVector)
}

void BlobProtoVector::SharedCtor() {
  _cached_size_ = 0;
}

BlobProtoVector::~BlobProtoVector() {
  // @@protoc_insertion_point(destructor:caffe.BlobProtoVector)
  SharedDtor();
}

void BlobProtoVector::SharedDtor() {
}

void BlobProtoVector::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* BlobProtoVector::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return BlobProtoVector_descriptor_;
}

const BlobProtoVector& BlobProtoVector::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<BlobProtoVector> BlobProtoVector_default_instance_;

BlobProtoVector* BlobProtoVector::New(::google::protobuf::Arena* arena) const {
  BlobProtoVector* n = new BlobProtoVector;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void BlobProtoVector::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.BlobProtoVector)
  blobs_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool BlobProtoVector::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.BlobProtoVector)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .caffe.BlobProto blobs = 1;
      case 1: {
        if (tag == 10) {
          DO_(input->IncrementRecursionDepth());
         parse_loop_blobs:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_blobs()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(10)) goto parse_loop_blobs;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.BlobProtoVector)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.BlobProtoVector)
  return false;
#undef DO_
}

void BlobProtoVector::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.BlobProtoVector)
  // repeated .caffe.BlobProto blobs = 1;
  for (unsigned int i = 0, n = this->blobs_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->blobs(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.BlobProtoVector)
}

::google::protobuf::uint8* BlobProtoVector::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.BlobProtoVector)
  // repeated .caffe.BlobProto blobs = 1;
  for (unsigned int i = 0, n = this->blobs_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        1, this->blobs(i), false, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // repeated .caffe.BlobProto blobs = 1;
  {
    unsigned int count = this->blobs_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->blobs(i));
    }
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void BlobProtoVector::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.BlobProtoVector)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const BlobProtoVector* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const BlobProtoVector>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.BlobProtoVector)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.BlobProtoVector)
    UnsafeMergeFrom(*source);
  }
}

void BlobProtoVector::MergeFrom(const BlobProtoVector& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.BlobProtoVector)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void BlobProtoVector::UnsafeMergeFrom(const BlobProtoVector& from) {
  GOOGLE_DCHECK(&from != this);
  blobs_.MergeFrom(from.blobs_);
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void BlobProtoVector::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.BlobProtoVector)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool BlobProtoVector::IsInitialized() const {

  return true;
}

void BlobProtoVector::Swap(BlobProtoVector* other) {
  if (other == this) return;
  InternalSwap(other);
}
void BlobProtoVector::InternalSwap(BlobProtoVector* other) {
  blobs_.UnsafeArenaSwap(&other->blobs_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata BlobProtoVector::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = BlobProtoVector_descriptor_;
  metadata.reflection = BlobProtoVector_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// BlobProtoVector

// repeated .caffe.BlobProto blobs = 1;
int BlobProtoVector::blobs_size() const {
  return blobs_.size();
}
void BlobProtoVector::clear_blobs() {
  blobs_.Clear();
}
const ::caffe::BlobProto& BlobProtoVector::blobs(int index) const {
  // @@protoc_insertion_point(field_get:caffe.BlobProtoVector.blobs)
  return blobs_.Get(index);
}
::caffe::BlobProto* BlobProtoVector::mutable_blobs(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.BlobProtoVector.blobs)
  return blobs_.Mutable(index);
}
::caffe::BlobProto* BlobProtoVector::add_blobs() {
  // @@protoc_insertion_point(field_add:caffe.BlobProtoVector.blobs)
  return blobs_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::BlobProto >*
BlobProtoVector::mutable_blobs() {
  // @@protoc_insertion_point(field_mutable_list:caffe.BlobProtoVector.blobs)
  return &blobs_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::BlobProto >&
BlobProtoVector::blobs() const {
  // @@protoc_insertion_point(field_list:caffe.BlobProtoVector.blobs)
  return blobs_;
}

inline const BlobProtoVector* BlobProtoVector::internal_default_instance() {
  return &BlobProtoVector_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int CropParameter::kAxisFieldNumber;
const int CropParameter::kOffsetFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

CropParameter::CropParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.CropParameter)
}

void CropParameter::InitAsDefaultInstance() {
}

CropParameter::CropParameter(const CropParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.CropParameter)
}

void CropParameter::SharedCtor() {
  _cached_size_ = 0;
  axis_ = 2;
}

CropParameter::~CropParameter() {
  // @@protoc_insertion_point(destructor:caffe.CropParameter)
  SharedDtor();
}

void CropParameter::SharedDtor() {
}

void CropParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* CropParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return CropParameter_descriptor_;
}

const CropParameter& CropParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<CropParameter> CropParameter_default_instance_;

CropParameter* CropParameter::New(::google::protobuf::Arena* arena) const {
  CropParameter* n = new CropParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void CropParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.CropParameter)
  axis_ = 2;
  offset_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool CropParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.CropParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 axis = 1 [default = 2];
      case 1: {
        if (tag == 8) {
          set_has_axis();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &axis_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_offset;
        break;
      }

      // repeated uint32 offset = 2;
      case 2: {
        if (tag == 16) {
         parse_offset:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 1, 16, input, this->mutable_offset())));
        } else if (tag == 18) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_offset())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_offset;
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.CropParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.CropParameter)
  return false;
#undef DO_
}

void CropParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.CropParameter)
  // optional int32 axis = 1 [default = 2];
  if (has_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->axis(), output);
  }

  // repeated uint32 offset = 2;
  for (int i = 0; i < this->offset_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      2, this->offset(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.CropParameter)
}

::google::protobuf::uint8* CropParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.CropParameter)
  // optional int32 axis = 1 [default = 2];
  if (has_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->axis(), target);
  }

  // repeated uint32 offset = 2;
  for (int i = 0; i < this->offset_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32ToArray(2, this->offset(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // optional int32 axis = 1 [default = 2];
  if (has_axis()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->axis());
  }

  // repeated uint32 offset = 2;
  {
    size_t data_size = 0;
    unsigned int count = this->offset_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->offset(i));
    }
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->offset_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void CropParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.CropParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const CropParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const CropParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.CropParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.CropParameter)
    UnsafeMergeFrom(*source);
  }
}

void CropParameter::MergeFrom(const CropParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.CropParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void CropParameter::UnsafeMergeFrom(const CropParameter& from) {
  GOOGLE_DCHECK(&from != this);
  offset_.UnsafeMergeFrom(from.offset_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_axis()) {
      set_axis(from.axis());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void CropParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.CropParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool CropParameter::IsInitialized() const {

  return true;
}

void CropParameter::Swap(CropParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void CropParameter::InternalSwap(CropParameter* other) {
  std::swap(axis_, other->axis_);
  offset_.UnsafeArenaSwap(&other->offset_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata CropParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = CropParameter_descriptor_;
  metadata.reflection = CropParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// CropParameter

// optional int32 axis = 1 [default = 2];
bool CropParameter::has_axis() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void CropParameter::set_has_axis() {
  _has_bits_[0] |= 0x00000001u;
}
void CropParameter::clear_has_axis() {
  _has_bits_[0] &= ~0x00000001u;
}
void CropParameter::clear_axis() {
  axis_ = 2;
  clear_has_axis();
}
::google::protobuf::int32 CropParameter::axis() const {
  // @@protoc_insertion_point(field_get:caffe.CropParameter.axis)
  return axis_;
}
void CropParameter::set_axis(::google::protobuf::int32 value) {
  set_has_axis();
  axis_ = value;
  // @@protoc_insertion_point(field_set:caffe.CropParameter.axis)
}

// repeated uint32 offset = 2;
int CropParameter::offset_size() const {
  return offset_.size();
}
void CropParameter::clear_offset() {
  offset_.Clear();
}
::google::protobuf::uint32 CropParameter::offset(int index) const {
  // @@protoc_insertion_point(field_get:caffe.CropParameter.offset)
  return offset_.Get(index);
}
void CropParameter::set_offset(int index, ::google::protobuf::uint32 value) {
  offset_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.CropParameter.offset)
}
void CropParameter::add_offset(::google::protobuf::uint32 value) {
  offset_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.CropParameter.offset)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
CropParameter::offset() const {
  // @@protoc_insertion_point(field_list:caffe.CropParameter.offset)
  return offset_;
}
::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
CropParameter::mutable_offset() {
  // @@protoc_insertion_point(field_mutable_list:caffe.CropParameter.offset)
  return &offset_;
}

inline const CropParameter* CropParameter::internal_default_instance() {
  return &CropParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int PermuteParameter::kOrderFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

PermuteParameter::PermuteParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.PermuteParameter)
}

void PermuteParameter::InitAsDefaultInstance() {
}

PermuteParameter::PermuteParameter(const PermuteParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.PermuteParameter)
}

void PermuteParameter::SharedCtor() {
  _cached_size_ = 0;
}

PermuteParameter::~PermuteParameter() {
  // @@protoc_insertion_point(destructor:caffe.PermuteParameter)
  SharedDtor();
}

void PermuteParameter::SharedDtor() {
}

void PermuteParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* PermuteParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PermuteParameter_descriptor_;
}

const PermuteParameter& PermuteParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<PermuteParameter> PermuteParameter_default_instance_;

PermuteParameter* PermuteParameter::New(::google::protobuf::Arena* arena) const {
  PermuteParameter* n = new PermuteParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void PermuteParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.PermuteParameter)
  order_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool PermuteParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.PermuteParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated uint32 order = 1;
      case 1: {
        if (tag == 8) {
         parse_order:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 1, 8, input, this->mutable_order())));
        } else if (tag == 10) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_order())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(8)) goto parse_order;
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.PermuteParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.PermuteParameter)
  return false;
#undef DO_
}

void PermuteParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.PermuteParameter)
  // repeated uint32 order = 1;
  for (int i = 0; i < this->order_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      1, this->order(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.PermuteParameter)
}

::google::protobuf::uint8* PermuteParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.PermuteParameter)
  // repeated uint32 order = 1;
  for (int i = 0; i < this->order_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32ToArray(1, this->order(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // repeated uint32 order = 1;
  {
    size_t data_size = 0;
    unsigned int count = this->order_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->order(i));
    }
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->order_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void PermuteParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.PermuteParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const PermuteParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const PermuteParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.PermuteParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.PermuteParameter)
    UnsafeMergeFrom(*source);
  }
}

void PermuteParameter::MergeFrom(const PermuteParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PermuteParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void PermuteParameter::UnsafeMergeFrom(const PermuteParameter& from) {
  GOOGLE_DCHECK(&from != this);
  order_.UnsafeMergeFrom(from.order_);
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void PermuteParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.PermuteParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool PermuteParameter::IsInitialized() const {

  return true;
}

void PermuteParameter::Swap(PermuteParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void PermuteParameter::InternalSwap(PermuteParameter* other) {
  order_.UnsafeArenaSwap(&other->order_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata PermuteParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = PermuteParameter_descriptor_;
  metadata.reflection = PermuteParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// PermuteParameter

// repeated uint32 order = 1;
int PermuteParameter::order_size() const {
  return order_.size();
}
void PermuteParameter::clear_order() {
  order_.Clear();
}
::google::protobuf::uint32 PermuteParameter::order(int index) const {
  // @@protoc_insertion_point(field_get:caffe.PermuteParameter.order)
  return order_.Get(index);
}
void PermuteParameter::set_order(int index, ::google::protobuf::uint32 value) {
  order_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.PermuteParameter.order)
}
void PermuteParameter::add_order(::google::protobuf::uint32 value) {
  order_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.PermuteParameter.order)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
PermuteParameter::order() const {
  // @@protoc_insertion_point(field_list:caffe.PermuteParameter.order)
  return order_;
}
::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
PermuteParameter::mutable_order() {
  // @@protoc_insertion_point(field_mutable_list:caffe.PermuteParameter.order)
  return &order_;
}

inline const PermuteParameter* PermuteParameter::internal_default_instance() {
  return &PermuteParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NormalizeBBoxParameter::kAcrossSpatialFieldNumber;
const int NormalizeBBoxParameter::kScaleFillerFieldNumber;
const int NormalizeBBoxParameter::kChannelSharedFieldNumber;
const int NormalizeBBoxParameter::kEpsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

NormalizeBBoxParameter::NormalizeBBoxParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.NormalizeBBoxParameter)
}

void NormalizeBBoxParameter::InitAsDefaultInstance() {
  scale_filler_ = const_cast< ::caffe::FillerParameter*>(
      ::caffe::FillerParameter::internal_default_instance());
}

NormalizeBBoxParameter::NormalizeBBoxParameter(const NormalizeBBoxParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.NormalizeBBoxParameter)
}

void NormalizeBBoxParameter::SharedCtor() {
  _cached_size_ = 0;
  scale_filler_ = NULL;
  across_spatial_ = true;
  channel_shared_ = true;
  eps_ = 1e-10f;
}

NormalizeBBoxParameter::~NormalizeBBoxParameter() {
  // @@protoc_insertion_point(destructor:caffe.NormalizeBBoxParameter)
  SharedDtor();
}

void NormalizeBBoxParameter::SharedDtor() {
  if (this != &NormalizeBBoxParameter_default_instance_.get()) {
    delete scale_filler_;
  }
}

void NormalizeBBoxParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NormalizeBBoxParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return NormalizeBBoxParameter_descriptor_;
}

const NormalizeBBoxParameter& NormalizeBBoxParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<NormalizeBBoxParameter> NormalizeBBoxParameter_default_instance_;

NormalizeBBoxParameter* NormalizeBBoxParameter::New(::google::protobuf::Arena* arena) const {
  NormalizeBBoxParameter* n = new NormalizeBBoxParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void NormalizeBBoxParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.NormalizeBBoxParameter)
  if (_has_bits_[0 / 32] & 15u) {
    across_spatial_ = true;
    if (has_scale_filler()) {
      if (scale_filler_ != NULL) scale_filler_->::caffe::FillerParameter::Clear();
    }
    channel_shared_ = true;
    eps_ = 1e-10f;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool NormalizeBBoxParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.NormalizeBBoxParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional bool across_spatial = 1 [default = true];
      case 1: {
        if (tag == 8) {
          set_has_across_spatial();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &across_spatial_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_scale_filler;
        break;
      }

      // optional .caffe.FillerParameter scale_filler = 2;
      case 2: {
        if (tag == 18) {
         parse_scale_filler:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_scale_filler()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_channel_shared;
        break;
      }

      // optional bool channel_shared = 3 [default = true];
      case 3: {
        if (tag == 24) {
         parse_channel_shared:
          set_has_channel_shared();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &channel_shared_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(37)) goto parse_eps;
        break;
      }

      // optional float eps = 4 [default = 1e-10];
      case 4: {
        if (tag == 37) {
         parse_eps:
          set_has_eps();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &eps_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.NormalizeBBoxParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.NormalizeBBoxParameter)
  return false;
#undef DO_
}

void NormalizeBBoxParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.NormalizeBBoxParameter)
  // optional bool across_spatial = 1 [default = true];
  if (has_across_spatial()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->across_spatial(), output);
  }

  // optional .caffe.FillerParameter scale_filler = 2;
  if (has_scale_filler()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, *this->scale_filler_, output);
  }

  // optional bool channel_shared = 3 [default = true];
  if (has_channel_shared()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->channel_shared(), output);
  }

  // optional float eps = 4 [default = 1e-10];
  if (has_eps()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->eps(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.NormalizeBBoxParameter)
}

::google::protobuf::uint8* NormalizeBBoxParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.NormalizeBBoxParameter)
  // optional bool across_spatial = 1 [default = true];
  if (has_across_spatial()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->across_spatial(), target);
  }

  // optional .caffe.FillerParameter scale_filler = 2;
  if (has_scale_filler()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        2, *this->scale_filler_, false, target);
  }

  // optional bool channel_shared = 3 [default = true];
  if (has_channel_shared()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->channel_shared(), target);
  }

  // optional float eps = 4 [default = 1e-10];
  if (has_eps()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->eps(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:caffe.NormalizeBBoxParameter)
  return target;
}

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

  if (_has_bits_[0 / 32] & 15u) {
    // optional bool across_spatial = 1 [default = true];
    if (has_across_spatial()) {
      total_size += 1 + 1;
    }

    // optional .caffe.FillerParameter scale_filler = 2;
    if (has_scale_filler()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->scale_filler_);
    }

    // optional bool channel_shared = 3 [default = true];
    if (has_channel_shared()) {
      total_size += 1 + 1;
    }

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

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void NormalizeBBoxParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.NormalizeBBoxParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const NormalizeBBoxParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const NormalizeBBoxParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.NormalizeBBoxParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.NormalizeBBoxParameter)
    UnsafeMergeFrom(*source);
  }
}

void NormalizeBBoxParameter::MergeFrom(const NormalizeBBoxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NormalizeBBoxParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void NormalizeBBoxParameter::UnsafeMergeFrom(const NormalizeBBoxParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_across_spatial()) {
      set_across_spatial(from.across_spatial());
    }
    if (from.has_scale_filler()) {
      mutable_scale_filler()->::caffe::FillerParameter::MergeFrom(from.scale_filler());
    }
    if (from.has_channel_shared()) {
      set_channel_shared(from.channel_shared());
    }
    if (from.has_eps()) {
      set_eps(from.eps());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void NormalizeBBoxParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.NormalizeBBoxParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool NormalizeBBoxParameter::IsInitialized() const {

  return true;
}

void NormalizeBBoxParameter::Swap(NormalizeBBoxParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void NormalizeBBoxParameter::InternalSwap(NormalizeBBoxParameter* other) {
  std::swap(across_spatial_, other->across_spatial_);
  std::swap(scale_filler_, other->scale_filler_);
  std::swap(channel_shared_, other->channel_shared_);
  std::swap(eps_, other->eps_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata NormalizeBBoxParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = NormalizeBBoxParameter_descriptor_;
  metadata.reflection = NormalizeBBoxParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// NormalizeBBoxParameter

// optional bool across_spatial = 1 [default = true];
bool NormalizeBBoxParameter::has_across_spatial() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void NormalizeBBoxParameter::set_has_across_spatial() {
  _has_bits_[0] |= 0x00000001u;
}
void NormalizeBBoxParameter::clear_has_across_spatial() {
  _has_bits_[0] &= ~0x00000001u;
}
void NormalizeBBoxParameter::clear_across_spatial() {
  across_spatial_ = true;
  clear_has_across_spatial();
}
bool NormalizeBBoxParameter::across_spatial() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizeBBoxParameter.across_spatial)
  return across_spatial_;
}
void NormalizeBBoxParameter::set_across_spatial(bool value) {
  set_has_across_spatial();
  across_spatial_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizeBBoxParameter.across_spatial)
}

// optional .caffe.FillerParameter scale_filler = 2;
bool NormalizeBBoxParameter::has_scale_filler() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void NormalizeBBoxParameter::set_has_scale_filler() {
  _has_bits_[0] |= 0x00000002u;
}
void NormalizeBBoxParameter::clear_has_scale_filler() {
  _has_bits_[0] &= ~0x00000002u;
}
void NormalizeBBoxParameter::clear_scale_filler() {
  if (scale_filler_ != NULL) scale_filler_->::caffe::FillerParameter::Clear();
  clear_has_scale_filler();
}
const ::caffe::FillerParameter& NormalizeBBoxParameter::scale_filler() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizeBBoxParameter.scale_filler)
  return scale_filler_ != NULL ? *scale_filler_
                         : *::caffe::FillerParameter::internal_default_instance();
}
::caffe::FillerParameter* NormalizeBBoxParameter::mutable_scale_filler() {
  set_has_scale_filler();
  if (scale_filler_ == NULL) {
    scale_filler_ = new ::caffe::FillerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.NormalizeBBoxParameter.scale_filler)
  return scale_filler_;
}
::caffe::FillerParameter* NormalizeBBoxParameter::release_scale_filler() {
  // @@protoc_insertion_point(field_release:caffe.NormalizeBBoxParameter.scale_filler)
  clear_has_scale_filler();
  ::caffe::FillerParameter* temp = scale_filler_;
  scale_filler_ = NULL;
  return temp;
}
void NormalizeBBoxParameter::set_allocated_scale_filler(::caffe::FillerParameter* scale_filler) {
  delete scale_filler_;
  scale_filler_ = scale_filler;
  if (scale_filler) {
    set_has_scale_filler();
  } else {
    clear_has_scale_filler();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.NormalizeBBoxParameter.scale_filler)
}

// optional bool channel_shared = 3 [default = true];
bool NormalizeBBoxParameter::has_channel_shared() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void NormalizeBBoxParameter::set_has_channel_shared() {
  _has_bits_[0] |= 0x00000004u;
}
void NormalizeBBoxParameter::clear_has_channel_shared() {
  _has_bits_[0] &= ~0x00000004u;
}
void NormalizeBBoxParameter::clear_channel_shared() {
  channel_shared_ = true;
  clear_has_channel_shared();
}
bool NormalizeBBoxParameter::channel_shared() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizeBBoxParameter.channel_shared)
  return channel_shared_;
}
void NormalizeBBoxParameter::set_channel_shared(bool value) {
  set_has_channel_shared();
  channel_shared_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizeBBoxParameter.channel_shared)
}

// optional float eps = 4 [default = 1e-10];
bool NormalizeBBoxParameter::has_eps() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void NormalizeBBoxParameter::set_has_eps() {
  _has_bits_[0] |= 0x00000008u;
}
void NormalizeBBoxParameter::clear_has_eps() {
  _has_bits_[0] &= ~0x00000008u;
}
void NormalizeBBoxParameter::clear_eps() {
  eps_ = 1e-10f;
  clear_has_eps();
}
float NormalizeBBoxParameter::eps() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizeBBoxParameter.eps)
  return eps_;
}
void NormalizeBBoxParameter::set_eps(float value) {
  set_has_eps();
  eps_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizeBBoxParameter.eps)
}

inline const NormalizeBBoxParameter* NormalizeBBoxParameter::internal_default_instance() {
  return &NormalizeBBoxParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* PriorBoxParameter_CodeType_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PriorBoxParameter_CodeType_descriptor_;
}
bool PriorBoxParameter_CodeType_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const PriorBoxParameter_CodeType PriorBoxParameter::CORNER;
const PriorBoxParameter_CodeType PriorBoxParameter::CENTER_SIZE;
const PriorBoxParameter_CodeType PriorBoxParameter::CodeType_MIN;
const PriorBoxParameter_CodeType PriorBoxParameter::CodeType_MAX;
const int PriorBoxParameter::CodeType_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int PriorBoxParameter::kMinSizeFieldNumber;
const int PriorBoxParameter::kMaxSizeFieldNumber;
const int PriorBoxParameter::kAspectRatioFieldNumber;
const int PriorBoxParameter::kFlipFieldNumber;
const int PriorBoxParameter::kClipFieldNumber;
const int PriorBoxParameter::kVarianceFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

PriorBoxParameter::PriorBoxParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.PriorBoxParameter)
}

void PriorBoxParameter::InitAsDefaultInstance() {
}

PriorBoxParameter::PriorBoxParameter(const PriorBoxParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.PriorBoxParameter)
}

void PriorBoxParameter::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&min_size_, 0, reinterpret_cast<char*>(&max_size_) -
    reinterpret_cast<char*>(&min_size_) + sizeof(max_size_));
  flip_ = true;
  clip_ = true;
}

PriorBoxParameter::~PriorBoxParameter() {
  // @@protoc_insertion_point(destructor:caffe.PriorBoxParameter)
  SharedDtor();
}

void PriorBoxParameter::SharedDtor() {
}

void PriorBoxParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* PriorBoxParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PriorBoxParameter_descriptor_;
}

const PriorBoxParameter& PriorBoxParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<PriorBoxParameter> PriorBoxParameter_default_instance_;

PriorBoxParameter* PriorBoxParameter::New(::google::protobuf::Arena* arena) const {
  PriorBoxParameter* n = new PriorBoxParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void PriorBoxParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.PriorBoxParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(PriorBoxParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<PriorBoxParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 27u) {
    ZR_(min_size_, max_size_);
    flip_ = true;
    clip_ = true;
  }

#undef ZR_HELPER_
#undef ZR_

  aspect_ratio_.Clear();
  variance_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool PriorBoxParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.PriorBoxParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float min_size = 1;
      case 1: {
        if (tag == 13) {
          set_has_min_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &min_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_max_size;
        break;
      }

      // optional float max_size = 2;
      case 2: {
        if (tag == 21) {
         parse_max_size:
          set_has_max_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &max_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_aspect_ratio;
        break;
      }

      // repeated float aspect_ratio = 3;
      case 3: {
        if (tag == 29) {
         parse_aspect_ratio:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 29, input, this->mutable_aspect_ratio())));
        } else if (tag == 26) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_aspect_ratio())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_aspect_ratio;
        if (input->ExpectTag(32)) goto parse_flip;
        break;
      }

      // optional bool flip = 4 [default = true];
      case 4: {
        if (tag == 32) {
         parse_flip:
          set_has_flip();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &flip_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_clip;
        break;
      }

      // optional bool clip = 5 [default = true];
      case 5: {
        if (tag == 40) {
         parse_clip:
          set_has_clip();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &clip_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(53)) goto parse_variance;
        break;
      }

      // repeated float variance = 6;
      case 6: {
        if (tag == 53) {
         parse_variance:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 53, input, this->mutable_variance())));
        } else if (tag == 50) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_variance())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(53)) goto parse_variance;
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.PriorBoxParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.PriorBoxParameter)
  return false;
#undef DO_
}

void PriorBoxParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.PriorBoxParameter)
  // optional float min_size = 1;
  if (has_min_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->min_size(), output);
  }

  // optional float max_size = 2;
  if (has_max_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->max_size(), output);
  }

  // repeated float aspect_ratio = 3;
  for (int i = 0; i < this->aspect_ratio_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      3, this->aspect_ratio(i), output);
  }

  // optional bool flip = 4 [default = true];
  if (has_flip()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->flip(), output);
  }

  // optional bool clip = 5 [default = true];
  if (has_clip()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->clip(), output);
  }

  // repeated float variance = 6;
  for (int i = 0; i < this->variance_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      6, this->variance(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.PriorBoxParameter)
}

::google::protobuf::uint8* PriorBoxParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.PriorBoxParameter)
  // optional float min_size = 1;
  if (has_min_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->min_size(), target);
  }

  // optional float max_size = 2;
  if (has_max_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->max_size(), target);
  }

  // repeated float aspect_ratio = 3;
  for (int i = 0; i < this->aspect_ratio_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(3, this->aspect_ratio(i), target);
  }

  // optional bool flip = 4 [default = true];
  if (has_flip()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->flip(), target);
  }

  // optional bool clip = 5 [default = true];
  if (has_clip()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->clip(), target);
  }

  // repeated float variance = 6;
  for (int i = 0; i < this->variance_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(6, this->variance(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 27u) {
    // optional float min_size = 1;
    if (has_min_size()) {
      total_size += 1 + 4;
    }

    // optional float max_size = 2;
    if (has_max_size()) {
      total_size += 1 + 4;
    }

    // optional bool flip = 4 [default = true];
    if (has_flip()) {
      total_size += 1 + 1;
    }

    // optional bool clip = 5 [default = true];
    if (has_clip()) {
      total_size += 1 + 1;
    }

  }
  // repeated float aspect_ratio = 3;
  {
    size_t data_size = 0;
    unsigned int count = this->aspect_ratio_size();
    data_size = 4UL * count;
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->aspect_ratio_size());
    total_size += data_size;
  }

  // repeated float variance = 6;
  {
    size_t data_size = 0;
    unsigned int count = this->variance_size();
    data_size = 4UL * count;
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->variance_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void PriorBoxParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.PriorBoxParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const PriorBoxParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const PriorBoxParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.PriorBoxParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.PriorBoxParameter)
    UnsafeMergeFrom(*source);
  }
}

void PriorBoxParameter::MergeFrom(const PriorBoxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PriorBoxParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void PriorBoxParameter::UnsafeMergeFrom(const PriorBoxParameter& from) {
  GOOGLE_DCHECK(&from != this);
  aspect_ratio_.UnsafeMergeFrom(from.aspect_ratio_);
  variance_.UnsafeMergeFrom(from.variance_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_min_size()) {
      set_min_size(from.min_size());
    }
    if (from.has_max_size()) {
      set_max_size(from.max_size());
    }
    if (from.has_flip()) {
      set_flip(from.flip());
    }
    if (from.has_clip()) {
      set_clip(from.clip());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void PriorBoxParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.PriorBoxParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool PriorBoxParameter::IsInitialized() const {

  return true;
}

void PriorBoxParameter::Swap(PriorBoxParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void PriorBoxParameter::InternalSwap(PriorBoxParameter* other) {
  std::swap(min_size_, other->min_size_);
  std::swap(max_size_, other->max_size_);
  aspect_ratio_.UnsafeArenaSwap(&other->aspect_ratio_);
  std::swap(flip_, other->flip_);
  std::swap(clip_, other->clip_);
  variance_.UnsafeArenaSwap(&other->variance_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata PriorBoxParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = PriorBoxParameter_descriptor_;
  metadata.reflection = PriorBoxParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// PriorBoxParameter

// optional float min_size = 1;
bool PriorBoxParameter::has_min_size() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void PriorBoxParameter::set_has_min_size() {
  _has_bits_[0] |= 0x00000001u;
}
void PriorBoxParameter::clear_has_min_size() {
  _has_bits_[0] &= ~0x00000001u;
}
void PriorBoxParameter::clear_min_size() {
  min_size_ = 0;
  clear_has_min_size();
}
float PriorBoxParameter::min_size() const {
  // @@protoc_insertion_point(field_get:caffe.PriorBoxParameter.min_size)
  return min_size_;
}
void PriorBoxParameter::set_min_size(float value) {
  set_has_min_size();
  min_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.PriorBoxParameter.min_size)
}

// optional float max_size = 2;
bool PriorBoxParameter::has_max_size() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void PriorBoxParameter::set_has_max_size() {
  _has_bits_[0] |= 0x00000002u;
}
void PriorBoxParameter::clear_has_max_size() {
  _has_bits_[0] &= ~0x00000002u;
}
void PriorBoxParameter::clear_max_size() {
  max_size_ = 0;
  clear_has_max_size();
}
float PriorBoxParameter::max_size() const {
  // @@protoc_insertion_point(field_get:caffe.PriorBoxParameter.max_size)
  return max_size_;
}
void PriorBoxParameter::set_max_size(float value) {
  set_has_max_size();
  max_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.PriorBoxParameter.max_size)
}

// repeated float aspect_ratio = 3;
int PriorBoxParameter::aspect_ratio_size() const {
  return aspect_ratio_.size();
}
void PriorBoxParameter::clear_aspect_ratio() {
  aspect_ratio_.Clear();
}
float PriorBoxParameter::aspect_ratio(int index) const {
  // @@protoc_insertion_point(field_get:caffe.PriorBoxParameter.aspect_ratio)
  return aspect_ratio_.Get(index);
}
void PriorBoxParameter::set_aspect_ratio(int index, float value) {
  aspect_ratio_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.PriorBoxParameter.aspect_ratio)
}
void PriorBoxParameter::add_aspect_ratio(float value) {
  aspect_ratio_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.PriorBoxParameter.aspect_ratio)
}
const ::google::protobuf::RepeatedField< float >&
PriorBoxParameter::aspect_ratio() const {
  // @@protoc_insertion_point(field_list:caffe.PriorBoxParameter.aspect_ratio)
  return aspect_ratio_;
}
::google::protobuf::RepeatedField< float >*
PriorBoxParameter::mutable_aspect_ratio() {
  // @@protoc_insertion_point(field_mutable_list:caffe.PriorBoxParameter.aspect_ratio)
  return &aspect_ratio_;
}

// optional bool flip = 4 [default = true];
bool PriorBoxParameter::has_flip() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void PriorBoxParameter::set_has_flip() {
  _has_bits_[0] |= 0x00000008u;
}
void PriorBoxParameter::clear_has_flip() {
  _has_bits_[0] &= ~0x00000008u;
}
void PriorBoxParameter::clear_flip() {
  flip_ = true;
  clear_has_flip();
}
bool PriorBoxParameter::flip() const {
  // @@protoc_insertion_point(field_get:caffe.PriorBoxParameter.flip)
  return flip_;
}
void PriorBoxParameter::set_flip(bool value) {
  set_has_flip();
  flip_ = value;
  // @@protoc_insertion_point(field_set:caffe.PriorBoxParameter.flip)
}

// optional bool clip = 5 [default = true];
bool PriorBoxParameter::has_clip() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void PriorBoxParameter::set_has_clip() {
  _has_bits_[0] |= 0x00000010u;
}
void PriorBoxParameter::clear_has_clip() {
  _has_bits_[0] &= ~0x00000010u;
}
void PriorBoxParameter::clear_clip() {
  clip_ = true;
  clear_has_clip();
}
bool PriorBoxParameter::clip() const {
  // @@protoc_insertion_point(field_get:caffe.PriorBoxParameter.clip)
  return clip_;
}
void PriorBoxParameter::set_clip(bool value) {
  set_has_clip();
  clip_ = value;
  // @@protoc_insertion_point(field_set:caffe.PriorBoxParameter.clip)
}

// repeated float variance = 6;
int PriorBoxParameter::variance_size() const {
  return variance_.size();
}
void PriorBoxParameter::clear_variance() {
  variance_.Clear();
}
float PriorBoxParameter::variance(int index) const {
  // @@protoc_insertion_point(field_get:caffe.PriorBoxParameter.variance)
  return variance_.Get(index);
}
void PriorBoxParameter::set_variance(int index, float value) {
  variance_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.PriorBoxParameter.variance)
}
void PriorBoxParameter::add_variance(float value) {
  variance_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.PriorBoxParameter.variance)
}
const ::google::protobuf::RepeatedField< float >&
PriorBoxParameter::variance() const {
  // @@protoc_insertion_point(field_list:caffe.PriorBoxParameter.variance)
  return variance_;
}
::google::protobuf::RepeatedField< float >*
PriorBoxParameter::mutable_variance() {
  // @@protoc_insertion_point(field_mutable_list:caffe.PriorBoxParameter.variance)
  return &variance_;
}

inline const PriorBoxParameter* PriorBoxParameter::internal_default_instance() {
  return &PriorBoxParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DetectionOutputParameter::kNumClassesFieldNumber;
const int DetectionOutputParameter::kShareLocationFieldNumber;
const int DetectionOutputParameter::kBackgroundLabelIdFieldNumber;
const int DetectionOutputParameter::kCodeTypeFieldNumber;
const int DetectionOutputParameter::kVarianceEncodedInTargetFieldNumber;
const int DetectionOutputParameter::kKeepTopKFieldNumber;
const int DetectionOutputParameter::kConfidenceThresholdFieldNumber;
const int DetectionOutputParameter::kNmsThresholdFieldNumber;
const int DetectionOutputParameter::kTopKFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DetectionOutputParameter::DetectionOutputParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.DetectionOutputParameter)
}

void DetectionOutputParameter::InitAsDefaultInstance() {
}

DetectionOutputParameter::DetectionOutputParameter(const DetectionOutputParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.DetectionOutputParameter)
}

void DetectionOutputParameter::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&num_classes_, 0, reinterpret_cast<char*>(&top_k_) -
    reinterpret_cast<char*>(&num_classes_) + sizeof(top_k_));
  share_location_ = true;
  code_type_ = 1;
  keep_top_k_ = -1;
  nms_threshold_ = 0.3f;
}

DetectionOutputParameter::~DetectionOutputParameter() {
  // @@protoc_insertion_point(destructor:caffe.DetectionOutputParameter)
  SharedDtor();
}

void DetectionOutputParameter::SharedDtor() {
}

void DetectionOutputParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DetectionOutputParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DetectionOutputParameter_descriptor_;
}

const DetectionOutputParameter& DetectionOutputParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<DetectionOutputParameter> DetectionOutputParameter_default_instance_;

DetectionOutputParameter* DetectionOutputParameter::New(::google::protobuf::Arena* arena) const {
  DetectionOutputParameter* n = new DetectionOutputParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DetectionOutputParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.DetectionOutputParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(DetectionOutputParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<DetectionOutputParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 255u) {
    ZR_(num_classes_, confidence_threshold_);
    share_location_ = true;
    code_type_ = 1;
    keep_top_k_ = -1;
    nms_threshold_ = 0.3f;
  }
  top_k_ = 0;

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool DetectionOutputParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.DetectionOutputParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint32 num_classes = 1;
      case 1: {
        if (tag == 8) {
          set_has_num_classes();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &num_classes_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_share_location;
        break;
      }

      // optional bool share_location = 2 [default = true];
      case 2: {
        if (tag == 16) {
         parse_share_location:
          set_has_share_location();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &share_location_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_background_label_id;
        break;
      }

      // optional int32 background_label_id = 3 [default = 0];
      case 3: {
        if (tag == 24) {
         parse_background_label_id:
          set_has_background_label_id();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &background_label_id_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_code_type;
        break;
      }

      // optional .caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
      case 6: {
        if (tag == 48) {
         parse_code_type:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::PriorBoxParameter_CodeType_IsValid(value)) {
            set_code_type(static_cast< ::caffe::PriorBoxParameter_CodeType >(value));
          } else {
            mutable_unknown_fields()->AddVarint(6, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(56)) goto parse_keep_top_k;
        break;
      }

      // optional int32 keep_top_k = 7 [default = -1];
      case 7: {
        if (tag == 56) {
         parse_keep_top_k:
          set_has_keep_top_k();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &keep_top_k_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(64)) goto parse_variance_encoded_in_target;
        break;
      }

      // optional bool variance_encoded_in_target = 8 [default = false];
      case 8: {
        if (tag == 64) {
         parse_variance_encoded_in_target:
          set_has_variance_encoded_in_target();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &variance_encoded_in_target_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(77)) goto parse_confidence_threshold;
        break;
      }

      // optional float confidence_threshold = 9;
      case 9: {
        if (tag == 77) {
         parse_confidence_threshold:
          set_has_confidence_threshold();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &confidence_threshold_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(85)) goto parse_nms_threshold;
        break;
      }

      // optional float nms_threshold = 10 [default = 0.3];
      case 10: {
        if (tag == 85) {
         parse_nms_threshold:
          set_has_nms_threshold();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &nms_threshold_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(88)) goto parse_top_k;
        break;
      }

      // optional int32 top_k = 11;
      case 11: {
        if (tag == 88) {
         parse_top_k:
          set_has_top_k();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &top_k_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.DetectionOutputParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.DetectionOutputParameter)
  return false;
#undef DO_
}

void DetectionOutputParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.DetectionOutputParameter)
  // optional uint32 num_classes = 1;
  if (has_num_classes()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->num_classes(), output);
  }

  // optional bool share_location = 2 [default = true];
  if (has_share_location()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->share_location(), output);
  }

  // optional int32 background_label_id = 3 [default = 0];
  if (has_background_label_id()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->background_label_id(), output);
  }

  // optional .caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
  if (has_code_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      6, this->code_type(), output);
  }

  // optional int32 keep_top_k = 7 [default = -1];
  if (has_keep_top_k()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->keep_top_k(), output);
  }

  // optional bool variance_encoded_in_target = 8 [default = false];
  if (has_variance_encoded_in_target()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->variance_encoded_in_target(), output);
  }

  // optional float confidence_threshold = 9;
  if (has_confidence_threshold()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(9, this->confidence_threshold(), output);
  }

  // optional float nms_threshold = 10 [default = 0.3];
  if (has_nms_threshold()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(10, this->nms_threshold(), output);
  }

  // optional int32 top_k = 11;
  if (has_top_k()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(11, this->top_k(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.DetectionOutputParameter)
}

::google::protobuf::uint8* DetectionOutputParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.DetectionOutputParameter)
  // optional uint32 num_classes = 1;
  if (has_num_classes()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->num_classes(), target);
  }

  // optional bool share_location = 2 [default = true];
  if (has_share_location()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->share_location(), target);
  }

  // optional int32 background_label_id = 3 [default = 0];
  if (has_background_label_id()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->background_label_id(), target);
  }

  // optional .caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
  if (has_code_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      6, this->code_type(), target);
  }

  // optional int32 keep_top_k = 7 [default = -1];
  if (has_keep_top_k()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->keep_top_k(), target);
  }

  // optional bool variance_encoded_in_target = 8 [default = false];
  if (has_variance_encoded_in_target()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, this->variance_encoded_in_target(), target);
  }

  // optional float confidence_threshold = 9;
  if (has_confidence_threshold()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, this->confidence_threshold(), target);
  }

  // optional float nms_threshold = 10 [default = 0.3];
  if (has_nms_threshold()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(10, this->nms_threshold(), target);
  }

  // optional int32 top_k = 11;
  if (has_top_k()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(11, this->top_k(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 255u) {
    // optional uint32 num_classes = 1;
    if (has_num_classes()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->num_classes());
    }

    // optional bool share_location = 2 [default = true];
    if (has_share_location()) {
      total_size += 1 + 1;
    }

    // optional int32 background_label_id = 3 [default = 0];
    if (has_background_label_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->background_label_id());
    }

    // optional .caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
    if (has_code_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->code_type());
    }

    // optional bool variance_encoded_in_target = 8 [default = false];
    if (has_variance_encoded_in_target()) {
      total_size += 1 + 1;
    }

    // optional int32 keep_top_k = 7 [default = -1];
    if (has_keep_top_k()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->keep_top_k());
    }

    // optional float confidence_threshold = 9;
    if (has_confidence_threshold()) {
      total_size += 1 + 4;
    }

    // optional float nms_threshold = 10 [default = 0.3];
    if (has_nms_threshold()) {
      total_size += 1 + 4;
    }

  }
  // optional int32 top_k = 11;
  if (has_top_k()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::Int32Size(
        this->top_k());
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DetectionOutputParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.DetectionOutputParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const DetectionOutputParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DetectionOutputParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.DetectionOutputParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.DetectionOutputParameter)
    UnsafeMergeFrom(*source);
  }
}

void DetectionOutputParameter::MergeFrom(const DetectionOutputParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.DetectionOutputParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void DetectionOutputParameter::UnsafeMergeFrom(const DetectionOutputParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_num_classes()) {
      set_num_classes(from.num_classes());
    }
    if (from.has_share_location()) {
      set_share_location(from.share_location());
    }
    if (from.has_background_label_id()) {
      set_background_label_id(from.background_label_id());
    }
    if (from.has_code_type()) {
      set_code_type(from.code_type());
    }
    if (from.has_variance_encoded_in_target()) {
      set_variance_encoded_in_target(from.variance_encoded_in_target());
    }
    if (from.has_keep_top_k()) {
      set_keep_top_k(from.keep_top_k());
    }
    if (from.has_confidence_threshold()) {
      set_confidence_threshold(from.confidence_threshold());
    }
    if (from.has_nms_threshold()) {
      set_nms_threshold(from.nms_threshold());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_top_k()) {
      set_top_k(from.top_k());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void DetectionOutputParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.DetectionOutputParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool DetectionOutputParameter::IsInitialized() const {

  return true;
}

void DetectionOutputParameter::Swap(DetectionOutputParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DetectionOutputParameter::InternalSwap(DetectionOutputParameter* other) {
  std::swap(num_classes_, other->num_classes_);
  std::swap(share_location_, other->share_location_);
  std::swap(background_label_id_, other->background_label_id_);
  std::swap(code_type_, other->code_type_);
  std::swap(variance_encoded_in_target_, other->variance_encoded_in_target_);
  std::swap(keep_top_k_, other->keep_top_k_);
  std::swap(confidence_threshold_, other->confidence_threshold_);
  std::swap(nms_threshold_, other->nms_threshold_);
  std::swap(top_k_, other->top_k_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DetectionOutputParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DetectionOutputParameter_descriptor_;
  metadata.reflection = DetectionOutputParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DetectionOutputParameter

// optional uint32 num_classes = 1;
bool DetectionOutputParameter::has_num_classes() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void DetectionOutputParameter::set_has_num_classes() {
  _has_bits_[0] |= 0x00000001u;
}
void DetectionOutputParameter::clear_has_num_classes() {
  _has_bits_[0] &= ~0x00000001u;
}
void DetectionOutputParameter::clear_num_classes() {
  num_classes_ = 0u;
  clear_has_num_classes();
}
::google::protobuf::uint32 DetectionOutputParameter::num_classes() const {
  // @@protoc_insertion_point(field_get:caffe.DetectionOutputParameter.num_classes)
  return num_classes_;
}
void DetectionOutputParameter::set_num_classes(::google::protobuf::uint32 value) {
  set_has_num_classes();
  num_classes_ = value;
  // @@protoc_insertion_point(field_set:caffe.DetectionOutputParameter.num_classes)
}

// optional bool share_location = 2 [default = true];
bool DetectionOutputParameter::has_share_location() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void DetectionOutputParameter::set_has_share_location() {
  _has_bits_[0] |= 0x00000002u;
}
void DetectionOutputParameter::clear_has_share_location() {
  _has_bits_[0] &= ~0x00000002u;
}
void DetectionOutputParameter::clear_share_location() {
  share_location_ = true;
  clear_has_share_location();
}
bool DetectionOutputParameter::share_location() const {
  // @@protoc_insertion_point(field_get:caffe.DetectionOutputParameter.share_location)
  return share_location_;
}
void DetectionOutputParameter::set_share_location(bool value) {
  set_has_share_location();
  share_location_ = value;
  // @@protoc_insertion_point(field_set:caffe.DetectionOutputParameter.share_location)
}

// optional int32 background_label_id = 3 [default = 0];
bool DetectionOutputParameter::has_background_label_id() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void DetectionOutputParameter::set_has_background_label_id() {
  _has_bits_[0] |= 0x00000004u;
}
void DetectionOutputParameter::clear_has_background_label_id() {
  _has_bits_[0] &= ~0x00000004u;
}
void DetectionOutputParameter::clear_background_label_id() {
  background_label_id_ = 0;
  clear_has_background_label_id();
}
::google::protobuf::int32 DetectionOutputParameter::background_label_id() const {
  // @@protoc_insertion_point(field_get:caffe.DetectionOutputParameter.background_label_id)
  return background_label_id_;
}
void DetectionOutputParameter::set_background_label_id(::google::protobuf::int32 value) {
  set_has_background_label_id();
  background_label_id_ = value;
  // @@protoc_insertion_point(field_set:caffe.DetectionOutputParameter.background_label_id)
}

// optional .caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
bool DetectionOutputParameter::has_code_type() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void DetectionOutputParameter::set_has_code_type() {
  _has_bits_[0] |= 0x00000008u;
}
void DetectionOutputParameter::clear_has_code_type() {
  _has_bits_[0] &= ~0x00000008u;
}
void DetectionOutputParameter::clear_code_type() {
  code_type_ = 1;
  clear_has_code_type();
}
::caffe::PriorBoxParameter_CodeType DetectionOutputParameter::code_type() const {
  // @@protoc_insertion_point(field_get:caffe.DetectionOutputParameter.code_type)
  return static_cast< ::caffe::PriorBoxParameter_CodeType >(code_type_);
}
void DetectionOutputParameter::set_code_type(::caffe::PriorBoxParameter_CodeType value) {
  assert(::caffe::PriorBoxParameter_CodeType_IsValid(value));
  set_has_code_type();
  code_type_ = value;
  // @@protoc_insertion_point(field_set:caffe.DetectionOutputParameter.code_type)
}

// optional bool variance_encoded_in_target = 8 [default = false];
bool DetectionOutputParameter::has_variance_encoded_in_target() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void DetectionOutputParameter::set_has_variance_encoded_in_target() {
  _has_bits_[0] |= 0x00000010u;
}
void DetectionOutputParameter::clear_has_variance_encoded_in_target() {
  _has_bits_[0] &= ~0x00000010u;
}
void DetectionOutputParameter::clear_variance_encoded_in_target() {
  variance_encoded_in_target_ = false;
  clear_has_variance_encoded_in_target();
}
bool DetectionOutputParameter::variance_encoded_in_target() const {
  // @@protoc_insertion_point(field_get:caffe.DetectionOutputParameter.variance_encoded_in_target)
  return variance_encoded_in_target_;
}
void DetectionOutputParameter::set_variance_encoded_in_target(bool value) {
  set_has_variance_encoded_in_target();
  variance_encoded_in_target_ = value;
  // @@protoc_insertion_point(field_set:caffe.DetectionOutputParameter.variance_encoded_in_target)
}

// optional int32 keep_top_k = 7 [default = -1];
bool DetectionOutputParameter::has_keep_top_k() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void DetectionOutputParameter::set_has_keep_top_k() {
  _has_bits_[0] |= 0x00000020u;
}
void DetectionOutputParameter::clear_has_keep_top_k() {
  _has_bits_[0] &= ~0x00000020u;
}
void DetectionOutputParameter::clear_keep_top_k() {
  keep_top_k_ = -1;
  clear_has_keep_top_k();
}
::google::protobuf::int32 DetectionOutputParameter::keep_top_k() const {
  // @@protoc_insertion_point(field_get:caffe.DetectionOutputParameter.keep_top_k)
  return keep_top_k_;
}
void DetectionOutputParameter::set_keep_top_k(::google::protobuf::int32 value) {
  set_has_keep_top_k();
  keep_top_k_ = value;
  // @@protoc_insertion_point(field_set:caffe.DetectionOutputParameter.keep_top_k)
}

// optional float confidence_threshold = 9;
bool DetectionOutputParameter::has_confidence_threshold() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void DetectionOutputParameter::set_has_confidence_threshold() {
  _has_bits_[0] |= 0x00000040u;
}
void DetectionOutputParameter::clear_has_confidence_threshold() {
  _has_bits_[0] &= ~0x00000040u;
}
void DetectionOutputParameter::clear_confidence_threshold() {
  confidence_threshold_ = 0;
  clear_has_confidence_threshold();
}
float DetectionOutputParameter::confidence_threshold() const {
  // @@protoc_insertion_point(field_get:caffe.DetectionOutputParameter.confidence_threshold)
  return confidence_threshold_;
}
void DetectionOutputParameter::set_confidence_threshold(float value) {
  set_has_confidence_threshold();
  confidence_threshold_ = value;
  // @@protoc_insertion_point(field_set:caffe.DetectionOutputParameter.confidence_threshold)
}

// optional float nms_threshold = 10 [default = 0.3];
bool DetectionOutputParameter::has_nms_threshold() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
void DetectionOutputParameter::set_has_nms_threshold() {
  _has_bits_[0] |= 0x00000080u;
}
void DetectionOutputParameter::clear_has_nms_threshold() {
  _has_bits_[0] &= ~0x00000080u;
}
void DetectionOutputParameter::clear_nms_threshold() {
  nms_threshold_ = 0.3f;
  clear_has_nms_threshold();
}
float DetectionOutputParameter::nms_threshold() const {
  // @@protoc_insertion_point(field_get:caffe.DetectionOutputParameter.nms_threshold)
  return nms_threshold_;
}
void DetectionOutputParameter::set_nms_threshold(float value) {
  set_has_nms_threshold();
  nms_threshold_ = value;
  // @@protoc_insertion_point(field_set:caffe.DetectionOutputParameter.nms_threshold)
}

// optional int32 top_k = 11;
bool DetectionOutputParameter::has_top_k() const {
  return (_has_bits_[0] & 0x00000100u) != 0;
}
void DetectionOutputParameter::set_has_top_k() {
  _has_bits_[0] |= 0x00000100u;
}
void DetectionOutputParameter::clear_has_top_k() {
  _has_bits_[0] &= ~0x00000100u;
}
void DetectionOutputParameter::clear_top_k() {
  top_k_ = 0;
  clear_has_top_k();
}
::google::protobuf::int32 DetectionOutputParameter::top_k() const {
  // @@protoc_insertion_point(field_get:caffe.DetectionOutputParameter.top_k)
  return top_k_;
}
void DetectionOutputParameter::set_top_k(::google::protobuf::int32 value) {
  set_has_top_k();
  top_k_ = value;
  // @@protoc_insertion_point(field_set:caffe.DetectionOutputParameter.top_k)
}

inline const DetectionOutputParameter* DetectionOutputParameter::internal_default_instance() {
  return &DetectionOutputParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int Datum::kChannelsFieldNumber;
const int Datum::kHeightFieldNumber;
const int Datum::kWidthFieldNumber;
const int Datum::kDataFieldNumber;
const int Datum::kLabelFieldNumber;
const int Datum::kFloatDataFieldNumber;
const int Datum::kEncodedFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

Datum::Datum()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.Datum)
}

void Datum::InitAsDefaultInstance() {
}

Datum::Datum(const Datum& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.Datum)
}

void Datum::SharedCtor() {
  _cached_size_ = 0;
  data_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&channels_, 0, reinterpret_cast<char*>(&encoded_) -
    reinterpret_cast<char*>(&channels_) + sizeof(encoded_));
}

Datum::~Datum() {
  // @@protoc_insertion_point(destructor:caffe.Datum)
  SharedDtor();
}

void Datum::SharedDtor() {
  data_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void Datum::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* Datum::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return Datum_descriptor_;
}

const Datum& Datum::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<Datum> Datum_default_instance_;

Datum* Datum::New(::google::protobuf::Arena* arena) const {
  Datum* n = new Datum;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void Datum::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.Datum)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(Datum, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<Datum*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 95u) {
    ZR_(channels_, encoded_);
    if (has_data()) {
      data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
  }

#undef ZR_HELPER_
#undef ZR_

  float_data_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool Datum::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.Datum)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 channels = 1;
      case 1: {
        if (tag == 8) {
          set_has_channels();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &channels_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_height;
        break;
      }

      // optional int32 height = 2;
      case 2: {
        if (tag == 16) {
         parse_height:
          set_has_height();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &height_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_width;
        break;
      }

      // optional int32 width = 3;
      case 3: {
        if (tag == 24) {
         parse_width:
          set_has_width();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &width_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(34)) goto parse_data;
        break;
      }

      // optional bytes data = 4;
      case 4: {
        if (tag == 34) {
         parse_data:
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_data()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_label;
        break;
      }

      // optional int32 label = 5;
      case 5: {
        if (tag == 40) {
         parse_label:
          set_has_label();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &label_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(53)) goto parse_float_data;
        break;
      }

      // repeated float float_data = 6;
      case 6: {
        if (tag == 53) {
         parse_float_data:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 53, input, this->mutable_float_data())));
        } else if (tag == 50) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_float_data())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(53)) goto parse_float_data;
        if (input->ExpectTag(56)) goto parse_encoded;
        break;
      }

      // optional bool encoded = 7 [default = false];
      case 7: {
        if (tag == 56) {
         parse_encoded:
          set_has_encoded();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &encoded_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.Datum)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.Datum)
  return false;
#undef DO_
}

void Datum::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.Datum)
  // optional int32 channels = 1;
  if (has_channels()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->channels(), output);
  }

  // optional int32 height = 2;
  if (has_height()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->height(), output);
  }

  // optional int32 width = 3;
  if (has_width()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->width(), output);
  }

  // optional bytes data = 4;
  if (has_data()) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      4, this->data(), output);
  }

  // optional int32 label = 5;
  if (has_label()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->label(), output);
  }

  // repeated float float_data = 6;
  for (int i = 0; i < this->float_data_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      6, this->float_data(i), output);
  }

  // optional bool encoded = 7 [default = false];
  if (has_encoded()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->encoded(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.Datum)
}

::google::protobuf::uint8* Datum::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.Datum)
  // optional int32 channels = 1;
  if (has_channels()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->channels(), target);
  }

  // optional int32 height = 2;
  if (has_height()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->height(), target);
  }

  // optional int32 width = 3;
  if (has_width()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->width(), target);
  }

  // optional bytes data = 4;
  if (has_data()) {
    target =
      ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
        4, this->data(), target);
  }

  // optional int32 label = 5;
  if (has_label()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->label(), target);
  }

  // repeated float float_data = 6;
  for (int i = 0; i < this->float_data_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(6, this->float_data(i), target);
  }

  // optional bool encoded = 7 [default = false];
  if (has_encoded()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->encoded(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 95u) {
    // optional int32 channels = 1;
    if (has_channels()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->channels());
    }

    // optional int32 height = 2;
    if (has_height()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->height());
    }

    // optional int32 width = 3;
    if (has_width()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->width());
    }

    // optional bytes data = 4;
    if (has_data()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->data());
    }

    // optional int32 label = 5;
    if (has_label()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->label());
    }

    // optional bool encoded = 7 [default = false];
    if (has_encoded()) {
      total_size += 1 + 1;
    }

  }
  // repeated float float_data = 6;
  {
    size_t data_size = 0;
    unsigned int count = this->float_data_size();
    data_size = 4UL * count;
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->float_data_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void Datum::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.Datum)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const Datum* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const Datum>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.Datum)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.Datum)
    UnsafeMergeFrom(*source);
  }
}

void Datum::MergeFrom(const Datum& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.Datum)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void Datum::UnsafeMergeFrom(const Datum& from) {
  GOOGLE_DCHECK(&from != this);
  float_data_.UnsafeMergeFrom(from.float_data_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_channels()) {
      set_channels(from.channels());
    }
    if (from.has_height()) {
      set_height(from.height());
    }
    if (from.has_width()) {
      set_width(from.width());
    }
    if (from.has_data()) {
      set_has_data();
      data_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.data_);
    }
    if (from.has_label()) {
      set_label(from.label());
    }
    if (from.has_encoded()) {
      set_encoded(from.encoded());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void Datum::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.Datum)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool Datum::IsInitialized() const {

  return true;
}

void Datum::Swap(Datum* other) {
  if (other == this) return;
  InternalSwap(other);
}
void Datum::InternalSwap(Datum* other) {
  std::swap(channels_, other->channels_);
  std::swap(height_, other->height_);
  std::swap(width_, other->width_);
  data_.Swap(&other->data_);
  std::swap(label_, other->label_);
  float_data_.UnsafeArenaSwap(&other->float_data_);
  std::swap(encoded_, other->encoded_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata Datum::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = Datum_descriptor_;
  metadata.reflection = Datum_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// Datum

// optional int32 channels = 1;
bool Datum::has_channels() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void Datum::set_has_channels() {
  _has_bits_[0] |= 0x00000001u;
}
void Datum::clear_has_channels() {
  _has_bits_[0] &= ~0x00000001u;
}
void Datum::clear_channels() {
  channels_ = 0;
  clear_has_channels();
}
::google::protobuf::int32 Datum::channels() const {
  // @@protoc_insertion_point(field_get:caffe.Datum.channels)
  return channels_;
}
void Datum::set_channels(::google::protobuf::int32 value) {
  set_has_channels();
  channels_ = value;
  // @@protoc_insertion_point(field_set:caffe.Datum.channels)
}

// optional int32 height = 2;
bool Datum::has_height() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void Datum::set_has_height() {
  _has_bits_[0] |= 0x00000002u;
}
void Datum::clear_has_height() {
  _has_bits_[0] &= ~0x00000002u;
}
void Datum::clear_height() {
  height_ = 0;
  clear_has_height();
}
::google::protobuf::int32 Datum::height() const {
  // @@protoc_insertion_point(field_get:caffe.Datum.height)
  return height_;
}
void Datum::set_height(::google::protobuf::int32 value) {
  set_has_height();
  height_ = value;
  // @@protoc_insertion_point(field_set:caffe.Datum.height)
}

// optional int32 width = 3;
bool Datum::has_width() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void Datum::set_has_width() {
  _has_bits_[0] |= 0x00000004u;
}
void Datum::clear_has_width() {
  _has_bits_[0] &= ~0x00000004u;
}
void Datum::clear_width() {
  width_ = 0;
  clear_has_width();
}
::google::protobuf::int32 Datum::width() const {
  // @@protoc_insertion_point(field_get:caffe.Datum.width)
  return width_;
}
void Datum::set_width(::google::protobuf::int32 value) {
  set_has_width();
  width_ = value;
  // @@protoc_insertion_point(field_set:caffe.Datum.width)
}

// optional bytes data = 4;
bool Datum::has_data() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void Datum::set_has_data() {
  _has_bits_[0] |= 0x00000008u;
}
void Datum::clear_has_data() {
  _has_bits_[0] &= ~0x00000008u;
}
void Datum::clear_data() {
  data_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_data();
}
const ::std::string& Datum::data() const {
  // @@protoc_insertion_point(field_get:caffe.Datum.data)
  return data_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Datum::set_data(const ::std::string& value) {
  set_has_data();
  data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.Datum.data)
}
void Datum::set_data(const char* value) {
  set_has_data();
  data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.Datum.data)
}
void Datum::set_data(const void* value, size_t size) {
  set_has_data();
  data_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.Datum.data)
}
::std::string* Datum::mutable_data() {
  set_has_data();
  // @@protoc_insertion_point(field_mutable:caffe.Datum.data)
  return data_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* Datum::release_data() {
  // @@protoc_insertion_point(field_release:caffe.Datum.data)
  clear_has_data();
  return data_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void Datum::set_allocated_data(::std::string* data) {
  if (data != NULL) {
    set_has_data();
  } else {
    clear_has_data();
  }
  data_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), data);
  // @@protoc_insertion_point(field_set_allocated:caffe.Datum.data)
}

// optional int32 label = 5;
bool Datum::has_label() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void Datum::set_has_label() {
  _has_bits_[0] |= 0x00000010u;
}
void Datum::clear_has_label() {
  _has_bits_[0] &= ~0x00000010u;
}
void Datum::clear_label() {
  label_ = 0;
  clear_has_label();
}
::google::protobuf::int32 Datum::label() const {
  // @@protoc_insertion_point(field_get:caffe.Datum.label)
  return label_;
}
void Datum::set_label(::google::protobuf::int32 value) {
  set_has_label();
  label_ = value;
  // @@protoc_insertion_point(field_set:caffe.Datum.label)
}

// repeated float float_data = 6;
int Datum::float_data_size() const {
  return float_data_.size();
}
void Datum::clear_float_data() {
  float_data_.Clear();
}
float Datum::float_data(int index) const {
  // @@protoc_insertion_point(field_get:caffe.Datum.float_data)
  return float_data_.Get(index);
}
void Datum::set_float_data(int index, float value) {
  float_data_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.Datum.float_data)
}
void Datum::add_float_data(float value) {
  float_data_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.Datum.float_data)
}
const ::google::protobuf::RepeatedField< float >&
Datum::float_data() const {
  // @@protoc_insertion_point(field_list:caffe.Datum.float_data)
  return float_data_;
}
::google::protobuf::RepeatedField< float >*
Datum::mutable_float_data() {
  // @@protoc_insertion_point(field_mutable_list:caffe.Datum.float_data)
  return &float_data_;
}

// optional bool encoded = 7 [default = false];
bool Datum::has_encoded() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void Datum::set_has_encoded() {
  _has_bits_[0] |= 0x00000040u;
}
void Datum::clear_has_encoded() {
  _has_bits_[0] &= ~0x00000040u;
}
void Datum::clear_encoded() {
  encoded_ = false;
  clear_has_encoded();
}
bool Datum::encoded() const {
  // @@protoc_insertion_point(field_get:caffe.Datum.encoded)
  return encoded_;
}
void Datum::set_encoded(bool value) {
  set_has_encoded();
  encoded_ = value;
  // @@protoc_insertion_point(field_set:caffe.Datum.encoded)
}

inline const Datum* Datum::internal_default_instance() {
  return &Datum_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* FillerParameter_VarianceNorm_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return FillerParameter_VarianceNorm_descriptor_;
}
bool FillerParameter_VarianceNorm_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const FillerParameter_VarianceNorm FillerParameter::FAN_IN;
const FillerParameter_VarianceNorm FillerParameter::FAN_OUT;
const FillerParameter_VarianceNorm FillerParameter::AVERAGE;
const FillerParameter_VarianceNorm FillerParameter::VarianceNorm_MIN;
const FillerParameter_VarianceNorm FillerParameter::VarianceNorm_MAX;
const int FillerParameter::VarianceNorm_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
::std::string* FillerParameter::_default_type_ = NULL;
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int FillerParameter::kTypeFieldNumber;
const int FillerParameter::kValueFieldNumber;
const int FillerParameter::kMinFieldNumber;
const int FillerParameter::kMaxFieldNumber;
const int FillerParameter::kMeanFieldNumber;
const int FillerParameter::kStdFieldNumber;
const int FillerParameter::kSparseFieldNumber;
const int FillerParameter::kVarianceNormFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

FillerParameter::FillerParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.FillerParameter)
}

void FillerParameter::InitAsDefaultInstance() {
}

FillerParameter::FillerParameter(const FillerParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.FillerParameter)
}

void FillerParameter::SharedCtor() {
  _cached_size_ = 0;
  type_.UnsafeSetDefault(_default_type_);
  ::memset(&value_, 0, 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)
  SharedDtor();
}

void FillerParameter::SharedDtor() {
  type_.DestroyNoArena(_default_type_);
}

void FillerParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* FillerParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return FillerParameter_descriptor_;
}

const FillerParameter& FillerParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<FillerParameter> FillerParameter_default_instance_;

FillerParameter* FillerParameter::New(::google::protobuf::Arena* arena) const {
  FillerParameter* n = new FillerParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void FillerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.FillerParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(FillerParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<FillerParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 255u) {
    ZR_(value_, variance_norm_);
    if (has_type()) {
      type_.ClearToDefaultNoArena(_default_type_);
    }
    max_ = 1;
    std_ = 1;
    sparse_ = -1;
  }

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool FillerParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.FillerParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string type = 1 [default = "constant"];
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_type()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->type().data(), this->type().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.FillerParameter.type");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_value;
        break;
      }

      // optional float value = 2 [default = 0];
      case 2: {
        if (tag == 21) {
         parse_value:
          set_has_value();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &value_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_min;
        break;
      }

      // optional float min = 3 [default = 0];
      case 3: {
        if (tag == 29) {
         parse_min:
          set_has_min();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &min_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(37)) goto parse_max;
        break;
      }

      // optional float max = 4 [default = 1];
      case 4: {
        if (tag == 37) {
         parse_max:
          set_has_max();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &max_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(45)) goto parse_mean;
        break;
      }

      // optional float mean = 5 [default = 0];
      case 5: {
        if (tag == 45) {
         parse_mean:
          set_has_mean();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &mean_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(53)) goto parse_std;
        break;
      }

      // optional float std = 6 [default = 1];
      case 6: {
        if (tag == 53) {
         parse_std:
          set_has_std();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &std_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(56)) goto parse_sparse;
        break;
      }

      // optional int32 sparse = 7 [default = -1];
      case 7: {
        if (tag == 56) {
         parse_sparse:
          set_has_sparse();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &sparse_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(64)) goto parse_variance_norm;
        break;
      }

      // optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
      case 8: {
        if (tag == 64) {
         parse_variance_norm:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::FillerParameter_VarianceNorm_IsValid(value)) {
            set_variance_norm(static_cast< ::caffe::FillerParameter_VarianceNorm >(value));
          } else {
            mutable_unknown_fields()->AddVarint(8, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.FillerParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.FillerParameter)
  return false;
#undef DO_
}

void FillerParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.FillerParameter)
  // optional string type = 1 [default = "constant"];
  if (has_type()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->type().data(), this->type().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.FillerParameter.type");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->type(), output);
  }

  // optional float value = 2 [default = 0];
  if (has_value()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->value(), output);
  }

  // optional float min = 3 [default = 0];
  if (has_min()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->min(), output);
  }

  // optional float max = 4 [default = 1];
  if (has_max()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->max(), output);
  }

  // optional float mean = 5 [default = 0];
  if (has_mean()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->mean(), output);
  }

  // optional float std = 6 [default = 1];
  if (has_std()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(6, this->std(), output);
  }

  // optional int32 sparse = 7 [default = -1];
  if (has_sparse()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->sparse(), output);
  }

  // optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
  if (has_variance_norm()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      8, this->variance_norm(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.FillerParameter)
}

::google::protobuf::uint8* FillerParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.FillerParameter)
  // optional string type = 1 [default = "constant"];
  if (has_type()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->type().data(), this->type().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.FillerParameter.type");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->type(), target);
  }

  // optional float value = 2 [default = 0];
  if (has_value()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->value(), target);
  }

  // optional float min = 3 [default = 0];
  if (has_min()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->min(), target);
  }

  // optional float max = 4 [default = 1];
  if (has_max()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->max(), target);
  }

  // optional float mean = 5 [default = 0];
  if (has_mean()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(5, this->mean(), target);
  }

  // optional float std = 6 [default = 1];
  if (has_std()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(6, this->std(), target);
  }

  // optional int32 sparse = 7 [default = -1];
  if (has_sparse()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->sparse(), target);
  }

  // optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
  if (has_variance_norm()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      8, this->variance_norm(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 255u) {
    // optional string type = 1 [default = "constant"];
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->type());
    }

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

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

    // optional float max = 4 [default = 1];
    if (has_max()) {
      total_size += 1 + 4;
    }

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

    // optional float std = 6 [default = 1];
    if (has_std()) {
      total_size += 1 + 4;
    }

    // optional int32 sparse = 7 [default = -1];
    if (has_sparse()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->sparse());
    }

    // optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
    if (has_variance_norm()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->variance_norm());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void FillerParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.FillerParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const FillerParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const FillerParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.FillerParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.FillerParameter)
    UnsafeMergeFrom(*source);
  }
}

void FillerParameter::MergeFrom(const FillerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.FillerParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void FillerParameter::UnsafeMergeFrom(const FillerParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_type()) {
      set_has_type();
      type_.AssignWithDefault(_default_type_, from.type_);
    }
    if (from.has_value()) {
      set_value(from.value());
    }
    if (from.has_min()) {
      set_min(from.min());
    }
    if (from.has_max()) {
      set_max(from.max());
    }
    if (from.has_mean()) {
      set_mean(from.mean());
    }
    if (from.has_std()) {
      set_std(from.std());
    }
    if (from.has_sparse()) {
      set_sparse(from.sparse());
    }
    if (from.has_variance_norm()) {
      set_variance_norm(from.variance_norm());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void FillerParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.FillerParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool FillerParameter::IsInitialized() const {

  return true;
}

void FillerParameter::Swap(FillerParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void FillerParameter::InternalSwap(FillerParameter* other) {
  type_.Swap(&other->type_);
  std::swap(value_, other->value_);
  std::swap(min_, other->min_);
  std::swap(max_, other->max_);
  std::swap(mean_, other->mean_);
  std::swap(std_, other->std_);
  std::swap(sparse_, other->sparse_);
  std::swap(variance_norm_, other->variance_norm_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata FillerParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = FillerParameter_descriptor_;
  metadata.reflection = FillerParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// FillerParameter

// optional string type = 1 [default = "constant"];
bool FillerParameter::has_type() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void FillerParameter::set_has_type() {
  _has_bits_[0] |= 0x00000001u;
}
void FillerParameter::clear_has_type() {
  _has_bits_[0] &= ~0x00000001u;
}
void FillerParameter::clear_type() {
  type_.ClearToDefaultNoArena(_default_type_);
  clear_has_type();
}
const ::std::string& FillerParameter::type() const {
  // @@protoc_insertion_point(field_get:caffe.FillerParameter.type)
  return type_.GetNoArena(_default_type_);
}
void FillerParameter::set_type(const ::std::string& value) {
  set_has_type();
  type_.SetNoArena(_default_type_, value);
  // @@protoc_insertion_point(field_set:caffe.FillerParameter.type)
}
void FillerParameter::set_type(const char* value) {
  set_has_type();
  type_.SetNoArena(_default_type_, ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.FillerParameter.type)
}
void FillerParameter::set_type(const char* value, size_t size) {
  set_has_type();
  type_.SetNoArena(_default_type_,
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.FillerParameter.type)
}
::std::string* FillerParameter::mutable_type() {
  set_has_type();
  // @@protoc_insertion_point(field_mutable:caffe.FillerParameter.type)
  return type_.MutableNoArena(_default_type_);
}
::std::string* FillerParameter::release_type() {
  // @@protoc_insertion_point(field_release:caffe.FillerParameter.type)
  clear_has_type();
  return type_.ReleaseNoArena(_default_type_);
}
void FillerParameter::set_allocated_type(::std::string* type) {
  if (type != NULL) {
    set_has_type();
  } else {
    clear_has_type();
  }
  type_.SetAllocatedNoArena(_default_type_, type);
  // @@protoc_insertion_point(field_set_allocated:caffe.FillerParameter.type)
}

// optional float value = 2 [default = 0];
bool FillerParameter::has_value() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void FillerParameter::set_has_value() {
  _has_bits_[0] |= 0x00000002u;
}
void FillerParameter::clear_has_value() {
  _has_bits_[0] &= ~0x00000002u;
}
void FillerParameter::clear_value() {
  value_ = 0;
  clear_has_value();
}
float FillerParameter::value() const {
  // @@protoc_insertion_point(field_get:caffe.FillerParameter.value)
  return value_;
}
void FillerParameter::set_value(float value) {
  set_has_value();
  value_ = value;
  // @@protoc_insertion_point(field_set:caffe.FillerParameter.value)
}

// optional float min = 3 [default = 0];
bool FillerParameter::has_min() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void FillerParameter::set_has_min() {
  _has_bits_[0] |= 0x00000004u;
}
void FillerParameter::clear_has_min() {
  _has_bits_[0] &= ~0x00000004u;
}
void FillerParameter::clear_min() {
  min_ = 0;
  clear_has_min();
}
float FillerParameter::min() const {
  // @@protoc_insertion_point(field_get:caffe.FillerParameter.min)
  return min_;
}
void FillerParameter::set_min(float value) {
  set_has_min();
  min_ = value;
  // @@protoc_insertion_point(field_set:caffe.FillerParameter.min)
}

// optional float max = 4 [default = 1];
bool FillerParameter::has_max() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void FillerParameter::set_has_max() {
  _has_bits_[0] |= 0x00000008u;
}
void FillerParameter::clear_has_max() {
  _has_bits_[0] &= ~0x00000008u;
}
void FillerParameter::clear_max() {
  max_ = 1;
  clear_has_max();
}
float FillerParameter::max() const {
  // @@protoc_insertion_point(field_get:caffe.FillerParameter.max)
  return max_;
}
void FillerParameter::set_max(float value) {
  set_has_max();
  max_ = value;
  // @@protoc_insertion_point(field_set:caffe.FillerParameter.max)
}

// optional float mean = 5 [default = 0];
bool FillerParameter::has_mean() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void FillerParameter::set_has_mean() {
  _has_bits_[0] |= 0x00000010u;
}
void FillerParameter::clear_has_mean() {
  _has_bits_[0] &= ~0x00000010u;
}
void FillerParameter::clear_mean() {
  mean_ = 0;
  clear_has_mean();
}
float FillerParameter::mean() const {
  // @@protoc_insertion_point(field_get:caffe.FillerParameter.mean)
  return mean_;
}
void FillerParameter::set_mean(float value) {
  set_has_mean();
  mean_ = value;
  // @@protoc_insertion_point(field_set:caffe.FillerParameter.mean)
}

// optional float std = 6 [default = 1];
bool FillerParameter::has_std() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void FillerParameter::set_has_std() {
  _has_bits_[0] |= 0x00000020u;
}
void FillerParameter::clear_has_std() {
  _has_bits_[0] &= ~0x00000020u;
}
void FillerParameter::clear_std() {
  std_ = 1;
  clear_has_std();
}
float FillerParameter::std() const {
  // @@protoc_insertion_point(field_get:caffe.FillerParameter.std)
  return std_;
}
void FillerParameter::set_std(float value) {
  set_has_std();
  std_ = value;
  // @@protoc_insertion_point(field_set:caffe.FillerParameter.std)
}

// optional int32 sparse = 7 [default = -1];
bool FillerParameter::has_sparse() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void FillerParameter::set_has_sparse() {
  _has_bits_[0] |= 0x00000040u;
}
void FillerParameter::clear_has_sparse() {
  _has_bits_[0] &= ~0x00000040u;
}
void FillerParameter::clear_sparse() {
  sparse_ = -1;
  clear_has_sparse();
}
::google::protobuf::int32 FillerParameter::sparse() const {
  // @@protoc_insertion_point(field_get:caffe.FillerParameter.sparse)
  return sparse_;
}
void FillerParameter::set_sparse(::google::protobuf::int32 value) {
  set_has_sparse();
  sparse_ = value;
  // @@protoc_insertion_point(field_set:caffe.FillerParameter.sparse)
}

// optional .caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
bool FillerParameter::has_variance_norm() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
void FillerParameter::set_has_variance_norm() {
  _has_bits_[0] |= 0x00000080u;
}
void FillerParameter::clear_has_variance_norm() {
  _has_bits_[0] &= ~0x00000080u;
}
void FillerParameter::clear_variance_norm() {
  variance_norm_ = 0;
  clear_has_variance_norm();
}
::caffe::FillerParameter_VarianceNorm FillerParameter::variance_norm() const {
  // @@protoc_insertion_point(field_get:caffe.FillerParameter.variance_norm)
  return static_cast< ::caffe::FillerParameter_VarianceNorm >(variance_norm_);
}
void FillerParameter::set_variance_norm(::caffe::FillerParameter_VarianceNorm value) {
  assert(::caffe::FillerParameter_VarianceNorm_IsValid(value));
  set_has_variance_norm();
  variance_norm_ = value;
  // @@protoc_insertion_point(field_set:caffe.FillerParameter.variance_norm)
}

inline const FillerParameter* FillerParameter::internal_default_instance() {
  return &FillerParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NetParameter::kNameFieldNumber;
const int NetParameter::kInputFieldNumber;
const int NetParameter::kInputShapeFieldNumber;
const int NetParameter::kInputDimFieldNumber;
const int NetParameter::kForceBackwardFieldNumber;
const int NetParameter::kStateFieldNumber;
const int NetParameter::kDebugInfoFieldNumber;
const int NetParameter::kLayerFieldNumber;
const int NetParameter::kLayersFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

NetParameter::NetParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.NetParameter)
}

void NetParameter::InitAsDefaultInstance() {
  state_ = const_cast< ::caffe::NetState*>(
      ::caffe::NetState::internal_default_instance());
}

NetParameter::NetParameter(const NetParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.NetParameter)
}

void NetParameter::SharedCtor() {
  _cached_size_ = 0;
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  state_ = NULL;
  ::memset(&force_backward_, 0, reinterpret_cast<char*>(&debug_info_) -
    reinterpret_cast<char*>(&force_backward_) + sizeof(debug_info_));
}

NetParameter::~NetParameter() {
  // @@protoc_insertion_point(destructor:caffe.NetParameter)
  SharedDtor();
}

void NetParameter::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != &NetParameter_default_instance_.get()) {
    delete state_;
  }
}

void NetParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NetParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return NetParameter_descriptor_;
}

const NetParameter& NetParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<NetParameter> NetParameter_default_instance_;

NetParameter* NetParameter::New(::google::protobuf::Arena* arena) const {
  NetParameter* n = new NetParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void NetParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.NetParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(NetParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<NetParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 113u) {
    ZR_(force_backward_, debug_info_);
    if (has_name()) {
      name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    if (has_state()) {
      if (state_ != NULL) state_->::caffe::NetState::Clear();
    }
  }

#undef ZR_HELPER_
#undef ZR_

  input_.Clear();
  input_shape_.Clear();
  input_dim_.Clear();
  layer_.Clear();
  layers_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool NetParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.NetParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.NetParameter.name");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_layers;
        break;
      }

      // repeated .caffe.V1LayerParameter layers = 2;
      case 2: {
        if (tag == 18) {
         parse_layers:
          DO_(input->IncrementRecursionDepth());
         parse_loop_layers:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_layers()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_loop_layers;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectTag(26)) goto parse_input;
        break;
      }

      // repeated string input = 3;
      case 3: {
        if (tag == 26) {
         parse_input:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_input()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->input(this->input_size() - 1).data(),
            this->input(this->input_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.NetParameter.input");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_input;
        if (input->ExpectTag(32)) goto parse_input_dim;
        break;
      }

      // repeated int32 input_dim = 4;
      case 4: {
        if (tag == 32) {
         parse_input_dim:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 32, input, this->mutable_input_dim())));
        } else if (tag == 34) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_input_dim())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_input_dim;
        if (input->ExpectTag(40)) goto parse_force_backward;
        break;
      }

      // optional bool force_backward = 5 [default = false];
      case 5: {
        if (tag == 40) {
         parse_force_backward:
          set_has_force_backward();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &force_backward_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(50)) goto parse_state;
        break;
      }

      // optional .caffe.NetState state = 6;
      case 6: {
        if (tag == 50) {
         parse_state:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_state()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(56)) goto parse_debug_info;
        break;
      }

      // optional bool debug_info = 7 [default = false];
      case 7: {
        if (tag == 56) {
         parse_debug_info:
          set_has_debug_info();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &debug_info_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(66)) goto parse_input_shape;
        break;
      }

      // repeated .caffe.BlobShape input_shape = 8;
      case 8: {
        if (tag == 66) {
         parse_input_shape:
          DO_(input->IncrementRecursionDepth());
         parse_loop_input_shape:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_input_shape()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(66)) goto parse_loop_input_shape;
        if (input->ExpectTag(802)) goto parse_loop_layer;
        input->UnsafeDecrementRecursionDepth();
        break;
      }

      // repeated .caffe.LayerParameter layer = 100;
      case 100: {
        if (tag == 802) {
          DO_(input->IncrementRecursionDepth());
         parse_loop_layer:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_layer()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(802)) goto parse_loop_layer;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.NetParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.NetParameter)
  return false;
#undef DO_
}

void NetParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.NetParameter)
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.NetParameter.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // repeated .caffe.V1LayerParameter layers = 2;
  for (unsigned int i = 0, n = this->layers_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      2, this->layers(i), output);
  }

  // repeated string input = 3;
  for (int i = 0; i < this->input_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->input(i).data(), this->input(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.NetParameter.input");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->input(i), output);
  }

  // repeated int32 input_dim = 4;
  for (int i = 0; i < this->input_dim_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      4, this->input_dim(i), output);
  }

  // optional bool force_backward = 5 [default = false];
  if (has_force_backward()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(5, this->force_backward(), output);
  }

  // optional .caffe.NetState state = 6;
  if (has_state()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, *this->state_, output);
  }

  // optional bool debug_info = 7 [default = false];
  if (has_debug_info()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->debug_info(), output);
  }

  // repeated .caffe.BlobShape input_shape = 8;
  for (unsigned int i = 0, n = this->input_shape_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      8, this->input_shape(i), output);
  }

  // repeated .caffe.LayerParameter layer = 100;
  for (unsigned int i = 0, n = this->layer_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      100, this->layer(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.NetParameter)
}

::google::protobuf::uint8* NetParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.NetParameter)
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.NetParameter.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // repeated .caffe.V1LayerParameter layers = 2;
  for (unsigned int i = 0, n = this->layers_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        2, this->layers(i), false, target);
  }

  // repeated string input = 3;
  for (int i = 0; i < this->input_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->input(i).data(), this->input(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.NetParameter.input");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->input(i), target);
  }

  // repeated int32 input_dim = 4;
  for (int i = 0; i < this->input_dim_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(4, this->input_dim(i), target);
  }

  // optional bool force_backward = 5 [default = false];
  if (has_force_backward()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(5, this->force_backward(), target);
  }

  // optional .caffe.NetState state = 6;
  if (has_state()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        6, *this->state_, false, target);
  }

  // optional bool debug_info = 7 [default = false];
  if (has_debug_info()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->debug_info(), target);
  }

  // repeated .caffe.BlobShape input_shape = 8;
  for (unsigned int i = 0, n = this->input_shape_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        8, this->input_shape(i), false, target);
  }

  // repeated .caffe.LayerParameter layer = 100;
  for (unsigned int i = 0, n = this->layer_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        100, this->layer(i), false, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 113u) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional bool force_backward = 5 [default = false];
    if (has_force_backward()) {
      total_size += 1 + 1;
    }

    // optional .caffe.NetState state = 6;
    if (has_state()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->state_);
    }

    // optional bool debug_info = 7 [default = false];
    if (has_debug_info()) {
      total_size += 1 + 1;
    }

  }
  // repeated string input = 3;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->input_size());
  for (int i = 0; i < this->input_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->input(i));
  }

  // repeated .caffe.BlobShape input_shape = 8;
  {
    unsigned int count = this->input_shape_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->input_shape(i));
    }
  }

  // repeated int32 input_dim = 4;
  {
    size_t data_size = 0;
    unsigned int count = this->input_dim_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->input_dim(i));
    }
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->input_dim_size());
    total_size += data_size;
  }

  // repeated .caffe.LayerParameter layer = 100;
  {
    unsigned int count = this->layer_size();
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->layer(i));
    }
  }

  // repeated .caffe.V1LayerParameter layers = 2;
  {
    unsigned int count = this->layers_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->layers(i));
    }
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void NetParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.NetParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const NetParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const NetParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.NetParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.NetParameter)
    UnsafeMergeFrom(*source);
  }
}

void NetParameter::MergeFrom(const NetParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NetParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void NetParameter::UnsafeMergeFrom(const NetParameter& from) {
  GOOGLE_DCHECK(&from != this);
  input_.UnsafeMergeFrom(from.input_);
  input_shape_.MergeFrom(from.input_shape_);
  input_dim_.UnsafeMergeFrom(from.input_dim_);
  layer_.MergeFrom(from.layer_);
  layers_.MergeFrom(from.layers_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_has_name();
      name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
    }
    if (from.has_force_backward()) {
      set_force_backward(from.force_backward());
    }
    if (from.has_state()) {
      mutable_state()->::caffe::NetState::MergeFrom(from.state());
    }
    if (from.has_debug_info()) {
      set_debug_info(from.debug_info());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

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

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

bool NetParameter::IsInitialized() const {

  return true;
}

void NetParameter::Swap(NetParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void NetParameter::InternalSwap(NetParameter* other) {
  name_.Swap(&other->name_);
  input_.UnsafeArenaSwap(&other->input_);
  input_shape_.UnsafeArenaSwap(&other->input_shape_);
  input_dim_.UnsafeArenaSwap(&other->input_dim_);
  std::swap(force_backward_, other->force_backward_);
  std::swap(state_, other->state_);
  std::swap(debug_info_, other->debug_info_);
  layer_.UnsafeArenaSwap(&other->layer_);
  layers_.UnsafeArenaSwap(&other->layers_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata NetParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = NetParameter_descriptor_;
  metadata.reflection = NetParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// NetParameter

// optional string name = 1;
bool NetParameter::has_name() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void NetParameter::set_has_name() {
  _has_bits_[0] |= 0x00000001u;
}
void NetParameter::clear_has_name() {
  _has_bits_[0] &= ~0x00000001u;
}
void NetParameter::clear_name() {
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_name();
}
const ::std::string& NetParameter::name() const {
  // @@protoc_insertion_point(field_get:caffe.NetParameter.name)
  return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void NetParameter::set_name(const ::std::string& value) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.NetParameter.name)
}
void NetParameter::set_name(const char* value) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.NetParameter.name)
}
void NetParameter::set_name(const char* value, size_t size) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.NetParameter.name)
}
::std::string* NetParameter::mutable_name() {
  set_has_name();
  // @@protoc_insertion_point(field_mutable:caffe.NetParameter.name)
  return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* NetParameter::release_name() {
  // @@protoc_insertion_point(field_release:caffe.NetParameter.name)
  clear_has_name();
  return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void NetParameter::set_allocated_name(::std::string* name) {
  if (name != NULL) {
    set_has_name();
  } else {
    clear_has_name();
  }
  name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
  // @@protoc_insertion_point(field_set_allocated:caffe.NetParameter.name)
}

// repeated string input = 3;
int NetParameter::input_size() const {
  return input_.size();
}
void NetParameter::clear_input() {
  input_.Clear();
}
const ::std::string& NetParameter::input(int index) const {
  // @@protoc_insertion_point(field_get:caffe.NetParameter.input)
  return input_.Get(index);
}
::std::string* NetParameter::mutable_input(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.NetParameter.input)
  return input_.Mutable(index);
}
void NetParameter::set_input(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:caffe.NetParameter.input)
  input_.Mutable(index)->assign(value);
}
void NetParameter::set_input(int index, const char* value) {
  input_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:caffe.NetParameter.input)
}
void NetParameter::set_input(int index, const char* value, size_t size) {
  input_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:caffe.NetParameter.input)
}
::std::string* NetParameter::add_input() {
  // @@protoc_insertion_point(field_add_mutable:caffe.NetParameter.input)
  return input_.Add();
}
void NetParameter::add_input(const ::std::string& value) {
  input_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:caffe.NetParameter.input)
}
void NetParameter::add_input(const char* value) {
  input_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:caffe.NetParameter.input)
}
void NetParameter::add_input(const char* value, size_t size) {
  input_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:caffe.NetParameter.input)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
NetParameter::input() const {
  // @@protoc_insertion_point(field_list:caffe.NetParameter.input)
  return input_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
NetParameter::mutable_input() {
  // @@protoc_insertion_point(field_mutable_list:caffe.NetParameter.input)
  return &input_;
}

// repeated .caffe.BlobShape input_shape = 8;
int NetParameter::input_shape_size() const {
  return input_shape_.size();
}
void NetParameter::clear_input_shape() {
  input_shape_.Clear();
}
const ::caffe::BlobShape& NetParameter::input_shape(int index) const {
  // @@protoc_insertion_point(field_get:caffe.NetParameter.input_shape)
  return input_shape_.Get(index);
}
::caffe::BlobShape* NetParameter::mutable_input_shape(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.NetParameter.input_shape)
  return input_shape_.Mutable(index);
}
::caffe::BlobShape* NetParameter::add_input_shape() {
  // @@protoc_insertion_point(field_add:caffe.NetParameter.input_shape)
  return input_shape_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::BlobShape >*
NetParameter::mutable_input_shape() {
  // @@protoc_insertion_point(field_mutable_list:caffe.NetParameter.input_shape)
  return &input_shape_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::BlobShape >&
NetParameter::input_shape() const {
  // @@protoc_insertion_point(field_list:caffe.NetParameter.input_shape)
  return input_shape_;
}

// repeated int32 input_dim = 4;
int NetParameter::input_dim_size() const {
  return input_dim_.size();
}
void NetParameter::clear_input_dim() {
  input_dim_.Clear();
}
::google::protobuf::int32 NetParameter::input_dim(int index) const {
  // @@protoc_insertion_point(field_get:caffe.NetParameter.input_dim)
  return input_dim_.Get(index);
}
void NetParameter::set_input_dim(int index, ::google::protobuf::int32 value) {
  input_dim_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.NetParameter.input_dim)
}
void NetParameter::add_input_dim(::google::protobuf::int32 value) {
  input_dim_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.NetParameter.input_dim)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
NetParameter::input_dim() const {
  // @@protoc_insertion_point(field_list:caffe.NetParameter.input_dim)
  return input_dim_;
}
::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
NetParameter::mutable_input_dim() {
  // @@protoc_insertion_point(field_mutable_list:caffe.NetParameter.input_dim)
  return &input_dim_;
}

// optional bool force_backward = 5 [default = false];
bool NetParameter::has_force_backward() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void NetParameter::set_has_force_backward() {
  _has_bits_[0] |= 0x00000010u;
}
void NetParameter::clear_has_force_backward() {
  _has_bits_[0] &= ~0x00000010u;
}
void NetParameter::clear_force_backward() {
  force_backward_ = false;
  clear_has_force_backward();
}
bool NetParameter::force_backward() const {
  // @@protoc_insertion_point(field_get:caffe.NetParameter.force_backward)
  return force_backward_;
}
void NetParameter::set_force_backward(bool value) {
  set_has_force_backward();
  force_backward_ = value;
  // @@protoc_insertion_point(field_set:caffe.NetParameter.force_backward)
}

// optional .caffe.NetState state = 6;
bool NetParameter::has_state() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void NetParameter::set_has_state() {
  _has_bits_[0] |= 0x00000020u;
}
void NetParameter::clear_has_state() {
  _has_bits_[0] &= ~0x00000020u;
}
void NetParameter::clear_state() {
  if (state_ != NULL) state_->::caffe::NetState::Clear();
  clear_has_state();
}
const ::caffe::NetState& NetParameter::state() const {
  // @@protoc_insertion_point(field_get:caffe.NetParameter.state)
  return state_ != NULL ? *state_
                         : *::caffe::NetState::internal_default_instance();
}
::caffe::NetState* NetParameter::mutable_state() {
  set_has_state();
  if (state_ == NULL) {
    state_ = new ::caffe::NetState;
  }
  // @@protoc_insertion_point(field_mutable:caffe.NetParameter.state)
  return state_;
}
::caffe::NetState* NetParameter::release_state() {
  // @@protoc_insertion_point(field_release:caffe.NetParameter.state)
  clear_has_state();
  ::caffe::NetState* temp = state_;
  state_ = NULL;
  return temp;
}
void NetParameter::set_allocated_state(::caffe::NetState* state) {
  delete state_;
  state_ = state;
  if (state) {
    set_has_state();
  } else {
    clear_has_state();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.NetParameter.state)
}

// optional bool debug_info = 7 [default = false];
bool NetParameter::has_debug_info() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void NetParameter::set_has_debug_info() {
  _has_bits_[0] |= 0x00000040u;
}
void NetParameter::clear_has_debug_info() {
  _has_bits_[0] &= ~0x00000040u;
}
void NetParameter::clear_debug_info() {
  debug_info_ = false;
  clear_has_debug_info();
}
bool NetParameter::debug_info() const {
  // @@protoc_insertion_point(field_get:caffe.NetParameter.debug_info)
  return debug_info_;
}
void NetParameter::set_debug_info(bool value) {
  set_has_debug_info();
  debug_info_ = value;
  // @@protoc_insertion_point(field_set:caffe.NetParameter.debug_info)
}

// repeated .caffe.LayerParameter layer = 100;
int NetParameter::layer_size() const {
  return layer_.size();
}
void NetParameter::clear_layer() {
  layer_.Clear();
}
const ::caffe::LayerParameter& NetParameter::layer(int index) const {
  // @@protoc_insertion_point(field_get:caffe.NetParameter.layer)
  return layer_.Get(index);
}
::caffe::LayerParameter* NetParameter::mutable_layer(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.NetParameter.layer)
  return layer_.Mutable(index);
}
::caffe::LayerParameter* NetParameter::add_layer() {
  // @@protoc_insertion_point(field_add:caffe.NetParameter.layer)
  return layer_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::LayerParameter >*
NetParameter::mutable_layer() {
  // @@protoc_insertion_point(field_mutable_list:caffe.NetParameter.layer)
  return &layer_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::LayerParameter >&
NetParameter::layer() const {
  // @@protoc_insertion_point(field_list:caffe.NetParameter.layer)
  return layer_;
}

// repeated .caffe.V1LayerParameter layers = 2;
int NetParameter::layers_size() const {
  return layers_.size();
}
void NetParameter::clear_layers() {
  layers_.Clear();
}
const ::caffe::V1LayerParameter& NetParameter::layers(int index) const {
  // @@protoc_insertion_point(field_get:caffe.NetParameter.layers)
  return layers_.Get(index);
}
::caffe::V1LayerParameter* NetParameter::mutable_layers(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.NetParameter.layers)
  return layers_.Mutable(index);
}
::caffe::V1LayerParameter* NetParameter::add_layers() {
  // @@protoc_insertion_point(field_add:caffe.NetParameter.layers)
  return layers_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::V1LayerParameter >*
NetParameter::mutable_layers() {
  // @@protoc_insertion_point(field_mutable_list:caffe.NetParameter.layers)
  return &layers_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::V1LayerParameter >&
NetParameter::layers() const {
  // @@protoc_insertion_point(field_list:caffe.NetParameter.layers)
  return layers_;
}

inline const NetParameter* NetParameter::internal_default_instance() {
  return &NetParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* SolverParameter_SolverMode_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SolverParameter_SolverMode_descriptor_;
}
bool SolverParameter_SolverMode_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const SolverParameter_SolverMode SolverParameter::CPU;
const SolverParameter_SolverMode SolverParameter::GPU;
const SolverParameter_SolverMode SolverParameter::SolverMode_MIN;
const SolverParameter_SolverMode SolverParameter::SolverMode_MAX;
const int SolverParameter::SolverMode_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* SolverParameter_SolverType_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SolverParameter_SolverType_descriptor_;
}
bool SolverParameter_SolverType_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const SolverParameter_SolverType SolverParameter::SGD;
const SolverParameter_SolverType SolverParameter::NESTEROV;
const SolverParameter_SolverType SolverParameter::ADAGRAD;
const SolverParameter_SolverType SolverParameter::SolverType_MIN;
const SolverParameter_SolverType SolverParameter::SolverType_MAX;
const int SolverParameter::SolverType_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
::std::string* SolverParameter::_default_regularization_type_ = NULL;
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int SolverParameter::kNetFieldNumber;
const int SolverParameter::kNetParamFieldNumber;
const int SolverParameter::kTrainNetFieldNumber;
const int SolverParameter::kTestNetFieldNumber;
const int SolverParameter::kTrainNetParamFieldNumber;
const int SolverParameter::kTestNetParamFieldNumber;
const int SolverParameter::kTrainStateFieldNumber;
const int SolverParameter::kTestStateFieldNumber;
const int SolverParameter::kTestIterFieldNumber;
const int SolverParameter::kTestIntervalFieldNumber;
const int SolverParameter::kTestComputeLossFieldNumber;
const int SolverParameter::kTestInitializationFieldNumber;
const int SolverParameter::kBaseLrFieldNumber;
const int SolverParameter::kDisplayFieldNumber;
const int SolverParameter::kAverageLossFieldNumber;
const int SolverParameter::kMaxIterFieldNumber;
const int SolverParameter::kIterSizeFieldNumber;
const int SolverParameter::kLrPolicyFieldNumber;
const int SolverParameter::kGammaFieldNumber;
const int SolverParameter::kPowerFieldNumber;
const int SolverParameter::kMomentumFieldNumber;
const int SolverParameter::kWeightDecayFieldNumber;
const int SolverParameter::kRegularizationTypeFieldNumber;
const int SolverParameter::kStepsizeFieldNumber;
const int SolverParameter::kStepvalueFieldNumber;
const int SolverParameter::kClipGradientsFieldNumber;
const int SolverParameter::kSnapshotFieldNumber;
const int SolverParameter::kSnapshotPrefixFieldNumber;
const int SolverParameter::kSnapshotDiffFieldNumber;
const int SolverParameter::kSolverModeFieldNumber;
const int SolverParameter::kDeviceIdFieldNumber;
const int SolverParameter::kRandomSeedFieldNumber;
const int SolverParameter::kSolverTypeFieldNumber;
const int SolverParameter::kDeltaFieldNumber;
const int SolverParameter::kDebugInfoFieldNumber;
const int SolverParameter::kSnapshotAfterTrainFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

SolverParameter::SolverParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.SolverParameter)
}

void SolverParameter::InitAsDefaultInstance() {
  net_param_ = const_cast< ::caffe::NetParameter*>(
      ::caffe::NetParameter::internal_default_instance());
  train_net_param_ = const_cast< ::caffe::NetParameter*>(
      ::caffe::NetParameter::internal_default_instance());
  train_state_ = const_cast< ::caffe::NetState*>(
      ::caffe::NetState::internal_default_instance());
}

SolverParameter::SolverParameter(const SolverParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.SolverParameter)
}

void SolverParameter::SharedCtor() {
  net_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  train_net_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  lr_policy_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  regularization_type_.UnsafeSetDefault(_default_regularization_type_);
  snapshot_prefix_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  net_param_ = NULL;
  train_net_param_ = NULL;
  train_state_ = NULL;
  ::memset(&test_interval_, 0, reinterpret_cast<char*>(&solver_type_) -
    reinterpret_cast<char*>(&test_interval_) + sizeof(solver_type_));
  average_loss_ = 1;
  iter_size_ = 1;
  test_initialization_ = true;
  snapshot_after_train_ = true;
  clip_gradients_ = -1;
  random_seed_ = GOOGLE_LONGLONG(-1);
  solver_mode_ = 1;
  delta_ = 1e-08f;
  _cached_size_ = 0;
}

SolverParameter::~SolverParameter() {
  // @@protoc_insertion_point(destructor:caffe.SolverParameter)
  SharedDtor();
}

void SolverParameter::SharedDtor() {
  net_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  train_net_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  lr_policy_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  regularization_type_.DestroyNoArena(_default_regularization_type_);
  snapshot_prefix_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != &SolverParameter_default_instance_.get()) {
    delete net_param_;
    delete train_net_param_;
    delete train_state_;
  }
}

void SolverParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SolverParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SolverParameter_descriptor_;
}

const SolverParameter& SolverParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<SolverParameter> SolverParameter_default_instance_;

SolverParameter* SolverParameter::New(::google::protobuf::Arena* arena) const {
  SolverParameter* n = new SolverParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void SolverParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.SolverParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(SolverParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<SolverParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 87u) {
    if (has_net()) {
      net_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    if (has_net_param()) {
      if (net_param_ != NULL) net_param_->::caffe::NetParameter::Clear();
    }
    if (has_train_net()) {
      train_net_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    if (has_train_net_param()) {
      if (train_net_param_ != NULL) train_net_param_->::caffe::NetParameter::Clear();
    }
    if (has_train_state()) {
      if (train_state_ != NULL) train_state_->::caffe::NetState::Clear();
    }
  }
  if (_has_bits_[8 / 32] & 65024u) {
    ZR_(test_interval_, max_iter_);
    test_compute_loss_ = false;
    test_initialization_ = true;
    average_loss_ = 1;
  }
  if (_has_bits_[16 / 32] & 16711680u) {
    ZR_(gamma_, stepsize_);
    iter_size_ = 1;
    if (has_lr_policy()) {
      lr_policy_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    if (has_regularization_type()) {
      regularization_type_.ClearToDefaultNoArena(_default_regularization_type_);
    }
  }
  if (_has_bits_[24 / 32] & 4261412864u) {
    ZR_(snapshot_, device_id_);
    clip_gradients_ = -1;
    if (has_snapshot_prefix()) {
      snapshot_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    snapshot_diff_ = false;
    solver_mode_ = 1;
    random_seed_ = GOOGLE_LONGLONG(-1);
  }
  if (_has_bits_[32 / 32] & 15u) {
    solver_type_ = 0;
    delta_ = 1e-08f;
    debug_info_ = false;
    snapshot_after_train_ = true;
  }

#undef ZR_HELPER_
#undef ZR_

  test_net_.Clear();
  test_net_param_.Clear();
  test_state_.Clear();
  test_iter_.Clear();
  stepvalue_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool SolverParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.SolverParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string train_net = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_train_net()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->train_net().data(), this->train_net().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.SolverParameter.train_net");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_test_net;
        break;
      }

      // repeated string test_net = 2;
      case 2: {
        if (tag == 18) {
         parse_test_net:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_test_net()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->test_net(this->test_net_size() - 1).data(),
            this->test_net(this->test_net_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.SolverParameter.test_net");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_test_net;
        if (input->ExpectTag(24)) goto parse_test_iter;
        break;
      }

      // repeated int32 test_iter = 3;
      case 3: {
        if (tag == 24) {
         parse_test_iter:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 1, 24, input, this->mutable_test_iter())));
        } else if (tag == 26) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_test_iter())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_test_iter;
        if (input->ExpectTag(32)) goto parse_test_interval;
        break;
      }

      // optional int32 test_interval = 4 [default = 0];
      case 4: {
        if (tag == 32) {
         parse_test_interval:
          set_has_test_interval();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &test_interval_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(45)) goto parse_base_lr;
        break;
      }

      // optional float base_lr = 5;
      case 5: {
        if (tag == 45) {
         parse_base_lr:
          set_has_base_lr();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &base_lr_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_display;
        break;
      }

      // optional int32 display = 6;
      case 6: {
        if (tag == 48) {
         parse_display:
          set_has_display();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &display_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(56)) goto parse_max_iter;
        break;
      }

      // optional int32 max_iter = 7;
      case 7: {
        if (tag == 56) {
         parse_max_iter:
          set_has_max_iter();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &max_iter_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(66)) goto parse_lr_policy;
        break;
      }

      // optional string lr_policy = 8;
      case 8: {
        if (tag == 66) {
         parse_lr_policy:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_lr_policy()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->lr_policy().data(), this->lr_policy().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.SolverParameter.lr_policy");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(77)) goto parse_gamma;
        break;
      }

      // optional float gamma = 9;
      case 9: {
        if (tag == 77) {
         parse_gamma:
          set_has_gamma();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &gamma_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(85)) goto parse_power;
        break;
      }

      // optional float power = 10;
      case 10: {
        if (tag == 85) {
         parse_power:
          set_has_power();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &power_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(93)) goto parse_momentum;
        break;
      }

      // optional float momentum = 11;
      case 11: {
        if (tag == 93) {
         parse_momentum:
          set_has_momentum();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &momentum_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(101)) goto parse_weight_decay;
        break;
      }

      // optional float weight_decay = 12;
      case 12: {
        if (tag == 101) {
         parse_weight_decay:
          set_has_weight_decay();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &weight_decay_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(104)) goto parse_stepsize;
        break;
      }

      // optional int32 stepsize = 13;
      case 13: {
        if (tag == 104) {
         parse_stepsize:
          set_has_stepsize();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &stepsize_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(112)) goto parse_snapshot;
        break;
      }

      // optional int32 snapshot = 14 [default = 0];
      case 14: {
        if (tag == 112) {
         parse_snapshot:
          set_has_snapshot();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &snapshot_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(122)) goto parse_snapshot_prefix;
        break;
      }

      // optional string snapshot_prefix = 15;
      case 15: {
        if (tag == 122) {
         parse_snapshot_prefix:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_snapshot_prefix()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->snapshot_prefix().data(), this->snapshot_prefix().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.SolverParameter.snapshot_prefix");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(128)) goto parse_snapshot_diff;
        break;
      }

      // optional bool snapshot_diff = 16 [default = false];
      case 16: {
        if (tag == 128) {
         parse_snapshot_diff:
          set_has_snapshot_diff();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &snapshot_diff_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(136)) goto parse_solver_mode;
        break;
      }

      // optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
      case 17: {
        if (tag == 136) {
         parse_solver_mode:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::SolverParameter_SolverMode_IsValid(value)) {
            set_solver_mode(static_cast< ::caffe::SolverParameter_SolverMode >(value));
          } else {
            mutable_unknown_fields()->AddVarint(17, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(144)) goto parse_device_id;
        break;
      }

      // optional int32 device_id = 18 [default = 0];
      case 18: {
        if (tag == 144) {
         parse_device_id:
          set_has_device_id();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &device_id_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(152)) goto parse_test_compute_loss;
        break;
      }

      // optional bool test_compute_loss = 19 [default = false];
      case 19: {
        if (tag == 152) {
         parse_test_compute_loss:
          set_has_test_compute_loss();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &test_compute_loss_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(160)) goto parse_random_seed;
        break;
      }

      // optional int64 random_seed = 20 [default = -1];
      case 20: {
        if (tag == 160) {
         parse_random_seed:
          set_has_random_seed();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &random_seed_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(170)) goto parse_train_net_param;
        break;
      }

      // optional .caffe.NetParameter train_net_param = 21;
      case 21: {
        if (tag == 170) {
         parse_train_net_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_train_net_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(178)) goto parse_test_net_param;
        break;
      }

      // repeated .caffe.NetParameter test_net_param = 22;
      case 22: {
        if (tag == 178) {
         parse_test_net_param:
          DO_(input->IncrementRecursionDepth());
         parse_loop_test_net_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_test_net_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(178)) goto parse_loop_test_net_param;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectTag(184)) goto parse_debug_info;
        break;
      }

      // optional bool debug_info = 23 [default = false];
      case 23: {
        if (tag == 184) {
         parse_debug_info:
          set_has_debug_info();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &debug_info_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(194)) goto parse_net;
        break;
      }

      // optional string net = 24;
      case 24: {
        if (tag == 194) {
         parse_net:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_net()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->net().data(), this->net().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.SolverParameter.net");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(202)) goto parse_net_param;
        break;
      }

      // optional .caffe.NetParameter net_param = 25;
      case 25: {
        if (tag == 202) {
         parse_net_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_net_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(210)) goto parse_train_state;
        break;
      }

      // optional .caffe.NetState train_state = 26;
      case 26: {
        if (tag == 210) {
         parse_train_state:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_train_state()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(218)) goto parse_test_state;
        break;
      }

      // repeated .caffe.NetState test_state = 27;
      case 27: {
        if (tag == 218) {
         parse_test_state:
          DO_(input->IncrementRecursionDepth());
         parse_loop_test_state:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_test_state()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(218)) goto parse_loop_test_state;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectTag(224)) goto parse_snapshot_after_train;
        break;
      }

      // optional bool snapshot_after_train = 28 [default = true];
      case 28: {
        if (tag == 224) {
         parse_snapshot_after_train:
          set_has_snapshot_after_train();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &snapshot_after_train_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(234)) goto parse_regularization_type;
        break;
      }

      // optional string regularization_type = 29 [default = "L2"];
      case 29: {
        if (tag == 234) {
         parse_regularization_type:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_regularization_type()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->regularization_type().data(), this->regularization_type().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.SolverParameter.regularization_type");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(240)) goto parse_solver_type;
        break;
      }

      // optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
      case 30: {
        if (tag == 240) {
         parse_solver_type:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::SolverParameter_SolverType_IsValid(value)) {
            set_solver_type(static_cast< ::caffe::SolverParameter_SolverType >(value));
          } else {
            mutable_unknown_fields()->AddVarint(30, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(253)) goto parse_delta;
        break;
      }

      // optional float delta = 31 [default = 1e-08];
      case 31: {
        if (tag == 253) {
         parse_delta:
          set_has_delta();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &delta_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(256)) goto parse_test_initialization;
        break;
      }

      // optional bool test_initialization = 32 [default = true];
      case 32: {
        if (tag == 256) {
         parse_test_initialization:
          set_has_test_initialization();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &test_initialization_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(264)) goto parse_average_loss;
        break;
      }

      // optional int32 average_loss = 33 [default = 1];
      case 33: {
        if (tag == 264) {
         parse_average_loss:
          set_has_average_loss();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &average_loss_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(272)) goto parse_stepvalue;
        break;
      }

      // repeated int32 stepvalue = 34;
      case 34: {
        if (tag == 272) {
         parse_stepvalue:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 2, 272, input, this->mutable_stepvalue())));
        } else if (tag == 274) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, this->mutable_stepvalue())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(272)) goto parse_stepvalue;
        if (input->ExpectTag(285)) goto parse_clip_gradients;
        break;
      }

      // optional float clip_gradients = 35 [default = -1];
      case 35: {
        if (tag == 285) {
         parse_clip_gradients:
          set_has_clip_gradients();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &clip_gradients_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(288)) goto parse_iter_size;
        break;
      }

      // optional int32 iter_size = 36 [default = 1];
      case 36: {
        if (tag == 288) {
         parse_iter_size:
          set_has_iter_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &iter_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.SolverParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.SolverParameter)
  return false;
#undef DO_
}

void SolverParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.SolverParameter)
  // optional string train_net = 1;
  if (has_train_net()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->train_net().data(), this->train_net().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.train_net");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->train_net(), output);
  }

  // repeated string test_net = 2;
  for (int i = 0; i < this->test_net_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->test_net(i).data(), this->test_net(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.test_net");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->test_net(i), output);
  }

  // repeated int32 test_iter = 3;
  for (int i = 0; i < this->test_iter_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      3, this->test_iter(i), output);
  }

  // optional int32 test_interval = 4 [default = 0];
  if (has_test_interval()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->test_interval(), output);
  }

  // optional float base_lr = 5;
  if (has_base_lr()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->base_lr(), output);
  }

  // optional int32 display = 6;
  if (has_display()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->display(), output);
  }

  // optional int32 max_iter = 7;
  if (has_max_iter()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->max_iter(), output);
  }

  // optional string lr_policy = 8;
  if (has_lr_policy()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->lr_policy().data(), this->lr_policy().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.lr_policy");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      8, this->lr_policy(), output);
  }

  // optional float gamma = 9;
  if (has_gamma()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(9, this->gamma(), output);
  }

  // optional float power = 10;
  if (has_power()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(10, this->power(), output);
  }

  // optional float momentum = 11;
  if (has_momentum()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->momentum(), output);
  }

  // optional float weight_decay = 12;
  if (has_weight_decay()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(12, this->weight_decay(), output);
  }

  // optional int32 stepsize = 13;
  if (has_stepsize()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(13, this->stepsize(), output);
  }

  // optional int32 snapshot = 14 [default = 0];
  if (has_snapshot()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(14, this->snapshot(), output);
  }

  // optional string snapshot_prefix = 15;
  if (has_snapshot_prefix()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->snapshot_prefix().data(), this->snapshot_prefix().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.snapshot_prefix");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      15, this->snapshot_prefix(), output);
  }

  // optional bool snapshot_diff = 16 [default = false];
  if (has_snapshot_diff()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(16, this->snapshot_diff(), output);
  }

  // optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
  if (has_solver_mode()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      17, this->solver_mode(), output);
  }

  // optional int32 device_id = 18 [default = 0];
  if (has_device_id()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(18, this->device_id(), output);
  }

  // optional bool test_compute_loss = 19 [default = false];
  if (has_test_compute_loss()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(19, this->test_compute_loss(), output);
  }

  // optional int64 random_seed = 20 [default = -1];
  if (has_random_seed()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(20, this->random_seed(), output);
  }

  // optional .caffe.NetParameter train_net_param = 21;
  if (has_train_net_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      21, *this->train_net_param_, output);
  }

  // repeated .caffe.NetParameter test_net_param = 22;
  for (unsigned int i = 0, n = this->test_net_param_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      22, this->test_net_param(i), output);
  }

  // optional bool debug_info = 23 [default = false];
  if (has_debug_info()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(23, this->debug_info(), output);
  }

  // optional string net = 24;
  if (has_net()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->net().data(), this->net().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.net");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      24, this->net(), output);
  }

  // optional .caffe.NetParameter net_param = 25;
  if (has_net_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      25, *this->net_param_, output);
  }

  // optional .caffe.NetState train_state = 26;
  if (has_train_state()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      26, *this->train_state_, output);
  }

  // repeated .caffe.NetState test_state = 27;
  for (unsigned int i = 0, n = this->test_state_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      27, this->test_state(i), output);
  }

  // optional bool snapshot_after_train = 28 [default = true];
  if (has_snapshot_after_train()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(28, this->snapshot_after_train(), output);
  }

  // optional string regularization_type = 29 [default = "L2"];
  if (has_regularization_type()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->regularization_type().data(), this->regularization_type().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.regularization_type");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      29, this->regularization_type(), output);
  }

  // optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
  if (has_solver_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      30, this->solver_type(), output);
  }

  // optional float delta = 31 [default = 1e-08];
  if (has_delta()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(31, this->delta(), output);
  }

  // optional bool test_initialization = 32 [default = true];
  if (has_test_initialization()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(32, this->test_initialization(), output);
  }

  // optional int32 average_loss = 33 [default = 1];
  if (has_average_loss()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(33, this->average_loss(), output);
  }

  // repeated int32 stepvalue = 34;
  for (int i = 0; i < this->stepvalue_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
      34, this->stepvalue(i), output);
  }

  // optional float clip_gradients = 35 [default = -1];
  if (has_clip_gradients()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(35, this->clip_gradients(), output);
  }

  // optional int32 iter_size = 36 [default = 1];
  if (has_iter_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(36, this->iter_size(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.SolverParameter)
}

::google::protobuf::uint8* SolverParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.SolverParameter)
  // optional string train_net = 1;
  if (has_train_net()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->train_net().data(), this->train_net().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.train_net");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->train_net(), target);
  }

  // repeated string test_net = 2;
  for (int i = 0; i < this->test_net_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->test_net(i).data(), this->test_net(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.test_net");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2, this->test_net(i), target);
  }

  // repeated int32 test_iter = 3;
  for (int i = 0; i < this->test_iter_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(3, this->test_iter(i), target);
  }

  // optional int32 test_interval = 4 [default = 0];
  if (has_test_interval()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->test_interval(), target);
  }

  // optional float base_lr = 5;
  if (has_base_lr()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(5, this->base_lr(), target);
  }

  // optional int32 display = 6;
  if (has_display()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->display(), target);
  }

  // optional int32 max_iter = 7;
  if (has_max_iter()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->max_iter(), target);
  }

  // optional string lr_policy = 8;
  if (has_lr_policy()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->lr_policy().data(), this->lr_policy().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.lr_policy");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        8, this->lr_policy(), target);
  }

  // optional float gamma = 9;
  if (has_gamma()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, this->gamma(), target);
  }

  // optional float power = 10;
  if (has_power()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(10, this->power(), target);
  }

  // optional float momentum = 11;
  if (has_momentum()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(11, this->momentum(), target);
  }

  // optional float weight_decay = 12;
  if (has_weight_decay()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(12, this->weight_decay(), target);
  }

  // optional int32 stepsize = 13;
  if (has_stepsize()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(13, this->stepsize(), target);
  }

  // optional int32 snapshot = 14 [default = 0];
  if (has_snapshot()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(14, this->snapshot(), target);
  }

  // optional string snapshot_prefix = 15;
  if (has_snapshot_prefix()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->snapshot_prefix().data(), this->snapshot_prefix().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.snapshot_prefix");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        15, this->snapshot_prefix(), target);
  }

  // optional bool snapshot_diff = 16 [default = false];
  if (has_snapshot_diff()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(16, this->snapshot_diff(), target);
  }

  // optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
  if (has_solver_mode()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      17, this->solver_mode(), target);
  }

  // optional int32 device_id = 18 [default = 0];
  if (has_device_id()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(18, this->device_id(), target);
  }

  // optional bool test_compute_loss = 19 [default = false];
  if (has_test_compute_loss()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(19, this->test_compute_loss(), target);
  }

  // optional int64 random_seed = 20 [default = -1];
  if (has_random_seed()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(20, this->random_seed(), target);
  }

  // optional .caffe.NetParameter train_net_param = 21;
  if (has_train_net_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        21, *this->train_net_param_, false, target);
  }

  // repeated .caffe.NetParameter test_net_param = 22;
  for (unsigned int i = 0, n = this->test_net_param_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        22, this->test_net_param(i), false, target);
  }

  // optional bool debug_info = 23 [default = false];
  if (has_debug_info()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(23, this->debug_info(), target);
  }

  // optional string net = 24;
  if (has_net()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->net().data(), this->net().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.net");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        24, this->net(), target);
  }

  // optional .caffe.NetParameter net_param = 25;
  if (has_net_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        25, *this->net_param_, false, target);
  }

  // optional .caffe.NetState train_state = 26;
  if (has_train_state()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        26, *this->train_state_, false, target);
  }

  // repeated .caffe.NetState test_state = 27;
  for (unsigned int i = 0, n = this->test_state_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        27, this->test_state(i), false, target);
  }

  // optional bool snapshot_after_train = 28 [default = true];
  if (has_snapshot_after_train()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(28, this->snapshot_after_train(), target);
  }

  // optional string regularization_type = 29 [default = "L2"];
  if (has_regularization_type()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->regularization_type().data(), this->regularization_type().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverParameter.regularization_type");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        29, this->regularization_type(), target);
  }

  // optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
  if (has_solver_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      30, this->solver_type(), target);
  }

  // optional float delta = 31 [default = 1e-08];
  if (has_delta()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(31, this->delta(), target);
  }

  // optional bool test_initialization = 32 [default = true];
  if (has_test_initialization()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(32, this->test_initialization(), target);
  }

  // optional int32 average_loss = 33 [default = 1];
  if (has_average_loss()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(33, this->average_loss(), target);
  }

  // repeated int32 stepvalue = 34;
  for (int i = 0; i < this->stepvalue_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteInt32ToArray(34, this->stepvalue(i), target);
  }

  // optional float clip_gradients = 35 [default = -1];
  if (has_clip_gradients()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(35, this->clip_gradients(), target);
  }

  // optional int32 iter_size = 36 [default = 1];
  if (has_iter_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(36, this->iter_size(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 87u) {
    // optional string net = 24;
    if (has_net()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->net());
    }

    // optional .caffe.NetParameter net_param = 25;
    if (has_net_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->net_param_);
    }

    // optional string train_net = 1;
    if (has_train_net()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->train_net());
    }

    // optional .caffe.NetParameter train_net_param = 21;
    if (has_train_net_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->train_net_param_);
    }

    // optional .caffe.NetState train_state = 26;
    if (has_train_state()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->train_state_);
    }

  }
  if (_has_bits_[9 / 32] & 65024u) {
    // optional int32 test_interval = 4 [default = 0];
    if (has_test_interval()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->test_interval());
    }

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

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

    // optional float base_lr = 5;
    if (has_base_lr()) {
      total_size += 1 + 4;
    }

    // optional int32 display = 6;
    if (has_display()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->display());
    }

    // optional int32 average_loss = 33 [default = 1];
    if (has_average_loss()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->average_loss());
    }

    // optional int32 max_iter = 7;
    if (has_max_iter()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->max_iter());
    }

  }
  if (_has_bits_[16 / 32] & 16711680u) {
    // optional int32 iter_size = 36 [default = 1];
    if (has_iter_size()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->iter_size());
    }

    // optional string lr_policy = 8;
    if (has_lr_policy()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->lr_policy());
    }

    // optional float gamma = 9;
    if (has_gamma()) {
      total_size += 1 + 4;
    }

    // optional float power = 10;
    if (has_power()) {
      total_size += 1 + 4;
    }

    // optional float momentum = 11;
    if (has_momentum()) {
      total_size += 1 + 4;
    }

    // optional float weight_decay = 12;
    if (has_weight_decay()) {
      total_size += 1 + 4;
    }

    // optional string regularization_type = 29 [default = "L2"];
    if (has_regularization_type()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->regularization_type());
    }

    // optional int32 stepsize = 13;
    if (has_stepsize()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->stepsize());
    }

  }
  if (_has_bits_[25 / 32] & 4261412864u) {
    // optional float clip_gradients = 35 [default = -1];
    if (has_clip_gradients()) {
      total_size += 2 + 4;
    }

    // optional int32 snapshot = 14 [default = 0];
    if (has_snapshot()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->snapshot());
    }

    // optional string snapshot_prefix = 15;
    if (has_snapshot_prefix()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->snapshot_prefix());
    }

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

    // optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
    if (has_solver_mode()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->solver_mode());
    }

    // optional int32 device_id = 18 [default = 0];
    if (has_device_id()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->device_id());
    }

    // optional int64 random_seed = 20 [default = -1];
    if (has_random_seed()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->random_seed());
    }

  }
  if (_has_bits_[32 / 32] & 15u) {
    // optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
    if (has_solver_type()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->solver_type());
    }

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

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

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

  }
  // repeated string test_net = 2;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->test_net_size());
  for (int i = 0; i < this->test_net_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->test_net(i));
  }

  // repeated .caffe.NetParameter test_net_param = 22;
  {
    unsigned int count = this->test_net_param_size();
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->test_net_param(i));
    }
  }

  // repeated .caffe.NetState test_state = 27;
  {
    unsigned int count = this->test_state_size();
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->test_state(i));
    }
  }

  // repeated int32 test_iter = 3;
  {
    size_t data_size = 0;
    unsigned int count = this->test_iter_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->test_iter(i));
    }
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->test_iter_size());
    total_size += data_size;
  }

  // repeated int32 stepvalue = 34;
  {
    size_t data_size = 0;
    unsigned int count = this->stepvalue_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        Int32Size(this->stepvalue(i));
    }
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->stepvalue_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SolverParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.SolverParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const SolverParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const SolverParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.SolverParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.SolverParameter)
    UnsafeMergeFrom(*source);
  }
}

void SolverParameter::MergeFrom(const SolverParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SolverParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void SolverParameter::UnsafeMergeFrom(const SolverParameter& from) {
  GOOGLE_DCHECK(&from != this);
  test_net_.UnsafeMergeFrom(from.test_net_);
  test_net_param_.MergeFrom(from.test_net_param_);
  test_state_.MergeFrom(from.test_state_);
  test_iter_.UnsafeMergeFrom(from.test_iter_);
  stepvalue_.UnsafeMergeFrom(from.stepvalue_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_net()) {
      set_has_net();
      net_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.net_);
    }
    if (from.has_net_param()) {
      mutable_net_param()->::caffe::NetParameter::MergeFrom(from.net_param());
    }
    if (from.has_train_net()) {
      set_has_train_net();
      train_net_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.train_net_);
    }
    if (from.has_train_net_param()) {
      mutable_train_net_param()->::caffe::NetParameter::MergeFrom(from.train_net_param());
    }
    if (from.has_train_state()) {
      mutable_train_state()->::caffe::NetState::MergeFrom(from.train_state());
    }
  }
  if (from._has_bits_[9 / 32] & (0xffu << (9 % 32))) {
    if (from.has_test_interval()) {
      set_test_interval(from.test_interval());
    }
    if (from.has_test_compute_loss()) {
      set_test_compute_loss(from.test_compute_loss());
    }
    if (from.has_test_initialization()) {
      set_test_initialization(from.test_initialization());
    }
    if (from.has_base_lr()) {
      set_base_lr(from.base_lr());
    }
    if (from.has_display()) {
      set_display(from.display());
    }
    if (from.has_average_loss()) {
      set_average_loss(from.average_loss());
    }
    if (from.has_max_iter()) {
      set_max_iter(from.max_iter());
    }
  }
  if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    if (from.has_iter_size()) {
      set_iter_size(from.iter_size());
    }
    if (from.has_lr_policy()) {
      set_has_lr_policy();
      lr_policy_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.lr_policy_);
    }
    if (from.has_gamma()) {
      set_gamma(from.gamma());
    }
    if (from.has_power()) {
      set_power(from.power());
    }
    if (from.has_momentum()) {
      set_momentum(from.momentum());
    }
    if (from.has_weight_decay()) {
      set_weight_decay(from.weight_decay());
    }
    if (from.has_regularization_type()) {
      set_has_regularization_type();
      regularization_type_.AssignWithDefault(_default_regularization_type_, from.regularization_type_);
    }
    if (from.has_stepsize()) {
      set_stepsize(from.stepsize());
    }
  }
  if (from._has_bits_[25 / 32] & (0xffu << (25 % 32))) {
    if (from.has_clip_gradients()) {
      set_clip_gradients(from.clip_gradients());
    }
    if (from.has_snapshot()) {
      set_snapshot(from.snapshot());
    }
    if (from.has_snapshot_prefix()) {
      set_has_snapshot_prefix();
      snapshot_prefix_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.snapshot_prefix_);
    }
    if (from.has_snapshot_diff()) {
      set_snapshot_diff(from.snapshot_diff());
    }
    if (from.has_solver_mode()) {
      set_solver_mode(from.solver_mode());
    }
    if (from.has_device_id()) {
      set_device_id(from.device_id());
    }
    if (from.has_random_seed()) {
      set_random_seed(from.random_seed());
    }
  }
  if (from._has_bits_[32 / 32] & (0xffu << (32 % 32))) {
    if (from.has_solver_type()) {
      set_solver_type(from.solver_type());
    }
    if (from.has_delta()) {
      set_delta(from.delta());
    }
    if (from.has_debug_info()) {
      set_debug_info(from.debug_info());
    }
    if (from.has_snapshot_after_train()) {
      set_snapshot_after_train(from.snapshot_after_train());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

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

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

bool SolverParameter::IsInitialized() const {

  return true;
}

void SolverParameter::Swap(SolverParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void SolverParameter::InternalSwap(SolverParameter* other) {
  net_.Swap(&other->net_);
  std::swap(net_param_, other->net_param_);
  train_net_.Swap(&other->train_net_);
  test_net_.UnsafeArenaSwap(&other->test_net_);
  std::swap(train_net_param_, other->train_net_param_);
  test_net_param_.UnsafeArenaSwap(&other->test_net_param_);
  std::swap(train_state_, other->train_state_);
  test_state_.UnsafeArenaSwap(&other->test_state_);
  test_iter_.UnsafeArenaSwap(&other->test_iter_);
  std::swap(test_interval_, other->test_interval_);
  std::swap(test_compute_loss_, other->test_compute_loss_);
  std::swap(test_initialization_, other->test_initialization_);
  std::swap(base_lr_, other->base_lr_);
  std::swap(display_, other->display_);
  std::swap(average_loss_, other->average_loss_);
  std::swap(max_iter_, other->max_iter_);
  std::swap(iter_size_, other->iter_size_);
  lr_policy_.Swap(&other->lr_policy_);
  std::swap(gamma_, other->gamma_);
  std::swap(power_, other->power_);
  std::swap(momentum_, other->momentum_);
  std::swap(weight_decay_, other->weight_decay_);
  regularization_type_.Swap(&other->regularization_type_);
  std::swap(stepsize_, other->stepsize_);
  stepvalue_.UnsafeArenaSwap(&other->stepvalue_);
  std::swap(clip_gradients_, other->clip_gradients_);
  std::swap(snapshot_, other->snapshot_);
  snapshot_prefix_.Swap(&other->snapshot_prefix_);
  std::swap(snapshot_diff_, other->snapshot_diff_);
  std::swap(solver_mode_, other->solver_mode_);
  std::swap(device_id_, other->device_id_);
  std::swap(random_seed_, other->random_seed_);
  std::swap(solver_type_, other->solver_type_);
  std::swap(delta_, other->delta_);
  std::swap(debug_info_, other->debug_info_);
  std::swap(snapshot_after_train_, other->snapshot_after_train_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  std::swap(_has_bits_[1], other->_has_bits_[1]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata SolverParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SolverParameter_descriptor_;
  metadata.reflection = SolverParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// SolverParameter

// optional string net = 24;
bool SolverParameter::has_net() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void SolverParameter::set_has_net() {
  _has_bits_[0] |= 0x00000001u;
}
void SolverParameter::clear_has_net() {
  _has_bits_[0] &= ~0x00000001u;
}
void SolverParameter::clear_net() {
  net_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_net();
}
const ::std::string& SolverParameter::net() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.net)
  return net_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void SolverParameter::set_net(const ::std::string& value) {
  set_has_net();
  net_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.net)
}
void SolverParameter::set_net(const char* value) {
  set_has_net();
  net_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.SolverParameter.net)
}
void SolverParameter::set_net(const char* value, size_t size) {
  set_has_net();
  net_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.SolverParameter.net)
}
::std::string* SolverParameter::mutable_net() {
  set_has_net();
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.net)
  return net_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* SolverParameter::release_net() {
  // @@protoc_insertion_point(field_release:caffe.SolverParameter.net)
  clear_has_net();
  return net_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void SolverParameter::set_allocated_net(::std::string* net) {
  if (net != NULL) {
    set_has_net();
  } else {
    clear_has_net();
  }
  net_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), net);
  // @@protoc_insertion_point(field_set_allocated:caffe.SolverParameter.net)
}

// optional .caffe.NetParameter net_param = 25;
bool SolverParameter::has_net_param() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void SolverParameter::set_has_net_param() {
  _has_bits_[0] |= 0x00000002u;
}
void SolverParameter::clear_has_net_param() {
  _has_bits_[0] &= ~0x00000002u;
}
void SolverParameter::clear_net_param() {
  if (net_param_ != NULL) net_param_->::caffe::NetParameter::Clear();
  clear_has_net_param();
}
const ::caffe::NetParameter& SolverParameter::net_param() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.net_param)
  return net_param_ != NULL ? *net_param_
                         : *::caffe::NetParameter::internal_default_instance();
}
::caffe::NetParameter* SolverParameter::mutable_net_param() {
  set_has_net_param();
  if (net_param_ == NULL) {
    net_param_ = new ::caffe::NetParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.net_param)
  return net_param_;
}
::caffe::NetParameter* SolverParameter::release_net_param() {
  // @@protoc_insertion_point(field_release:caffe.SolverParameter.net_param)
  clear_has_net_param();
  ::caffe::NetParameter* temp = net_param_;
  net_param_ = NULL;
  return temp;
}
void SolverParameter::set_allocated_net_param(::caffe::NetParameter* net_param) {
  delete net_param_;
  net_param_ = net_param;
  if (net_param) {
    set_has_net_param();
  } else {
    clear_has_net_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.SolverParameter.net_param)
}

// optional string train_net = 1;
bool SolverParameter::has_train_net() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void SolverParameter::set_has_train_net() {
  _has_bits_[0] |= 0x00000004u;
}
void SolverParameter::clear_has_train_net() {
  _has_bits_[0] &= ~0x00000004u;
}
void SolverParameter::clear_train_net() {
  train_net_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_train_net();
}
const ::std::string& SolverParameter::train_net() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.train_net)
  return train_net_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void SolverParameter::set_train_net(const ::std::string& value) {
  set_has_train_net();
  train_net_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.train_net)
}
void SolverParameter::set_train_net(const char* value) {
  set_has_train_net();
  train_net_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.SolverParameter.train_net)
}
void SolverParameter::set_train_net(const char* value, size_t size) {
  set_has_train_net();
  train_net_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.SolverParameter.train_net)
}
::std::string* SolverParameter::mutable_train_net() {
  set_has_train_net();
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.train_net)
  return train_net_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* SolverParameter::release_train_net() {
  // @@protoc_insertion_point(field_release:caffe.SolverParameter.train_net)
  clear_has_train_net();
  return train_net_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void SolverParameter::set_allocated_train_net(::std::string* train_net) {
  if (train_net != NULL) {
    set_has_train_net();
  } else {
    clear_has_train_net();
  }
  train_net_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), train_net);
  // @@protoc_insertion_point(field_set_allocated:caffe.SolverParameter.train_net)
}

// repeated string test_net = 2;
int SolverParameter::test_net_size() const {
  return test_net_.size();
}
void SolverParameter::clear_test_net() {
  test_net_.Clear();
}
const ::std::string& SolverParameter::test_net(int index) const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.test_net)
  return test_net_.Get(index);
}
::std::string* SolverParameter::mutable_test_net(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.test_net)
  return test_net_.Mutable(index);
}
void SolverParameter::set_test_net(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.test_net)
  test_net_.Mutable(index)->assign(value);
}
void SolverParameter::set_test_net(int index, const char* value) {
  test_net_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:caffe.SolverParameter.test_net)
}
void SolverParameter::set_test_net(int index, const char* value, size_t size) {
  test_net_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:caffe.SolverParameter.test_net)
}
::std::string* SolverParameter::add_test_net() {
  // @@protoc_insertion_point(field_add_mutable:caffe.SolverParameter.test_net)
  return test_net_.Add();
}
void SolverParameter::add_test_net(const ::std::string& value) {
  test_net_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:caffe.SolverParameter.test_net)
}
void SolverParameter::add_test_net(const char* value) {
  test_net_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:caffe.SolverParameter.test_net)
}
void SolverParameter::add_test_net(const char* value, size_t size) {
  test_net_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:caffe.SolverParameter.test_net)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
SolverParameter::test_net() const {
  // @@protoc_insertion_point(field_list:caffe.SolverParameter.test_net)
  return test_net_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
SolverParameter::mutable_test_net() {
  // @@protoc_insertion_point(field_mutable_list:caffe.SolverParameter.test_net)
  return &test_net_;
}

// optional .caffe.NetParameter train_net_param = 21;
bool SolverParameter::has_train_net_param() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void SolverParameter::set_has_train_net_param() {
  _has_bits_[0] |= 0x00000010u;
}
void SolverParameter::clear_has_train_net_param() {
  _has_bits_[0] &= ~0x00000010u;
}
void SolverParameter::clear_train_net_param() {
  if (train_net_param_ != NULL) train_net_param_->::caffe::NetParameter::Clear();
  clear_has_train_net_param();
}
const ::caffe::NetParameter& SolverParameter::train_net_param() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.train_net_param)
  return train_net_param_ != NULL ? *train_net_param_
                         : *::caffe::NetParameter::internal_default_instance();
}
::caffe::NetParameter* SolverParameter::mutable_train_net_param() {
  set_has_train_net_param();
  if (train_net_param_ == NULL) {
    train_net_param_ = new ::caffe::NetParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.train_net_param)
  return train_net_param_;
}
::caffe::NetParameter* SolverParameter::release_train_net_param() {
  // @@protoc_insertion_point(field_release:caffe.SolverParameter.train_net_param)
  clear_has_train_net_param();
  ::caffe::NetParameter* temp = train_net_param_;
  train_net_param_ = NULL;
  return temp;
}
void SolverParameter::set_allocated_train_net_param(::caffe::NetParameter* train_net_param) {
  delete train_net_param_;
  train_net_param_ = train_net_param;
  if (train_net_param) {
    set_has_train_net_param();
  } else {
    clear_has_train_net_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.SolverParameter.train_net_param)
}

// repeated .caffe.NetParameter test_net_param = 22;
int SolverParameter::test_net_param_size() const {
  return test_net_param_.size();
}
void SolverParameter::clear_test_net_param() {
  test_net_param_.Clear();
}
const ::caffe::NetParameter& SolverParameter::test_net_param(int index) const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.test_net_param)
  return test_net_param_.Get(index);
}
::caffe::NetParameter* SolverParameter::mutable_test_net_param(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.test_net_param)
  return test_net_param_.Mutable(index);
}
::caffe::NetParameter* SolverParameter::add_test_net_param() {
  // @@protoc_insertion_point(field_add:caffe.SolverParameter.test_net_param)
  return test_net_param_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::NetParameter >*
SolverParameter::mutable_test_net_param() {
  // @@protoc_insertion_point(field_mutable_list:caffe.SolverParameter.test_net_param)
  return &test_net_param_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::NetParameter >&
SolverParameter::test_net_param() const {
  // @@protoc_insertion_point(field_list:caffe.SolverParameter.test_net_param)
  return test_net_param_;
}

// optional .caffe.NetState train_state = 26;
bool SolverParameter::has_train_state() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void SolverParameter::set_has_train_state() {
  _has_bits_[0] |= 0x00000040u;
}
void SolverParameter::clear_has_train_state() {
  _has_bits_[0] &= ~0x00000040u;
}
void SolverParameter::clear_train_state() {
  if (train_state_ != NULL) train_state_->::caffe::NetState::Clear();
  clear_has_train_state();
}
const ::caffe::NetState& SolverParameter::train_state() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.train_state)
  return train_state_ != NULL ? *train_state_
                         : *::caffe::NetState::internal_default_instance();
}
::caffe::NetState* SolverParameter::mutable_train_state() {
  set_has_train_state();
  if (train_state_ == NULL) {
    train_state_ = new ::caffe::NetState;
  }
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.train_state)
  return train_state_;
}
::caffe::NetState* SolverParameter::release_train_state() {
  // @@protoc_insertion_point(field_release:caffe.SolverParameter.train_state)
  clear_has_train_state();
  ::caffe::NetState* temp = train_state_;
  train_state_ = NULL;
  return temp;
}
void SolverParameter::set_allocated_train_state(::caffe::NetState* train_state) {
  delete train_state_;
  train_state_ = train_state;
  if (train_state) {
    set_has_train_state();
  } else {
    clear_has_train_state();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.SolverParameter.train_state)
}

// repeated .caffe.NetState test_state = 27;
int SolverParameter::test_state_size() const {
  return test_state_.size();
}
void SolverParameter::clear_test_state() {
  test_state_.Clear();
}
const ::caffe::NetState& SolverParameter::test_state(int index) const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.test_state)
  return test_state_.Get(index);
}
::caffe::NetState* SolverParameter::mutable_test_state(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.test_state)
  return test_state_.Mutable(index);
}
::caffe::NetState* SolverParameter::add_test_state() {
  // @@protoc_insertion_point(field_add:caffe.SolverParameter.test_state)
  return test_state_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::NetState >*
SolverParameter::mutable_test_state() {
  // @@protoc_insertion_point(field_mutable_list:caffe.SolverParameter.test_state)
  return &test_state_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::NetState >&
SolverParameter::test_state() const {
  // @@protoc_insertion_point(field_list:caffe.SolverParameter.test_state)
  return test_state_;
}

// repeated int32 test_iter = 3;
int SolverParameter::test_iter_size() const {
  return test_iter_.size();
}
void SolverParameter::clear_test_iter() {
  test_iter_.Clear();
}
::google::protobuf::int32 SolverParameter::test_iter(int index) const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.test_iter)
  return test_iter_.Get(index);
}
void SolverParameter::set_test_iter(int index, ::google::protobuf::int32 value) {
  test_iter_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.test_iter)
}
void SolverParameter::add_test_iter(::google::protobuf::int32 value) {
  test_iter_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.SolverParameter.test_iter)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
SolverParameter::test_iter() const {
  // @@protoc_insertion_point(field_list:caffe.SolverParameter.test_iter)
  return test_iter_;
}
::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
SolverParameter::mutable_test_iter() {
  // @@protoc_insertion_point(field_mutable_list:caffe.SolverParameter.test_iter)
  return &test_iter_;
}

// optional int32 test_interval = 4 [default = 0];
bool SolverParameter::has_test_interval() const {
  return (_has_bits_[0] & 0x00000200u) != 0;
}
void SolverParameter::set_has_test_interval() {
  _has_bits_[0] |= 0x00000200u;
}
void SolverParameter::clear_has_test_interval() {
  _has_bits_[0] &= ~0x00000200u;
}
void SolverParameter::clear_test_interval() {
  test_interval_ = 0;
  clear_has_test_interval();
}
::google::protobuf::int32 SolverParameter::test_interval() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.test_interval)
  return test_interval_;
}
void SolverParameter::set_test_interval(::google::protobuf::int32 value) {
  set_has_test_interval();
  test_interval_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.test_interval)
}

// optional bool test_compute_loss = 19 [default = false];
bool SolverParameter::has_test_compute_loss() const {
  return (_has_bits_[0] & 0x00000400u) != 0;
}
void SolverParameter::set_has_test_compute_loss() {
  _has_bits_[0] |= 0x00000400u;
}
void SolverParameter::clear_has_test_compute_loss() {
  _has_bits_[0] &= ~0x00000400u;
}
void SolverParameter::clear_test_compute_loss() {
  test_compute_loss_ = false;
  clear_has_test_compute_loss();
}
bool SolverParameter::test_compute_loss() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.test_compute_loss)
  return test_compute_loss_;
}
void SolverParameter::set_test_compute_loss(bool value) {
  set_has_test_compute_loss();
  test_compute_loss_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.test_compute_loss)
}

// optional bool test_initialization = 32 [default = true];
bool SolverParameter::has_test_initialization() const {
  return (_has_bits_[0] & 0x00000800u) != 0;
}
void SolverParameter::set_has_test_initialization() {
  _has_bits_[0] |= 0x00000800u;
}
void SolverParameter::clear_has_test_initialization() {
  _has_bits_[0] &= ~0x00000800u;
}
void SolverParameter::clear_test_initialization() {
  test_initialization_ = true;
  clear_has_test_initialization();
}
bool SolverParameter::test_initialization() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.test_initialization)
  return test_initialization_;
}
void SolverParameter::set_test_initialization(bool value) {
  set_has_test_initialization();
  test_initialization_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.test_initialization)
}

// optional float base_lr = 5;
bool SolverParameter::has_base_lr() const {
  return (_has_bits_[0] & 0x00001000u) != 0;
}
void SolverParameter::set_has_base_lr() {
  _has_bits_[0] |= 0x00001000u;
}
void SolverParameter::clear_has_base_lr() {
  _has_bits_[0] &= ~0x00001000u;
}
void SolverParameter::clear_base_lr() {
  base_lr_ = 0;
  clear_has_base_lr();
}
float SolverParameter::base_lr() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.base_lr)
  return base_lr_;
}
void SolverParameter::set_base_lr(float value) {
  set_has_base_lr();
  base_lr_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.base_lr)
}

// optional int32 display = 6;
bool SolverParameter::has_display() const {
  return (_has_bits_[0] & 0x00002000u) != 0;
}
void SolverParameter::set_has_display() {
  _has_bits_[0] |= 0x00002000u;
}
void SolverParameter::clear_has_display() {
  _has_bits_[0] &= ~0x00002000u;
}
void SolverParameter::clear_display() {
  display_ = 0;
  clear_has_display();
}
::google::protobuf::int32 SolverParameter::display() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.display)
  return display_;
}
void SolverParameter::set_display(::google::protobuf::int32 value) {
  set_has_display();
  display_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.display)
}

// optional int32 average_loss = 33 [default = 1];
bool SolverParameter::has_average_loss() const {
  return (_has_bits_[0] & 0x00004000u) != 0;
}
void SolverParameter::set_has_average_loss() {
  _has_bits_[0] |= 0x00004000u;
}
void SolverParameter::clear_has_average_loss() {
  _has_bits_[0] &= ~0x00004000u;
}
void SolverParameter::clear_average_loss() {
  average_loss_ = 1;
  clear_has_average_loss();
}
::google::protobuf::int32 SolverParameter::average_loss() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.average_loss)
  return average_loss_;
}
void SolverParameter::set_average_loss(::google::protobuf::int32 value) {
  set_has_average_loss();
  average_loss_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.average_loss)
}

// optional int32 max_iter = 7;
bool SolverParameter::has_max_iter() const {
  return (_has_bits_[0] & 0x00008000u) != 0;
}
void SolverParameter::set_has_max_iter() {
  _has_bits_[0] |= 0x00008000u;
}
void SolverParameter::clear_has_max_iter() {
  _has_bits_[0] &= ~0x00008000u;
}
void SolverParameter::clear_max_iter() {
  max_iter_ = 0;
  clear_has_max_iter();
}
::google::protobuf::int32 SolverParameter::max_iter() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.max_iter)
  return max_iter_;
}
void SolverParameter::set_max_iter(::google::protobuf::int32 value) {
  set_has_max_iter();
  max_iter_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.max_iter)
}

// optional int32 iter_size = 36 [default = 1];
bool SolverParameter::has_iter_size() const {
  return (_has_bits_[0] & 0x00010000u) != 0;
}
void SolverParameter::set_has_iter_size() {
  _has_bits_[0] |= 0x00010000u;
}
void SolverParameter::clear_has_iter_size() {
  _has_bits_[0] &= ~0x00010000u;
}
void SolverParameter::clear_iter_size() {
  iter_size_ = 1;
  clear_has_iter_size();
}
::google::protobuf::int32 SolverParameter::iter_size() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.iter_size)
  return iter_size_;
}
void SolverParameter::set_iter_size(::google::protobuf::int32 value) {
  set_has_iter_size();
  iter_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.iter_size)
}

// optional string lr_policy = 8;
bool SolverParameter::has_lr_policy() const {
  return (_has_bits_[0] & 0x00020000u) != 0;
}
void SolverParameter::set_has_lr_policy() {
  _has_bits_[0] |= 0x00020000u;
}
void SolverParameter::clear_has_lr_policy() {
  _has_bits_[0] &= ~0x00020000u;
}
void SolverParameter::clear_lr_policy() {
  lr_policy_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_lr_policy();
}
const ::std::string& SolverParameter::lr_policy() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.lr_policy)
  return lr_policy_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void SolverParameter::set_lr_policy(const ::std::string& value) {
  set_has_lr_policy();
  lr_policy_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.lr_policy)
}
void SolverParameter::set_lr_policy(const char* value) {
  set_has_lr_policy();
  lr_policy_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.SolverParameter.lr_policy)
}
void SolverParameter::set_lr_policy(const char* value, size_t size) {
  set_has_lr_policy();
  lr_policy_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.SolverParameter.lr_policy)
}
::std::string* SolverParameter::mutable_lr_policy() {
  set_has_lr_policy();
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.lr_policy)
  return lr_policy_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* SolverParameter::release_lr_policy() {
  // @@protoc_insertion_point(field_release:caffe.SolverParameter.lr_policy)
  clear_has_lr_policy();
  return lr_policy_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void SolverParameter::set_allocated_lr_policy(::std::string* lr_policy) {
  if (lr_policy != NULL) {
    set_has_lr_policy();
  } else {
    clear_has_lr_policy();
  }
  lr_policy_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), lr_policy);
  // @@protoc_insertion_point(field_set_allocated:caffe.SolverParameter.lr_policy)
}

// optional float gamma = 9;
bool SolverParameter::has_gamma() const {
  return (_has_bits_[0] & 0x00040000u) != 0;
}
void SolverParameter::set_has_gamma() {
  _has_bits_[0] |= 0x00040000u;
}
void SolverParameter::clear_has_gamma() {
  _has_bits_[0] &= ~0x00040000u;
}
void SolverParameter::clear_gamma() {
  gamma_ = 0;
  clear_has_gamma();
}
float SolverParameter::gamma() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.gamma)
  return gamma_;
}
void SolverParameter::set_gamma(float value) {
  set_has_gamma();
  gamma_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.gamma)
}

// optional float power = 10;
bool SolverParameter::has_power() const {
  return (_has_bits_[0] & 0x00080000u) != 0;
}
void SolverParameter::set_has_power() {
  _has_bits_[0] |= 0x00080000u;
}
void SolverParameter::clear_has_power() {
  _has_bits_[0] &= ~0x00080000u;
}
void SolverParameter::clear_power() {
  power_ = 0;
  clear_has_power();
}
float SolverParameter::power() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.power)
  return power_;
}
void SolverParameter::set_power(float value) {
  set_has_power();
  power_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.power)
}

// optional float momentum = 11;
bool SolverParameter::has_momentum() const {
  return (_has_bits_[0] & 0x00100000u) != 0;
}
void SolverParameter::set_has_momentum() {
  _has_bits_[0] |= 0x00100000u;
}
void SolverParameter::clear_has_momentum() {
  _has_bits_[0] &= ~0x00100000u;
}
void SolverParameter::clear_momentum() {
  momentum_ = 0;
  clear_has_momentum();
}
float SolverParameter::momentum() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.momentum)
  return momentum_;
}
void SolverParameter::set_momentum(float value) {
  set_has_momentum();
  momentum_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.momentum)
}

// optional float weight_decay = 12;
bool SolverParameter::has_weight_decay() const {
  return (_has_bits_[0] & 0x00200000u) != 0;
}
void SolverParameter::set_has_weight_decay() {
  _has_bits_[0] |= 0x00200000u;
}
void SolverParameter::clear_has_weight_decay() {
  _has_bits_[0] &= ~0x00200000u;
}
void SolverParameter::clear_weight_decay() {
  weight_decay_ = 0;
  clear_has_weight_decay();
}
float SolverParameter::weight_decay() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.weight_decay)
  return weight_decay_;
}
void SolverParameter::set_weight_decay(float value) {
  set_has_weight_decay();
  weight_decay_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.weight_decay)
}

// optional string regularization_type = 29 [default = "L2"];
bool SolverParameter::has_regularization_type() const {
  return (_has_bits_[0] & 0x00400000u) != 0;
}
void SolverParameter::set_has_regularization_type() {
  _has_bits_[0] |= 0x00400000u;
}
void SolverParameter::clear_has_regularization_type() {
  _has_bits_[0] &= ~0x00400000u;
}
void SolverParameter::clear_regularization_type() {
  regularization_type_.ClearToDefaultNoArena(_default_regularization_type_);
  clear_has_regularization_type();
}
const ::std::string& SolverParameter::regularization_type() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.regularization_type)
  return regularization_type_.GetNoArena(_default_regularization_type_);
}
void SolverParameter::set_regularization_type(const ::std::string& value) {
  set_has_regularization_type();
  regularization_type_.SetNoArena(_default_regularization_type_, value);
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.regularization_type)
}
void SolverParameter::set_regularization_type(const char* value) {
  set_has_regularization_type();
  regularization_type_.SetNoArena(_default_regularization_type_, ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.SolverParameter.regularization_type)
}
void SolverParameter::set_regularization_type(const char* value, size_t size) {
  set_has_regularization_type();
  regularization_type_.SetNoArena(_default_regularization_type_,
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.SolverParameter.regularization_type)
}
::std::string* SolverParameter::mutable_regularization_type() {
  set_has_regularization_type();
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.regularization_type)
  return regularization_type_.MutableNoArena(_default_regularization_type_);
}
::std::string* SolverParameter::release_regularization_type() {
  // @@protoc_insertion_point(field_release:caffe.SolverParameter.regularization_type)
  clear_has_regularization_type();
  return regularization_type_.ReleaseNoArena(_default_regularization_type_);
}
void SolverParameter::set_allocated_regularization_type(::std::string* regularization_type) {
  if (regularization_type != NULL) {
    set_has_regularization_type();
  } else {
    clear_has_regularization_type();
  }
  regularization_type_.SetAllocatedNoArena(_default_regularization_type_, regularization_type);
  // @@protoc_insertion_point(field_set_allocated:caffe.SolverParameter.regularization_type)
}

// optional int32 stepsize = 13;
bool SolverParameter::has_stepsize() const {
  return (_has_bits_[0] & 0x00800000u) != 0;
}
void SolverParameter::set_has_stepsize() {
  _has_bits_[0] |= 0x00800000u;
}
void SolverParameter::clear_has_stepsize() {
  _has_bits_[0] &= ~0x00800000u;
}
void SolverParameter::clear_stepsize() {
  stepsize_ = 0;
  clear_has_stepsize();
}
::google::protobuf::int32 SolverParameter::stepsize() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.stepsize)
  return stepsize_;
}
void SolverParameter::set_stepsize(::google::protobuf::int32 value) {
  set_has_stepsize();
  stepsize_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.stepsize)
}

// repeated int32 stepvalue = 34;
int SolverParameter::stepvalue_size() const {
  return stepvalue_.size();
}
void SolverParameter::clear_stepvalue() {
  stepvalue_.Clear();
}
::google::protobuf::int32 SolverParameter::stepvalue(int index) const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.stepvalue)
  return stepvalue_.Get(index);
}
void SolverParameter::set_stepvalue(int index, ::google::protobuf::int32 value) {
  stepvalue_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.stepvalue)
}
void SolverParameter::add_stepvalue(::google::protobuf::int32 value) {
  stepvalue_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.SolverParameter.stepvalue)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >&
SolverParameter::stepvalue() const {
  // @@protoc_insertion_point(field_list:caffe.SolverParameter.stepvalue)
  return stepvalue_;
}
::google::protobuf::RepeatedField< ::google::protobuf::int32 >*
SolverParameter::mutable_stepvalue() {
  // @@protoc_insertion_point(field_mutable_list:caffe.SolverParameter.stepvalue)
  return &stepvalue_;
}

// optional float clip_gradients = 35 [default = -1];
bool SolverParameter::has_clip_gradients() const {
  return (_has_bits_[0] & 0x02000000u) != 0;
}
void SolverParameter::set_has_clip_gradients() {
  _has_bits_[0] |= 0x02000000u;
}
void SolverParameter::clear_has_clip_gradients() {
  _has_bits_[0] &= ~0x02000000u;
}
void SolverParameter::clear_clip_gradients() {
  clip_gradients_ = -1;
  clear_has_clip_gradients();
}
float SolverParameter::clip_gradients() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.clip_gradients)
  return clip_gradients_;
}
void SolverParameter::set_clip_gradients(float value) {
  set_has_clip_gradients();
  clip_gradients_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.clip_gradients)
}

// optional int32 snapshot = 14 [default = 0];
bool SolverParameter::has_snapshot() const {
  return (_has_bits_[0] & 0x04000000u) != 0;
}
void SolverParameter::set_has_snapshot() {
  _has_bits_[0] |= 0x04000000u;
}
void SolverParameter::clear_has_snapshot() {
  _has_bits_[0] &= ~0x04000000u;
}
void SolverParameter::clear_snapshot() {
  snapshot_ = 0;
  clear_has_snapshot();
}
::google::protobuf::int32 SolverParameter::snapshot() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.snapshot)
  return snapshot_;
}
void SolverParameter::set_snapshot(::google::protobuf::int32 value) {
  set_has_snapshot();
  snapshot_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.snapshot)
}

// optional string snapshot_prefix = 15;
bool SolverParameter::has_snapshot_prefix() const {
  return (_has_bits_[0] & 0x08000000u) != 0;
}
void SolverParameter::set_has_snapshot_prefix() {
  _has_bits_[0] |= 0x08000000u;
}
void SolverParameter::clear_has_snapshot_prefix() {
  _has_bits_[0] &= ~0x08000000u;
}
void SolverParameter::clear_snapshot_prefix() {
  snapshot_prefix_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_snapshot_prefix();
}
const ::std::string& SolverParameter::snapshot_prefix() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.snapshot_prefix)
  return snapshot_prefix_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void SolverParameter::set_snapshot_prefix(const ::std::string& value) {
  set_has_snapshot_prefix();
  snapshot_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.snapshot_prefix)
}
void SolverParameter::set_snapshot_prefix(const char* value) {
  set_has_snapshot_prefix();
  snapshot_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.SolverParameter.snapshot_prefix)
}
void SolverParameter::set_snapshot_prefix(const char* value, size_t size) {
  set_has_snapshot_prefix();
  snapshot_prefix_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.SolverParameter.snapshot_prefix)
}
::std::string* SolverParameter::mutable_snapshot_prefix() {
  set_has_snapshot_prefix();
  // @@protoc_insertion_point(field_mutable:caffe.SolverParameter.snapshot_prefix)
  return snapshot_prefix_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* SolverParameter::release_snapshot_prefix() {
  // @@protoc_insertion_point(field_release:caffe.SolverParameter.snapshot_prefix)
  clear_has_snapshot_prefix();
  return snapshot_prefix_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void SolverParameter::set_allocated_snapshot_prefix(::std::string* snapshot_prefix) {
  if (snapshot_prefix != NULL) {
    set_has_snapshot_prefix();
  } else {
    clear_has_snapshot_prefix();
  }
  snapshot_prefix_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), snapshot_prefix);
  // @@protoc_insertion_point(field_set_allocated:caffe.SolverParameter.snapshot_prefix)
}

// optional bool snapshot_diff = 16 [default = false];
bool SolverParameter::has_snapshot_diff() const {
  return (_has_bits_[0] & 0x10000000u) != 0;
}
void SolverParameter::set_has_snapshot_diff() {
  _has_bits_[0] |= 0x10000000u;
}
void SolverParameter::clear_has_snapshot_diff() {
  _has_bits_[0] &= ~0x10000000u;
}
void SolverParameter::clear_snapshot_diff() {
  snapshot_diff_ = false;
  clear_has_snapshot_diff();
}
bool SolverParameter::snapshot_diff() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.snapshot_diff)
  return snapshot_diff_;
}
void SolverParameter::set_snapshot_diff(bool value) {
  set_has_snapshot_diff();
  snapshot_diff_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.snapshot_diff)
}

// optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
bool SolverParameter::has_solver_mode() const {
  return (_has_bits_[0] & 0x20000000u) != 0;
}
void SolverParameter::set_has_solver_mode() {
  _has_bits_[0] |= 0x20000000u;
}
void SolverParameter::clear_has_solver_mode() {
  _has_bits_[0] &= ~0x20000000u;
}
void SolverParameter::clear_solver_mode() {
  solver_mode_ = 1;
  clear_has_solver_mode();
}
::caffe::SolverParameter_SolverMode SolverParameter::solver_mode() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.solver_mode)
  return static_cast< ::caffe::SolverParameter_SolverMode >(solver_mode_);
}
void SolverParameter::set_solver_mode(::caffe::SolverParameter_SolverMode value) {
  assert(::caffe::SolverParameter_SolverMode_IsValid(value));
  set_has_solver_mode();
  solver_mode_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.solver_mode)
}

// optional int32 device_id = 18 [default = 0];
bool SolverParameter::has_device_id() const {
  return (_has_bits_[0] & 0x40000000u) != 0;
}
void SolverParameter::set_has_device_id() {
  _has_bits_[0] |= 0x40000000u;
}
void SolverParameter::clear_has_device_id() {
  _has_bits_[0] &= ~0x40000000u;
}
void SolverParameter::clear_device_id() {
  device_id_ = 0;
  clear_has_device_id();
}
::google::protobuf::int32 SolverParameter::device_id() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.device_id)
  return device_id_;
}
void SolverParameter::set_device_id(::google::protobuf::int32 value) {
  set_has_device_id();
  device_id_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.device_id)
}

// optional int64 random_seed = 20 [default = -1];
bool SolverParameter::has_random_seed() const {
  return (_has_bits_[0] & 0x80000000u) != 0;
}
void SolverParameter::set_has_random_seed() {
  _has_bits_[0] |= 0x80000000u;
}
void SolverParameter::clear_has_random_seed() {
  _has_bits_[0] &= ~0x80000000u;
}
void SolverParameter::clear_random_seed() {
  random_seed_ = GOOGLE_LONGLONG(-1);
  clear_has_random_seed();
}
::google::protobuf::int64 SolverParameter::random_seed() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.random_seed)
  return random_seed_;
}
void SolverParameter::set_random_seed(::google::protobuf::int64 value) {
  set_has_random_seed();
  random_seed_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.random_seed)
}

// optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
bool SolverParameter::has_solver_type() const {
  return (_has_bits_[1] & 0x00000001u) != 0;
}
void SolverParameter::set_has_solver_type() {
  _has_bits_[1] |= 0x00000001u;
}
void SolverParameter::clear_has_solver_type() {
  _has_bits_[1] &= ~0x00000001u;
}
void SolverParameter::clear_solver_type() {
  solver_type_ = 0;
  clear_has_solver_type();
}
::caffe::SolverParameter_SolverType SolverParameter::solver_type() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.solver_type)
  return static_cast< ::caffe::SolverParameter_SolverType >(solver_type_);
}
void SolverParameter::set_solver_type(::caffe::SolverParameter_SolverType value) {
  assert(::caffe::SolverParameter_SolverType_IsValid(value));
  set_has_solver_type();
  solver_type_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.solver_type)
}

// optional float delta = 31 [default = 1e-08];
bool SolverParameter::has_delta() const {
  return (_has_bits_[1] & 0x00000002u) != 0;
}
void SolverParameter::set_has_delta() {
  _has_bits_[1] |= 0x00000002u;
}
void SolverParameter::clear_has_delta() {
  _has_bits_[1] &= ~0x00000002u;
}
void SolverParameter::clear_delta() {
  delta_ = 1e-08f;
  clear_has_delta();
}
float SolverParameter::delta() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.delta)
  return delta_;
}
void SolverParameter::set_delta(float value) {
  set_has_delta();
  delta_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.delta)
}

// optional bool debug_info = 23 [default = false];
bool SolverParameter::has_debug_info() const {
  return (_has_bits_[1] & 0x00000004u) != 0;
}
void SolverParameter::set_has_debug_info() {
  _has_bits_[1] |= 0x00000004u;
}
void SolverParameter::clear_has_debug_info() {
  _has_bits_[1] &= ~0x00000004u;
}
void SolverParameter::clear_debug_info() {
  debug_info_ = false;
  clear_has_debug_info();
}
bool SolverParameter::debug_info() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.debug_info)
  return debug_info_;
}
void SolverParameter::set_debug_info(bool value) {
  set_has_debug_info();
  debug_info_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.debug_info)
}

// optional bool snapshot_after_train = 28 [default = true];
bool SolverParameter::has_snapshot_after_train() const {
  return (_has_bits_[1] & 0x00000008u) != 0;
}
void SolverParameter::set_has_snapshot_after_train() {
  _has_bits_[1] |= 0x00000008u;
}
void SolverParameter::clear_has_snapshot_after_train() {
  _has_bits_[1] &= ~0x00000008u;
}
void SolverParameter::clear_snapshot_after_train() {
  snapshot_after_train_ = true;
  clear_has_snapshot_after_train();
}
bool SolverParameter::snapshot_after_train() const {
  // @@protoc_insertion_point(field_get:caffe.SolverParameter.snapshot_after_train)
  return snapshot_after_train_;
}
void SolverParameter::set_snapshot_after_train(bool value) {
  set_has_snapshot_after_train();
  snapshot_after_train_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverParameter.snapshot_after_train)
}

inline const SolverParameter* SolverParameter::internal_default_instance() {
  return &SolverParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int SolverState::kIterFieldNumber;
const int SolverState::kLearnedNetFieldNumber;
const int SolverState::kHistoryFieldNumber;
const int SolverState::kCurrentStepFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

SolverState::SolverState()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.SolverState)
}

void SolverState::InitAsDefaultInstance() {
}

SolverState::SolverState(const SolverState& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.SolverState)
}

void SolverState::SharedCtor() {
  _cached_size_ = 0;
  learned_net_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&iter_, 0, reinterpret_cast<char*>(&current_step_) -
    reinterpret_cast<char*>(&iter_) + sizeof(current_step_));
}

SolverState::~SolverState() {
  // @@protoc_insertion_point(destructor:caffe.SolverState)
  SharedDtor();
}

void SolverState::SharedDtor() {
  learned_net_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void SolverState::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SolverState::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SolverState_descriptor_;
}

const SolverState& SolverState::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<SolverState> SolverState_default_instance_;

SolverState* SolverState::New(::google::protobuf::Arena* arena) const {
  SolverState* n = new SolverState;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void SolverState::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.SolverState)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(SolverState, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<SolverState*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 11u) {
    ZR_(iter_, current_step_);
    if (has_learned_net()) {
      learned_net_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
  }

#undef ZR_HELPER_
#undef ZR_

  history_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool SolverState::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.SolverState)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 iter = 1;
      case 1: {
        if (tag == 8) {
          set_has_iter();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &iter_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_learned_net;
        break;
      }

      // optional string learned_net = 2;
      case 2: {
        if (tag == 18) {
         parse_learned_net:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_learned_net()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->learned_net().data(), this->learned_net().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.SolverState.learned_net");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_history;
        break;
      }

      // repeated .caffe.BlobProto history = 3;
      case 3: {
        if (tag == 26) {
         parse_history:
          DO_(input->IncrementRecursionDepth());
         parse_loop_history:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_history()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_loop_history;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectTag(32)) goto parse_current_step;
        break;
      }

      // optional int32 current_step = 4 [default = 0];
      case 4: {
        if (tag == 32) {
         parse_current_step:
          set_has_current_step();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &current_step_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.SolverState)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.SolverState)
  return false;
#undef DO_
}

void SolverState::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.SolverState)
  // optional int32 iter = 1;
  if (has_iter()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->iter(), output);
  }

  // optional string learned_net = 2;
  if (has_learned_net()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->learned_net().data(), this->learned_net().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverState.learned_net");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->learned_net(), output);
  }

  // repeated .caffe.BlobProto history = 3;
  for (unsigned int i = 0, n = this->history_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->history(i), output);
  }

  // optional int32 current_step = 4 [default = 0];
  if (has_current_step()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(4, this->current_step(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.SolverState)
}

::google::protobuf::uint8* SolverState::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.SolverState)
  // optional int32 iter = 1;
  if (has_iter()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->iter(), target);
  }

  // optional string learned_net = 2;
  if (has_learned_net()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->learned_net().data(), this->learned_net().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.SolverState.learned_net");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->learned_net(), target);
  }

  // repeated .caffe.BlobProto history = 3;
  for (unsigned int i = 0, n = this->history_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        3, this->history(i), false, target);
  }

  // optional int32 current_step = 4 [default = 0];
  if (has_current_step()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->current_step(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 11u) {
    // optional int32 iter = 1;
    if (has_iter()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->iter());
    }

    // optional string learned_net = 2;
    if (has_learned_net()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->learned_net());
    }

    // optional int32 current_step = 4 [default = 0];
    if (has_current_step()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->current_step());
    }

  }
  // repeated .caffe.BlobProto history = 3;
  {
    unsigned int count = this->history_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->history(i));
    }
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SolverState::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.SolverState)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const SolverState* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const SolverState>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.SolverState)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.SolverState)
    UnsafeMergeFrom(*source);
  }
}

void SolverState::MergeFrom(const SolverState& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SolverState)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void SolverState::UnsafeMergeFrom(const SolverState& from) {
  GOOGLE_DCHECK(&from != this);
  history_.MergeFrom(from.history_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_iter()) {
      set_iter(from.iter());
    }
    if (from.has_learned_net()) {
      set_has_learned_net();
      learned_net_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.learned_net_);
    }
    if (from.has_current_step()) {
      set_current_step(from.current_step());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void SolverState::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.SolverState)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool SolverState::IsInitialized() const {

  return true;
}

void SolverState::Swap(SolverState* other) {
  if (other == this) return;
  InternalSwap(other);
}
void SolverState::InternalSwap(SolverState* other) {
  std::swap(iter_, other->iter_);
  learned_net_.Swap(&other->learned_net_);
  history_.UnsafeArenaSwap(&other->history_);
  std::swap(current_step_, other->current_step_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata SolverState::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SolverState_descriptor_;
  metadata.reflection = SolverState_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// SolverState

// optional int32 iter = 1;
bool SolverState::has_iter() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void SolverState::set_has_iter() {
  _has_bits_[0] |= 0x00000001u;
}
void SolverState::clear_has_iter() {
  _has_bits_[0] &= ~0x00000001u;
}
void SolverState::clear_iter() {
  iter_ = 0;
  clear_has_iter();
}
::google::protobuf::int32 SolverState::iter() const {
  // @@protoc_insertion_point(field_get:caffe.SolverState.iter)
  return iter_;
}
void SolverState::set_iter(::google::protobuf::int32 value) {
  set_has_iter();
  iter_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverState.iter)
}

// optional string learned_net = 2;
bool SolverState::has_learned_net() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void SolverState::set_has_learned_net() {
  _has_bits_[0] |= 0x00000002u;
}
void SolverState::clear_has_learned_net() {
  _has_bits_[0] &= ~0x00000002u;
}
void SolverState::clear_learned_net() {
  learned_net_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_learned_net();
}
const ::std::string& SolverState::learned_net() const {
  // @@protoc_insertion_point(field_get:caffe.SolverState.learned_net)
  return learned_net_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void SolverState::set_learned_net(const ::std::string& value) {
  set_has_learned_net();
  learned_net_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.SolverState.learned_net)
}
void SolverState::set_learned_net(const char* value) {
  set_has_learned_net();
  learned_net_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.SolverState.learned_net)
}
void SolverState::set_learned_net(const char* value, size_t size) {
  set_has_learned_net();
  learned_net_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.SolverState.learned_net)
}
::std::string* SolverState::mutable_learned_net() {
  set_has_learned_net();
  // @@protoc_insertion_point(field_mutable:caffe.SolverState.learned_net)
  return learned_net_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* SolverState::release_learned_net() {
  // @@protoc_insertion_point(field_release:caffe.SolverState.learned_net)
  clear_has_learned_net();
  return learned_net_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void SolverState::set_allocated_learned_net(::std::string* learned_net) {
  if (learned_net != NULL) {
    set_has_learned_net();
  } else {
    clear_has_learned_net();
  }
  learned_net_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), learned_net);
  // @@protoc_insertion_point(field_set_allocated:caffe.SolverState.learned_net)
}

// repeated .caffe.BlobProto history = 3;
int SolverState::history_size() const {
  return history_.size();
}
void SolverState::clear_history() {
  history_.Clear();
}
const ::caffe::BlobProto& SolverState::history(int index) const {
  // @@protoc_insertion_point(field_get:caffe.SolverState.history)
  return history_.Get(index);
}
::caffe::BlobProto* SolverState::mutable_history(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.SolverState.history)
  return history_.Mutable(index);
}
::caffe::BlobProto* SolverState::add_history() {
  // @@protoc_insertion_point(field_add:caffe.SolverState.history)
  return history_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::BlobProto >*
SolverState::mutable_history() {
  // @@protoc_insertion_point(field_mutable_list:caffe.SolverState.history)
  return &history_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::BlobProto >&
SolverState::history() const {
  // @@protoc_insertion_point(field_list:caffe.SolverState.history)
  return history_;
}

// optional int32 current_step = 4 [default = 0];
bool SolverState::has_current_step() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void SolverState::set_has_current_step() {
  _has_bits_[0] |= 0x00000008u;
}
void SolverState::clear_has_current_step() {
  _has_bits_[0] &= ~0x00000008u;
}
void SolverState::clear_current_step() {
  current_step_ = 0;
  clear_has_current_step();
}
::google::protobuf::int32 SolverState::current_step() const {
  // @@protoc_insertion_point(field_get:caffe.SolverState.current_step)
  return current_step_;
}
void SolverState::set_current_step(::google::protobuf::int32 value) {
  set_has_current_step();
  current_step_ = value;
  // @@protoc_insertion_point(field_set:caffe.SolverState.current_step)
}

inline const SolverState* SolverState::internal_default_instance() {
  return &SolverState_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NetState::kPhaseFieldNumber;
const int NetState::kLevelFieldNumber;
const int NetState::kStageFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

NetState::NetState()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.NetState)
}

void NetState::InitAsDefaultInstance() {
}

NetState::NetState(const NetState& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.NetState)
}

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

NetState::~NetState() {
  // @@protoc_insertion_point(destructor:caffe.NetState)
  SharedDtor();
}

void NetState::SharedDtor() {
}

void NetState::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NetState::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return NetState_descriptor_;
}

const NetState& NetState::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<NetState> NetState_default_instance_;

NetState* NetState::New(::google::protobuf::Arena* arena) const {
  NetState* n = new NetState;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void NetState::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.NetState)
  if (_has_bits_[0 / 32] & 3u) {
    phase_ = 1;
    level_ = 0;
  }
  stage_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool NetState::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.NetState)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.Phase phase = 1 [default = TEST];
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::Phase_IsValid(value)) {
            set_phase(static_cast< ::caffe::Phase >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_level;
        break;
      }

      // optional int32 level = 2 [default = 0];
      case 2: {
        if (tag == 16) {
         parse_level:
          set_has_level();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &level_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_stage;
        break;
      }

      // repeated string stage = 3;
      case 3: {
        if (tag == 26) {
         parse_stage:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_stage()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->stage(this->stage_size() - 1).data(),
            this->stage(this->stage_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.NetState.stage");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_stage;
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.NetState)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.NetState)
  return false;
#undef DO_
}

void NetState::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.NetState)
  // optional .caffe.Phase phase = 1 [default = TEST];
  if (has_phase()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->phase(), output);
  }

  // optional int32 level = 2 [default = 0];
  if (has_level()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->level(), output);
  }

  // repeated string stage = 3;
  for (int i = 0; i < this->stage_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->stage(i).data(), this->stage(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.NetState.stage");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->stage(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.NetState)
}

::google::protobuf::uint8* NetState::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.NetState)
  // optional .caffe.Phase phase = 1 [default = TEST];
  if (has_phase()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->phase(), target);
  }

  // optional int32 level = 2 [default = 0];
  if (has_level()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->level(), target);
  }

  // repeated string stage = 3;
  for (int i = 0; i < this->stage_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->stage(i).data(), this->stage(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.NetState.stage");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->stage(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 3u) {
    // optional .caffe.Phase phase = 1 [default = TEST];
    if (has_phase()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->phase());
    }

    // optional int32 level = 2 [default = 0];
    if (has_level()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->level());
    }

  }
  // repeated string stage = 3;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->stage_size());
  for (int i = 0; i < this->stage_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->stage(i));
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void NetState::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.NetState)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const NetState* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const NetState>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.NetState)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.NetState)
    UnsafeMergeFrom(*source);
  }
}

void NetState::MergeFrom(const NetState& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NetState)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void NetState::UnsafeMergeFrom(const NetState& from) {
  GOOGLE_DCHECK(&from != this);
  stage_.UnsafeMergeFrom(from.stage_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_phase()) {
      set_phase(from.phase());
    }
    if (from.has_level()) {
      set_level(from.level());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void NetState::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.NetState)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool NetState::IsInitialized() const {

  return true;
}

void NetState::Swap(NetState* other) {
  if (other == this) return;
  InternalSwap(other);
}
void NetState::InternalSwap(NetState* other) {
  std::swap(phase_, other->phase_);
  std::swap(level_, other->level_);
  stage_.UnsafeArenaSwap(&other->stage_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata NetState::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = NetState_descriptor_;
  metadata.reflection = NetState_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// NetState

// optional .caffe.Phase phase = 1 [default = TEST];
bool NetState::has_phase() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void NetState::set_has_phase() {
  _has_bits_[0] |= 0x00000001u;
}
void NetState::clear_has_phase() {
  _has_bits_[0] &= ~0x00000001u;
}
void NetState::clear_phase() {
  phase_ = 1;
  clear_has_phase();
}
::caffe::Phase NetState::phase() const {
  // @@protoc_insertion_point(field_get:caffe.NetState.phase)
  return static_cast< ::caffe::Phase >(phase_);
}
void NetState::set_phase(::caffe::Phase value) {
  assert(::caffe::Phase_IsValid(value));
  set_has_phase();
  phase_ = value;
  // @@protoc_insertion_point(field_set:caffe.NetState.phase)
}

// optional int32 level = 2 [default = 0];
bool NetState::has_level() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void NetState::set_has_level() {
  _has_bits_[0] |= 0x00000002u;
}
void NetState::clear_has_level() {
  _has_bits_[0] &= ~0x00000002u;
}
void NetState::clear_level() {
  level_ = 0;
  clear_has_level();
}
::google::protobuf::int32 NetState::level() const {
  // @@protoc_insertion_point(field_get:caffe.NetState.level)
  return level_;
}
void NetState::set_level(::google::protobuf::int32 value) {
  set_has_level();
  level_ = value;
  // @@protoc_insertion_point(field_set:caffe.NetState.level)
}

// repeated string stage = 3;
int NetState::stage_size() const {
  return stage_.size();
}
void NetState::clear_stage() {
  stage_.Clear();
}
const ::std::string& NetState::stage(int index) const {
  // @@protoc_insertion_point(field_get:caffe.NetState.stage)
  return stage_.Get(index);
}
::std::string* NetState::mutable_stage(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.NetState.stage)
  return stage_.Mutable(index);
}
void NetState::set_stage(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:caffe.NetState.stage)
  stage_.Mutable(index)->assign(value);
}
void NetState::set_stage(int index, const char* value) {
  stage_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:caffe.NetState.stage)
}
void NetState::set_stage(int index, const char* value, size_t size) {
  stage_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:caffe.NetState.stage)
}
::std::string* NetState::add_stage() {
  // @@protoc_insertion_point(field_add_mutable:caffe.NetState.stage)
  return stage_.Add();
}
void NetState::add_stage(const ::std::string& value) {
  stage_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:caffe.NetState.stage)
}
void NetState::add_stage(const char* value) {
  stage_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:caffe.NetState.stage)
}
void NetState::add_stage(const char* value, size_t size) {
  stage_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:caffe.NetState.stage)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
NetState::stage() const {
  // @@protoc_insertion_point(field_list:caffe.NetState.stage)
  return stage_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
NetState::mutable_stage() {
  // @@protoc_insertion_point(field_mutable_list:caffe.NetState.stage)
  return &stage_;
}

inline const NetState* NetState::internal_default_instance() {
  return &NetState_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NetStateRule::kPhaseFieldNumber;
const int NetStateRule::kMinLevelFieldNumber;
const int NetStateRule::kMaxLevelFieldNumber;
const int NetStateRule::kStageFieldNumber;
const int NetStateRule::kNotStageFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

NetStateRule::NetStateRule()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.NetStateRule)
}

void NetStateRule::InitAsDefaultInstance() {
}

NetStateRule::NetStateRule(const NetStateRule& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.NetStateRule)
}

void NetStateRule::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&phase_, 0, reinterpret_cast<char*>(&max_level_) -
    reinterpret_cast<char*>(&phase_) + sizeof(max_level_));
}

NetStateRule::~NetStateRule() {
  // @@protoc_insertion_point(destructor:caffe.NetStateRule)
  SharedDtor();
}

void NetStateRule::SharedDtor() {
}

void NetStateRule::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NetStateRule::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return NetStateRule_descriptor_;
}

const NetStateRule& NetStateRule::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<NetStateRule> NetStateRule_default_instance_;

NetStateRule* NetStateRule::New(::google::protobuf::Arena* arena) const {
  NetStateRule* n = new NetStateRule;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void NetStateRule::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.NetStateRule)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(NetStateRule, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<NetStateRule*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  ZR_(phase_, max_level_);

#undef ZR_HELPER_
#undef ZR_

  stage_.Clear();
  not_stage_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool NetStateRule::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.NetStateRule)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.Phase phase = 1;
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::Phase_IsValid(value)) {
            set_phase(static_cast< ::caffe::Phase >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_min_level;
        break;
      }

      // optional int32 min_level = 2;
      case 2: {
        if (tag == 16) {
         parse_min_level:
          set_has_min_level();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &min_level_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_max_level;
        break;
      }

      // optional int32 max_level = 3;
      case 3: {
        if (tag == 24) {
         parse_max_level:
          set_has_max_level();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &max_level_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(34)) goto parse_stage;
        break;
      }

      // repeated string stage = 4;
      case 4: {
        if (tag == 34) {
         parse_stage:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_stage()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->stage(this->stage_size() - 1).data(),
            this->stage(this->stage_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.NetStateRule.stage");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(34)) goto parse_stage;
        if (input->ExpectTag(42)) goto parse_not_stage;
        break;
      }

      // repeated string not_stage = 5;
      case 5: {
        if (tag == 42) {
         parse_not_stage:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_not_stage()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->not_stage(this->not_stage_size() - 1).data(),
            this->not_stage(this->not_stage_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.NetStateRule.not_stage");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(42)) goto parse_not_stage;
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.NetStateRule)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.NetStateRule)
  return false;
#undef DO_
}

void NetStateRule::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.NetStateRule)
  // optional .caffe.Phase phase = 1;
  if (has_phase()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->phase(), output);
  }

  // optional int32 min_level = 2;
  if (has_min_level()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->min_level(), output);
  }

  // optional int32 max_level = 3;
  if (has_max_level()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->max_level(), output);
  }

  // repeated string stage = 4;
  for (int i = 0; i < this->stage_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->stage(i).data(), this->stage(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.NetStateRule.stage");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->stage(i), output);
  }

  // repeated string not_stage = 5;
  for (int i = 0; i < this->not_stage_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->not_stage(i).data(), this->not_stage(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.NetStateRule.not_stage");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      5, this->not_stage(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.NetStateRule)
}

::google::protobuf::uint8* NetStateRule::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.NetStateRule)
  // optional .caffe.Phase phase = 1;
  if (has_phase()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->phase(), target);
  }

  // optional int32 min_level = 2;
  if (has_min_level()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->min_level(), target);
  }

  // optional int32 max_level = 3;
  if (has_max_level()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->max_level(), target);
  }

  // repeated string stage = 4;
  for (int i = 0; i < this->stage_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->stage(i).data(), this->stage(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.NetStateRule.stage");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(4, this->stage(i), target);
  }

  // repeated string not_stage = 5;
  for (int i = 0; i < this->not_stage_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->not_stage(i).data(), this->not_stage(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.NetStateRule.not_stage");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(5, this->not_stage(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 7u) {
    // optional .caffe.Phase phase = 1;
    if (has_phase()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->phase());
    }

    // optional int32 min_level = 2;
    if (has_min_level()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->min_level());
    }

    // optional int32 max_level = 3;
    if (has_max_level()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->max_level());
    }

  }
  // repeated string stage = 4;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->stage_size());
  for (int i = 0; i < this->stage_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->stage(i));
  }

  // repeated string not_stage = 5;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->not_stage_size());
  for (int i = 0; i < this->not_stage_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->not_stage(i));
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void NetStateRule::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.NetStateRule)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const NetStateRule* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const NetStateRule>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.NetStateRule)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.NetStateRule)
    UnsafeMergeFrom(*source);
  }
}

void NetStateRule::MergeFrom(const NetStateRule& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NetStateRule)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void NetStateRule::UnsafeMergeFrom(const NetStateRule& from) {
  GOOGLE_DCHECK(&from != this);
  stage_.UnsafeMergeFrom(from.stage_);
  not_stage_.UnsafeMergeFrom(from.not_stage_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_phase()) {
      set_phase(from.phase());
    }
    if (from.has_min_level()) {
      set_min_level(from.min_level());
    }
    if (from.has_max_level()) {
      set_max_level(from.max_level());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void NetStateRule::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.NetStateRule)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool NetStateRule::IsInitialized() const {

  return true;
}

void NetStateRule::Swap(NetStateRule* other) {
  if (other == this) return;
  InternalSwap(other);
}
void NetStateRule::InternalSwap(NetStateRule* other) {
  std::swap(phase_, other->phase_);
  std::swap(min_level_, other->min_level_);
  std::swap(max_level_, other->max_level_);
  stage_.UnsafeArenaSwap(&other->stage_);
  not_stage_.UnsafeArenaSwap(&other->not_stage_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata NetStateRule::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = NetStateRule_descriptor_;
  metadata.reflection = NetStateRule_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// NetStateRule

// optional .caffe.Phase phase = 1;
bool NetStateRule::has_phase() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void NetStateRule::set_has_phase() {
  _has_bits_[0] |= 0x00000001u;
}
void NetStateRule::clear_has_phase() {
  _has_bits_[0] &= ~0x00000001u;
}
void NetStateRule::clear_phase() {
  phase_ = 0;
  clear_has_phase();
}
::caffe::Phase NetStateRule::phase() const {
  // @@protoc_insertion_point(field_get:caffe.NetStateRule.phase)
  return static_cast< ::caffe::Phase >(phase_);
}
void NetStateRule::set_phase(::caffe::Phase value) {
  assert(::caffe::Phase_IsValid(value));
  set_has_phase();
  phase_ = value;
  // @@protoc_insertion_point(field_set:caffe.NetStateRule.phase)
}

// optional int32 min_level = 2;
bool NetStateRule::has_min_level() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void NetStateRule::set_has_min_level() {
  _has_bits_[0] |= 0x00000002u;
}
void NetStateRule::clear_has_min_level() {
  _has_bits_[0] &= ~0x00000002u;
}
void NetStateRule::clear_min_level() {
  min_level_ = 0;
  clear_has_min_level();
}
::google::protobuf::int32 NetStateRule::min_level() const {
  // @@protoc_insertion_point(field_get:caffe.NetStateRule.min_level)
  return min_level_;
}
void NetStateRule::set_min_level(::google::protobuf::int32 value) {
  set_has_min_level();
  min_level_ = value;
  // @@protoc_insertion_point(field_set:caffe.NetStateRule.min_level)
}

// optional int32 max_level = 3;
bool NetStateRule::has_max_level() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void NetStateRule::set_has_max_level() {
  _has_bits_[0] |= 0x00000004u;
}
void NetStateRule::clear_has_max_level() {
  _has_bits_[0] &= ~0x00000004u;
}
void NetStateRule::clear_max_level() {
  max_level_ = 0;
  clear_has_max_level();
}
::google::protobuf::int32 NetStateRule::max_level() const {
  // @@protoc_insertion_point(field_get:caffe.NetStateRule.max_level)
  return max_level_;
}
void NetStateRule::set_max_level(::google::protobuf::int32 value) {
  set_has_max_level();
  max_level_ = value;
  // @@protoc_insertion_point(field_set:caffe.NetStateRule.max_level)
}

// repeated string stage = 4;
int NetStateRule::stage_size() const {
  return stage_.size();
}
void NetStateRule::clear_stage() {
  stage_.Clear();
}
const ::std::string& NetStateRule::stage(int index) const {
  // @@protoc_insertion_point(field_get:caffe.NetStateRule.stage)
  return stage_.Get(index);
}
::std::string* NetStateRule::mutable_stage(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.NetStateRule.stage)
  return stage_.Mutable(index);
}
void NetStateRule::set_stage(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:caffe.NetStateRule.stage)
  stage_.Mutable(index)->assign(value);
}
void NetStateRule::set_stage(int index, const char* value) {
  stage_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:caffe.NetStateRule.stage)
}
void NetStateRule::set_stage(int index, const char* value, size_t size) {
  stage_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:caffe.NetStateRule.stage)
}
::std::string* NetStateRule::add_stage() {
  // @@protoc_insertion_point(field_add_mutable:caffe.NetStateRule.stage)
  return stage_.Add();
}
void NetStateRule::add_stage(const ::std::string& value) {
  stage_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:caffe.NetStateRule.stage)
}
void NetStateRule::add_stage(const char* value) {
  stage_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:caffe.NetStateRule.stage)
}
void NetStateRule::add_stage(const char* value, size_t size) {
  stage_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:caffe.NetStateRule.stage)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
NetStateRule::stage() const {
  // @@protoc_insertion_point(field_list:caffe.NetStateRule.stage)
  return stage_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
NetStateRule::mutable_stage() {
  // @@protoc_insertion_point(field_mutable_list:caffe.NetStateRule.stage)
  return &stage_;
}

// repeated string not_stage = 5;
int NetStateRule::not_stage_size() const {
  return not_stage_.size();
}
void NetStateRule::clear_not_stage() {
  not_stage_.Clear();
}
const ::std::string& NetStateRule::not_stage(int index) const {
  // @@protoc_insertion_point(field_get:caffe.NetStateRule.not_stage)
  return not_stage_.Get(index);
}
::std::string* NetStateRule::mutable_not_stage(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.NetStateRule.not_stage)
  return not_stage_.Mutable(index);
}
void NetStateRule::set_not_stage(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:caffe.NetStateRule.not_stage)
  not_stage_.Mutable(index)->assign(value);
}
void NetStateRule::set_not_stage(int index, const char* value) {
  not_stage_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:caffe.NetStateRule.not_stage)
}
void NetStateRule::set_not_stage(int index, const char* value, size_t size) {
  not_stage_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:caffe.NetStateRule.not_stage)
}
::std::string* NetStateRule::add_not_stage() {
  // @@protoc_insertion_point(field_add_mutable:caffe.NetStateRule.not_stage)
  return not_stage_.Add();
}
void NetStateRule::add_not_stage(const ::std::string& value) {
  not_stage_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:caffe.NetStateRule.not_stage)
}
void NetStateRule::add_not_stage(const char* value) {
  not_stage_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:caffe.NetStateRule.not_stage)
}
void NetStateRule::add_not_stage(const char* value, size_t size) {
  not_stage_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:caffe.NetStateRule.not_stage)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
NetStateRule::not_stage() const {
  // @@protoc_insertion_point(field_list:caffe.NetStateRule.not_stage)
  return not_stage_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
NetStateRule::mutable_not_stage() {
  // @@protoc_insertion_point(field_mutable_list:caffe.NetStateRule.not_stage)
  return &not_stage_;
}

inline const NetStateRule* NetStateRule::internal_default_instance() {
  return &NetStateRule_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* ParamSpec_DimCheckMode_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ParamSpec_DimCheckMode_descriptor_;
}
bool ParamSpec_DimCheckMode_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const ParamSpec_DimCheckMode ParamSpec::STRICT;
const ParamSpec_DimCheckMode ParamSpec::PERMISSIVE;
const ParamSpec_DimCheckMode ParamSpec::DimCheckMode_MIN;
const ParamSpec_DimCheckMode ParamSpec::DimCheckMode_MAX;
const int ParamSpec::DimCheckMode_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ParamSpec::kNameFieldNumber;
const int ParamSpec::kShareModeFieldNumber;
const int ParamSpec::kLrMultFieldNumber;
const int ParamSpec::kDecayMultFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ParamSpec::ParamSpec()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ParamSpec)
}

void ParamSpec::InitAsDefaultInstance() {
}

ParamSpec::ParamSpec(const ParamSpec& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ParamSpec)
}

void ParamSpec::SharedCtor() {
  _cached_size_ = 0;
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  share_mode_ = 0;
  lr_mult_ = 1;
  decay_mult_ = 1;
}

ParamSpec::~ParamSpec() {
  // @@protoc_insertion_point(destructor:caffe.ParamSpec)
  SharedDtor();
}

void ParamSpec::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void ParamSpec::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ParamSpec::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ParamSpec_descriptor_;
}

const ParamSpec& ParamSpec::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ParamSpec> ParamSpec_default_instance_;

ParamSpec* ParamSpec::New(::google::protobuf::Arena* arena) const {
  ParamSpec* n = new ParamSpec;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ParamSpec::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ParamSpec)
  if (_has_bits_[0 / 32] & 15u) {
    if (has_name()) {
      name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    share_mode_ = 0;
    lr_mult_ = 1;
    decay_mult_ = 1;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ParamSpec::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ParamSpec)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.ParamSpec.name");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_share_mode;
        break;
      }

      // optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
      case 2: {
        if (tag == 16) {
         parse_share_mode:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::ParamSpec_DimCheckMode_IsValid(value)) {
            set_share_mode(static_cast< ::caffe::ParamSpec_DimCheckMode >(value));
          } else {
            mutable_unknown_fields()->AddVarint(2, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_lr_mult;
        break;
      }

      // optional float lr_mult = 3 [default = 1];
      case 3: {
        if (tag == 29) {
         parse_lr_mult:
          set_has_lr_mult();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &lr_mult_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(37)) goto parse_decay_mult;
        break;
      }

      // optional float decay_mult = 4 [default = 1];
      case 4: {
        if (tag == 37) {
         parse_decay_mult:
          set_has_decay_mult();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &decay_mult_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ParamSpec)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ParamSpec)
  return false;
#undef DO_
}

void ParamSpec::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ParamSpec)
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.ParamSpec.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
  if (has_share_mode()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->share_mode(), output);
  }

  // optional float lr_mult = 3 [default = 1];
  if (has_lr_mult()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->lr_mult(), output);
  }

  // optional float decay_mult = 4 [default = 1];
  if (has_decay_mult()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->decay_mult(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ParamSpec)
}

::google::protobuf::uint8* ParamSpec::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ParamSpec)
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.ParamSpec.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
  if (has_share_mode()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->share_mode(), target);
  }

  // optional float lr_mult = 3 [default = 1];
  if (has_lr_mult()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->lr_mult(), target);
  }

  // optional float decay_mult = 4 [default = 1];
  if (has_decay_mult()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->decay_mult(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 15u) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
    if (has_share_mode()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->share_mode());
    }

    // optional float lr_mult = 3 [default = 1];
    if (has_lr_mult()) {
      total_size += 1 + 4;
    }

    // optional float decay_mult = 4 [default = 1];
    if (has_decay_mult()) {
      total_size += 1 + 4;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ParamSpec::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ParamSpec)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ParamSpec* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ParamSpec>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ParamSpec)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ParamSpec)
    UnsafeMergeFrom(*source);
  }
}

void ParamSpec::MergeFrom(const ParamSpec& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ParamSpec)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ParamSpec::UnsafeMergeFrom(const ParamSpec& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_has_name();
      name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
    }
    if (from.has_share_mode()) {
      set_share_mode(from.share_mode());
    }
    if (from.has_lr_mult()) {
      set_lr_mult(from.lr_mult());
    }
    if (from.has_decay_mult()) {
      set_decay_mult(from.decay_mult());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ParamSpec::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ParamSpec)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ParamSpec::IsInitialized() const {

  return true;
}

void ParamSpec::Swap(ParamSpec* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ParamSpec::InternalSwap(ParamSpec* other) {
  name_.Swap(&other->name_);
  std::swap(share_mode_, other->share_mode_);
  std::swap(lr_mult_, other->lr_mult_);
  std::swap(decay_mult_, other->decay_mult_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ParamSpec::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ParamSpec_descriptor_;
  metadata.reflection = ParamSpec_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ParamSpec

// optional string name = 1;
bool ParamSpec::has_name() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ParamSpec::set_has_name() {
  _has_bits_[0] |= 0x00000001u;
}
void ParamSpec::clear_has_name() {
  _has_bits_[0] &= ~0x00000001u;
}
void ParamSpec::clear_name() {
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_name();
}
const ::std::string& ParamSpec::name() const {
  // @@protoc_insertion_point(field_get:caffe.ParamSpec.name)
  return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ParamSpec::set_name(const ::std::string& value) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.ParamSpec.name)
}
void ParamSpec::set_name(const char* value) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.ParamSpec.name)
}
void ParamSpec::set_name(const char* value, size_t size) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.ParamSpec.name)
}
::std::string* ParamSpec::mutable_name() {
  set_has_name();
  // @@protoc_insertion_point(field_mutable:caffe.ParamSpec.name)
  return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* ParamSpec::release_name() {
  // @@protoc_insertion_point(field_release:caffe.ParamSpec.name)
  clear_has_name();
  return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ParamSpec::set_allocated_name(::std::string* name) {
  if (name != NULL) {
    set_has_name();
  } else {
    clear_has_name();
  }
  name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
  // @@protoc_insertion_point(field_set_allocated:caffe.ParamSpec.name)
}

// optional .caffe.ParamSpec.DimCheckMode share_mode = 2;
bool ParamSpec::has_share_mode() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ParamSpec::set_has_share_mode() {
  _has_bits_[0] |= 0x00000002u;
}
void ParamSpec::clear_has_share_mode() {
  _has_bits_[0] &= ~0x00000002u;
}
void ParamSpec::clear_share_mode() {
  share_mode_ = 0;
  clear_has_share_mode();
}
::caffe::ParamSpec_DimCheckMode ParamSpec::share_mode() const {
  // @@protoc_insertion_point(field_get:caffe.ParamSpec.share_mode)
  return static_cast< ::caffe::ParamSpec_DimCheckMode >(share_mode_);
}
void ParamSpec::set_share_mode(::caffe::ParamSpec_DimCheckMode value) {
  assert(::caffe::ParamSpec_DimCheckMode_IsValid(value));
  set_has_share_mode();
  share_mode_ = value;
  // @@protoc_insertion_point(field_set:caffe.ParamSpec.share_mode)
}

// optional float lr_mult = 3 [default = 1];
bool ParamSpec::has_lr_mult() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void ParamSpec::set_has_lr_mult() {
  _has_bits_[0] |= 0x00000004u;
}
void ParamSpec::clear_has_lr_mult() {
  _has_bits_[0] &= ~0x00000004u;
}
void ParamSpec::clear_lr_mult() {
  lr_mult_ = 1;
  clear_has_lr_mult();
}
float ParamSpec::lr_mult() const {
  // @@protoc_insertion_point(field_get:caffe.ParamSpec.lr_mult)
  return lr_mult_;
}
void ParamSpec::set_lr_mult(float value) {
  set_has_lr_mult();
  lr_mult_ = value;
  // @@protoc_insertion_point(field_set:caffe.ParamSpec.lr_mult)
}

// optional float decay_mult = 4 [default = 1];
bool ParamSpec::has_decay_mult() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void ParamSpec::set_has_decay_mult() {
  _has_bits_[0] |= 0x00000008u;
}
void ParamSpec::clear_has_decay_mult() {
  _has_bits_[0] &= ~0x00000008u;
}
void ParamSpec::clear_decay_mult() {
  decay_mult_ = 1;
  clear_has_decay_mult();
}
float ParamSpec::decay_mult() const {
  // @@protoc_insertion_point(field_get:caffe.ParamSpec.decay_mult)
  return decay_mult_;
}
void ParamSpec::set_decay_mult(float value) {
  set_has_decay_mult();
  decay_mult_ = value;
  // @@protoc_insertion_point(field_set:caffe.ParamSpec.decay_mult)
}

inline const ParamSpec* ParamSpec::internal_default_instance() {
  return &ParamSpec_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int LayerParameter::kNameFieldNumber;
const int LayerParameter::kTypeFieldNumber;
const int LayerParameter::kBottomFieldNumber;
const int LayerParameter::kTopFieldNumber;
const int LayerParameter::kPhaseFieldNumber;
const int LayerParameter::kLossWeightFieldNumber;
const int LayerParameter::kParamFieldNumber;
const int LayerParameter::kBlobsFieldNumber;
const int LayerParameter::kPropagateDownFieldNumber;
const int LayerParameter::kIncludeFieldNumber;
const int LayerParameter::kExcludeFieldNumber;
const int LayerParameter::kTransformParamFieldNumber;
const int LayerParameter::kLossParamFieldNumber;
const int LayerParameter::kAccuracyParamFieldNumber;
const int LayerParameter::kArgmaxParamFieldNumber;
const int LayerParameter::kConcatParamFieldNumber;
const int LayerParameter::kContrastiveLossParamFieldNumber;
const int LayerParameter::kConvolutionParamFieldNumber;
const int LayerParameter::kCropParamFieldNumber;
const int LayerParameter::kDataParamFieldNumber;
const int LayerParameter::kDetectionOutputParamFieldNumber;
const int LayerParameter::kDropoutParamFieldNumber;
const int LayerParameter::kDummyDataParamFieldNumber;
const int LayerParameter::kEltwiseParamFieldNumber;
const int LayerParameter::kExpParamFieldNumber;
const int LayerParameter::kFlattenParamFieldNumber;
const int LayerParameter::kHdf5DataParamFieldNumber;
const int LayerParameter::kHdf5OutputParamFieldNumber;
const int LayerParameter::kHingeLossParamFieldNumber;
const int LayerParameter::kImageDataParamFieldNumber;
const int LayerParameter::kInfogainLossParamFieldNumber;
const int LayerParameter::kInnerProductParamFieldNumber;
const int LayerParameter::kLogParamFieldNumber;
const int LayerParameter::kLrnParamFieldNumber;
const int LayerParameter::kMemoryDataParamFieldNumber;
const int LayerParameter::kMvnParamFieldNumber;
const int LayerParameter::kNormalizeBboxParamFieldNumber;
const int LayerParameter::kPermuteParamFieldNumber;
const int LayerParameter::kPoolingParamFieldNumber;
const int LayerParameter::kPowerParamFieldNumber;
const int LayerParameter::kPreluParamFieldNumber;
const int LayerParameter::kPriorBoxParamFieldNumber;
const int LayerParameter::kPythonParamFieldNumber;
const int LayerParameter::kReductionParamFieldNumber;
const int LayerParameter::kReluParamFieldNumber;
const int LayerParameter::kReshapeParamFieldNumber;
const int LayerParameter::kSigmoidParamFieldNumber;
const int LayerParameter::kSliceParamFieldNumber;
const int LayerParameter::kSoftmaxParamFieldNumber;
const int LayerParameter::kSppParamFieldNumber;
const int LayerParameter::kTanhParamFieldNumber;
const int LayerParameter::kThresholdParamFieldNumber;
const int LayerParameter::kWindowDataParamFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

LayerParameter::LayerParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.LayerParameter)
}

void LayerParameter::InitAsDefaultInstance() {
  transform_param_ = const_cast< ::caffe::TransformationParameter*>(
      ::caffe::TransformationParameter::internal_default_instance());
  loss_param_ = const_cast< ::caffe::LossParameter*>(
      ::caffe::LossParameter::internal_default_instance());
  accuracy_param_ = const_cast< ::caffe::AccuracyParameter*>(
      ::caffe::AccuracyParameter::internal_default_instance());
  argmax_param_ = const_cast< ::caffe::ArgMaxParameter*>(
      ::caffe::ArgMaxParameter::internal_default_instance());
  concat_param_ = const_cast< ::caffe::ConcatParameter*>(
      ::caffe::ConcatParameter::internal_default_instance());
  contrastive_loss_param_ = const_cast< ::caffe::ContrastiveLossParameter*>(
      ::caffe::ContrastiveLossParameter::internal_default_instance());
  convolution_param_ = const_cast< ::caffe::ConvolutionParameter*>(
      ::caffe::ConvolutionParameter::internal_default_instance());
  crop_param_ = const_cast< ::caffe::CropParameter*>(
      ::caffe::CropParameter::internal_default_instance());
  data_param_ = const_cast< ::caffe::DataParameter*>(
      ::caffe::DataParameter::internal_default_instance());
  detection_output_param_ = const_cast< ::caffe::DetectionOutputParameter*>(
      ::caffe::DetectionOutputParameter::internal_default_instance());
  dropout_param_ = const_cast< ::caffe::DropoutParameter*>(
      ::caffe::DropoutParameter::internal_default_instance());
  dummy_data_param_ = const_cast< ::caffe::DummyDataParameter*>(
      ::caffe::DummyDataParameter::internal_default_instance());
  eltwise_param_ = const_cast< ::caffe::EltwiseParameter*>(
      ::caffe::EltwiseParameter::internal_default_instance());
  exp_param_ = const_cast< ::caffe::ExpParameter*>(
      ::caffe::ExpParameter::internal_default_instance());
  flatten_param_ = const_cast< ::caffe::FlattenParameter*>(
      ::caffe::FlattenParameter::internal_default_instance());
  hdf5_data_param_ = const_cast< ::caffe::HDF5DataParameter*>(
      ::caffe::HDF5DataParameter::internal_default_instance());
  hdf5_output_param_ = const_cast< ::caffe::HDF5OutputParameter*>(
      ::caffe::HDF5OutputParameter::internal_default_instance());
  hinge_loss_param_ = const_cast< ::caffe::HingeLossParameter*>(
      ::caffe::HingeLossParameter::internal_default_instance());
  image_data_param_ = const_cast< ::caffe::ImageDataParameter*>(
      ::caffe::ImageDataParameter::internal_default_instance());
  infogain_loss_param_ = const_cast< ::caffe::InfogainLossParameter*>(
      ::caffe::InfogainLossParameter::internal_default_instance());
  inner_product_param_ = const_cast< ::caffe::InnerProductParameter*>(
      ::caffe::InnerProductParameter::internal_default_instance());
  log_param_ = const_cast< ::caffe::LogParameter*>(
      ::caffe::LogParameter::internal_default_instance());
  lrn_param_ = const_cast< ::caffe::LRNParameter*>(
      ::caffe::LRNParameter::internal_default_instance());
  memory_data_param_ = const_cast< ::caffe::MemoryDataParameter*>(
      ::caffe::MemoryDataParameter::internal_default_instance());
  mvn_param_ = const_cast< ::caffe::MVNParameter*>(
      ::caffe::MVNParameter::internal_default_instance());
  normalize_bbox_param_ = const_cast< ::caffe::NormalizeBBoxParameter*>(
      ::caffe::NormalizeBBoxParameter::internal_default_instance());
  permute_param_ = const_cast< ::caffe::PermuteParameter*>(
      ::caffe::PermuteParameter::internal_default_instance());
  pooling_param_ = const_cast< ::caffe::PoolingParameter*>(
      ::caffe::PoolingParameter::internal_default_instance());
  power_param_ = const_cast< ::caffe::PowerParameter*>(
      ::caffe::PowerParameter::internal_default_instance());
  prelu_param_ = const_cast< ::caffe::PReLUParameter*>(
      ::caffe::PReLUParameter::internal_default_instance());
  prior_box_param_ = const_cast< ::caffe::PriorBoxParameter*>(
      ::caffe::PriorBoxParameter::internal_default_instance());
  python_param_ = const_cast< ::caffe::PythonParameter*>(
      ::caffe::PythonParameter::internal_default_instance());
  reduction_param_ = const_cast< ::caffe::ReductionParameter*>(
      ::caffe::ReductionParameter::internal_default_instance());
  relu_param_ = const_cast< ::caffe::ReLUParameter*>(
      ::caffe::ReLUParameter::internal_default_instance());
  reshape_param_ = const_cast< ::caffe::ReshapeParameter*>(
      ::caffe::ReshapeParameter::internal_default_instance());
  sigmoid_param_ = const_cast< ::caffe::SigmoidParameter*>(
      ::caffe::SigmoidParameter::internal_default_instance());
  slice_param_ = const_cast< ::caffe::SliceParameter*>(
      ::caffe::SliceParameter::internal_default_instance());
  softmax_param_ = const_cast< ::caffe::SoftmaxParameter*>(
      ::caffe::SoftmaxParameter::internal_default_instance());
  spp_param_ = const_cast< ::caffe::SPPParameter*>(
      ::caffe::SPPParameter::internal_default_instance());
  tanh_param_ = const_cast< ::caffe::TanHParameter*>(
      ::caffe::TanHParameter::internal_default_instance());
  threshold_param_ = const_cast< ::caffe::ThresholdParameter*>(
      ::caffe::ThresholdParameter::internal_default_instance());
  window_data_param_ = const_cast< ::caffe::WindowDataParameter*>(
      ::caffe::WindowDataParameter::internal_default_instance());
}

LayerParameter::LayerParameter(const LayerParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.LayerParameter)
}

void LayerParameter::SharedCtor() {
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  transform_param_ = NULL;
  loss_param_ = NULL;
  accuracy_param_ = NULL;
  argmax_param_ = NULL;
  concat_param_ = NULL;
  contrastive_loss_param_ = NULL;
  convolution_param_ = NULL;
  crop_param_ = NULL;
  data_param_ = NULL;
  detection_output_param_ = NULL;
  dropout_param_ = NULL;
  dummy_data_param_ = NULL;
  eltwise_param_ = NULL;
  exp_param_ = NULL;
  flatten_param_ = NULL;
  hdf5_data_param_ = NULL;
  hdf5_output_param_ = NULL;
  hinge_loss_param_ = NULL;
  image_data_param_ = NULL;
  infogain_loss_param_ = NULL;
  inner_product_param_ = NULL;
  log_param_ = NULL;
  lrn_param_ = NULL;
  memory_data_param_ = NULL;
  mvn_param_ = NULL;
  normalize_bbox_param_ = NULL;
  permute_param_ = NULL;
  pooling_param_ = NULL;
  power_param_ = NULL;
  prelu_param_ = NULL;
  prior_box_param_ = NULL;
  python_param_ = NULL;
  reduction_param_ = NULL;
  relu_param_ = NULL;
  reshape_param_ = NULL;
  sigmoid_param_ = NULL;
  slice_param_ = NULL;
  softmax_param_ = NULL;
  spp_param_ = NULL;
  tanh_param_ = NULL;
  threshold_param_ = NULL;
  window_data_param_ = NULL;
  phase_ = 0;
  _cached_size_ = 0;
}

LayerParameter::~LayerParameter() {
  // @@protoc_insertion_point(destructor:caffe.LayerParameter)
  SharedDtor();
}

void LayerParameter::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != &LayerParameter_default_instance_.get()) {
    delete transform_param_;
    delete loss_param_;
    delete accuracy_param_;
    delete argmax_param_;
    delete concat_param_;
    delete contrastive_loss_param_;
    delete convolution_param_;
    delete crop_param_;
    delete data_param_;
    delete detection_output_param_;
    delete dropout_param_;
    delete dummy_data_param_;
    delete eltwise_param_;
    delete exp_param_;
    delete flatten_param_;
    delete hdf5_data_param_;
    delete hdf5_output_param_;
    delete hinge_loss_param_;
    delete image_data_param_;
    delete infogain_loss_param_;
    delete inner_product_param_;
    delete log_param_;
    delete lrn_param_;
    delete memory_data_param_;
    delete mvn_param_;
    delete normalize_bbox_param_;
    delete permute_param_;
    delete pooling_param_;
    delete power_param_;
    delete prelu_param_;
    delete prior_box_param_;
    delete python_param_;
    delete reduction_param_;
    delete relu_param_;
    delete reshape_param_;
    delete sigmoid_param_;
    delete slice_param_;
    delete softmax_param_;
    delete spp_param_;
    delete tanh_param_;
    delete threshold_param_;
    delete window_data_param_;
  }
}

void LayerParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* LayerParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return LayerParameter_descriptor_;
}

const LayerParameter& LayerParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<LayerParameter> LayerParameter_default_instance_;

LayerParameter* LayerParameter::New(::google::protobuf::Arena* arena) const {
  LayerParameter* n = new LayerParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void LayerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.LayerParameter)
  if (_has_bits_[0 / 32] & 19u) {
    if (has_name()) {
      name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    if (has_type()) {
      type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    phase_ = 0;
  }
  if (_has_bits_[8 / 32] & 63488u) {
    if (has_transform_param()) {
      if (transform_param_ != NULL) transform_param_->::caffe::TransformationParameter::Clear();
    }
    if (has_loss_param()) {
      if (loss_param_ != NULL) loss_param_->::caffe::LossParameter::Clear();
    }
    if (has_accuracy_param()) {
      if (accuracy_param_ != NULL) accuracy_param_->::caffe::AccuracyParameter::Clear();
    }
    if (has_argmax_param()) {
      if (argmax_param_ != NULL) argmax_param_->::caffe::ArgMaxParameter::Clear();
    }
    if (has_concat_param()) {
      if (concat_param_ != NULL) concat_param_->::caffe::ConcatParameter::Clear();
    }
  }
  if (_has_bits_[16 / 32] & 16711680u) {
    if (has_contrastive_loss_param()) {
      if (contrastive_loss_param_ != NULL) contrastive_loss_param_->::caffe::ContrastiveLossParameter::Clear();
    }
    if (has_convolution_param()) {
      if (convolution_param_ != NULL) convolution_param_->::caffe::ConvolutionParameter::Clear();
    }
    if (has_crop_param()) {
      if (crop_param_ != NULL) crop_param_->::caffe::CropParameter::Clear();
    }
    if (has_data_param()) {
      if (data_param_ != NULL) data_param_->::caffe::DataParameter::Clear();
    }
    if (has_detection_output_param()) {
      if (detection_output_param_ != NULL) detection_output_param_->::caffe::DetectionOutputParameter::Clear();
    }
    if (has_dropout_param()) {
      if (dropout_param_ != NULL) dropout_param_->::caffe::DropoutParameter::Clear();
    }
    if (has_dummy_data_param()) {
      if (dummy_data_param_ != NULL) dummy_data_param_->::caffe::DummyDataParameter::Clear();
    }
    if (has_eltwise_param()) {
      if (eltwise_param_ != NULL) eltwise_param_->::caffe::EltwiseParameter::Clear();
    }
  }
  if (_has_bits_[24 / 32] & 4278190080u) {
    if (has_exp_param()) {
      if (exp_param_ != NULL) exp_param_->::caffe::ExpParameter::Clear();
    }
    if (has_flatten_param()) {
      if (flatten_param_ != NULL) flatten_param_->::caffe::FlattenParameter::Clear();
    }
    if (has_hdf5_data_param()) {
      if (hdf5_data_param_ != NULL) hdf5_data_param_->::caffe::HDF5DataParameter::Clear();
    }
    if (has_hdf5_output_param()) {
      if (hdf5_output_param_ != NULL) hdf5_output_param_->::caffe::HDF5OutputParameter::Clear();
    }
    if (has_hinge_loss_param()) {
      if (hinge_loss_param_ != NULL) hinge_loss_param_->::caffe::HingeLossParameter::Clear();
    }
    if (has_image_data_param()) {
      if (image_data_param_ != NULL) image_data_param_->::caffe::ImageDataParameter::Clear();
    }
    if (has_infogain_loss_param()) {
      if (infogain_loss_param_ != NULL) infogain_loss_param_->::caffe::InfogainLossParameter::Clear();
    }
    if (has_inner_product_param()) {
      if (inner_product_param_ != NULL) inner_product_param_->::caffe::InnerProductParameter::Clear();
    }
  }
  if (_has_bits_[32 / 32] & 255u) {
    if (has_log_param()) {
      if (log_param_ != NULL) log_param_->::caffe::LogParameter::Clear();
    }
    if (has_lrn_param()) {
      if (lrn_param_ != NULL) lrn_param_->::caffe::LRNParameter::Clear();
    }
    if (has_memory_data_param()) {
      if (memory_data_param_ != NULL) memory_data_param_->::caffe::MemoryDataParameter::Clear();
    }
    if (has_mvn_param()) {
      if (mvn_param_ != NULL) mvn_param_->::caffe::MVNParameter::Clear();
    }
    if (has_normalize_bbox_param()) {
      if (normalize_bbox_param_ != NULL) normalize_bbox_param_->::caffe::NormalizeBBoxParameter::Clear();
    }
    if (has_permute_param()) {
      if (permute_param_ != NULL) permute_param_->::caffe::PermuteParameter::Clear();
    }
    if (has_pooling_param()) {
      if (pooling_param_ != NULL) pooling_param_->::caffe::PoolingParameter::Clear();
    }
    if (has_power_param()) {
      if (power_param_ != NULL) power_param_->::caffe::PowerParameter::Clear();
    }
  }
  if (_has_bits_[40 / 32] & 65280u) {
    if (has_prelu_param()) {
      if (prelu_param_ != NULL) prelu_param_->::caffe::PReLUParameter::Clear();
    }
    if (has_prior_box_param()) {
      if (prior_box_param_ != NULL) prior_box_param_->::caffe::PriorBoxParameter::Clear();
    }
    if (has_python_param()) {
      if (python_param_ != NULL) python_param_->::caffe::PythonParameter::Clear();
    }
    if (has_reduction_param()) {
      if (reduction_param_ != NULL) reduction_param_->::caffe::ReductionParameter::Clear();
    }
    if (has_relu_param()) {
      if (relu_param_ != NULL) relu_param_->::caffe::ReLUParameter::Clear();
    }
    if (has_reshape_param()) {
      if (reshape_param_ != NULL) reshape_param_->::caffe::ReshapeParameter::Clear();
    }
    if (has_sigmoid_param()) {
      if (sigmoid_param_ != NULL) sigmoid_param_->::caffe::SigmoidParameter::Clear();
    }
    if (has_slice_param()) {
      if (slice_param_ != NULL) slice_param_->::caffe::SliceParameter::Clear();
    }
  }
  if (_has_bits_[48 / 32] & 2031616u) {
    if (has_softmax_param()) {
      if (softmax_param_ != NULL) softmax_param_->::caffe::SoftmaxParameter::Clear();
    }
    if (has_spp_param()) {
      if (spp_param_ != NULL) spp_param_->::caffe::SPPParameter::Clear();
    }
    if (has_tanh_param()) {
      if (tanh_param_ != NULL) tanh_param_->::caffe::TanHParameter::Clear();
    }
    if (has_threshold_param()) {
      if (threshold_param_ != NULL) threshold_param_->::caffe::ThresholdParameter::Clear();
    }
    if (has_window_data_param()) {
      if (window_data_param_ != NULL) window_data_param_->::caffe::WindowDataParameter::Clear();
    }
  }
  bottom_.Clear();
  top_.Clear();
  loss_weight_.Clear();
  param_.Clear();
  blobs_.Clear();
  propagate_down_.Clear();
  include_.Clear();
  exclude_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool LayerParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.LayerParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.LayerParameter.name");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_type;
        break;
      }

      // optional string type = 2;
      case 2: {
        if (tag == 18) {
         parse_type:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_type()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->type().data(), this->type().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.LayerParameter.type");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_bottom;
        break;
      }

      // repeated string bottom = 3;
      case 3: {
        if (tag == 26) {
         parse_bottom:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_bottom()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->bottom(this->bottom_size() - 1).data(),
            this->bottom(this->bottom_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.LayerParameter.bottom");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_bottom;
        if (input->ExpectTag(34)) goto parse_top;
        break;
      }

      // repeated string top = 4;
      case 4: {
        if (tag == 34) {
         parse_top:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_top()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->top(this->top_size() - 1).data(),
            this->top(this->top_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.LayerParameter.top");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(34)) goto parse_top;
        if (input->ExpectTag(45)) goto parse_loss_weight;
        break;
      }

      // repeated float loss_weight = 5;
      case 5: {
        if (tag == 45) {
         parse_loss_weight:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 45, input, this->mutable_loss_weight())));
        } else if (tag == 42) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_loss_weight())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(45)) goto parse_loss_weight;
        if (input->ExpectTag(50)) goto parse_param;
        break;
      }

      // repeated .caffe.ParamSpec param = 6;
      case 6: {
        if (tag == 50) {
         parse_param:
          DO_(input->IncrementRecursionDepth());
         parse_loop_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(50)) goto parse_loop_param;
        if (input->ExpectTag(58)) goto parse_loop_blobs;
        input->UnsafeDecrementRecursionDepth();
        break;
      }

      // repeated .caffe.BlobProto blobs = 7;
      case 7: {
        if (tag == 58) {
          DO_(input->IncrementRecursionDepth());
         parse_loop_blobs:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_blobs()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(58)) goto parse_loop_blobs;
        if (input->ExpectTag(66)) goto parse_loop_include;
        input->UnsafeDecrementRecursionDepth();
        break;
      }

      // repeated .caffe.NetStateRule include = 8;
      case 8: {
        if (tag == 66) {
          DO_(input->IncrementRecursionDepth());
         parse_loop_include:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_include()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(66)) goto parse_loop_include;
        if (input->ExpectTag(74)) goto parse_loop_exclude;
        input->UnsafeDecrementRecursionDepth();
        break;
      }

      // repeated .caffe.NetStateRule exclude = 9;
      case 9: {
        if (tag == 74) {
          DO_(input->IncrementRecursionDepth());
         parse_loop_exclude:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_exclude()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(74)) goto parse_loop_exclude;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectTag(80)) goto parse_phase;
        break;
      }

      // optional .caffe.Phase phase = 10;
      case 10: {
        if (tag == 80) {
         parse_phase:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::Phase_IsValid(value)) {
            set_phase(static_cast< ::caffe::Phase >(value));
          } else {
            mutable_unknown_fields()->AddVarint(10, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(88)) goto parse_propagate_down;
        break;
      }

      // repeated bool propagate_down = 11;
      case 11: {
        if (tag == 88) {
         parse_propagate_down:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 1, 88, input, this->mutable_propagate_down())));
        } else if (tag == 90) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, this->mutable_propagate_down())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(88)) goto parse_propagate_down;
        if (input->ExpectTag(802)) goto parse_transform_param;
        break;
      }

      // optional .caffe.TransformationParameter transform_param = 100;
      case 100: {
        if (tag == 802) {
         parse_transform_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_transform_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(810)) goto parse_loss_param;
        break;
      }

      // optional .caffe.LossParameter loss_param = 101;
      case 101: {
        if (tag == 810) {
         parse_loss_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_loss_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(818)) goto parse_accuracy_param;
        break;
      }

      // optional .caffe.AccuracyParameter accuracy_param = 102;
      case 102: {
        if (tag == 818) {
         parse_accuracy_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_accuracy_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(826)) goto parse_argmax_param;
        break;
      }

      // optional .caffe.ArgMaxParameter argmax_param = 103;
      case 103: {
        if (tag == 826) {
         parse_argmax_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_argmax_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(834)) goto parse_concat_param;
        break;
      }

      // optional .caffe.ConcatParameter concat_param = 104;
      case 104: {
        if (tag == 834) {
         parse_concat_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_concat_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(842)) goto parse_contrastive_loss_param;
        break;
      }

      // optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
      case 105: {
        if (tag == 842) {
         parse_contrastive_loss_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_contrastive_loss_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(850)) goto parse_convolution_param;
        break;
      }

      // optional .caffe.ConvolutionParameter convolution_param = 106;
      case 106: {
        if (tag == 850) {
         parse_convolution_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_convolution_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(858)) goto parse_data_param;
        break;
      }

      // optional .caffe.DataParameter data_param = 107;
      case 107: {
        if (tag == 858) {
         parse_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(866)) goto parse_dropout_param;
        break;
      }

      // optional .caffe.DropoutParameter dropout_param = 108;
      case 108: {
        if (tag == 866) {
         parse_dropout_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_dropout_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(874)) goto parse_dummy_data_param;
        break;
      }

      // optional .caffe.DummyDataParameter dummy_data_param = 109;
      case 109: {
        if (tag == 874) {
         parse_dummy_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_dummy_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(882)) goto parse_eltwise_param;
        break;
      }

      // optional .caffe.EltwiseParameter eltwise_param = 110;
      case 110: {
        if (tag == 882) {
         parse_eltwise_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_eltwise_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(890)) goto parse_exp_param;
        break;
      }

      // optional .caffe.ExpParameter exp_param = 111;
      case 111: {
        if (tag == 890) {
         parse_exp_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_exp_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(898)) goto parse_hdf5_data_param;
        break;
      }

      // optional .caffe.HDF5DataParameter hdf5_data_param = 112;
      case 112: {
        if (tag == 898) {
         parse_hdf5_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_hdf5_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(906)) goto parse_hdf5_output_param;
        break;
      }

      // optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
      case 113: {
        if (tag == 906) {
         parse_hdf5_output_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_hdf5_output_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(914)) goto parse_hinge_loss_param;
        break;
      }

      // optional .caffe.HingeLossParameter hinge_loss_param = 114;
      case 114: {
        if (tag == 914) {
         parse_hinge_loss_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_hinge_loss_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(922)) goto parse_image_data_param;
        break;
      }

      // optional .caffe.ImageDataParameter image_data_param = 115;
      case 115: {
        if (tag == 922) {
         parse_image_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_image_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(930)) goto parse_infogain_loss_param;
        break;
      }

      // optional .caffe.InfogainLossParameter infogain_loss_param = 116;
      case 116: {
        if (tag == 930) {
         parse_infogain_loss_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_infogain_loss_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(938)) goto parse_inner_product_param;
        break;
      }

      // optional .caffe.InnerProductParameter inner_product_param = 117;
      case 117: {
        if (tag == 938) {
         parse_inner_product_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_inner_product_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(946)) goto parse_lrn_param;
        break;
      }

      // optional .caffe.LRNParameter lrn_param = 118;
      case 118: {
        if (tag == 946) {
         parse_lrn_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_lrn_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(954)) goto parse_memory_data_param;
        break;
      }

      // optional .caffe.MemoryDataParameter memory_data_param = 119;
      case 119: {
        if (tag == 954) {
         parse_memory_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_memory_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(962)) goto parse_mvn_param;
        break;
      }

      // optional .caffe.MVNParameter mvn_param = 120;
      case 120: {
        if (tag == 962) {
         parse_mvn_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_mvn_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(970)) goto parse_pooling_param;
        break;
      }

      // optional .caffe.PoolingParameter pooling_param = 121;
      case 121: {
        if (tag == 970) {
         parse_pooling_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_pooling_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(978)) goto parse_power_param;
        break;
      }

      // optional .caffe.PowerParameter power_param = 122;
      case 122: {
        if (tag == 978) {
         parse_power_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_power_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(986)) goto parse_relu_param;
        break;
      }

      // optional .caffe.ReLUParameter relu_param = 123;
      case 123: {
        if (tag == 986) {
         parse_relu_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_relu_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(994)) goto parse_sigmoid_param;
        break;
      }

      // optional .caffe.SigmoidParameter sigmoid_param = 124;
      case 124: {
        if (tag == 994) {
         parse_sigmoid_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_sigmoid_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1002)) goto parse_softmax_param;
        break;
      }

      // optional .caffe.SoftmaxParameter softmax_param = 125;
      case 125: {
        if (tag == 1002) {
         parse_softmax_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_softmax_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1010)) goto parse_slice_param;
        break;
      }

      // optional .caffe.SliceParameter slice_param = 126;
      case 126: {
        if (tag == 1010) {
         parse_slice_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_slice_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1018)) goto parse_tanh_param;
        break;
      }

      // optional .caffe.TanHParameter tanh_param = 127;
      case 127: {
        if (tag == 1018) {
         parse_tanh_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_tanh_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1026)) goto parse_threshold_param;
        break;
      }

      // optional .caffe.ThresholdParameter threshold_param = 128;
      case 128: {
        if (tag == 1026) {
         parse_threshold_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_threshold_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1034)) goto parse_window_data_param;
        break;
      }

      // optional .caffe.WindowDataParameter window_data_param = 129;
      case 129: {
        if (tag == 1034) {
         parse_window_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_window_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1042)) goto parse_python_param;
        break;
      }

      // optional .caffe.PythonParameter python_param = 130;
      case 130: {
        if (tag == 1042) {
         parse_python_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_python_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1050)) goto parse_prelu_param;
        break;
      }

      // optional .caffe.PReLUParameter prelu_param = 131;
      case 131: {
        if (tag == 1050) {
         parse_prelu_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_prelu_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1058)) goto parse_spp_param;
        break;
      }

      // optional .caffe.SPPParameter spp_param = 132;
      case 132: {
        if (tag == 1058) {
         parse_spp_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_spp_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1066)) goto parse_reshape_param;
        break;
      }

      // optional .caffe.ReshapeParameter reshape_param = 133;
      case 133: {
        if (tag == 1066) {
         parse_reshape_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_reshape_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1074)) goto parse_log_param;
        break;
      }

      // optional .caffe.LogParameter log_param = 134;
      case 134: {
        if (tag == 1074) {
         parse_log_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_log_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1082)) goto parse_flatten_param;
        break;
      }

      // optional .caffe.FlattenParameter flatten_param = 135;
      case 135: {
        if (tag == 1082) {
         parse_flatten_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_flatten_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1090)) goto parse_reduction_param;
        break;
      }

      // optional .caffe.ReductionParameter reduction_param = 136;
      case 136: {
        if (tag == 1090) {
         parse_reduction_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_reduction_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1098)) goto parse_crop_param;
        break;
      }

      // optional .caffe.CropParameter crop_param = 137;
      case 137: {
        if (tag == 1098) {
         parse_crop_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_crop_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1106)) goto parse_permute_param;
        break;
      }

      // optional .caffe.PermuteParameter permute_param = 138;
      case 138: {
        if (tag == 1106) {
         parse_permute_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_permute_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1114)) goto parse_normalize_bbox_param;
        break;
      }

      // optional .caffe.NormalizeBBoxParameter normalize_bbox_param = 139;
      case 139: {
        if (tag == 1114) {
         parse_normalize_bbox_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_normalize_bbox_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1122)) goto parse_prior_box_param;
        break;
      }

      // optional .caffe.PriorBoxParameter prior_box_param = 140;
      case 140: {
        if (tag == 1122) {
         parse_prior_box_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_prior_box_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(1130)) goto parse_detection_output_param;
        break;
      }

      // optional .caffe.DetectionOutputParameter detection_output_param = 141;
      case 141: {
        if (tag == 1130) {
         parse_detection_output_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_detection_output_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.LayerParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.LayerParameter)
  return false;
#undef DO_
}

void LayerParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.LayerParameter)
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.LayerParameter.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // optional string type = 2;
  if (has_type()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->type().data(), this->type().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.LayerParameter.type");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->type(), output);
  }

  // repeated string bottom = 3;
  for (int i = 0; i < this->bottom_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->bottom(i).data(), this->bottom(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.LayerParameter.bottom");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->bottom(i), output);
  }

  // repeated string top = 4;
  for (int i = 0; i < this->top_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->top(i).data(), this->top(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.LayerParameter.top");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      4, this->top(i), output);
  }

  // repeated float loss_weight = 5;
  for (int i = 0; i < this->loss_weight_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      5, this->loss_weight(i), output);
  }

  // repeated .caffe.ParamSpec param = 6;
  for (unsigned int i = 0, n = this->param_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, this->param(i), output);
  }

  // repeated .caffe.BlobProto blobs = 7;
  for (unsigned int i = 0, n = this->blobs_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, this->blobs(i), output);
  }

  // repeated .caffe.NetStateRule include = 8;
  for (unsigned int i = 0, n = this->include_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      8, this->include(i), output);
  }

  // repeated .caffe.NetStateRule exclude = 9;
  for (unsigned int i = 0, n = this->exclude_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      9, this->exclude(i), output);
  }

  // optional .caffe.Phase phase = 10;
  if (has_phase()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      10, this->phase(), output);
  }

  // repeated bool propagate_down = 11;
  for (int i = 0; i < this->propagate_down_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(
      11, this->propagate_down(i), output);
  }

  // optional .caffe.TransformationParameter transform_param = 100;
  if (has_transform_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      100, *this->transform_param_, output);
  }

  // optional .caffe.LossParameter loss_param = 101;
  if (has_loss_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      101, *this->loss_param_, output);
  }

  // optional .caffe.AccuracyParameter accuracy_param = 102;
  if (has_accuracy_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      102, *this->accuracy_param_, output);
  }

  // optional .caffe.ArgMaxParameter argmax_param = 103;
  if (has_argmax_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      103, *this->argmax_param_, output);
  }

  // optional .caffe.ConcatParameter concat_param = 104;
  if (has_concat_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      104, *this->concat_param_, output);
  }

  // optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
  if (has_contrastive_loss_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      105, *this->contrastive_loss_param_, output);
  }

  // optional .caffe.ConvolutionParameter convolution_param = 106;
  if (has_convolution_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      106, *this->convolution_param_, output);
  }

  // optional .caffe.DataParameter data_param = 107;
  if (has_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      107, *this->data_param_, output);
  }

  // optional .caffe.DropoutParameter dropout_param = 108;
  if (has_dropout_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      108, *this->dropout_param_, output);
  }

  // optional .caffe.DummyDataParameter dummy_data_param = 109;
  if (has_dummy_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      109, *this->dummy_data_param_, output);
  }

  // optional .caffe.EltwiseParameter eltwise_param = 110;
  if (has_eltwise_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      110, *this->eltwise_param_, output);
  }

  // optional .caffe.ExpParameter exp_param = 111;
  if (has_exp_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      111, *this->exp_param_, output);
  }

  // optional .caffe.HDF5DataParameter hdf5_data_param = 112;
  if (has_hdf5_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      112, *this->hdf5_data_param_, output);
  }

  // optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
  if (has_hdf5_output_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      113, *this->hdf5_output_param_, output);
  }

  // optional .caffe.HingeLossParameter hinge_loss_param = 114;
  if (has_hinge_loss_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      114, *this->hinge_loss_param_, output);
  }

  // optional .caffe.ImageDataParameter image_data_param = 115;
  if (has_image_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      115, *this->image_data_param_, output);
  }

  // optional .caffe.InfogainLossParameter infogain_loss_param = 116;
  if (has_infogain_loss_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      116, *this->infogain_loss_param_, output);
  }

  // optional .caffe.InnerProductParameter inner_product_param = 117;
  if (has_inner_product_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      117, *this->inner_product_param_, output);
  }

  // optional .caffe.LRNParameter lrn_param = 118;
  if (has_lrn_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      118, *this->lrn_param_, output);
  }

  // optional .caffe.MemoryDataParameter memory_data_param = 119;
  if (has_memory_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      119, *this->memory_data_param_, output);
  }

  // optional .caffe.MVNParameter mvn_param = 120;
  if (has_mvn_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      120, *this->mvn_param_, output);
  }

  // optional .caffe.PoolingParameter pooling_param = 121;
  if (has_pooling_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      121, *this->pooling_param_, output);
  }

  // optional .caffe.PowerParameter power_param = 122;
  if (has_power_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      122, *this->power_param_, output);
  }

  // optional .caffe.ReLUParameter relu_param = 123;
  if (has_relu_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      123, *this->relu_param_, output);
  }

  // optional .caffe.SigmoidParameter sigmoid_param = 124;
  if (has_sigmoid_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      124, *this->sigmoid_param_, output);
  }

  // optional .caffe.SoftmaxParameter softmax_param = 125;
  if (has_softmax_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      125, *this->softmax_param_, output);
  }

  // optional .caffe.SliceParameter slice_param = 126;
  if (has_slice_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      126, *this->slice_param_, output);
  }

  // optional .caffe.TanHParameter tanh_param = 127;
  if (has_tanh_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      127, *this->tanh_param_, output);
  }

  // optional .caffe.ThresholdParameter threshold_param = 128;
  if (has_threshold_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      128, *this->threshold_param_, output);
  }

  // optional .caffe.WindowDataParameter window_data_param = 129;
  if (has_window_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      129, *this->window_data_param_, output);
  }

  // optional .caffe.PythonParameter python_param = 130;
  if (has_python_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      130, *this->python_param_, output);
  }

  // optional .caffe.PReLUParameter prelu_param = 131;
  if (has_prelu_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      131, *this->prelu_param_, output);
  }

  // optional .caffe.SPPParameter spp_param = 132;
  if (has_spp_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      132, *this->spp_param_, output);
  }

  // optional .caffe.ReshapeParameter reshape_param = 133;
  if (has_reshape_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      133, *this->reshape_param_, output);
  }

  // optional .caffe.LogParameter log_param = 134;
  if (has_log_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      134, *this->log_param_, output);
  }

  // optional .caffe.FlattenParameter flatten_param = 135;
  if (has_flatten_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      135, *this->flatten_param_, output);
  }

  // optional .caffe.ReductionParameter reduction_param = 136;
  if (has_reduction_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      136, *this->reduction_param_, output);
  }

  // optional .caffe.CropParameter crop_param = 137;
  if (has_crop_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      137, *this->crop_param_, output);
  }

  // optional .caffe.PermuteParameter permute_param = 138;
  if (has_permute_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      138, *this->permute_param_, output);
  }

  // optional .caffe.NormalizeBBoxParameter normalize_bbox_param = 139;
  if (has_normalize_bbox_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      139, *this->normalize_bbox_param_, output);
  }

  // optional .caffe.PriorBoxParameter prior_box_param = 140;
  if (has_prior_box_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      140, *this->prior_box_param_, output);
  }

  // optional .caffe.DetectionOutputParameter detection_output_param = 141;
  if (has_detection_output_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      141, *this->detection_output_param_, output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.LayerParameter)
}

::google::protobuf::uint8* LayerParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.LayerParameter)
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.LayerParameter.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional string type = 2;
  if (has_type()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->type().data(), this->type().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.LayerParameter.type");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->type(), target);
  }

  // repeated string bottom = 3;
  for (int i = 0; i < this->bottom_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->bottom(i).data(), this->bottom(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.LayerParameter.bottom");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->bottom(i), target);
  }

  // repeated string top = 4;
  for (int i = 0; i < this->top_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->top(i).data(), this->top(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.LayerParameter.top");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(4, this->top(i), target);
  }

  // repeated float loss_weight = 5;
  for (int i = 0; i < this->loss_weight_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(5, this->loss_weight(i), target);
  }

  // repeated .caffe.ParamSpec param = 6;
  for (unsigned int i = 0, n = this->param_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        6, this->param(i), false, target);
  }

  // repeated .caffe.BlobProto blobs = 7;
  for (unsigned int i = 0, n = this->blobs_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        7, this->blobs(i), false, target);
  }

  // repeated .caffe.NetStateRule include = 8;
  for (unsigned int i = 0, n = this->include_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        8, this->include(i), false, target);
  }

  // repeated .caffe.NetStateRule exclude = 9;
  for (unsigned int i = 0, n = this->exclude_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        9, this->exclude(i), false, target);
  }

  // optional .caffe.Phase phase = 10;
  if (has_phase()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      10, this->phase(), target);
  }

  // repeated bool propagate_down = 11;
  for (int i = 0; i < this->propagate_down_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteBoolToArray(11, this->propagate_down(i), target);
  }

  // optional .caffe.TransformationParameter transform_param = 100;
  if (has_transform_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        100, *this->transform_param_, false, target);
  }

  // optional .caffe.LossParameter loss_param = 101;
  if (has_loss_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        101, *this->loss_param_, false, target);
  }

  // optional .caffe.AccuracyParameter accuracy_param = 102;
  if (has_accuracy_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        102, *this->accuracy_param_, false, target);
  }

  // optional .caffe.ArgMaxParameter argmax_param = 103;
  if (has_argmax_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        103, *this->argmax_param_, false, target);
  }

  // optional .caffe.ConcatParameter concat_param = 104;
  if (has_concat_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        104, *this->concat_param_, false, target);
  }

  // optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
  if (has_contrastive_loss_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        105, *this->contrastive_loss_param_, false, target);
  }

  // optional .caffe.ConvolutionParameter convolution_param = 106;
  if (has_convolution_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        106, *this->convolution_param_, false, target);
  }

  // optional .caffe.DataParameter data_param = 107;
  if (has_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        107, *this->data_param_, false, target);
  }

  // optional .caffe.DropoutParameter dropout_param = 108;
  if (has_dropout_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        108, *this->dropout_param_, false, target);
  }

  // optional .caffe.DummyDataParameter dummy_data_param = 109;
  if (has_dummy_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        109, *this->dummy_data_param_, false, target);
  }

  // optional .caffe.EltwiseParameter eltwise_param = 110;
  if (has_eltwise_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        110, *this->eltwise_param_, false, target);
  }

  // optional .caffe.ExpParameter exp_param = 111;
  if (has_exp_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        111, *this->exp_param_, false, target);
  }

  // optional .caffe.HDF5DataParameter hdf5_data_param = 112;
  if (has_hdf5_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        112, *this->hdf5_data_param_, false, target);
  }

  // optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
  if (has_hdf5_output_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        113, *this->hdf5_output_param_, false, target);
  }

  // optional .caffe.HingeLossParameter hinge_loss_param = 114;
  if (has_hinge_loss_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        114, *this->hinge_loss_param_, false, target);
  }

  // optional .caffe.ImageDataParameter image_data_param = 115;
  if (has_image_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        115, *this->image_data_param_, false, target);
  }

  // optional .caffe.InfogainLossParameter infogain_loss_param = 116;
  if (has_infogain_loss_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        116, *this->infogain_loss_param_, false, target);
  }

  // optional .caffe.InnerProductParameter inner_product_param = 117;
  if (has_inner_product_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        117, *this->inner_product_param_, false, target);
  }

  // optional .caffe.LRNParameter lrn_param = 118;
  if (has_lrn_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        118, *this->lrn_param_, false, target);
  }

  // optional .caffe.MemoryDataParameter memory_data_param = 119;
  if (has_memory_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        119, *this->memory_data_param_, false, target);
  }

  // optional .caffe.MVNParameter mvn_param = 120;
  if (has_mvn_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        120, *this->mvn_param_, false, target);
  }

  // optional .caffe.PoolingParameter pooling_param = 121;
  if (has_pooling_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        121, *this->pooling_param_, false, target);
  }

  // optional .caffe.PowerParameter power_param = 122;
  if (has_power_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        122, *this->power_param_, false, target);
  }

  // optional .caffe.ReLUParameter relu_param = 123;
  if (has_relu_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        123, *this->relu_param_, false, target);
  }

  // optional .caffe.SigmoidParameter sigmoid_param = 124;
  if (has_sigmoid_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        124, *this->sigmoid_param_, false, target);
  }

  // optional .caffe.SoftmaxParameter softmax_param = 125;
  if (has_softmax_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        125, *this->softmax_param_, false, target);
  }

  // optional .caffe.SliceParameter slice_param = 126;
  if (has_slice_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        126, *this->slice_param_, false, target);
  }

  // optional .caffe.TanHParameter tanh_param = 127;
  if (has_tanh_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        127, *this->tanh_param_, false, target);
  }

  // optional .caffe.ThresholdParameter threshold_param = 128;
  if (has_threshold_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        128, *this->threshold_param_, false, target);
  }

  // optional .caffe.WindowDataParameter window_data_param = 129;
  if (has_window_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        129, *this->window_data_param_, false, target);
  }

  // optional .caffe.PythonParameter python_param = 130;
  if (has_python_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        130, *this->python_param_, false, target);
  }

  // optional .caffe.PReLUParameter prelu_param = 131;
  if (has_prelu_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        131, *this->prelu_param_, false, target);
  }

  // optional .caffe.SPPParameter spp_param = 132;
  if (has_spp_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        132, *this->spp_param_, false, target);
  }

  // optional .caffe.ReshapeParameter reshape_param = 133;
  if (has_reshape_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        133, *this->reshape_param_, false, target);
  }

  // optional .caffe.LogParameter log_param = 134;
  if (has_log_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        134, *this->log_param_, false, target);
  }

  // optional .caffe.FlattenParameter flatten_param = 135;
  if (has_flatten_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        135, *this->flatten_param_, false, target);
  }

  // optional .caffe.ReductionParameter reduction_param = 136;
  if (has_reduction_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        136, *this->reduction_param_, false, target);
  }

  // optional .caffe.CropParameter crop_param = 137;
  if (has_crop_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        137, *this->crop_param_, false, target);
  }

  // optional .caffe.PermuteParameter permute_param = 138;
  if (has_permute_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        138, *this->permute_param_, false, target);
  }

  // optional .caffe.NormalizeBBoxParameter normalize_bbox_param = 139;
  if (has_normalize_bbox_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        139, *this->normalize_bbox_param_, false, target);
  }

  // optional .caffe.PriorBoxParameter prior_box_param = 140;
  if (has_prior_box_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        140, *this->prior_box_param_, false, target);
  }

  // optional .caffe.DetectionOutputParameter detection_output_param = 141;
  if (has_detection_output_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        141, *this->detection_output_param_, false, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 19u) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional string type = 2;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->type());
    }

    // optional .caffe.Phase phase = 10;
    if (has_phase()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->phase());
    }

  }
  if (_has_bits_[11 / 32] & 63488u) {
    // optional .caffe.TransformationParameter transform_param = 100;
    if (has_transform_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->transform_param_);
    }

    // optional .caffe.LossParameter loss_param = 101;
    if (has_loss_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->loss_param_);
    }

    // optional .caffe.AccuracyParameter accuracy_param = 102;
    if (has_accuracy_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->accuracy_param_);
    }

    // optional .caffe.ArgMaxParameter argmax_param = 103;
    if (has_argmax_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->argmax_param_);
    }

    // optional .caffe.ConcatParameter concat_param = 104;
    if (has_concat_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->concat_param_);
    }

  }
  if (_has_bits_[16 / 32] & 16711680u) {
    // optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
    if (has_contrastive_loss_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->contrastive_loss_param_);
    }

    // optional .caffe.ConvolutionParameter convolution_param = 106;
    if (has_convolution_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->convolution_param_);
    }

    // optional .caffe.CropParameter crop_param = 137;
    if (has_crop_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->crop_param_);
    }

    // optional .caffe.DataParameter data_param = 107;
    if (has_data_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->data_param_);
    }

    // optional .caffe.DetectionOutputParameter detection_output_param = 141;
    if (has_detection_output_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->detection_output_param_);
    }

    // optional .caffe.DropoutParameter dropout_param = 108;
    if (has_dropout_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->dropout_param_);
    }

    // optional .caffe.DummyDataParameter dummy_data_param = 109;
    if (has_dummy_data_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->dummy_data_param_);
    }

    // optional .caffe.EltwiseParameter eltwise_param = 110;
    if (has_eltwise_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->eltwise_param_);
    }

  }
  if (_has_bits_[24 / 32] & 4278190080u) {
    // optional .caffe.ExpParameter exp_param = 111;
    if (has_exp_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->exp_param_);
    }

    // optional .caffe.FlattenParameter flatten_param = 135;
    if (has_flatten_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->flatten_param_);
    }

    // optional .caffe.HDF5DataParameter hdf5_data_param = 112;
    if (has_hdf5_data_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->hdf5_data_param_);
    }

    // optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
    if (has_hdf5_output_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->hdf5_output_param_);
    }

    // optional .caffe.HingeLossParameter hinge_loss_param = 114;
    if (has_hinge_loss_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->hinge_loss_param_);
    }

    // optional .caffe.ImageDataParameter image_data_param = 115;
    if (has_image_data_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->image_data_param_);
    }

    // optional .caffe.InfogainLossParameter infogain_loss_param = 116;
    if (has_infogain_loss_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->infogain_loss_param_);
    }

    // optional .caffe.InnerProductParameter inner_product_param = 117;
    if (has_inner_product_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->inner_product_param_);
    }

  }
  if (_has_bits_[32 / 32] & 255u) {
    // optional .caffe.LogParameter log_param = 134;
    if (has_log_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->log_param_);
    }

    // optional .caffe.LRNParameter lrn_param = 118;
    if (has_lrn_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->lrn_param_);
    }

    // optional .caffe.MemoryDataParameter memory_data_param = 119;
    if (has_memory_data_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->memory_data_param_);
    }

    // optional .caffe.MVNParameter mvn_param = 120;
    if (has_mvn_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->mvn_param_);
    }

    // optional .caffe.NormalizeBBoxParameter normalize_bbox_param = 139;
    if (has_normalize_bbox_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->normalize_bbox_param_);
    }

    // optional .caffe.PermuteParameter permute_param = 138;
    if (has_permute_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->permute_param_);
    }

    // optional .caffe.PoolingParameter pooling_param = 121;
    if (has_pooling_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->pooling_param_);
    }

    // optional .caffe.PowerParameter power_param = 122;
    if (has_power_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->power_param_);
    }

  }
  if (_has_bits_[40 / 32] & 65280u) {
    // optional .caffe.PReLUParameter prelu_param = 131;
    if (has_prelu_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->prelu_param_);
    }

    // optional .caffe.PriorBoxParameter prior_box_param = 140;
    if (has_prior_box_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->prior_box_param_);
    }

    // optional .caffe.PythonParameter python_param = 130;
    if (has_python_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->python_param_);
    }

    // optional .caffe.ReductionParameter reduction_param = 136;
    if (has_reduction_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->reduction_param_);
    }

    // optional .caffe.ReLUParameter relu_param = 123;
    if (has_relu_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->relu_param_);
    }

    // optional .caffe.ReshapeParameter reshape_param = 133;
    if (has_reshape_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->reshape_param_);
    }

    // optional .caffe.SigmoidParameter sigmoid_param = 124;
    if (has_sigmoid_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->sigmoid_param_);
    }

    // optional .caffe.SliceParameter slice_param = 126;
    if (has_slice_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->slice_param_);
    }

  }
  if (_has_bits_[48 / 32] & 2031616u) {
    // optional .caffe.SoftmaxParameter softmax_param = 125;
    if (has_softmax_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->softmax_param_);
    }

    // optional .caffe.SPPParameter spp_param = 132;
    if (has_spp_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->spp_param_);
    }

    // optional .caffe.TanHParameter tanh_param = 127;
    if (has_tanh_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->tanh_param_);
    }

    // optional .caffe.ThresholdParameter threshold_param = 128;
    if (has_threshold_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->threshold_param_);
    }

    // optional .caffe.WindowDataParameter window_data_param = 129;
    if (has_window_data_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->window_data_param_);
    }

  }
  // repeated string bottom = 3;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->bottom_size());
  for (int i = 0; i < this->bottom_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->bottom(i));
  }

  // repeated string top = 4;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->top_size());
  for (int i = 0; i < this->top_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->top(i));
  }

  // repeated float loss_weight = 5;
  {
    size_t data_size = 0;
    unsigned int count = this->loss_weight_size();
    data_size = 4UL * count;
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->loss_weight_size());
    total_size += data_size;
  }

  // repeated .caffe.ParamSpec param = 6;
  {
    unsigned int count = this->param_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->param(i));
    }
  }

  // repeated .caffe.BlobProto blobs = 7;
  {
    unsigned int count = this->blobs_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->blobs(i));
    }
  }

  // repeated bool propagate_down = 11;
  {
    size_t data_size = 0;
    unsigned int count = this->propagate_down_size();
    data_size = 1UL * count;
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->propagate_down_size());
    total_size += data_size;
  }

  // repeated .caffe.NetStateRule include = 8;
  {
    unsigned int count = this->include_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->include(i));
    }
  }

  // repeated .caffe.NetStateRule exclude = 9;
  {
    unsigned int count = this->exclude_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->exclude(i));
    }
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void LayerParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.LayerParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const LayerParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const LayerParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.LayerParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.LayerParameter)
    UnsafeMergeFrom(*source);
  }
}

void LayerParameter::MergeFrom(const LayerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LayerParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void LayerParameter::UnsafeMergeFrom(const LayerParameter& from) {
  GOOGLE_DCHECK(&from != this);
  bottom_.UnsafeMergeFrom(from.bottom_);
  top_.UnsafeMergeFrom(from.top_);
  loss_weight_.UnsafeMergeFrom(from.loss_weight_);
  param_.MergeFrom(from.param_);
  blobs_.MergeFrom(from.blobs_);
  propagate_down_.UnsafeMergeFrom(from.propagate_down_);
  include_.MergeFrom(from.include_);
  exclude_.MergeFrom(from.exclude_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_has_name();
      name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
    }
    if (from.has_type()) {
      set_has_type();
      type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_);
    }
    if (from.has_phase()) {
      set_phase(from.phase());
    }
  }
  if (from._has_bits_[11 / 32] & (0xffu << (11 % 32))) {
    if (from.has_transform_param()) {
      mutable_transform_param()->::caffe::TransformationParameter::MergeFrom(from.transform_param());
    }
    if (from.has_loss_param()) {
      mutable_loss_param()->::caffe::LossParameter::MergeFrom(from.loss_param());
    }
    if (from.has_accuracy_param()) {
      mutable_accuracy_param()->::caffe::AccuracyParameter::MergeFrom(from.accuracy_param());
    }
    if (from.has_argmax_param()) {
      mutable_argmax_param()->::caffe::ArgMaxParameter::MergeFrom(from.argmax_param());
    }
    if (from.has_concat_param()) {
      mutable_concat_param()->::caffe::ConcatParameter::MergeFrom(from.concat_param());
    }
  }
  if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    if (from.has_contrastive_loss_param()) {
      mutable_contrastive_loss_param()->::caffe::ContrastiveLossParameter::MergeFrom(from.contrastive_loss_param());
    }
    if (from.has_convolution_param()) {
      mutable_convolution_param()->::caffe::ConvolutionParameter::MergeFrom(from.convolution_param());
    }
    if (from.has_crop_param()) {
      mutable_crop_param()->::caffe::CropParameter::MergeFrom(from.crop_param());
    }
    if (from.has_data_param()) {
      mutable_data_param()->::caffe::DataParameter::MergeFrom(from.data_param());
    }
    if (from.has_detection_output_param()) {
      mutable_detection_output_param()->::caffe::DetectionOutputParameter::MergeFrom(from.detection_output_param());
    }
    if (from.has_dropout_param()) {
      mutable_dropout_param()->::caffe::DropoutParameter::MergeFrom(from.dropout_param());
    }
    if (from.has_dummy_data_param()) {
      mutable_dummy_data_param()->::caffe::DummyDataParameter::MergeFrom(from.dummy_data_param());
    }
    if (from.has_eltwise_param()) {
      mutable_eltwise_param()->::caffe::EltwiseParameter::MergeFrom(from.eltwise_param());
    }
  }
  if (from._has_bits_[24 / 32] & (0xffu << (24 % 32))) {
    if (from.has_exp_param()) {
      mutable_exp_param()->::caffe::ExpParameter::MergeFrom(from.exp_param());
    }
    if (from.has_flatten_param()) {
      mutable_flatten_param()->::caffe::FlattenParameter::MergeFrom(from.flatten_param());
    }
    if (from.has_hdf5_data_param()) {
      mutable_hdf5_data_param()->::caffe::HDF5DataParameter::MergeFrom(from.hdf5_data_param());
    }
    if (from.has_hdf5_output_param()) {
      mutable_hdf5_output_param()->::caffe::HDF5OutputParameter::MergeFrom(from.hdf5_output_param());
    }
    if (from.has_hinge_loss_param()) {
      mutable_hinge_loss_param()->::caffe::HingeLossParameter::MergeFrom(from.hinge_loss_param());
    }
    if (from.has_image_data_param()) {
      mutable_image_data_param()->::caffe::ImageDataParameter::MergeFrom(from.image_data_param());
    }
    if (from.has_infogain_loss_param()) {
      mutable_infogain_loss_param()->::caffe::InfogainLossParameter::MergeFrom(from.infogain_loss_param());
    }
    if (from.has_inner_product_param()) {
      mutable_inner_product_param()->::caffe::InnerProductParameter::MergeFrom(from.inner_product_param());
    }
  }
  if (from._has_bits_[32 / 32] & (0xffu << (32 % 32))) {
    if (from.has_log_param()) {
      mutable_log_param()->::caffe::LogParameter::MergeFrom(from.log_param());
    }
    if (from.has_lrn_param()) {
      mutable_lrn_param()->::caffe::LRNParameter::MergeFrom(from.lrn_param());
    }
    if (from.has_memory_data_param()) {
      mutable_memory_data_param()->::caffe::MemoryDataParameter::MergeFrom(from.memory_data_param());
    }
    if (from.has_mvn_param()) {
      mutable_mvn_param()->::caffe::MVNParameter::MergeFrom(from.mvn_param());
    }
    if (from.has_normalize_bbox_param()) {
      mutable_normalize_bbox_param()->::caffe::NormalizeBBoxParameter::MergeFrom(from.normalize_bbox_param());
    }
    if (from.has_permute_param()) {
      mutable_permute_param()->::caffe::PermuteParameter::MergeFrom(from.permute_param());
    }
    if (from.has_pooling_param()) {
      mutable_pooling_param()->::caffe::PoolingParameter::MergeFrom(from.pooling_param());
    }
    if (from.has_power_param()) {
      mutable_power_param()->::caffe::PowerParameter::MergeFrom(from.power_param());
    }
  }
  if (from._has_bits_[40 / 32] & (0xffu << (40 % 32))) {
    if (from.has_prelu_param()) {
      mutable_prelu_param()->::caffe::PReLUParameter::MergeFrom(from.prelu_param());
    }
    if (from.has_prior_box_param()) {
      mutable_prior_box_param()->::caffe::PriorBoxParameter::MergeFrom(from.prior_box_param());
    }
    if (from.has_python_param()) {
      mutable_python_param()->::caffe::PythonParameter::MergeFrom(from.python_param());
    }
    if (from.has_reduction_param()) {
      mutable_reduction_param()->::caffe::ReductionParameter::MergeFrom(from.reduction_param());
    }
    if (from.has_relu_param()) {
      mutable_relu_param()->::caffe::ReLUParameter::MergeFrom(from.relu_param());
    }
    if (from.has_reshape_param()) {
      mutable_reshape_param()->::caffe::ReshapeParameter::MergeFrom(from.reshape_param());
    }
    if (from.has_sigmoid_param()) {
      mutable_sigmoid_param()->::caffe::SigmoidParameter::MergeFrom(from.sigmoid_param());
    }
    if (from.has_slice_param()) {
      mutable_slice_param()->::caffe::SliceParameter::MergeFrom(from.slice_param());
    }
  }
  if (from._has_bits_[48 / 32] & (0xffu << (48 % 32))) {
    if (from.has_softmax_param()) {
      mutable_softmax_param()->::caffe::SoftmaxParameter::MergeFrom(from.softmax_param());
    }
    if (from.has_spp_param()) {
      mutable_spp_param()->::caffe::SPPParameter::MergeFrom(from.spp_param());
    }
    if (from.has_tanh_param()) {
      mutable_tanh_param()->::caffe::TanHParameter::MergeFrom(from.tanh_param());
    }
    if (from.has_threshold_param()) {
      mutable_threshold_param()->::caffe::ThresholdParameter::MergeFrom(from.threshold_param());
    }
    if (from.has_window_data_param()) {
      mutable_window_data_param()->::caffe::WindowDataParameter::MergeFrom(from.window_data_param());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void LayerParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.LayerParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool LayerParameter::IsInitialized() const {

  return true;
}

void LayerParameter::Swap(LayerParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void LayerParameter::InternalSwap(LayerParameter* other) {
  name_.Swap(&other->name_);
  type_.Swap(&other->type_);
  bottom_.UnsafeArenaSwap(&other->bottom_);
  top_.UnsafeArenaSwap(&other->top_);
  std::swap(phase_, other->phase_);
  loss_weight_.UnsafeArenaSwap(&other->loss_weight_);
  param_.UnsafeArenaSwap(&other->param_);
  blobs_.UnsafeArenaSwap(&other->blobs_);
  propagate_down_.UnsafeArenaSwap(&other->propagate_down_);
  include_.UnsafeArenaSwap(&other->include_);
  exclude_.UnsafeArenaSwap(&other->exclude_);
  std::swap(transform_param_, other->transform_param_);
  std::swap(loss_param_, other->loss_param_);
  std::swap(accuracy_param_, other->accuracy_param_);
  std::swap(argmax_param_, other->argmax_param_);
  std::swap(concat_param_, other->concat_param_);
  std::swap(contrastive_loss_param_, other->contrastive_loss_param_);
  std::swap(convolution_param_, other->convolution_param_);
  std::swap(crop_param_, other->crop_param_);
  std::swap(data_param_, other->data_param_);
  std::swap(detection_output_param_, other->detection_output_param_);
  std::swap(dropout_param_, other->dropout_param_);
  std::swap(dummy_data_param_, other->dummy_data_param_);
  std::swap(eltwise_param_, other->eltwise_param_);
  std::swap(exp_param_, other->exp_param_);
  std::swap(flatten_param_, other->flatten_param_);
  std::swap(hdf5_data_param_, other->hdf5_data_param_);
  std::swap(hdf5_output_param_, other->hdf5_output_param_);
  std::swap(hinge_loss_param_, other->hinge_loss_param_);
  std::swap(image_data_param_, other->image_data_param_);
  std::swap(infogain_loss_param_, other->infogain_loss_param_);
  std::swap(inner_product_param_, other->inner_product_param_);
  std::swap(log_param_, other->log_param_);
  std::swap(lrn_param_, other->lrn_param_);
  std::swap(memory_data_param_, other->memory_data_param_);
  std::swap(mvn_param_, other->mvn_param_);
  std::swap(normalize_bbox_param_, other->normalize_bbox_param_);
  std::swap(permute_param_, other->permute_param_);
  std::swap(pooling_param_, other->pooling_param_);
  std::swap(power_param_, other->power_param_);
  std::swap(prelu_param_, other->prelu_param_);
  std::swap(prior_box_param_, other->prior_box_param_);
  std::swap(python_param_, other->python_param_);
  std::swap(reduction_param_, other->reduction_param_);
  std::swap(relu_param_, other->relu_param_);
  std::swap(reshape_param_, other->reshape_param_);
  std::swap(sigmoid_param_, other->sigmoid_param_);
  std::swap(slice_param_, other->slice_param_);
  std::swap(softmax_param_, other->softmax_param_);
  std::swap(spp_param_, other->spp_param_);
  std::swap(tanh_param_, other->tanh_param_);
  std::swap(threshold_param_, other->threshold_param_);
  std::swap(window_data_param_, other->window_data_param_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  std::swap(_has_bits_[1], other->_has_bits_[1]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata LayerParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = LayerParameter_descriptor_;
  metadata.reflection = LayerParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// LayerParameter

// optional string name = 1;
bool LayerParameter::has_name() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void LayerParameter::set_has_name() {
  _has_bits_[0] |= 0x00000001u;
}
void LayerParameter::clear_has_name() {
  _has_bits_[0] &= ~0x00000001u;
}
void LayerParameter::clear_name() {
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_name();
}
const ::std::string& LayerParameter::name() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.name)
  return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void LayerParameter::set_name(const ::std::string& value) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.LayerParameter.name)
}
void LayerParameter::set_name(const char* value) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.LayerParameter.name)
}
void LayerParameter::set_name(const char* value, size_t size) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.LayerParameter.name)
}
::std::string* LayerParameter::mutable_name() {
  set_has_name();
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.name)
  return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* LayerParameter::release_name() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.name)
  clear_has_name();
  return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void LayerParameter::set_allocated_name(::std::string* name) {
  if (name != NULL) {
    set_has_name();
  } else {
    clear_has_name();
  }
  name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.name)
}

// optional string type = 2;
bool LayerParameter::has_type() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void LayerParameter::set_has_type() {
  _has_bits_[0] |= 0x00000002u;
}
void LayerParameter::clear_has_type() {
  _has_bits_[0] &= ~0x00000002u;
}
void LayerParameter::clear_type() {
  type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_type();
}
const ::std::string& LayerParameter::type() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.type)
  return type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void LayerParameter::set_type(const ::std::string& value) {
  set_has_type();
  type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.LayerParameter.type)
}
void LayerParameter::set_type(const char* value) {
  set_has_type();
  type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.LayerParameter.type)
}
void LayerParameter::set_type(const char* value, size_t size) {
  set_has_type();
  type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.LayerParameter.type)
}
::std::string* LayerParameter::mutable_type() {
  set_has_type();
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.type)
  return type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* LayerParameter::release_type() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.type)
  clear_has_type();
  return type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void LayerParameter::set_allocated_type(::std::string* type) {
  if (type != NULL) {
    set_has_type();
  } else {
    clear_has_type();
  }
  type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type);
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.type)
}

// repeated string bottom = 3;
int LayerParameter::bottom_size() const {
  return bottom_.size();
}
void LayerParameter::clear_bottom() {
  bottom_.Clear();
}
const ::std::string& LayerParameter::bottom(int index) const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.bottom)
  return bottom_.Get(index);
}
::std::string* LayerParameter::mutable_bottom(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.bottom)
  return bottom_.Mutable(index);
}
void LayerParameter::set_bottom(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:caffe.LayerParameter.bottom)
  bottom_.Mutable(index)->assign(value);
}
void LayerParameter::set_bottom(int index, const char* value) {
  bottom_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:caffe.LayerParameter.bottom)
}
void LayerParameter::set_bottom(int index, const char* value, size_t size) {
  bottom_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:caffe.LayerParameter.bottom)
}
::std::string* LayerParameter::add_bottom() {
  // @@protoc_insertion_point(field_add_mutable:caffe.LayerParameter.bottom)
  return bottom_.Add();
}
void LayerParameter::add_bottom(const ::std::string& value) {
  bottom_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:caffe.LayerParameter.bottom)
}
void LayerParameter::add_bottom(const char* value) {
  bottom_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:caffe.LayerParameter.bottom)
}
void LayerParameter::add_bottom(const char* value, size_t size) {
  bottom_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:caffe.LayerParameter.bottom)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
LayerParameter::bottom() const {
  // @@protoc_insertion_point(field_list:caffe.LayerParameter.bottom)
  return bottom_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
LayerParameter::mutable_bottom() {
  // @@protoc_insertion_point(field_mutable_list:caffe.LayerParameter.bottom)
  return &bottom_;
}

// repeated string top = 4;
int LayerParameter::top_size() const {
  return top_.size();
}
void LayerParameter::clear_top() {
  top_.Clear();
}
const ::std::string& LayerParameter::top(int index) const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.top)
  return top_.Get(index);
}
::std::string* LayerParameter::mutable_top(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.top)
  return top_.Mutable(index);
}
void LayerParameter::set_top(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:caffe.LayerParameter.top)
  top_.Mutable(index)->assign(value);
}
void LayerParameter::set_top(int index, const char* value) {
  top_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:caffe.LayerParameter.top)
}
void LayerParameter::set_top(int index, const char* value, size_t size) {
  top_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:caffe.LayerParameter.top)
}
::std::string* LayerParameter::add_top() {
  // @@protoc_insertion_point(field_add_mutable:caffe.LayerParameter.top)
  return top_.Add();
}
void LayerParameter::add_top(const ::std::string& value) {
  top_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:caffe.LayerParameter.top)
}
void LayerParameter::add_top(const char* value) {
  top_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:caffe.LayerParameter.top)
}
void LayerParameter::add_top(const char* value, size_t size) {
  top_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:caffe.LayerParameter.top)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
LayerParameter::top() const {
  // @@protoc_insertion_point(field_list:caffe.LayerParameter.top)
  return top_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
LayerParameter::mutable_top() {
  // @@protoc_insertion_point(field_mutable_list:caffe.LayerParameter.top)
  return &top_;
}

// optional .caffe.Phase phase = 10;
bool LayerParameter::has_phase() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void LayerParameter::set_has_phase() {
  _has_bits_[0] |= 0x00000010u;
}
void LayerParameter::clear_has_phase() {
  _has_bits_[0] &= ~0x00000010u;
}
void LayerParameter::clear_phase() {
  phase_ = 0;
  clear_has_phase();
}
::caffe::Phase LayerParameter::phase() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.phase)
  return static_cast< ::caffe::Phase >(phase_);
}
void LayerParameter::set_phase(::caffe::Phase value) {
  assert(::caffe::Phase_IsValid(value));
  set_has_phase();
  phase_ = value;
  // @@protoc_insertion_point(field_set:caffe.LayerParameter.phase)
}

// repeated float loss_weight = 5;
int LayerParameter::loss_weight_size() const {
  return loss_weight_.size();
}
void LayerParameter::clear_loss_weight() {
  loss_weight_.Clear();
}
float LayerParameter::loss_weight(int index) const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.loss_weight)
  return loss_weight_.Get(index);
}
void LayerParameter::set_loss_weight(int index, float value) {
  loss_weight_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.LayerParameter.loss_weight)
}
void LayerParameter::add_loss_weight(float value) {
  loss_weight_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.LayerParameter.loss_weight)
}
const ::google::protobuf::RepeatedField< float >&
LayerParameter::loss_weight() const {
  // @@protoc_insertion_point(field_list:caffe.LayerParameter.loss_weight)
  return loss_weight_;
}
::google::protobuf::RepeatedField< float >*
LayerParameter::mutable_loss_weight() {
  // @@protoc_insertion_point(field_mutable_list:caffe.LayerParameter.loss_weight)
  return &loss_weight_;
}

// repeated .caffe.ParamSpec param = 6;
int LayerParameter::param_size() const {
  return param_.size();
}
void LayerParameter::clear_param() {
  param_.Clear();
}
const ::caffe::ParamSpec& LayerParameter::param(int index) const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.param)
  return param_.Get(index);
}
::caffe::ParamSpec* LayerParameter::mutable_param(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.param)
  return param_.Mutable(index);
}
::caffe::ParamSpec* LayerParameter::add_param() {
  // @@protoc_insertion_point(field_add:caffe.LayerParameter.param)
  return param_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::ParamSpec >*
LayerParameter::mutable_param() {
  // @@protoc_insertion_point(field_mutable_list:caffe.LayerParameter.param)
  return &param_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::ParamSpec >&
LayerParameter::param() const {
  // @@protoc_insertion_point(field_list:caffe.LayerParameter.param)
  return param_;
}

// repeated .caffe.BlobProto blobs = 7;
int LayerParameter::blobs_size() const {
  return blobs_.size();
}
void LayerParameter::clear_blobs() {
  blobs_.Clear();
}
const ::caffe::BlobProto& LayerParameter::blobs(int index) const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.blobs)
  return blobs_.Get(index);
}
::caffe::BlobProto* LayerParameter::mutable_blobs(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.blobs)
  return blobs_.Mutable(index);
}
::caffe::BlobProto* LayerParameter::add_blobs() {
  // @@protoc_insertion_point(field_add:caffe.LayerParameter.blobs)
  return blobs_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::BlobProto >*
LayerParameter::mutable_blobs() {
  // @@protoc_insertion_point(field_mutable_list:caffe.LayerParameter.blobs)
  return &blobs_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::BlobProto >&
LayerParameter::blobs() const {
  // @@protoc_insertion_point(field_list:caffe.LayerParameter.blobs)
  return blobs_;
}

// repeated bool propagate_down = 11;
int LayerParameter::propagate_down_size() const {
  return propagate_down_.size();
}
void LayerParameter::clear_propagate_down() {
  propagate_down_.Clear();
}
bool LayerParameter::propagate_down(int index) const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.propagate_down)
  return propagate_down_.Get(index);
}
void LayerParameter::set_propagate_down(int index, bool value) {
  propagate_down_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.LayerParameter.propagate_down)
}
void LayerParameter::add_propagate_down(bool value) {
  propagate_down_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.LayerParameter.propagate_down)
}
const ::google::protobuf::RepeatedField< bool >&
LayerParameter::propagate_down() const {
  // @@protoc_insertion_point(field_list:caffe.LayerParameter.propagate_down)
  return propagate_down_;
}
::google::protobuf::RepeatedField< bool >*
LayerParameter::mutable_propagate_down() {
  // @@protoc_insertion_point(field_mutable_list:caffe.LayerParameter.propagate_down)
  return &propagate_down_;
}

// repeated .caffe.NetStateRule include = 8;
int LayerParameter::include_size() const {
  return include_.size();
}
void LayerParameter::clear_include() {
  include_.Clear();
}
const ::caffe::NetStateRule& LayerParameter::include(int index) const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.include)
  return include_.Get(index);
}
::caffe::NetStateRule* LayerParameter::mutable_include(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.include)
  return include_.Mutable(index);
}
::caffe::NetStateRule* LayerParameter::add_include() {
  // @@protoc_insertion_point(field_add:caffe.LayerParameter.include)
  return include_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::NetStateRule >*
LayerParameter::mutable_include() {
  // @@protoc_insertion_point(field_mutable_list:caffe.LayerParameter.include)
  return &include_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::NetStateRule >&
LayerParameter::include() const {
  // @@protoc_insertion_point(field_list:caffe.LayerParameter.include)
  return include_;
}

// repeated .caffe.NetStateRule exclude = 9;
int LayerParameter::exclude_size() const {
  return exclude_.size();
}
void LayerParameter::clear_exclude() {
  exclude_.Clear();
}
const ::caffe::NetStateRule& LayerParameter::exclude(int index) const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.exclude)
  return exclude_.Get(index);
}
::caffe::NetStateRule* LayerParameter::mutable_exclude(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.exclude)
  return exclude_.Mutable(index);
}
::caffe::NetStateRule* LayerParameter::add_exclude() {
  // @@protoc_insertion_point(field_add:caffe.LayerParameter.exclude)
  return exclude_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::NetStateRule >*
LayerParameter::mutable_exclude() {
  // @@protoc_insertion_point(field_mutable_list:caffe.LayerParameter.exclude)
  return &exclude_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::NetStateRule >&
LayerParameter::exclude() const {
  // @@protoc_insertion_point(field_list:caffe.LayerParameter.exclude)
  return exclude_;
}

// optional .caffe.TransformationParameter transform_param = 100;
bool LayerParameter::has_transform_param() const {
  return (_has_bits_[0] & 0x00000800u) != 0;
}
void LayerParameter::set_has_transform_param() {
  _has_bits_[0] |= 0x00000800u;
}
void LayerParameter::clear_has_transform_param() {
  _has_bits_[0] &= ~0x00000800u;
}
void LayerParameter::clear_transform_param() {
  if (transform_param_ != NULL) transform_param_->::caffe::TransformationParameter::Clear();
  clear_has_transform_param();
}
const ::caffe::TransformationParameter& LayerParameter::transform_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.transform_param)
  return transform_param_ != NULL ? *transform_param_
                         : *::caffe::TransformationParameter::internal_default_instance();
}
::caffe::TransformationParameter* LayerParameter::mutable_transform_param() {
  set_has_transform_param();
  if (transform_param_ == NULL) {
    transform_param_ = new ::caffe::TransformationParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.transform_param)
  return transform_param_;
}
::caffe::TransformationParameter* LayerParameter::release_transform_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.transform_param)
  clear_has_transform_param();
  ::caffe::TransformationParameter* temp = transform_param_;
  transform_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_transform_param(::caffe::TransformationParameter* transform_param) {
  delete transform_param_;
  transform_param_ = transform_param;
  if (transform_param) {
    set_has_transform_param();
  } else {
    clear_has_transform_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.transform_param)
}

// optional .caffe.LossParameter loss_param = 101;
bool LayerParameter::has_loss_param() const {
  return (_has_bits_[0] & 0x00001000u) != 0;
}
void LayerParameter::set_has_loss_param() {
  _has_bits_[0] |= 0x00001000u;
}
void LayerParameter::clear_has_loss_param() {
  _has_bits_[0] &= ~0x00001000u;
}
void LayerParameter::clear_loss_param() {
  if (loss_param_ != NULL) loss_param_->::caffe::LossParameter::Clear();
  clear_has_loss_param();
}
const ::caffe::LossParameter& LayerParameter::loss_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.loss_param)
  return loss_param_ != NULL ? *loss_param_
                         : *::caffe::LossParameter::internal_default_instance();
}
::caffe::LossParameter* LayerParameter::mutable_loss_param() {
  set_has_loss_param();
  if (loss_param_ == NULL) {
    loss_param_ = new ::caffe::LossParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.loss_param)
  return loss_param_;
}
::caffe::LossParameter* LayerParameter::release_loss_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.loss_param)
  clear_has_loss_param();
  ::caffe::LossParameter* temp = loss_param_;
  loss_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_loss_param(::caffe::LossParameter* loss_param) {
  delete loss_param_;
  loss_param_ = loss_param;
  if (loss_param) {
    set_has_loss_param();
  } else {
    clear_has_loss_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.loss_param)
}

// optional .caffe.AccuracyParameter accuracy_param = 102;
bool LayerParameter::has_accuracy_param() const {
  return (_has_bits_[0] & 0x00002000u) != 0;
}
void LayerParameter::set_has_accuracy_param() {
  _has_bits_[0] |= 0x00002000u;
}
void LayerParameter::clear_has_accuracy_param() {
  _has_bits_[0] &= ~0x00002000u;
}
void LayerParameter::clear_accuracy_param() {
  if (accuracy_param_ != NULL) accuracy_param_->::caffe::AccuracyParameter::Clear();
  clear_has_accuracy_param();
}
const ::caffe::AccuracyParameter& LayerParameter::accuracy_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.accuracy_param)
  return accuracy_param_ != NULL ? *accuracy_param_
                         : *::caffe::AccuracyParameter::internal_default_instance();
}
::caffe::AccuracyParameter* LayerParameter::mutable_accuracy_param() {
  set_has_accuracy_param();
  if (accuracy_param_ == NULL) {
    accuracy_param_ = new ::caffe::AccuracyParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.accuracy_param)
  return accuracy_param_;
}
::caffe::AccuracyParameter* LayerParameter::release_accuracy_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.accuracy_param)
  clear_has_accuracy_param();
  ::caffe::AccuracyParameter* temp = accuracy_param_;
  accuracy_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_accuracy_param(::caffe::AccuracyParameter* accuracy_param) {
  delete accuracy_param_;
  accuracy_param_ = accuracy_param;
  if (accuracy_param) {
    set_has_accuracy_param();
  } else {
    clear_has_accuracy_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.accuracy_param)
}

// optional .caffe.ArgMaxParameter argmax_param = 103;
bool LayerParameter::has_argmax_param() const {
  return (_has_bits_[0] & 0x00004000u) != 0;
}
void LayerParameter::set_has_argmax_param() {
  _has_bits_[0] |= 0x00004000u;
}
void LayerParameter::clear_has_argmax_param() {
  _has_bits_[0] &= ~0x00004000u;
}
void LayerParameter::clear_argmax_param() {
  if (argmax_param_ != NULL) argmax_param_->::caffe::ArgMaxParameter::Clear();
  clear_has_argmax_param();
}
const ::caffe::ArgMaxParameter& LayerParameter::argmax_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.argmax_param)
  return argmax_param_ != NULL ? *argmax_param_
                         : *::caffe::ArgMaxParameter::internal_default_instance();
}
::caffe::ArgMaxParameter* LayerParameter::mutable_argmax_param() {
  set_has_argmax_param();
  if (argmax_param_ == NULL) {
    argmax_param_ = new ::caffe::ArgMaxParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.argmax_param)
  return argmax_param_;
}
::caffe::ArgMaxParameter* LayerParameter::release_argmax_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.argmax_param)
  clear_has_argmax_param();
  ::caffe::ArgMaxParameter* temp = argmax_param_;
  argmax_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_argmax_param(::caffe::ArgMaxParameter* argmax_param) {
  delete argmax_param_;
  argmax_param_ = argmax_param;
  if (argmax_param) {
    set_has_argmax_param();
  } else {
    clear_has_argmax_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.argmax_param)
}

// optional .caffe.ConcatParameter concat_param = 104;
bool LayerParameter::has_concat_param() const {
  return (_has_bits_[0] & 0x00008000u) != 0;
}
void LayerParameter::set_has_concat_param() {
  _has_bits_[0] |= 0x00008000u;
}
void LayerParameter::clear_has_concat_param() {
  _has_bits_[0] &= ~0x00008000u;
}
void LayerParameter::clear_concat_param() {
  if (concat_param_ != NULL) concat_param_->::caffe::ConcatParameter::Clear();
  clear_has_concat_param();
}
const ::caffe::ConcatParameter& LayerParameter::concat_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.concat_param)
  return concat_param_ != NULL ? *concat_param_
                         : *::caffe::ConcatParameter::internal_default_instance();
}
::caffe::ConcatParameter* LayerParameter::mutable_concat_param() {
  set_has_concat_param();
  if (concat_param_ == NULL) {
    concat_param_ = new ::caffe::ConcatParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.concat_param)
  return concat_param_;
}
::caffe::ConcatParameter* LayerParameter::release_concat_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.concat_param)
  clear_has_concat_param();
  ::caffe::ConcatParameter* temp = concat_param_;
  concat_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_concat_param(::caffe::ConcatParameter* concat_param) {
  delete concat_param_;
  concat_param_ = concat_param;
  if (concat_param) {
    set_has_concat_param();
  } else {
    clear_has_concat_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.concat_param)
}

// optional .caffe.ContrastiveLossParameter contrastive_loss_param = 105;
bool LayerParameter::has_contrastive_loss_param() const {
  return (_has_bits_[0] & 0x00010000u) != 0;
}
void LayerParameter::set_has_contrastive_loss_param() {
  _has_bits_[0] |= 0x00010000u;
}
void LayerParameter::clear_has_contrastive_loss_param() {
  _has_bits_[0] &= ~0x00010000u;
}
void LayerParameter::clear_contrastive_loss_param() {
  if (contrastive_loss_param_ != NULL) contrastive_loss_param_->::caffe::ContrastiveLossParameter::Clear();
  clear_has_contrastive_loss_param();
}
const ::caffe::ContrastiveLossParameter& LayerParameter::contrastive_loss_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.contrastive_loss_param)
  return contrastive_loss_param_ != NULL ? *contrastive_loss_param_
                         : *::caffe::ContrastiveLossParameter::internal_default_instance();
}
::caffe::ContrastiveLossParameter* LayerParameter::mutable_contrastive_loss_param() {
  set_has_contrastive_loss_param();
  if (contrastive_loss_param_ == NULL) {
    contrastive_loss_param_ = new ::caffe::ContrastiveLossParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.contrastive_loss_param)
  return contrastive_loss_param_;
}
::caffe::ContrastiveLossParameter* LayerParameter::release_contrastive_loss_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.contrastive_loss_param)
  clear_has_contrastive_loss_param();
  ::caffe::ContrastiveLossParameter* temp = contrastive_loss_param_;
  contrastive_loss_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_contrastive_loss_param(::caffe::ContrastiveLossParameter* contrastive_loss_param) {
  delete contrastive_loss_param_;
  contrastive_loss_param_ = contrastive_loss_param;
  if (contrastive_loss_param) {
    set_has_contrastive_loss_param();
  } else {
    clear_has_contrastive_loss_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.contrastive_loss_param)
}

// optional .caffe.ConvolutionParameter convolution_param = 106;
bool LayerParameter::has_convolution_param() const {
  return (_has_bits_[0] & 0x00020000u) != 0;
}
void LayerParameter::set_has_convolution_param() {
  _has_bits_[0] |= 0x00020000u;
}
void LayerParameter::clear_has_convolution_param() {
  _has_bits_[0] &= ~0x00020000u;
}
void LayerParameter::clear_convolution_param() {
  if (convolution_param_ != NULL) convolution_param_->::caffe::ConvolutionParameter::Clear();
  clear_has_convolution_param();
}
const ::caffe::ConvolutionParameter& LayerParameter::convolution_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.convolution_param)
  return convolution_param_ != NULL ? *convolution_param_
                         : *::caffe::ConvolutionParameter::internal_default_instance();
}
::caffe::ConvolutionParameter* LayerParameter::mutable_convolution_param() {
  set_has_convolution_param();
  if (convolution_param_ == NULL) {
    convolution_param_ = new ::caffe::ConvolutionParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.convolution_param)
  return convolution_param_;
}
::caffe::ConvolutionParameter* LayerParameter::release_convolution_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.convolution_param)
  clear_has_convolution_param();
  ::caffe::ConvolutionParameter* temp = convolution_param_;
  convolution_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_convolution_param(::caffe::ConvolutionParameter* convolution_param) {
  delete convolution_param_;
  convolution_param_ = convolution_param;
  if (convolution_param) {
    set_has_convolution_param();
  } else {
    clear_has_convolution_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.convolution_param)
}

// optional .caffe.CropParameter crop_param = 137;
bool LayerParameter::has_crop_param() const {
  return (_has_bits_[0] & 0x00040000u) != 0;
}
void LayerParameter::set_has_crop_param() {
  _has_bits_[0] |= 0x00040000u;
}
void LayerParameter::clear_has_crop_param() {
  _has_bits_[0] &= ~0x00040000u;
}
void LayerParameter::clear_crop_param() {
  if (crop_param_ != NULL) crop_param_->::caffe::CropParameter::Clear();
  clear_has_crop_param();
}
const ::caffe::CropParameter& LayerParameter::crop_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.crop_param)
  return crop_param_ != NULL ? *crop_param_
                         : *::caffe::CropParameter::internal_default_instance();
}
::caffe::CropParameter* LayerParameter::mutable_crop_param() {
  set_has_crop_param();
  if (crop_param_ == NULL) {
    crop_param_ = new ::caffe::CropParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.crop_param)
  return crop_param_;
}
::caffe::CropParameter* LayerParameter::release_crop_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.crop_param)
  clear_has_crop_param();
  ::caffe::CropParameter* temp = crop_param_;
  crop_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_crop_param(::caffe::CropParameter* crop_param) {
  delete crop_param_;
  crop_param_ = crop_param;
  if (crop_param) {
    set_has_crop_param();
  } else {
    clear_has_crop_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.crop_param)
}

// optional .caffe.DataParameter data_param = 107;
bool LayerParameter::has_data_param() const {
  return (_has_bits_[0] & 0x00080000u) != 0;
}
void LayerParameter::set_has_data_param() {
  _has_bits_[0] |= 0x00080000u;
}
void LayerParameter::clear_has_data_param() {
  _has_bits_[0] &= ~0x00080000u;
}
void LayerParameter::clear_data_param() {
  if (data_param_ != NULL) data_param_->::caffe::DataParameter::Clear();
  clear_has_data_param();
}
const ::caffe::DataParameter& LayerParameter::data_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.data_param)
  return data_param_ != NULL ? *data_param_
                         : *::caffe::DataParameter::internal_default_instance();
}
::caffe::DataParameter* LayerParameter::mutable_data_param() {
  set_has_data_param();
  if (data_param_ == NULL) {
    data_param_ = new ::caffe::DataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.data_param)
  return data_param_;
}
::caffe::DataParameter* LayerParameter::release_data_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.data_param)
  clear_has_data_param();
  ::caffe::DataParameter* temp = data_param_;
  data_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_data_param(::caffe::DataParameter* data_param) {
  delete data_param_;
  data_param_ = data_param;
  if (data_param) {
    set_has_data_param();
  } else {
    clear_has_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.data_param)
}

// optional .caffe.DetectionOutputParameter detection_output_param = 141;
bool LayerParameter::has_detection_output_param() const {
  return (_has_bits_[0] & 0x00100000u) != 0;
}
void LayerParameter::set_has_detection_output_param() {
  _has_bits_[0] |= 0x00100000u;
}
void LayerParameter::clear_has_detection_output_param() {
  _has_bits_[0] &= ~0x00100000u;
}
void LayerParameter::clear_detection_output_param() {
  if (detection_output_param_ != NULL) detection_output_param_->::caffe::DetectionOutputParameter::Clear();
  clear_has_detection_output_param();
}
const ::caffe::DetectionOutputParameter& LayerParameter::detection_output_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.detection_output_param)
  return detection_output_param_ != NULL ? *detection_output_param_
                         : *::caffe::DetectionOutputParameter::internal_default_instance();
}
::caffe::DetectionOutputParameter* LayerParameter::mutable_detection_output_param() {
  set_has_detection_output_param();
  if (detection_output_param_ == NULL) {
    detection_output_param_ = new ::caffe::DetectionOutputParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.detection_output_param)
  return detection_output_param_;
}
::caffe::DetectionOutputParameter* LayerParameter::release_detection_output_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.detection_output_param)
  clear_has_detection_output_param();
  ::caffe::DetectionOutputParameter* temp = detection_output_param_;
  detection_output_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_detection_output_param(::caffe::DetectionOutputParameter* detection_output_param) {
  delete detection_output_param_;
  detection_output_param_ = detection_output_param;
  if (detection_output_param) {
    set_has_detection_output_param();
  } else {
    clear_has_detection_output_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.detection_output_param)
}

// optional .caffe.DropoutParameter dropout_param = 108;
bool LayerParameter::has_dropout_param() const {
  return (_has_bits_[0] & 0x00200000u) != 0;
}
void LayerParameter::set_has_dropout_param() {
  _has_bits_[0] |= 0x00200000u;
}
void LayerParameter::clear_has_dropout_param() {
  _has_bits_[0] &= ~0x00200000u;
}
void LayerParameter::clear_dropout_param() {
  if (dropout_param_ != NULL) dropout_param_->::caffe::DropoutParameter::Clear();
  clear_has_dropout_param();
}
const ::caffe::DropoutParameter& LayerParameter::dropout_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.dropout_param)
  return dropout_param_ != NULL ? *dropout_param_
                         : *::caffe::DropoutParameter::internal_default_instance();
}
::caffe::DropoutParameter* LayerParameter::mutable_dropout_param() {
  set_has_dropout_param();
  if (dropout_param_ == NULL) {
    dropout_param_ = new ::caffe::DropoutParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.dropout_param)
  return dropout_param_;
}
::caffe::DropoutParameter* LayerParameter::release_dropout_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.dropout_param)
  clear_has_dropout_param();
  ::caffe::DropoutParameter* temp = dropout_param_;
  dropout_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_dropout_param(::caffe::DropoutParameter* dropout_param) {
  delete dropout_param_;
  dropout_param_ = dropout_param;
  if (dropout_param) {
    set_has_dropout_param();
  } else {
    clear_has_dropout_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.dropout_param)
}

// optional .caffe.DummyDataParameter dummy_data_param = 109;
bool LayerParameter::has_dummy_data_param() const {
  return (_has_bits_[0] & 0x00400000u) != 0;
}
void LayerParameter::set_has_dummy_data_param() {
  _has_bits_[0] |= 0x00400000u;
}
void LayerParameter::clear_has_dummy_data_param() {
  _has_bits_[0] &= ~0x00400000u;
}
void LayerParameter::clear_dummy_data_param() {
  if (dummy_data_param_ != NULL) dummy_data_param_->::caffe::DummyDataParameter::Clear();
  clear_has_dummy_data_param();
}
const ::caffe::DummyDataParameter& LayerParameter::dummy_data_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.dummy_data_param)
  return dummy_data_param_ != NULL ? *dummy_data_param_
                         : *::caffe::DummyDataParameter::internal_default_instance();
}
::caffe::DummyDataParameter* LayerParameter::mutable_dummy_data_param() {
  set_has_dummy_data_param();
  if (dummy_data_param_ == NULL) {
    dummy_data_param_ = new ::caffe::DummyDataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.dummy_data_param)
  return dummy_data_param_;
}
::caffe::DummyDataParameter* LayerParameter::release_dummy_data_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.dummy_data_param)
  clear_has_dummy_data_param();
  ::caffe::DummyDataParameter* temp = dummy_data_param_;
  dummy_data_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_dummy_data_param(::caffe::DummyDataParameter* dummy_data_param) {
  delete dummy_data_param_;
  dummy_data_param_ = dummy_data_param;
  if (dummy_data_param) {
    set_has_dummy_data_param();
  } else {
    clear_has_dummy_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.dummy_data_param)
}

// optional .caffe.EltwiseParameter eltwise_param = 110;
bool LayerParameter::has_eltwise_param() const {
  return (_has_bits_[0] & 0x00800000u) != 0;
}
void LayerParameter::set_has_eltwise_param() {
  _has_bits_[0] |= 0x00800000u;
}
void LayerParameter::clear_has_eltwise_param() {
  _has_bits_[0] &= ~0x00800000u;
}
void LayerParameter::clear_eltwise_param() {
  if (eltwise_param_ != NULL) eltwise_param_->::caffe::EltwiseParameter::Clear();
  clear_has_eltwise_param();
}
const ::caffe::EltwiseParameter& LayerParameter::eltwise_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.eltwise_param)
  return eltwise_param_ != NULL ? *eltwise_param_
                         : *::caffe::EltwiseParameter::internal_default_instance();
}
::caffe::EltwiseParameter* LayerParameter::mutable_eltwise_param() {
  set_has_eltwise_param();
  if (eltwise_param_ == NULL) {
    eltwise_param_ = new ::caffe::EltwiseParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.eltwise_param)
  return eltwise_param_;
}
::caffe::EltwiseParameter* LayerParameter::release_eltwise_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.eltwise_param)
  clear_has_eltwise_param();
  ::caffe::EltwiseParameter* temp = eltwise_param_;
  eltwise_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_eltwise_param(::caffe::EltwiseParameter* eltwise_param) {
  delete eltwise_param_;
  eltwise_param_ = eltwise_param;
  if (eltwise_param) {
    set_has_eltwise_param();
  } else {
    clear_has_eltwise_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.eltwise_param)
}

// optional .caffe.ExpParameter exp_param = 111;
bool LayerParameter::has_exp_param() const {
  return (_has_bits_[0] & 0x01000000u) != 0;
}
void LayerParameter::set_has_exp_param() {
  _has_bits_[0] |= 0x01000000u;
}
void LayerParameter::clear_has_exp_param() {
  _has_bits_[0] &= ~0x01000000u;
}
void LayerParameter::clear_exp_param() {
  if (exp_param_ != NULL) exp_param_->::caffe::ExpParameter::Clear();
  clear_has_exp_param();
}
const ::caffe::ExpParameter& LayerParameter::exp_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.exp_param)
  return exp_param_ != NULL ? *exp_param_
                         : *::caffe::ExpParameter::internal_default_instance();
}
::caffe::ExpParameter* LayerParameter::mutable_exp_param() {
  set_has_exp_param();
  if (exp_param_ == NULL) {
    exp_param_ = new ::caffe::ExpParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.exp_param)
  return exp_param_;
}
::caffe::ExpParameter* LayerParameter::release_exp_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.exp_param)
  clear_has_exp_param();
  ::caffe::ExpParameter* temp = exp_param_;
  exp_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_exp_param(::caffe::ExpParameter* exp_param) {
  delete exp_param_;
  exp_param_ = exp_param;
  if (exp_param) {
    set_has_exp_param();
  } else {
    clear_has_exp_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.exp_param)
}

// optional .caffe.FlattenParameter flatten_param = 135;
bool LayerParameter::has_flatten_param() const {
  return (_has_bits_[0] & 0x02000000u) != 0;
}
void LayerParameter::set_has_flatten_param() {
  _has_bits_[0] |= 0x02000000u;
}
void LayerParameter::clear_has_flatten_param() {
  _has_bits_[0] &= ~0x02000000u;
}
void LayerParameter::clear_flatten_param() {
  if (flatten_param_ != NULL) flatten_param_->::caffe::FlattenParameter::Clear();
  clear_has_flatten_param();
}
const ::caffe::FlattenParameter& LayerParameter::flatten_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.flatten_param)
  return flatten_param_ != NULL ? *flatten_param_
                         : *::caffe::FlattenParameter::internal_default_instance();
}
::caffe::FlattenParameter* LayerParameter::mutable_flatten_param() {
  set_has_flatten_param();
  if (flatten_param_ == NULL) {
    flatten_param_ = new ::caffe::FlattenParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.flatten_param)
  return flatten_param_;
}
::caffe::FlattenParameter* LayerParameter::release_flatten_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.flatten_param)
  clear_has_flatten_param();
  ::caffe::FlattenParameter* temp = flatten_param_;
  flatten_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_flatten_param(::caffe::FlattenParameter* flatten_param) {
  delete flatten_param_;
  flatten_param_ = flatten_param;
  if (flatten_param) {
    set_has_flatten_param();
  } else {
    clear_has_flatten_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.flatten_param)
}

// optional .caffe.HDF5DataParameter hdf5_data_param = 112;
bool LayerParameter::has_hdf5_data_param() const {
  return (_has_bits_[0] & 0x04000000u) != 0;
}
void LayerParameter::set_has_hdf5_data_param() {
  _has_bits_[0] |= 0x04000000u;
}
void LayerParameter::clear_has_hdf5_data_param() {
  _has_bits_[0] &= ~0x04000000u;
}
void LayerParameter::clear_hdf5_data_param() {
  if (hdf5_data_param_ != NULL) hdf5_data_param_->::caffe::HDF5DataParameter::Clear();
  clear_has_hdf5_data_param();
}
const ::caffe::HDF5DataParameter& LayerParameter::hdf5_data_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.hdf5_data_param)
  return hdf5_data_param_ != NULL ? *hdf5_data_param_
                         : *::caffe::HDF5DataParameter::internal_default_instance();
}
::caffe::HDF5DataParameter* LayerParameter::mutable_hdf5_data_param() {
  set_has_hdf5_data_param();
  if (hdf5_data_param_ == NULL) {
    hdf5_data_param_ = new ::caffe::HDF5DataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.hdf5_data_param)
  return hdf5_data_param_;
}
::caffe::HDF5DataParameter* LayerParameter::release_hdf5_data_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.hdf5_data_param)
  clear_has_hdf5_data_param();
  ::caffe::HDF5DataParameter* temp = hdf5_data_param_;
  hdf5_data_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_hdf5_data_param(::caffe::HDF5DataParameter* hdf5_data_param) {
  delete hdf5_data_param_;
  hdf5_data_param_ = hdf5_data_param;
  if (hdf5_data_param) {
    set_has_hdf5_data_param();
  } else {
    clear_has_hdf5_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.hdf5_data_param)
}

// optional .caffe.HDF5OutputParameter hdf5_output_param = 113;
bool LayerParameter::has_hdf5_output_param() const {
  return (_has_bits_[0] & 0x08000000u) != 0;
}
void LayerParameter::set_has_hdf5_output_param() {
  _has_bits_[0] |= 0x08000000u;
}
void LayerParameter::clear_has_hdf5_output_param() {
  _has_bits_[0] &= ~0x08000000u;
}
void LayerParameter::clear_hdf5_output_param() {
  if (hdf5_output_param_ != NULL) hdf5_output_param_->::caffe::HDF5OutputParameter::Clear();
  clear_has_hdf5_output_param();
}
const ::caffe::HDF5OutputParameter& LayerParameter::hdf5_output_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.hdf5_output_param)
  return hdf5_output_param_ != NULL ? *hdf5_output_param_
                         : *::caffe::HDF5OutputParameter::internal_default_instance();
}
::caffe::HDF5OutputParameter* LayerParameter::mutable_hdf5_output_param() {
  set_has_hdf5_output_param();
  if (hdf5_output_param_ == NULL) {
    hdf5_output_param_ = new ::caffe::HDF5OutputParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.hdf5_output_param)
  return hdf5_output_param_;
}
::caffe::HDF5OutputParameter* LayerParameter::release_hdf5_output_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.hdf5_output_param)
  clear_has_hdf5_output_param();
  ::caffe::HDF5OutputParameter* temp = hdf5_output_param_;
  hdf5_output_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_hdf5_output_param(::caffe::HDF5OutputParameter* hdf5_output_param) {
  delete hdf5_output_param_;
  hdf5_output_param_ = hdf5_output_param;
  if (hdf5_output_param) {
    set_has_hdf5_output_param();
  } else {
    clear_has_hdf5_output_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.hdf5_output_param)
}

// optional .caffe.HingeLossParameter hinge_loss_param = 114;
bool LayerParameter::has_hinge_loss_param() const {
  return (_has_bits_[0] & 0x10000000u) != 0;
}
void LayerParameter::set_has_hinge_loss_param() {
  _has_bits_[0] |= 0x10000000u;
}
void LayerParameter::clear_has_hinge_loss_param() {
  _has_bits_[0] &= ~0x10000000u;
}
void LayerParameter::clear_hinge_loss_param() {
  if (hinge_loss_param_ != NULL) hinge_loss_param_->::caffe::HingeLossParameter::Clear();
  clear_has_hinge_loss_param();
}
const ::caffe::HingeLossParameter& LayerParameter::hinge_loss_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.hinge_loss_param)
  return hinge_loss_param_ != NULL ? *hinge_loss_param_
                         : *::caffe::HingeLossParameter::internal_default_instance();
}
::caffe::HingeLossParameter* LayerParameter::mutable_hinge_loss_param() {
  set_has_hinge_loss_param();
  if (hinge_loss_param_ == NULL) {
    hinge_loss_param_ = new ::caffe::HingeLossParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.hinge_loss_param)
  return hinge_loss_param_;
}
::caffe::HingeLossParameter* LayerParameter::release_hinge_loss_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.hinge_loss_param)
  clear_has_hinge_loss_param();
  ::caffe::HingeLossParameter* temp = hinge_loss_param_;
  hinge_loss_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_hinge_loss_param(::caffe::HingeLossParameter* hinge_loss_param) {
  delete hinge_loss_param_;
  hinge_loss_param_ = hinge_loss_param;
  if (hinge_loss_param) {
    set_has_hinge_loss_param();
  } else {
    clear_has_hinge_loss_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.hinge_loss_param)
}

// optional .caffe.ImageDataParameter image_data_param = 115;
bool LayerParameter::has_image_data_param() const {
  return (_has_bits_[0] & 0x20000000u) != 0;
}
void LayerParameter::set_has_image_data_param() {
  _has_bits_[0] |= 0x20000000u;
}
void LayerParameter::clear_has_image_data_param() {
  _has_bits_[0] &= ~0x20000000u;
}
void LayerParameter::clear_image_data_param() {
  if (image_data_param_ != NULL) image_data_param_->::caffe::ImageDataParameter::Clear();
  clear_has_image_data_param();
}
const ::caffe::ImageDataParameter& LayerParameter::image_data_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.image_data_param)
  return image_data_param_ != NULL ? *image_data_param_
                         : *::caffe::ImageDataParameter::internal_default_instance();
}
::caffe::ImageDataParameter* LayerParameter::mutable_image_data_param() {
  set_has_image_data_param();
  if (image_data_param_ == NULL) {
    image_data_param_ = new ::caffe::ImageDataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.image_data_param)
  return image_data_param_;
}
::caffe::ImageDataParameter* LayerParameter::release_image_data_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.image_data_param)
  clear_has_image_data_param();
  ::caffe::ImageDataParameter* temp = image_data_param_;
  image_data_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_image_data_param(::caffe::ImageDataParameter* image_data_param) {
  delete image_data_param_;
  image_data_param_ = image_data_param;
  if (image_data_param) {
    set_has_image_data_param();
  } else {
    clear_has_image_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.image_data_param)
}

// optional .caffe.InfogainLossParameter infogain_loss_param = 116;
bool LayerParameter::has_infogain_loss_param() const {
  return (_has_bits_[0] & 0x40000000u) != 0;
}
void LayerParameter::set_has_infogain_loss_param() {
  _has_bits_[0] |= 0x40000000u;
}
void LayerParameter::clear_has_infogain_loss_param() {
  _has_bits_[0] &= ~0x40000000u;
}
void LayerParameter::clear_infogain_loss_param() {
  if (infogain_loss_param_ != NULL) infogain_loss_param_->::caffe::InfogainLossParameter::Clear();
  clear_has_infogain_loss_param();
}
const ::caffe::InfogainLossParameter& LayerParameter::infogain_loss_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.infogain_loss_param)
  return infogain_loss_param_ != NULL ? *infogain_loss_param_
                         : *::caffe::InfogainLossParameter::internal_default_instance();
}
::caffe::InfogainLossParameter* LayerParameter::mutable_infogain_loss_param() {
  set_has_infogain_loss_param();
  if (infogain_loss_param_ == NULL) {
    infogain_loss_param_ = new ::caffe::InfogainLossParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.infogain_loss_param)
  return infogain_loss_param_;
}
::caffe::InfogainLossParameter* LayerParameter::release_infogain_loss_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.infogain_loss_param)
  clear_has_infogain_loss_param();
  ::caffe::InfogainLossParameter* temp = infogain_loss_param_;
  infogain_loss_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_infogain_loss_param(::caffe::InfogainLossParameter* infogain_loss_param) {
  delete infogain_loss_param_;
  infogain_loss_param_ = infogain_loss_param;
  if (infogain_loss_param) {
    set_has_infogain_loss_param();
  } else {
    clear_has_infogain_loss_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.infogain_loss_param)
}

// optional .caffe.InnerProductParameter inner_product_param = 117;
bool LayerParameter::has_inner_product_param() const {
  return (_has_bits_[0] & 0x80000000u) != 0;
}
void LayerParameter::set_has_inner_product_param() {
  _has_bits_[0] |= 0x80000000u;
}
void LayerParameter::clear_has_inner_product_param() {
  _has_bits_[0] &= ~0x80000000u;
}
void LayerParameter::clear_inner_product_param() {
  if (inner_product_param_ != NULL) inner_product_param_->::caffe::InnerProductParameter::Clear();
  clear_has_inner_product_param();
}
const ::caffe::InnerProductParameter& LayerParameter::inner_product_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.inner_product_param)
  return inner_product_param_ != NULL ? *inner_product_param_
                         : *::caffe::InnerProductParameter::internal_default_instance();
}
::caffe::InnerProductParameter* LayerParameter::mutable_inner_product_param() {
  set_has_inner_product_param();
  if (inner_product_param_ == NULL) {
    inner_product_param_ = new ::caffe::InnerProductParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.inner_product_param)
  return inner_product_param_;
}
::caffe::InnerProductParameter* LayerParameter::release_inner_product_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.inner_product_param)
  clear_has_inner_product_param();
  ::caffe::InnerProductParameter* temp = inner_product_param_;
  inner_product_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_inner_product_param(::caffe::InnerProductParameter* inner_product_param) {
  delete inner_product_param_;
  inner_product_param_ = inner_product_param;
  if (inner_product_param) {
    set_has_inner_product_param();
  } else {
    clear_has_inner_product_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.inner_product_param)
}

// optional .caffe.LogParameter log_param = 134;
bool LayerParameter::has_log_param() const {
  return (_has_bits_[1] & 0x00000001u) != 0;
}
void LayerParameter::set_has_log_param() {
  _has_bits_[1] |= 0x00000001u;
}
void LayerParameter::clear_has_log_param() {
  _has_bits_[1] &= ~0x00000001u;
}
void LayerParameter::clear_log_param() {
  if (log_param_ != NULL) log_param_->::caffe::LogParameter::Clear();
  clear_has_log_param();
}
const ::caffe::LogParameter& LayerParameter::log_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.log_param)
  return log_param_ != NULL ? *log_param_
                         : *::caffe::LogParameter::internal_default_instance();
}
::caffe::LogParameter* LayerParameter::mutable_log_param() {
  set_has_log_param();
  if (log_param_ == NULL) {
    log_param_ = new ::caffe::LogParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.log_param)
  return log_param_;
}
::caffe::LogParameter* LayerParameter::release_log_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.log_param)
  clear_has_log_param();
  ::caffe::LogParameter* temp = log_param_;
  log_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_log_param(::caffe::LogParameter* log_param) {
  delete log_param_;
  log_param_ = log_param;
  if (log_param) {
    set_has_log_param();
  } else {
    clear_has_log_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.log_param)
}

// optional .caffe.LRNParameter lrn_param = 118;
bool LayerParameter::has_lrn_param() const {
  return (_has_bits_[1] & 0x00000002u) != 0;
}
void LayerParameter::set_has_lrn_param() {
  _has_bits_[1] |= 0x00000002u;
}
void LayerParameter::clear_has_lrn_param() {
  _has_bits_[1] &= ~0x00000002u;
}
void LayerParameter::clear_lrn_param() {
  if (lrn_param_ != NULL) lrn_param_->::caffe::LRNParameter::Clear();
  clear_has_lrn_param();
}
const ::caffe::LRNParameter& LayerParameter::lrn_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.lrn_param)
  return lrn_param_ != NULL ? *lrn_param_
                         : *::caffe::LRNParameter::internal_default_instance();
}
::caffe::LRNParameter* LayerParameter::mutable_lrn_param() {
  set_has_lrn_param();
  if (lrn_param_ == NULL) {
    lrn_param_ = new ::caffe::LRNParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.lrn_param)
  return lrn_param_;
}
::caffe::LRNParameter* LayerParameter::release_lrn_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.lrn_param)
  clear_has_lrn_param();
  ::caffe::LRNParameter* temp = lrn_param_;
  lrn_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_lrn_param(::caffe::LRNParameter* lrn_param) {
  delete lrn_param_;
  lrn_param_ = lrn_param;
  if (lrn_param) {
    set_has_lrn_param();
  } else {
    clear_has_lrn_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.lrn_param)
}

// optional .caffe.MemoryDataParameter memory_data_param = 119;
bool LayerParameter::has_memory_data_param() const {
  return (_has_bits_[1] & 0x00000004u) != 0;
}
void LayerParameter::set_has_memory_data_param() {
  _has_bits_[1] |= 0x00000004u;
}
void LayerParameter::clear_has_memory_data_param() {
  _has_bits_[1] &= ~0x00000004u;
}
void LayerParameter::clear_memory_data_param() {
  if (memory_data_param_ != NULL) memory_data_param_->::caffe::MemoryDataParameter::Clear();
  clear_has_memory_data_param();
}
const ::caffe::MemoryDataParameter& LayerParameter::memory_data_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.memory_data_param)
  return memory_data_param_ != NULL ? *memory_data_param_
                         : *::caffe::MemoryDataParameter::internal_default_instance();
}
::caffe::MemoryDataParameter* LayerParameter::mutable_memory_data_param() {
  set_has_memory_data_param();
  if (memory_data_param_ == NULL) {
    memory_data_param_ = new ::caffe::MemoryDataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.memory_data_param)
  return memory_data_param_;
}
::caffe::MemoryDataParameter* LayerParameter::release_memory_data_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.memory_data_param)
  clear_has_memory_data_param();
  ::caffe::MemoryDataParameter* temp = memory_data_param_;
  memory_data_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_memory_data_param(::caffe::MemoryDataParameter* memory_data_param) {
  delete memory_data_param_;
  memory_data_param_ = memory_data_param;
  if (memory_data_param) {
    set_has_memory_data_param();
  } else {
    clear_has_memory_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.memory_data_param)
}

// optional .caffe.MVNParameter mvn_param = 120;
bool LayerParameter::has_mvn_param() const {
  return (_has_bits_[1] & 0x00000008u) != 0;
}
void LayerParameter::set_has_mvn_param() {
  _has_bits_[1] |= 0x00000008u;
}
void LayerParameter::clear_has_mvn_param() {
  _has_bits_[1] &= ~0x00000008u;
}
void LayerParameter::clear_mvn_param() {
  if (mvn_param_ != NULL) mvn_param_->::caffe::MVNParameter::Clear();
  clear_has_mvn_param();
}
const ::caffe::MVNParameter& LayerParameter::mvn_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.mvn_param)
  return mvn_param_ != NULL ? *mvn_param_
                         : *::caffe::MVNParameter::internal_default_instance();
}
::caffe::MVNParameter* LayerParameter::mutable_mvn_param() {
  set_has_mvn_param();
  if (mvn_param_ == NULL) {
    mvn_param_ = new ::caffe::MVNParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.mvn_param)
  return mvn_param_;
}
::caffe::MVNParameter* LayerParameter::release_mvn_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.mvn_param)
  clear_has_mvn_param();
  ::caffe::MVNParameter* temp = mvn_param_;
  mvn_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_mvn_param(::caffe::MVNParameter* mvn_param) {
  delete mvn_param_;
  mvn_param_ = mvn_param;
  if (mvn_param) {
    set_has_mvn_param();
  } else {
    clear_has_mvn_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.mvn_param)
}

// optional .caffe.NormalizeBBoxParameter normalize_bbox_param = 139;
bool LayerParameter::has_normalize_bbox_param() const {
  return (_has_bits_[1] & 0x00000010u) != 0;
}
void LayerParameter::set_has_normalize_bbox_param() {
  _has_bits_[1] |= 0x00000010u;
}
void LayerParameter::clear_has_normalize_bbox_param() {
  _has_bits_[1] &= ~0x00000010u;
}
void LayerParameter::clear_normalize_bbox_param() {
  if (normalize_bbox_param_ != NULL) normalize_bbox_param_->::caffe::NormalizeBBoxParameter::Clear();
  clear_has_normalize_bbox_param();
}
const ::caffe::NormalizeBBoxParameter& LayerParameter::normalize_bbox_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.normalize_bbox_param)
  return normalize_bbox_param_ != NULL ? *normalize_bbox_param_
                         : *::caffe::NormalizeBBoxParameter::internal_default_instance();
}
::caffe::NormalizeBBoxParameter* LayerParameter::mutable_normalize_bbox_param() {
  set_has_normalize_bbox_param();
  if (normalize_bbox_param_ == NULL) {
    normalize_bbox_param_ = new ::caffe::NormalizeBBoxParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.normalize_bbox_param)
  return normalize_bbox_param_;
}
::caffe::NormalizeBBoxParameter* LayerParameter::release_normalize_bbox_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.normalize_bbox_param)
  clear_has_normalize_bbox_param();
  ::caffe::NormalizeBBoxParameter* temp = normalize_bbox_param_;
  normalize_bbox_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_normalize_bbox_param(::caffe::NormalizeBBoxParameter* normalize_bbox_param) {
  delete normalize_bbox_param_;
  normalize_bbox_param_ = normalize_bbox_param;
  if (normalize_bbox_param) {
    set_has_normalize_bbox_param();
  } else {
    clear_has_normalize_bbox_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.normalize_bbox_param)
}

// optional .caffe.PermuteParameter permute_param = 138;
bool LayerParameter::has_permute_param() const {
  return (_has_bits_[1] & 0x00000020u) != 0;
}
void LayerParameter::set_has_permute_param() {
  _has_bits_[1] |= 0x00000020u;
}
void LayerParameter::clear_has_permute_param() {
  _has_bits_[1] &= ~0x00000020u;
}
void LayerParameter::clear_permute_param() {
  if (permute_param_ != NULL) permute_param_->::caffe::PermuteParameter::Clear();
  clear_has_permute_param();
}
const ::caffe::PermuteParameter& LayerParameter::permute_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.permute_param)
  return permute_param_ != NULL ? *permute_param_
                         : *::caffe::PermuteParameter::internal_default_instance();
}
::caffe::PermuteParameter* LayerParameter::mutable_permute_param() {
  set_has_permute_param();
  if (permute_param_ == NULL) {
    permute_param_ = new ::caffe::PermuteParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.permute_param)
  return permute_param_;
}
::caffe::PermuteParameter* LayerParameter::release_permute_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.permute_param)
  clear_has_permute_param();
  ::caffe::PermuteParameter* temp = permute_param_;
  permute_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_permute_param(::caffe::PermuteParameter* permute_param) {
  delete permute_param_;
  permute_param_ = permute_param;
  if (permute_param) {
    set_has_permute_param();
  } else {
    clear_has_permute_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.permute_param)
}

// optional .caffe.PoolingParameter pooling_param = 121;
bool LayerParameter::has_pooling_param() const {
  return (_has_bits_[1] & 0x00000040u) != 0;
}
void LayerParameter::set_has_pooling_param() {
  _has_bits_[1] |= 0x00000040u;
}
void LayerParameter::clear_has_pooling_param() {
  _has_bits_[1] &= ~0x00000040u;
}
void LayerParameter::clear_pooling_param() {
  if (pooling_param_ != NULL) pooling_param_->::caffe::PoolingParameter::Clear();
  clear_has_pooling_param();
}
const ::caffe::PoolingParameter& LayerParameter::pooling_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.pooling_param)
  return pooling_param_ != NULL ? *pooling_param_
                         : *::caffe::PoolingParameter::internal_default_instance();
}
::caffe::PoolingParameter* LayerParameter::mutable_pooling_param() {
  set_has_pooling_param();
  if (pooling_param_ == NULL) {
    pooling_param_ = new ::caffe::PoolingParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.pooling_param)
  return pooling_param_;
}
::caffe::PoolingParameter* LayerParameter::release_pooling_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.pooling_param)
  clear_has_pooling_param();
  ::caffe::PoolingParameter* temp = pooling_param_;
  pooling_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_pooling_param(::caffe::PoolingParameter* pooling_param) {
  delete pooling_param_;
  pooling_param_ = pooling_param;
  if (pooling_param) {
    set_has_pooling_param();
  } else {
    clear_has_pooling_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.pooling_param)
}

// optional .caffe.PowerParameter power_param = 122;
bool LayerParameter::has_power_param() const {
  return (_has_bits_[1] & 0x00000080u) != 0;
}
void LayerParameter::set_has_power_param() {
  _has_bits_[1] |= 0x00000080u;
}
void LayerParameter::clear_has_power_param() {
  _has_bits_[1] &= ~0x00000080u;
}
void LayerParameter::clear_power_param() {
  if (power_param_ != NULL) power_param_->::caffe::PowerParameter::Clear();
  clear_has_power_param();
}
const ::caffe::PowerParameter& LayerParameter::power_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.power_param)
  return power_param_ != NULL ? *power_param_
                         : *::caffe::PowerParameter::internal_default_instance();
}
::caffe::PowerParameter* LayerParameter::mutable_power_param() {
  set_has_power_param();
  if (power_param_ == NULL) {
    power_param_ = new ::caffe::PowerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.power_param)
  return power_param_;
}
::caffe::PowerParameter* LayerParameter::release_power_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.power_param)
  clear_has_power_param();
  ::caffe::PowerParameter* temp = power_param_;
  power_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_power_param(::caffe::PowerParameter* power_param) {
  delete power_param_;
  power_param_ = power_param;
  if (power_param) {
    set_has_power_param();
  } else {
    clear_has_power_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.power_param)
}

// optional .caffe.PReLUParameter prelu_param = 131;
bool LayerParameter::has_prelu_param() const {
  return (_has_bits_[1] & 0x00000100u) != 0;
}
void LayerParameter::set_has_prelu_param() {
  _has_bits_[1] |= 0x00000100u;
}
void LayerParameter::clear_has_prelu_param() {
  _has_bits_[1] &= ~0x00000100u;
}
void LayerParameter::clear_prelu_param() {
  if (prelu_param_ != NULL) prelu_param_->::caffe::PReLUParameter::Clear();
  clear_has_prelu_param();
}
const ::caffe::PReLUParameter& LayerParameter::prelu_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.prelu_param)
  return prelu_param_ != NULL ? *prelu_param_
                         : *::caffe::PReLUParameter::internal_default_instance();
}
::caffe::PReLUParameter* LayerParameter::mutable_prelu_param() {
  set_has_prelu_param();
  if (prelu_param_ == NULL) {
    prelu_param_ = new ::caffe::PReLUParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.prelu_param)
  return prelu_param_;
}
::caffe::PReLUParameter* LayerParameter::release_prelu_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.prelu_param)
  clear_has_prelu_param();
  ::caffe::PReLUParameter* temp = prelu_param_;
  prelu_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_prelu_param(::caffe::PReLUParameter* prelu_param) {
  delete prelu_param_;
  prelu_param_ = prelu_param;
  if (prelu_param) {
    set_has_prelu_param();
  } else {
    clear_has_prelu_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.prelu_param)
}

// optional .caffe.PriorBoxParameter prior_box_param = 140;
bool LayerParameter::has_prior_box_param() const {
  return (_has_bits_[1] & 0x00000200u) != 0;
}
void LayerParameter::set_has_prior_box_param() {
  _has_bits_[1] |= 0x00000200u;
}
void LayerParameter::clear_has_prior_box_param() {
  _has_bits_[1] &= ~0x00000200u;
}
void LayerParameter::clear_prior_box_param() {
  if (prior_box_param_ != NULL) prior_box_param_->::caffe::PriorBoxParameter::Clear();
  clear_has_prior_box_param();
}
const ::caffe::PriorBoxParameter& LayerParameter::prior_box_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.prior_box_param)
  return prior_box_param_ != NULL ? *prior_box_param_
                         : *::caffe::PriorBoxParameter::internal_default_instance();
}
::caffe::PriorBoxParameter* LayerParameter::mutable_prior_box_param() {
  set_has_prior_box_param();
  if (prior_box_param_ == NULL) {
    prior_box_param_ = new ::caffe::PriorBoxParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.prior_box_param)
  return prior_box_param_;
}
::caffe::PriorBoxParameter* LayerParameter::release_prior_box_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.prior_box_param)
  clear_has_prior_box_param();
  ::caffe::PriorBoxParameter* temp = prior_box_param_;
  prior_box_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_prior_box_param(::caffe::PriorBoxParameter* prior_box_param) {
  delete prior_box_param_;
  prior_box_param_ = prior_box_param;
  if (prior_box_param) {
    set_has_prior_box_param();
  } else {
    clear_has_prior_box_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.prior_box_param)
}

// optional .caffe.PythonParameter python_param = 130;
bool LayerParameter::has_python_param() const {
  return (_has_bits_[1] & 0x00000400u) != 0;
}
void LayerParameter::set_has_python_param() {
  _has_bits_[1] |= 0x00000400u;
}
void LayerParameter::clear_has_python_param() {
  _has_bits_[1] &= ~0x00000400u;
}
void LayerParameter::clear_python_param() {
  if (python_param_ != NULL) python_param_->::caffe::PythonParameter::Clear();
  clear_has_python_param();
}
const ::caffe::PythonParameter& LayerParameter::python_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.python_param)
  return python_param_ != NULL ? *python_param_
                         : *::caffe::PythonParameter::internal_default_instance();
}
::caffe::PythonParameter* LayerParameter::mutable_python_param() {
  set_has_python_param();
  if (python_param_ == NULL) {
    python_param_ = new ::caffe::PythonParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.python_param)
  return python_param_;
}
::caffe::PythonParameter* LayerParameter::release_python_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.python_param)
  clear_has_python_param();
  ::caffe::PythonParameter* temp = python_param_;
  python_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_python_param(::caffe::PythonParameter* python_param) {
  delete python_param_;
  python_param_ = python_param;
  if (python_param) {
    set_has_python_param();
  } else {
    clear_has_python_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.python_param)
}

// optional .caffe.ReductionParameter reduction_param = 136;
bool LayerParameter::has_reduction_param() const {
  return (_has_bits_[1] & 0x00000800u) != 0;
}
void LayerParameter::set_has_reduction_param() {
  _has_bits_[1] |= 0x00000800u;
}
void LayerParameter::clear_has_reduction_param() {
  _has_bits_[1] &= ~0x00000800u;
}
void LayerParameter::clear_reduction_param() {
  if (reduction_param_ != NULL) reduction_param_->::caffe::ReductionParameter::Clear();
  clear_has_reduction_param();
}
const ::caffe::ReductionParameter& LayerParameter::reduction_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.reduction_param)
  return reduction_param_ != NULL ? *reduction_param_
                         : *::caffe::ReductionParameter::internal_default_instance();
}
::caffe::ReductionParameter* LayerParameter::mutable_reduction_param() {
  set_has_reduction_param();
  if (reduction_param_ == NULL) {
    reduction_param_ = new ::caffe::ReductionParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.reduction_param)
  return reduction_param_;
}
::caffe::ReductionParameter* LayerParameter::release_reduction_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.reduction_param)
  clear_has_reduction_param();
  ::caffe::ReductionParameter* temp = reduction_param_;
  reduction_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_reduction_param(::caffe::ReductionParameter* reduction_param) {
  delete reduction_param_;
  reduction_param_ = reduction_param;
  if (reduction_param) {
    set_has_reduction_param();
  } else {
    clear_has_reduction_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.reduction_param)
}

// optional .caffe.ReLUParameter relu_param = 123;
bool LayerParameter::has_relu_param() const {
  return (_has_bits_[1] & 0x00001000u) != 0;
}
void LayerParameter::set_has_relu_param() {
  _has_bits_[1] |= 0x00001000u;
}
void LayerParameter::clear_has_relu_param() {
  _has_bits_[1] &= ~0x00001000u;
}
void LayerParameter::clear_relu_param() {
  if (relu_param_ != NULL) relu_param_->::caffe::ReLUParameter::Clear();
  clear_has_relu_param();
}
const ::caffe::ReLUParameter& LayerParameter::relu_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.relu_param)
  return relu_param_ != NULL ? *relu_param_
                         : *::caffe::ReLUParameter::internal_default_instance();
}
::caffe::ReLUParameter* LayerParameter::mutable_relu_param() {
  set_has_relu_param();
  if (relu_param_ == NULL) {
    relu_param_ = new ::caffe::ReLUParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.relu_param)
  return relu_param_;
}
::caffe::ReLUParameter* LayerParameter::release_relu_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.relu_param)
  clear_has_relu_param();
  ::caffe::ReLUParameter* temp = relu_param_;
  relu_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_relu_param(::caffe::ReLUParameter* relu_param) {
  delete relu_param_;
  relu_param_ = relu_param;
  if (relu_param) {
    set_has_relu_param();
  } else {
    clear_has_relu_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.relu_param)
}

// optional .caffe.ReshapeParameter reshape_param = 133;
bool LayerParameter::has_reshape_param() const {
  return (_has_bits_[1] & 0x00002000u) != 0;
}
void LayerParameter::set_has_reshape_param() {
  _has_bits_[1] |= 0x00002000u;
}
void LayerParameter::clear_has_reshape_param() {
  _has_bits_[1] &= ~0x00002000u;
}
void LayerParameter::clear_reshape_param() {
  if (reshape_param_ != NULL) reshape_param_->::caffe::ReshapeParameter::Clear();
  clear_has_reshape_param();
}
const ::caffe::ReshapeParameter& LayerParameter::reshape_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.reshape_param)
  return reshape_param_ != NULL ? *reshape_param_
                         : *::caffe::ReshapeParameter::internal_default_instance();
}
::caffe::ReshapeParameter* LayerParameter::mutable_reshape_param() {
  set_has_reshape_param();
  if (reshape_param_ == NULL) {
    reshape_param_ = new ::caffe::ReshapeParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.reshape_param)
  return reshape_param_;
}
::caffe::ReshapeParameter* LayerParameter::release_reshape_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.reshape_param)
  clear_has_reshape_param();
  ::caffe::ReshapeParameter* temp = reshape_param_;
  reshape_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_reshape_param(::caffe::ReshapeParameter* reshape_param) {
  delete reshape_param_;
  reshape_param_ = reshape_param;
  if (reshape_param) {
    set_has_reshape_param();
  } else {
    clear_has_reshape_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.reshape_param)
}

// optional .caffe.SigmoidParameter sigmoid_param = 124;
bool LayerParameter::has_sigmoid_param() const {
  return (_has_bits_[1] & 0x00004000u) != 0;
}
void LayerParameter::set_has_sigmoid_param() {
  _has_bits_[1] |= 0x00004000u;
}
void LayerParameter::clear_has_sigmoid_param() {
  _has_bits_[1] &= ~0x00004000u;
}
void LayerParameter::clear_sigmoid_param() {
  if (sigmoid_param_ != NULL) sigmoid_param_->::caffe::SigmoidParameter::Clear();
  clear_has_sigmoid_param();
}
const ::caffe::SigmoidParameter& LayerParameter::sigmoid_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.sigmoid_param)
  return sigmoid_param_ != NULL ? *sigmoid_param_
                         : *::caffe::SigmoidParameter::internal_default_instance();
}
::caffe::SigmoidParameter* LayerParameter::mutable_sigmoid_param() {
  set_has_sigmoid_param();
  if (sigmoid_param_ == NULL) {
    sigmoid_param_ = new ::caffe::SigmoidParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.sigmoid_param)
  return sigmoid_param_;
}
::caffe::SigmoidParameter* LayerParameter::release_sigmoid_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.sigmoid_param)
  clear_has_sigmoid_param();
  ::caffe::SigmoidParameter* temp = sigmoid_param_;
  sigmoid_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_sigmoid_param(::caffe::SigmoidParameter* sigmoid_param) {
  delete sigmoid_param_;
  sigmoid_param_ = sigmoid_param;
  if (sigmoid_param) {
    set_has_sigmoid_param();
  } else {
    clear_has_sigmoid_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.sigmoid_param)
}

// optional .caffe.SliceParameter slice_param = 126;
bool LayerParameter::has_slice_param() const {
  return (_has_bits_[1] & 0x00008000u) != 0;
}
void LayerParameter::set_has_slice_param() {
  _has_bits_[1] |= 0x00008000u;
}
void LayerParameter::clear_has_slice_param() {
  _has_bits_[1] &= ~0x00008000u;
}
void LayerParameter::clear_slice_param() {
  if (slice_param_ != NULL) slice_param_->::caffe::SliceParameter::Clear();
  clear_has_slice_param();
}
const ::caffe::SliceParameter& LayerParameter::slice_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.slice_param)
  return slice_param_ != NULL ? *slice_param_
                         : *::caffe::SliceParameter::internal_default_instance();
}
::caffe::SliceParameter* LayerParameter::mutable_slice_param() {
  set_has_slice_param();
  if (slice_param_ == NULL) {
    slice_param_ = new ::caffe::SliceParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.slice_param)
  return slice_param_;
}
::caffe::SliceParameter* LayerParameter::release_slice_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.slice_param)
  clear_has_slice_param();
  ::caffe::SliceParameter* temp = slice_param_;
  slice_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_slice_param(::caffe::SliceParameter* slice_param) {
  delete slice_param_;
  slice_param_ = slice_param;
  if (slice_param) {
    set_has_slice_param();
  } else {
    clear_has_slice_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.slice_param)
}

// optional .caffe.SoftmaxParameter softmax_param = 125;
bool LayerParameter::has_softmax_param() const {
  return (_has_bits_[1] & 0x00010000u) != 0;
}
void LayerParameter::set_has_softmax_param() {
  _has_bits_[1] |= 0x00010000u;
}
void LayerParameter::clear_has_softmax_param() {
  _has_bits_[1] &= ~0x00010000u;
}
void LayerParameter::clear_softmax_param() {
  if (softmax_param_ != NULL) softmax_param_->::caffe::SoftmaxParameter::Clear();
  clear_has_softmax_param();
}
const ::caffe::SoftmaxParameter& LayerParameter::softmax_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.softmax_param)
  return softmax_param_ != NULL ? *softmax_param_
                         : *::caffe::SoftmaxParameter::internal_default_instance();
}
::caffe::SoftmaxParameter* LayerParameter::mutable_softmax_param() {
  set_has_softmax_param();
  if (softmax_param_ == NULL) {
    softmax_param_ = new ::caffe::SoftmaxParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.softmax_param)
  return softmax_param_;
}
::caffe::SoftmaxParameter* LayerParameter::release_softmax_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.softmax_param)
  clear_has_softmax_param();
  ::caffe::SoftmaxParameter* temp = softmax_param_;
  softmax_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_softmax_param(::caffe::SoftmaxParameter* softmax_param) {
  delete softmax_param_;
  softmax_param_ = softmax_param;
  if (softmax_param) {
    set_has_softmax_param();
  } else {
    clear_has_softmax_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.softmax_param)
}

// optional .caffe.SPPParameter spp_param = 132;
bool LayerParameter::has_spp_param() const {
  return (_has_bits_[1] & 0x00020000u) != 0;
}
void LayerParameter::set_has_spp_param() {
  _has_bits_[1] |= 0x00020000u;
}
void LayerParameter::clear_has_spp_param() {
  _has_bits_[1] &= ~0x00020000u;
}
void LayerParameter::clear_spp_param() {
  if (spp_param_ != NULL) spp_param_->::caffe::SPPParameter::Clear();
  clear_has_spp_param();
}
const ::caffe::SPPParameter& LayerParameter::spp_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.spp_param)
  return spp_param_ != NULL ? *spp_param_
                         : *::caffe::SPPParameter::internal_default_instance();
}
::caffe::SPPParameter* LayerParameter::mutable_spp_param() {
  set_has_spp_param();
  if (spp_param_ == NULL) {
    spp_param_ = new ::caffe::SPPParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.spp_param)
  return spp_param_;
}
::caffe::SPPParameter* LayerParameter::release_spp_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.spp_param)
  clear_has_spp_param();
  ::caffe::SPPParameter* temp = spp_param_;
  spp_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_spp_param(::caffe::SPPParameter* spp_param) {
  delete spp_param_;
  spp_param_ = spp_param;
  if (spp_param) {
    set_has_spp_param();
  } else {
    clear_has_spp_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.spp_param)
}

// optional .caffe.TanHParameter tanh_param = 127;
bool LayerParameter::has_tanh_param() const {
  return (_has_bits_[1] & 0x00040000u) != 0;
}
void LayerParameter::set_has_tanh_param() {
  _has_bits_[1] |= 0x00040000u;
}
void LayerParameter::clear_has_tanh_param() {
  _has_bits_[1] &= ~0x00040000u;
}
void LayerParameter::clear_tanh_param() {
  if (tanh_param_ != NULL) tanh_param_->::caffe::TanHParameter::Clear();
  clear_has_tanh_param();
}
const ::caffe::TanHParameter& LayerParameter::tanh_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.tanh_param)
  return tanh_param_ != NULL ? *tanh_param_
                         : *::caffe::TanHParameter::internal_default_instance();
}
::caffe::TanHParameter* LayerParameter::mutable_tanh_param() {
  set_has_tanh_param();
  if (tanh_param_ == NULL) {
    tanh_param_ = new ::caffe::TanHParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.tanh_param)
  return tanh_param_;
}
::caffe::TanHParameter* LayerParameter::release_tanh_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.tanh_param)
  clear_has_tanh_param();
  ::caffe::TanHParameter* temp = tanh_param_;
  tanh_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_tanh_param(::caffe::TanHParameter* tanh_param) {
  delete tanh_param_;
  tanh_param_ = tanh_param;
  if (tanh_param) {
    set_has_tanh_param();
  } else {
    clear_has_tanh_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.tanh_param)
}

// optional .caffe.ThresholdParameter threshold_param = 128;
bool LayerParameter::has_threshold_param() const {
  return (_has_bits_[1] & 0x00080000u) != 0;
}
void LayerParameter::set_has_threshold_param() {
  _has_bits_[1] |= 0x00080000u;
}
void LayerParameter::clear_has_threshold_param() {
  _has_bits_[1] &= ~0x00080000u;
}
void LayerParameter::clear_threshold_param() {
  if (threshold_param_ != NULL) threshold_param_->::caffe::ThresholdParameter::Clear();
  clear_has_threshold_param();
}
const ::caffe::ThresholdParameter& LayerParameter::threshold_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.threshold_param)
  return threshold_param_ != NULL ? *threshold_param_
                         : *::caffe::ThresholdParameter::internal_default_instance();
}
::caffe::ThresholdParameter* LayerParameter::mutable_threshold_param() {
  set_has_threshold_param();
  if (threshold_param_ == NULL) {
    threshold_param_ = new ::caffe::ThresholdParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.threshold_param)
  return threshold_param_;
}
::caffe::ThresholdParameter* LayerParameter::release_threshold_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.threshold_param)
  clear_has_threshold_param();
  ::caffe::ThresholdParameter* temp = threshold_param_;
  threshold_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_threshold_param(::caffe::ThresholdParameter* threshold_param) {
  delete threshold_param_;
  threshold_param_ = threshold_param;
  if (threshold_param) {
    set_has_threshold_param();
  } else {
    clear_has_threshold_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.threshold_param)
}

// optional .caffe.WindowDataParameter window_data_param = 129;
bool LayerParameter::has_window_data_param() const {
  return (_has_bits_[1] & 0x00100000u) != 0;
}
void LayerParameter::set_has_window_data_param() {
  _has_bits_[1] |= 0x00100000u;
}
void LayerParameter::clear_has_window_data_param() {
  _has_bits_[1] &= ~0x00100000u;
}
void LayerParameter::clear_window_data_param() {
  if (window_data_param_ != NULL) window_data_param_->::caffe::WindowDataParameter::Clear();
  clear_has_window_data_param();
}
const ::caffe::WindowDataParameter& LayerParameter::window_data_param() const {
  // @@protoc_insertion_point(field_get:caffe.LayerParameter.window_data_param)
  return window_data_param_ != NULL ? *window_data_param_
                         : *::caffe::WindowDataParameter::internal_default_instance();
}
::caffe::WindowDataParameter* LayerParameter::mutable_window_data_param() {
  set_has_window_data_param();
  if (window_data_param_ == NULL) {
    window_data_param_ = new ::caffe::WindowDataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.LayerParameter.window_data_param)
  return window_data_param_;
}
::caffe::WindowDataParameter* LayerParameter::release_window_data_param() {
  // @@protoc_insertion_point(field_release:caffe.LayerParameter.window_data_param)
  clear_has_window_data_param();
  ::caffe::WindowDataParameter* temp = window_data_param_;
  window_data_param_ = NULL;
  return temp;
}
void LayerParameter::set_allocated_window_data_param(::caffe::WindowDataParameter* window_data_param) {
  delete window_data_param_;
  window_data_param_ = window_data_param;
  if (window_data_param) {
    set_has_window_data_param();
  } else {
    clear_has_window_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.LayerParameter.window_data_param)
}

inline const LayerParameter* LayerParameter::internal_default_instance() {
  return &LayerParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TransformationParameter::kScaleFieldNumber;
const int TransformationParameter::kMirrorFieldNumber;
const int TransformationParameter::kCropSizeFieldNumber;
const int TransformationParameter::kMeanFileFieldNumber;
const int TransformationParameter::kMeanValueFieldNumber;
const int TransformationParameter::kForceColorFieldNumber;
const int TransformationParameter::kForceGrayFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TransformationParameter::TransformationParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.TransformationParameter)
}

void TransformationParameter::InitAsDefaultInstance() {
}

TransformationParameter::TransformationParameter(const TransformationParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.TransformationParameter)
}

void TransformationParameter::SharedCtor() {
  _cached_size_ = 0;
  mean_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&crop_size_, 0, reinterpret_cast<char*>(&force_gray_) -
    reinterpret_cast<char*>(&crop_size_) + sizeof(force_gray_));
  scale_ = 1;
}

TransformationParameter::~TransformationParameter() {
  // @@protoc_insertion_point(destructor:caffe.TransformationParameter)
  SharedDtor();
}

void TransformationParameter::SharedDtor() {
  mean_file_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void TransformationParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TransformationParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TransformationParameter_descriptor_;
}

const TransformationParameter& TransformationParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<TransformationParameter> TransformationParameter_default_instance_;

TransformationParameter* TransformationParameter::New(::google::protobuf::Arena* arena) const {
  TransformationParameter* n = new TransformationParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void TransformationParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.TransformationParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(TransformationParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<TransformationParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 111u) {
    ZR_(crop_size_, force_gray_);
    scale_ = 1;
    if (has_mean_file()) {
      mean_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
  }

#undef ZR_HELPER_
#undef ZR_

  mean_value_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool TransformationParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.TransformationParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float scale = 1 [default = 1];
      case 1: {
        if (tag == 13) {
          set_has_scale();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &scale_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_mirror;
        break;
      }

      // optional bool mirror = 2 [default = false];
      case 2: {
        if (tag == 16) {
         parse_mirror:
          set_has_mirror();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &mirror_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_crop_size;
        break;
      }

      // optional uint32 crop_size = 3 [default = 0];
      case 3: {
        if (tag == 24) {
         parse_crop_size:
          set_has_crop_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &crop_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(34)) goto parse_mean_file;
        break;
      }

      // optional string mean_file = 4;
      case 4: {
        if (tag == 34) {
         parse_mean_file:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_mean_file()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->mean_file().data(), this->mean_file().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.TransformationParameter.mean_file");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(45)) goto parse_mean_value;
        break;
      }

      // repeated float mean_value = 5;
      case 5: {
        if (tag == 45) {
         parse_mean_value:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 45, input, this->mutable_mean_value())));
        } else if (tag == 42) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_mean_value())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(45)) goto parse_mean_value;
        if (input->ExpectTag(48)) goto parse_force_color;
        break;
      }

      // optional bool force_color = 6 [default = false];
      case 6: {
        if (tag == 48) {
         parse_force_color:
          set_has_force_color();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &force_color_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(56)) goto parse_force_gray;
        break;
      }

      // optional bool force_gray = 7 [default = false];
      case 7: {
        if (tag == 56) {
         parse_force_gray:
          set_has_force_gray();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &force_gray_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.TransformationParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.TransformationParameter)
  return false;
#undef DO_
}

void TransformationParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.TransformationParameter)
  // optional float scale = 1 [default = 1];
  if (has_scale()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->scale(), output);
  }

  // optional bool mirror = 2 [default = false];
  if (has_mirror()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->mirror(), output);
  }

  // optional uint32 crop_size = 3 [default = 0];
  if (has_crop_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->crop_size(), output);
  }

  // optional string mean_file = 4;
  if (has_mean_file()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->mean_file().data(), this->mean_file().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.TransformationParameter.mean_file");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      4, this->mean_file(), output);
  }

  // repeated float mean_value = 5;
  for (int i = 0; i < this->mean_value_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      5, this->mean_value(i), output);
  }

  // optional bool force_color = 6 [default = false];
  if (has_force_color()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->force_color(), output);
  }

  // optional bool force_gray = 7 [default = false];
  if (has_force_gray()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->force_gray(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.TransformationParameter)
}

::google::protobuf::uint8* TransformationParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.TransformationParameter)
  // optional float scale = 1 [default = 1];
  if (has_scale()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->scale(), target);
  }

  // optional bool mirror = 2 [default = false];
  if (has_mirror()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->mirror(), target);
  }

  // optional uint32 crop_size = 3 [default = 0];
  if (has_crop_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->crop_size(), target);
  }

  // optional string mean_file = 4;
  if (has_mean_file()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->mean_file().data(), this->mean_file().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.TransformationParameter.mean_file");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->mean_file(), target);
  }

  // repeated float mean_value = 5;
  for (int i = 0; i < this->mean_value_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(5, this->mean_value(i), target);
  }

  // optional bool force_color = 6 [default = false];
  if (has_force_color()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->force_color(), target);
  }

  // optional bool force_gray = 7 [default = false];
  if (has_force_gray()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(7, this->force_gray(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 111u) {
    // optional float scale = 1 [default = 1];
    if (has_scale()) {
      total_size += 1 + 4;
    }

    // optional bool mirror = 2 [default = false];
    if (has_mirror()) {
      total_size += 1 + 1;
    }

    // optional uint32 crop_size = 3 [default = 0];
    if (has_crop_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->crop_size());
    }

    // optional string mean_file = 4;
    if (has_mean_file()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->mean_file());
    }

    // optional bool force_color = 6 [default = false];
    if (has_force_color()) {
      total_size += 1 + 1;
    }

    // optional bool force_gray = 7 [default = false];
    if (has_force_gray()) {
      total_size += 1 + 1;
    }

  }
  // repeated float mean_value = 5;
  {
    size_t data_size = 0;
    unsigned int count = this->mean_value_size();
    data_size = 4UL * count;
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->mean_value_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void TransformationParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.TransformationParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const TransformationParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const TransformationParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.TransformationParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.TransformationParameter)
    UnsafeMergeFrom(*source);
  }
}

void TransformationParameter::MergeFrom(const TransformationParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.TransformationParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void TransformationParameter::UnsafeMergeFrom(const TransformationParameter& from) {
  GOOGLE_DCHECK(&from != this);
  mean_value_.UnsafeMergeFrom(from.mean_value_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_scale()) {
      set_scale(from.scale());
    }
    if (from.has_mirror()) {
      set_mirror(from.mirror());
    }
    if (from.has_crop_size()) {
      set_crop_size(from.crop_size());
    }
    if (from.has_mean_file()) {
      set_has_mean_file();
      mean_file_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mean_file_);
    }
    if (from.has_force_color()) {
      set_force_color(from.force_color());
    }
    if (from.has_force_gray()) {
      set_force_gray(from.force_gray());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void TransformationParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.TransformationParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool TransformationParameter::IsInitialized() const {

  return true;
}

void TransformationParameter::Swap(TransformationParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TransformationParameter::InternalSwap(TransformationParameter* other) {
  std::swap(scale_, other->scale_);
  std::swap(mirror_, other->mirror_);
  std::swap(crop_size_, other->crop_size_);
  mean_file_.Swap(&other->mean_file_);
  mean_value_.UnsafeArenaSwap(&other->mean_value_);
  std::swap(force_color_, other->force_color_);
  std::swap(force_gray_, other->force_gray_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata TransformationParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = TransformationParameter_descriptor_;
  metadata.reflection = TransformationParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// TransformationParameter

// optional float scale = 1 [default = 1];
bool TransformationParameter::has_scale() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void TransformationParameter::set_has_scale() {
  _has_bits_[0] |= 0x00000001u;
}
void TransformationParameter::clear_has_scale() {
  _has_bits_[0] &= ~0x00000001u;
}
void TransformationParameter::clear_scale() {
  scale_ = 1;
  clear_has_scale();
}
float TransformationParameter::scale() const {
  // @@protoc_insertion_point(field_get:caffe.TransformationParameter.scale)
  return scale_;
}
void TransformationParameter::set_scale(float value) {
  set_has_scale();
  scale_ = value;
  // @@protoc_insertion_point(field_set:caffe.TransformationParameter.scale)
}

// optional bool mirror = 2 [default = false];
bool TransformationParameter::has_mirror() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void TransformationParameter::set_has_mirror() {
  _has_bits_[0] |= 0x00000002u;
}
void TransformationParameter::clear_has_mirror() {
  _has_bits_[0] &= ~0x00000002u;
}
void TransformationParameter::clear_mirror() {
  mirror_ = false;
  clear_has_mirror();
}
bool TransformationParameter::mirror() const {
  // @@protoc_insertion_point(field_get:caffe.TransformationParameter.mirror)
  return mirror_;
}
void TransformationParameter::set_mirror(bool value) {
  set_has_mirror();
  mirror_ = value;
  // @@protoc_insertion_point(field_set:caffe.TransformationParameter.mirror)
}

// optional uint32 crop_size = 3 [default = 0];
bool TransformationParameter::has_crop_size() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void TransformationParameter::set_has_crop_size() {
  _has_bits_[0] |= 0x00000004u;
}
void TransformationParameter::clear_has_crop_size() {
  _has_bits_[0] &= ~0x00000004u;
}
void TransformationParameter::clear_crop_size() {
  crop_size_ = 0u;
  clear_has_crop_size();
}
::google::protobuf::uint32 TransformationParameter::crop_size() const {
  // @@protoc_insertion_point(field_get:caffe.TransformationParameter.crop_size)
  return crop_size_;
}
void TransformationParameter::set_crop_size(::google::protobuf::uint32 value) {
  set_has_crop_size();
  crop_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.TransformationParameter.crop_size)
}

// optional string mean_file = 4;
bool TransformationParameter::has_mean_file() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void TransformationParameter::set_has_mean_file() {
  _has_bits_[0] |= 0x00000008u;
}
void TransformationParameter::clear_has_mean_file() {
  _has_bits_[0] &= ~0x00000008u;
}
void TransformationParameter::clear_mean_file() {
  mean_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_mean_file();
}
const ::std::string& TransformationParameter::mean_file() const {
  // @@protoc_insertion_point(field_get:caffe.TransformationParameter.mean_file)
  return mean_file_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void TransformationParameter::set_mean_file(const ::std::string& value) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.TransformationParameter.mean_file)
}
void TransformationParameter::set_mean_file(const char* value) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.TransformationParameter.mean_file)
}
void TransformationParameter::set_mean_file(const char* value, size_t size) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.TransformationParameter.mean_file)
}
::std::string* TransformationParameter::mutable_mean_file() {
  set_has_mean_file();
  // @@protoc_insertion_point(field_mutable:caffe.TransformationParameter.mean_file)
  return mean_file_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* TransformationParameter::release_mean_file() {
  // @@protoc_insertion_point(field_release:caffe.TransformationParameter.mean_file)
  clear_has_mean_file();
  return mean_file_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void TransformationParameter::set_allocated_mean_file(::std::string* mean_file) {
  if (mean_file != NULL) {
    set_has_mean_file();
  } else {
    clear_has_mean_file();
  }
  mean_file_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), mean_file);
  // @@protoc_insertion_point(field_set_allocated:caffe.TransformationParameter.mean_file)
}

// repeated float mean_value = 5;
int TransformationParameter::mean_value_size() const {
  return mean_value_.size();
}
void TransformationParameter::clear_mean_value() {
  mean_value_.Clear();
}
float TransformationParameter::mean_value(int index) const {
  // @@protoc_insertion_point(field_get:caffe.TransformationParameter.mean_value)
  return mean_value_.Get(index);
}
void TransformationParameter::set_mean_value(int index, float value) {
  mean_value_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.TransformationParameter.mean_value)
}
void TransformationParameter::add_mean_value(float value) {
  mean_value_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.TransformationParameter.mean_value)
}
const ::google::protobuf::RepeatedField< float >&
TransformationParameter::mean_value() const {
  // @@protoc_insertion_point(field_list:caffe.TransformationParameter.mean_value)
  return mean_value_;
}
::google::protobuf::RepeatedField< float >*
TransformationParameter::mutable_mean_value() {
  // @@protoc_insertion_point(field_mutable_list:caffe.TransformationParameter.mean_value)
  return &mean_value_;
}

// optional bool force_color = 6 [default = false];
bool TransformationParameter::has_force_color() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void TransformationParameter::set_has_force_color() {
  _has_bits_[0] |= 0x00000020u;
}
void TransformationParameter::clear_has_force_color() {
  _has_bits_[0] &= ~0x00000020u;
}
void TransformationParameter::clear_force_color() {
  force_color_ = false;
  clear_has_force_color();
}
bool TransformationParameter::force_color() const {
  // @@protoc_insertion_point(field_get:caffe.TransformationParameter.force_color)
  return force_color_;
}
void TransformationParameter::set_force_color(bool value) {
  set_has_force_color();
  force_color_ = value;
  // @@protoc_insertion_point(field_set:caffe.TransformationParameter.force_color)
}

// optional bool force_gray = 7 [default = false];
bool TransformationParameter::has_force_gray() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void TransformationParameter::set_has_force_gray() {
  _has_bits_[0] |= 0x00000040u;
}
void TransformationParameter::clear_has_force_gray() {
  _has_bits_[0] &= ~0x00000040u;
}
void TransformationParameter::clear_force_gray() {
  force_gray_ = false;
  clear_has_force_gray();
}
bool TransformationParameter::force_gray() const {
  // @@protoc_insertion_point(field_get:caffe.TransformationParameter.force_gray)
  return force_gray_;
}
void TransformationParameter::set_force_gray(bool value) {
  set_has_force_gray();
  force_gray_ = value;
  // @@protoc_insertion_point(field_set:caffe.TransformationParameter.force_gray)
}

inline const TransformationParameter* TransformationParameter::internal_default_instance() {
  return &TransformationParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int LossParameter::kIgnoreLabelFieldNumber;
const int LossParameter::kNormalizeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

LossParameter::LossParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.LossParameter)
}

void LossParameter::InitAsDefaultInstance() {
}

LossParameter::LossParameter(const LossParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.LossParameter)
}

void LossParameter::SharedCtor() {
  _cached_size_ = 0;
  ignore_label_ = 0;
  normalize_ = true;
}

LossParameter::~LossParameter() {
  // @@protoc_insertion_point(destructor:caffe.LossParameter)
  SharedDtor();
}

void LossParameter::SharedDtor() {
}

void LossParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* LossParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return LossParameter_descriptor_;
}

const LossParameter& LossParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<LossParameter> LossParameter_default_instance_;

LossParameter* LossParameter::New(::google::protobuf::Arena* arena) const {
  LossParameter* n = new LossParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void LossParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.LossParameter)
  if (_has_bits_[0 / 32] & 3u) {
    ignore_label_ = 0;
    normalize_ = true;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool LossParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.LossParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 ignore_label = 1;
      case 1: {
        if (tag == 8) {
          set_has_ignore_label();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &ignore_label_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_normalize;
        break;
      }

      // optional bool normalize = 2 [default = true];
      case 2: {
        if (tag == 16) {
         parse_normalize:
          set_has_normalize();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &normalize_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.LossParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.LossParameter)
  return false;
#undef DO_
}

void LossParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.LossParameter)
  // optional int32 ignore_label = 1;
  if (has_ignore_label()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->ignore_label(), output);
  }

  // optional bool normalize = 2 [default = true];
  if (has_normalize()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->normalize(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.LossParameter)
}

::google::protobuf::uint8* LossParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.LossParameter)
  // optional int32 ignore_label = 1;
  if (has_ignore_label()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->ignore_label(), target);
  }

  // optional bool normalize = 2 [default = true];
  if (has_normalize()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->normalize(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 3u) {
    // optional int32 ignore_label = 1;
    if (has_ignore_label()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->ignore_label());
    }

    // optional bool normalize = 2 [default = true];
    if (has_normalize()) {
      total_size += 1 + 1;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void LossParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.LossParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const LossParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const LossParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.LossParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.LossParameter)
    UnsafeMergeFrom(*source);
  }
}

void LossParameter::MergeFrom(const LossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LossParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void LossParameter::UnsafeMergeFrom(const LossParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_ignore_label()) {
      set_ignore_label(from.ignore_label());
    }
    if (from.has_normalize()) {
      set_normalize(from.normalize());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void LossParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.LossParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool LossParameter::IsInitialized() const {

  return true;
}

void LossParameter::Swap(LossParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void LossParameter::InternalSwap(LossParameter* other) {
  std::swap(ignore_label_, other->ignore_label_);
  std::swap(normalize_, other->normalize_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata LossParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = LossParameter_descriptor_;
  metadata.reflection = LossParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// LossParameter

// optional int32 ignore_label = 1;
bool LossParameter::has_ignore_label() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void LossParameter::set_has_ignore_label() {
  _has_bits_[0] |= 0x00000001u;
}
void LossParameter::clear_has_ignore_label() {
  _has_bits_[0] &= ~0x00000001u;
}
void LossParameter::clear_ignore_label() {
  ignore_label_ = 0;
  clear_has_ignore_label();
}
::google::protobuf::int32 LossParameter::ignore_label() const {
  // @@protoc_insertion_point(field_get:caffe.LossParameter.ignore_label)
  return ignore_label_;
}
void LossParameter::set_ignore_label(::google::protobuf::int32 value) {
  set_has_ignore_label();
  ignore_label_ = value;
  // @@protoc_insertion_point(field_set:caffe.LossParameter.ignore_label)
}

// optional bool normalize = 2 [default = true];
bool LossParameter::has_normalize() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void LossParameter::set_has_normalize() {
  _has_bits_[0] |= 0x00000002u;
}
void LossParameter::clear_has_normalize() {
  _has_bits_[0] &= ~0x00000002u;
}
void LossParameter::clear_normalize() {
  normalize_ = true;
  clear_has_normalize();
}
bool LossParameter::normalize() const {
  // @@protoc_insertion_point(field_get:caffe.LossParameter.normalize)
  return normalize_;
}
void LossParameter::set_normalize(bool value) {
  set_has_normalize();
  normalize_ = value;
  // @@protoc_insertion_point(field_set:caffe.LossParameter.normalize)
}

inline const LossParameter* LossParameter::internal_default_instance() {
  return &LossParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int AccuracyParameter::kTopKFieldNumber;
const int AccuracyParameter::kAxisFieldNumber;
const int AccuracyParameter::kIgnoreLabelFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

AccuracyParameter::AccuracyParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.AccuracyParameter)
}

void AccuracyParameter::InitAsDefaultInstance() {
}

AccuracyParameter::AccuracyParameter(const AccuracyParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.AccuracyParameter)
}

void AccuracyParameter::SharedCtor() {
  _cached_size_ = 0;
  ignore_label_ = 0;
  top_k_ = 1u;
  axis_ = 1;
}

AccuracyParameter::~AccuracyParameter() {
  // @@protoc_insertion_point(destructor:caffe.AccuracyParameter)
  SharedDtor();
}

void AccuracyParameter::SharedDtor() {
}

void AccuracyParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* AccuracyParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return AccuracyParameter_descriptor_;
}

const AccuracyParameter& AccuracyParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<AccuracyParameter> AccuracyParameter_default_instance_;

AccuracyParameter* AccuracyParameter::New(::google::protobuf::Arena* arena) const {
  AccuracyParameter* n = new AccuracyParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void AccuracyParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.AccuracyParameter)
  if (_has_bits_[0 / 32] & 7u) {
    top_k_ = 1u;
    axis_ = 1;
    ignore_label_ = 0;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool AccuracyParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.AccuracyParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint32 top_k = 1 [default = 1];
      case 1: {
        if (tag == 8) {
          set_has_top_k();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &top_k_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_axis;
        break;
      }

      // optional int32 axis = 2 [default = 1];
      case 2: {
        if (tag == 16) {
         parse_axis:
          set_has_axis();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &axis_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_ignore_label;
        break;
      }

      // optional int32 ignore_label = 3;
      case 3: {
        if (tag == 24) {
         parse_ignore_label:
          set_has_ignore_label();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &ignore_label_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.AccuracyParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.AccuracyParameter)
  return false;
#undef DO_
}

void AccuracyParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.AccuracyParameter)
  // optional uint32 top_k = 1 [default = 1];
  if (has_top_k()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->top_k(), output);
  }

  // optional int32 axis = 2 [default = 1];
  if (has_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->axis(), output);
  }

  // optional int32 ignore_label = 3;
  if (has_ignore_label()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->ignore_label(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.AccuracyParameter)
}

::google::protobuf::uint8* AccuracyParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.AccuracyParameter)
  // optional uint32 top_k = 1 [default = 1];
  if (has_top_k()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->top_k(), target);
  }

  // optional int32 axis = 2 [default = 1];
  if (has_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->axis(), target);
  }

  // optional int32 ignore_label = 3;
  if (has_ignore_label()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->ignore_label(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 7u) {
    // optional uint32 top_k = 1 [default = 1];
    if (has_top_k()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->top_k());
    }

    // optional int32 axis = 2 [default = 1];
    if (has_axis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->axis());
    }

    // optional int32 ignore_label = 3;
    if (has_ignore_label()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->ignore_label());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void AccuracyParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.AccuracyParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const AccuracyParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const AccuracyParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.AccuracyParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.AccuracyParameter)
    UnsafeMergeFrom(*source);
  }
}

void AccuracyParameter::MergeFrom(const AccuracyParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.AccuracyParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void AccuracyParameter::UnsafeMergeFrom(const AccuracyParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_top_k()) {
      set_top_k(from.top_k());
    }
    if (from.has_axis()) {
      set_axis(from.axis());
    }
    if (from.has_ignore_label()) {
      set_ignore_label(from.ignore_label());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void AccuracyParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.AccuracyParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool AccuracyParameter::IsInitialized() const {

  return true;
}

void AccuracyParameter::Swap(AccuracyParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void AccuracyParameter::InternalSwap(AccuracyParameter* other) {
  std::swap(top_k_, other->top_k_);
  std::swap(axis_, other->axis_);
  std::swap(ignore_label_, other->ignore_label_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata AccuracyParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = AccuracyParameter_descriptor_;
  metadata.reflection = AccuracyParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// AccuracyParameter

// optional uint32 top_k = 1 [default = 1];
bool AccuracyParameter::has_top_k() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void AccuracyParameter::set_has_top_k() {
  _has_bits_[0] |= 0x00000001u;
}
void AccuracyParameter::clear_has_top_k() {
  _has_bits_[0] &= ~0x00000001u;
}
void AccuracyParameter::clear_top_k() {
  top_k_ = 1u;
  clear_has_top_k();
}
::google::protobuf::uint32 AccuracyParameter::top_k() const {
  // @@protoc_insertion_point(field_get:caffe.AccuracyParameter.top_k)
  return top_k_;
}
void AccuracyParameter::set_top_k(::google::protobuf::uint32 value) {
  set_has_top_k();
  top_k_ = value;
  // @@protoc_insertion_point(field_set:caffe.AccuracyParameter.top_k)
}

// optional int32 axis = 2 [default = 1];
bool AccuracyParameter::has_axis() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void AccuracyParameter::set_has_axis() {
  _has_bits_[0] |= 0x00000002u;
}
void AccuracyParameter::clear_has_axis() {
  _has_bits_[0] &= ~0x00000002u;
}
void AccuracyParameter::clear_axis() {
  axis_ = 1;
  clear_has_axis();
}
::google::protobuf::int32 AccuracyParameter::axis() const {
  // @@protoc_insertion_point(field_get:caffe.AccuracyParameter.axis)
  return axis_;
}
void AccuracyParameter::set_axis(::google::protobuf::int32 value) {
  set_has_axis();
  axis_ = value;
  // @@protoc_insertion_point(field_set:caffe.AccuracyParameter.axis)
}

// optional int32 ignore_label = 3;
bool AccuracyParameter::has_ignore_label() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void AccuracyParameter::set_has_ignore_label() {
  _has_bits_[0] |= 0x00000004u;
}
void AccuracyParameter::clear_has_ignore_label() {
  _has_bits_[0] &= ~0x00000004u;
}
void AccuracyParameter::clear_ignore_label() {
  ignore_label_ = 0;
  clear_has_ignore_label();
}
::google::protobuf::int32 AccuracyParameter::ignore_label() const {
  // @@protoc_insertion_point(field_get:caffe.AccuracyParameter.ignore_label)
  return ignore_label_;
}
void AccuracyParameter::set_ignore_label(::google::protobuf::int32 value) {
  set_has_ignore_label();
  ignore_label_ = value;
  // @@protoc_insertion_point(field_set:caffe.AccuracyParameter.ignore_label)
}

inline const AccuracyParameter* AccuracyParameter::internal_default_instance() {
  return &AccuracyParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ArgMaxParameter::kOutMaxValFieldNumber;
const int ArgMaxParameter::kTopKFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ArgMaxParameter::ArgMaxParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ArgMaxParameter)
}

void ArgMaxParameter::InitAsDefaultInstance() {
}

ArgMaxParameter::ArgMaxParameter(const ArgMaxParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ArgMaxParameter)
}

void ArgMaxParameter::SharedCtor() {
  _cached_size_ = 0;
  out_max_val_ = false;
  top_k_ = 1u;
}

ArgMaxParameter::~ArgMaxParameter() {
  // @@protoc_insertion_point(destructor:caffe.ArgMaxParameter)
  SharedDtor();
}

void ArgMaxParameter::SharedDtor() {
}

void ArgMaxParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ArgMaxParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ArgMaxParameter_descriptor_;
}

const ArgMaxParameter& ArgMaxParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ArgMaxParameter> ArgMaxParameter_default_instance_;

ArgMaxParameter* ArgMaxParameter::New(::google::protobuf::Arena* arena) const {
  ArgMaxParameter* n = new ArgMaxParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ArgMaxParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ArgMaxParameter)
  if (_has_bits_[0 / 32] & 3u) {
    out_max_val_ = false;
    top_k_ = 1u;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ArgMaxParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ArgMaxParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional bool out_max_val = 1 [default = false];
      case 1: {
        if (tag == 8) {
          set_has_out_max_val();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &out_max_val_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_top_k;
        break;
      }

      // optional uint32 top_k = 2 [default = 1];
      case 2: {
        if (tag == 16) {
         parse_top_k:
          set_has_top_k();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &top_k_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ArgMaxParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ArgMaxParameter)
  return false;
#undef DO_
}

void ArgMaxParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ArgMaxParameter)
  // optional bool out_max_val = 1 [default = false];
  if (has_out_max_val()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->out_max_val(), output);
  }

  // optional uint32 top_k = 2 [default = 1];
  if (has_top_k()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->top_k(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ArgMaxParameter)
}

::google::protobuf::uint8* ArgMaxParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ArgMaxParameter)
  // optional bool out_max_val = 1 [default = false];
  if (has_out_max_val()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->out_max_val(), target);
  }

  // optional uint32 top_k = 2 [default = 1];
  if (has_top_k()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->top_k(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 3u) {
    // optional bool out_max_val = 1 [default = false];
    if (has_out_max_val()) {
      total_size += 1 + 1;
    }

    // optional uint32 top_k = 2 [default = 1];
    if (has_top_k()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->top_k());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ArgMaxParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ArgMaxParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ArgMaxParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ArgMaxParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ArgMaxParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ArgMaxParameter)
    UnsafeMergeFrom(*source);
  }
}

void ArgMaxParameter::MergeFrom(const ArgMaxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ArgMaxParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ArgMaxParameter::UnsafeMergeFrom(const ArgMaxParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_out_max_val()) {
      set_out_max_val(from.out_max_val());
    }
    if (from.has_top_k()) {
      set_top_k(from.top_k());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ArgMaxParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ArgMaxParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ArgMaxParameter::IsInitialized() const {

  return true;
}

void ArgMaxParameter::Swap(ArgMaxParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ArgMaxParameter::InternalSwap(ArgMaxParameter* other) {
  std::swap(out_max_val_, other->out_max_val_);
  std::swap(top_k_, other->top_k_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ArgMaxParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ArgMaxParameter_descriptor_;
  metadata.reflection = ArgMaxParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ArgMaxParameter

// optional bool out_max_val = 1 [default = false];
bool ArgMaxParameter::has_out_max_val() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ArgMaxParameter::set_has_out_max_val() {
  _has_bits_[0] |= 0x00000001u;
}
void ArgMaxParameter::clear_has_out_max_val() {
  _has_bits_[0] &= ~0x00000001u;
}
void ArgMaxParameter::clear_out_max_val() {
  out_max_val_ = false;
  clear_has_out_max_val();
}
bool ArgMaxParameter::out_max_val() const {
  // @@protoc_insertion_point(field_get:caffe.ArgMaxParameter.out_max_val)
  return out_max_val_;
}
void ArgMaxParameter::set_out_max_val(bool value) {
  set_has_out_max_val();
  out_max_val_ = value;
  // @@protoc_insertion_point(field_set:caffe.ArgMaxParameter.out_max_val)
}

// optional uint32 top_k = 2 [default = 1];
bool ArgMaxParameter::has_top_k() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ArgMaxParameter::set_has_top_k() {
  _has_bits_[0] |= 0x00000002u;
}
void ArgMaxParameter::clear_has_top_k() {
  _has_bits_[0] &= ~0x00000002u;
}
void ArgMaxParameter::clear_top_k() {
  top_k_ = 1u;
  clear_has_top_k();
}
::google::protobuf::uint32 ArgMaxParameter::top_k() const {
  // @@protoc_insertion_point(field_get:caffe.ArgMaxParameter.top_k)
  return top_k_;
}
void ArgMaxParameter::set_top_k(::google::protobuf::uint32 value) {
  set_has_top_k();
  top_k_ = value;
  // @@protoc_insertion_point(field_set:caffe.ArgMaxParameter.top_k)
}

inline const ArgMaxParameter* ArgMaxParameter::internal_default_instance() {
  return &ArgMaxParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ConcatParameter::kAxisFieldNumber;
const int ConcatParameter::kConcatDimFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ConcatParameter::ConcatParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ConcatParameter)
}

void ConcatParameter::InitAsDefaultInstance() {
}

ConcatParameter::ConcatParameter(const ConcatParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ConcatParameter)
}

void ConcatParameter::SharedCtor() {
  _cached_size_ = 0;
  axis_ = 1;
  concat_dim_ = 1u;
}

ConcatParameter::~ConcatParameter() {
  // @@protoc_insertion_point(destructor:caffe.ConcatParameter)
  SharedDtor();
}

void ConcatParameter::SharedDtor() {
}

void ConcatParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ConcatParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ConcatParameter_descriptor_;
}

const ConcatParameter& ConcatParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ConcatParameter> ConcatParameter_default_instance_;

ConcatParameter* ConcatParameter::New(::google::protobuf::Arena* arena) const {
  ConcatParameter* n = new ConcatParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ConcatParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ConcatParameter)
  if (_has_bits_[0 / 32] & 3u) {
    axis_ = 1;
    concat_dim_ = 1u;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ConcatParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ConcatParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint32 concat_dim = 1 [default = 1];
      case 1: {
        if (tag == 8) {
          set_has_concat_dim();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &concat_dim_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_axis;
        break;
      }

      // optional int32 axis = 2 [default = 1];
      case 2: {
        if (tag == 16) {
         parse_axis:
          set_has_axis();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &axis_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ConcatParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ConcatParameter)
  return false;
#undef DO_
}

void ConcatParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ConcatParameter)
  // optional uint32 concat_dim = 1 [default = 1];
  if (has_concat_dim()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->concat_dim(), output);
  }

  // optional int32 axis = 2 [default = 1];
  if (has_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->axis(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ConcatParameter)
}

::google::protobuf::uint8* ConcatParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ConcatParameter)
  // optional uint32 concat_dim = 1 [default = 1];
  if (has_concat_dim()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->concat_dim(), target);
  }

  // optional int32 axis = 2 [default = 1];
  if (has_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->axis(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 3u) {
    // optional int32 axis = 2 [default = 1];
    if (has_axis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->axis());
    }

    // optional uint32 concat_dim = 1 [default = 1];
    if (has_concat_dim()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->concat_dim());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ConcatParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ConcatParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ConcatParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ConcatParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ConcatParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ConcatParameter)
    UnsafeMergeFrom(*source);
  }
}

void ConcatParameter::MergeFrom(const ConcatParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ConcatParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ConcatParameter::UnsafeMergeFrom(const ConcatParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_axis()) {
      set_axis(from.axis());
    }
    if (from.has_concat_dim()) {
      set_concat_dim(from.concat_dim());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ConcatParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ConcatParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ConcatParameter::IsInitialized() const {

  return true;
}

void ConcatParameter::Swap(ConcatParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ConcatParameter::InternalSwap(ConcatParameter* other) {
  std::swap(axis_, other->axis_);
  std::swap(concat_dim_, other->concat_dim_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ConcatParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ConcatParameter_descriptor_;
  metadata.reflection = ConcatParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ConcatParameter

// optional int32 axis = 2 [default = 1];
bool ConcatParameter::has_axis() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ConcatParameter::set_has_axis() {
  _has_bits_[0] |= 0x00000001u;
}
void ConcatParameter::clear_has_axis() {
  _has_bits_[0] &= ~0x00000001u;
}
void ConcatParameter::clear_axis() {
  axis_ = 1;
  clear_has_axis();
}
::google::protobuf::int32 ConcatParameter::axis() const {
  // @@protoc_insertion_point(field_get:caffe.ConcatParameter.axis)
  return axis_;
}
void ConcatParameter::set_axis(::google::protobuf::int32 value) {
  set_has_axis();
  axis_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConcatParameter.axis)
}

// optional uint32 concat_dim = 1 [default = 1];
bool ConcatParameter::has_concat_dim() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ConcatParameter::set_has_concat_dim() {
  _has_bits_[0] |= 0x00000002u;
}
void ConcatParameter::clear_has_concat_dim() {
  _has_bits_[0] &= ~0x00000002u;
}
void ConcatParameter::clear_concat_dim() {
  concat_dim_ = 1u;
  clear_has_concat_dim();
}
::google::protobuf::uint32 ConcatParameter::concat_dim() const {
  // @@protoc_insertion_point(field_get:caffe.ConcatParameter.concat_dim)
  return concat_dim_;
}
void ConcatParameter::set_concat_dim(::google::protobuf::uint32 value) {
  set_has_concat_dim();
  concat_dim_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConcatParameter.concat_dim)
}

inline const ConcatParameter* ConcatParameter::internal_default_instance() {
  return &ConcatParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ContrastiveLossParameter::kMarginFieldNumber;
const int ContrastiveLossParameter::kLegacyVersionFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ContrastiveLossParameter::ContrastiveLossParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ContrastiveLossParameter)
}

void ContrastiveLossParameter::InitAsDefaultInstance() {
}

ContrastiveLossParameter::ContrastiveLossParameter(const ContrastiveLossParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ContrastiveLossParameter)
}

void ContrastiveLossParameter::SharedCtor() {
  _cached_size_ = 0;
  legacy_version_ = false;
  margin_ = 1;
}

ContrastiveLossParameter::~ContrastiveLossParameter() {
  // @@protoc_insertion_point(destructor:caffe.ContrastiveLossParameter)
  SharedDtor();
}

void ContrastiveLossParameter::SharedDtor() {
}

void ContrastiveLossParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ContrastiveLossParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ContrastiveLossParameter_descriptor_;
}

const ContrastiveLossParameter& ContrastiveLossParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ContrastiveLossParameter> ContrastiveLossParameter_default_instance_;

ContrastiveLossParameter* ContrastiveLossParameter::New(::google::protobuf::Arena* arena) const {
  ContrastiveLossParameter* n = new ContrastiveLossParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ContrastiveLossParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ContrastiveLossParameter)
  if (_has_bits_[0 / 32] & 3u) {
    margin_ = 1;
    legacy_version_ = false;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ContrastiveLossParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ContrastiveLossParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float margin = 1 [default = 1];
      case 1: {
        if (tag == 13) {
          set_has_margin();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &margin_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_legacy_version;
        break;
      }

      // optional bool legacy_version = 2 [default = false];
      case 2: {
        if (tag == 16) {
         parse_legacy_version:
          set_has_legacy_version();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &legacy_version_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ContrastiveLossParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ContrastiveLossParameter)
  return false;
#undef DO_
}

void ContrastiveLossParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ContrastiveLossParameter)
  // optional float margin = 1 [default = 1];
  if (has_margin()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->margin(), output);
  }

  // optional bool legacy_version = 2 [default = false];
  if (has_legacy_version()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->legacy_version(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ContrastiveLossParameter)
}

::google::protobuf::uint8* ContrastiveLossParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ContrastiveLossParameter)
  // optional float margin = 1 [default = 1];
  if (has_margin()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->margin(), target);
  }

  // optional bool legacy_version = 2 [default = false];
  if (has_legacy_version()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->legacy_version(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 3u) {
    // optional float margin = 1 [default = 1];
    if (has_margin()) {
      total_size += 1 + 4;
    }

    // optional bool legacy_version = 2 [default = false];
    if (has_legacy_version()) {
      total_size += 1 + 1;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ContrastiveLossParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ContrastiveLossParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ContrastiveLossParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ContrastiveLossParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ContrastiveLossParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ContrastiveLossParameter)
    UnsafeMergeFrom(*source);
  }
}

void ContrastiveLossParameter::MergeFrom(const ContrastiveLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ContrastiveLossParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ContrastiveLossParameter::UnsafeMergeFrom(const ContrastiveLossParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_margin()) {
      set_margin(from.margin());
    }
    if (from.has_legacy_version()) {
      set_legacy_version(from.legacy_version());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ContrastiveLossParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ContrastiveLossParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ContrastiveLossParameter::IsInitialized() const {

  return true;
}

void ContrastiveLossParameter::Swap(ContrastiveLossParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ContrastiveLossParameter::InternalSwap(ContrastiveLossParameter* other) {
  std::swap(margin_, other->margin_);
  std::swap(legacy_version_, other->legacy_version_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ContrastiveLossParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ContrastiveLossParameter_descriptor_;
  metadata.reflection = ContrastiveLossParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ContrastiveLossParameter

// optional float margin = 1 [default = 1];
bool ContrastiveLossParameter::has_margin() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ContrastiveLossParameter::set_has_margin() {
  _has_bits_[0] |= 0x00000001u;
}
void ContrastiveLossParameter::clear_has_margin() {
  _has_bits_[0] &= ~0x00000001u;
}
void ContrastiveLossParameter::clear_margin() {
  margin_ = 1;
  clear_has_margin();
}
float ContrastiveLossParameter::margin() const {
  // @@protoc_insertion_point(field_get:caffe.ContrastiveLossParameter.margin)
  return margin_;
}
void ContrastiveLossParameter::set_margin(float value) {
  set_has_margin();
  margin_ = value;
  // @@protoc_insertion_point(field_set:caffe.ContrastiveLossParameter.margin)
}

// optional bool legacy_version = 2 [default = false];
bool ContrastiveLossParameter::has_legacy_version() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ContrastiveLossParameter::set_has_legacy_version() {
  _has_bits_[0] |= 0x00000002u;
}
void ContrastiveLossParameter::clear_has_legacy_version() {
  _has_bits_[0] &= ~0x00000002u;
}
void ContrastiveLossParameter::clear_legacy_version() {
  legacy_version_ = false;
  clear_has_legacy_version();
}
bool ContrastiveLossParameter::legacy_version() const {
  // @@protoc_insertion_point(field_get:caffe.ContrastiveLossParameter.legacy_version)
  return legacy_version_;
}
void ContrastiveLossParameter::set_legacy_version(bool value) {
  set_has_legacy_version();
  legacy_version_ = value;
  // @@protoc_insertion_point(field_set:caffe.ContrastiveLossParameter.legacy_version)
}

inline const ContrastiveLossParameter* ContrastiveLossParameter::internal_default_instance() {
  return &ContrastiveLossParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* ConvolutionParameter_Engine_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ConvolutionParameter_Engine_descriptor_;
}
bool ConvolutionParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const ConvolutionParameter_Engine ConvolutionParameter::DEFAULT;
const ConvolutionParameter_Engine ConvolutionParameter::CAFFE;
const ConvolutionParameter_Engine ConvolutionParameter::CUDNN;
const ConvolutionParameter_Engine ConvolutionParameter::Engine_MIN;
const ConvolutionParameter_Engine ConvolutionParameter::Engine_MAX;
const int ConvolutionParameter::Engine_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ConvolutionParameter::kNumOutputFieldNumber;
const int ConvolutionParameter::kBiasTermFieldNumber;
const int ConvolutionParameter::kPadFieldNumber;
const int ConvolutionParameter::kPadHFieldNumber;
const int ConvolutionParameter::kPadWFieldNumber;
const int ConvolutionParameter::kKernelSizeFieldNumber;
const int ConvolutionParameter::kKernelHFieldNumber;
const int ConvolutionParameter::kKernelWFieldNumber;
const int ConvolutionParameter::kGroupFieldNumber;
const int ConvolutionParameter::kStrideFieldNumber;
const int ConvolutionParameter::kStrideHFieldNumber;
const int ConvolutionParameter::kStrideWFieldNumber;
const int ConvolutionParameter::kWeightFillerFieldNumber;
const int ConvolutionParameter::kBiasFillerFieldNumber;
const int ConvolutionParameter::kEngineFieldNumber;
const int ConvolutionParameter::kDilationHFieldNumber;
const int ConvolutionParameter::kDilationWFieldNumber;
const int ConvolutionParameter::kDilationFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ConvolutionParameter::ConvolutionParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ConvolutionParameter)
}

void ConvolutionParameter::InitAsDefaultInstance() {
  weight_filler_ = const_cast< ::caffe::FillerParameter*>(
      ::caffe::FillerParameter::internal_default_instance());
  bias_filler_ = const_cast< ::caffe::FillerParameter*>(
      ::caffe::FillerParameter::internal_default_instance());
}

ConvolutionParameter::ConvolutionParameter(const ConvolutionParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ConvolutionParameter)
}

void ConvolutionParameter::SharedCtor() {
  _cached_size_ = 0;
  weight_filler_ = NULL;
  bias_filler_ = NULL;
  ::memset(&num_output_, 0, reinterpret_cast<char*>(&dilation_) -
    reinterpret_cast<char*>(&num_output_) + sizeof(dilation_));
  stride_ = 1u;
  bias_term_ = true;
  group_ = 1u;
}

ConvolutionParameter::~ConvolutionParameter() {
  // @@protoc_insertion_point(destructor:caffe.ConvolutionParameter)
  SharedDtor();
}

void ConvolutionParameter::SharedDtor() {
  if (this != &ConvolutionParameter_default_instance_.get()) {
    delete weight_filler_;
    delete bias_filler_;
  }
}

void ConvolutionParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ConvolutionParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ConvolutionParameter_descriptor_;
}

const ConvolutionParameter& ConvolutionParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ConvolutionParameter> ConvolutionParameter_default_instance_;

ConvolutionParameter* ConvolutionParameter::New(::google::protobuf::Arena* arena) const {
  ConvolutionParameter* n = new ConvolutionParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ConvolutionParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ConvolutionParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(ConvolutionParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<ConvolutionParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 255u) {
    ZR_(num_output_, kernel_w_);
    bias_term_ = true;
  }
  if (_has_bits_[8 / 32] & 65280u) {
    ZR_(stride_h_, dilation_h_);
    group_ = 1u;
    stride_ = 1u;
    if (has_weight_filler()) {
      if (weight_filler_ != NULL) weight_filler_->::caffe::FillerParameter::Clear();
    }
    if (has_bias_filler()) {
      if (bias_filler_ != NULL) bias_filler_->::caffe::FillerParameter::Clear();
    }
  }
  ZR_(dilation_w_, dilation_);

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ConvolutionParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ConvolutionParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint32 num_output = 1;
      case 1: {
        if (tag == 8) {
          set_has_num_output();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &num_output_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_bias_term;
        break;
      }

      // optional bool bias_term = 2 [default = true];
      case 2: {
        if (tag == 16) {
         parse_bias_term:
          set_has_bias_term();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &bias_term_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_pad;
        break;
      }

      // optional uint32 pad = 3 [default = 0];
      case 3: {
        if (tag == 24) {
         parse_pad:
          set_has_pad();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &pad_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_kernel_size;
        break;
      }

      // optional uint32 kernel_size = 4;
      case 4: {
        if (tag == 32) {
         parse_kernel_size:
          set_has_kernel_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &kernel_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_group;
        break;
      }

      // optional uint32 group = 5 [default = 1];
      case 5: {
        if (tag == 40) {
         parse_group:
          set_has_group();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &group_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_stride;
        break;
      }

      // optional uint32 stride = 6 [default = 1];
      case 6: {
        if (tag == 48) {
         parse_stride:
          set_has_stride();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &stride_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(58)) goto parse_weight_filler;
        break;
      }

      // optional .caffe.FillerParameter weight_filler = 7;
      case 7: {
        if (tag == 58) {
         parse_weight_filler:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_weight_filler()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(66)) goto parse_bias_filler;
        break;
      }

      // optional .caffe.FillerParameter bias_filler = 8;
      case 8: {
        if (tag == 66) {
         parse_bias_filler:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_bias_filler()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(72)) goto parse_pad_h;
        break;
      }

      // optional uint32 pad_h = 9 [default = 0];
      case 9: {
        if (tag == 72) {
         parse_pad_h:
          set_has_pad_h();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &pad_h_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(80)) goto parse_pad_w;
        break;
      }

      // optional uint32 pad_w = 10 [default = 0];
      case 10: {
        if (tag == 80) {
         parse_pad_w:
          set_has_pad_w();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &pad_w_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(88)) goto parse_kernel_h;
        break;
      }

      // optional uint32 kernel_h = 11;
      case 11: {
        if (tag == 88) {
         parse_kernel_h:
          set_has_kernel_h();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &kernel_h_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(96)) goto parse_kernel_w;
        break;
      }

      // optional uint32 kernel_w = 12;
      case 12: {
        if (tag == 96) {
         parse_kernel_w:
          set_has_kernel_w();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &kernel_w_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(104)) goto parse_stride_h;
        break;
      }

      // optional uint32 stride_h = 13;
      case 13: {
        if (tag == 104) {
         parse_stride_h:
          set_has_stride_h();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &stride_h_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(112)) goto parse_stride_w;
        break;
      }

      // optional uint32 stride_w = 14;
      case 14: {
        if (tag == 112) {
         parse_stride_w:
          set_has_stride_w();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &stride_w_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(120)) goto parse_engine;
        break;
      }

      // optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
      case 15: {
        if (tag == 120) {
         parse_engine:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::ConvolutionParameter_Engine_IsValid(value)) {
            set_engine(static_cast< ::caffe::ConvolutionParameter_Engine >(value));
          } else {
            mutable_unknown_fields()->AddVarint(15, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(144)) goto parse_dilation_h;
        break;
      }

      // optional uint32 dilation_h = 18;
      case 18: {
        if (tag == 144) {
         parse_dilation_h:
          set_has_dilation_h();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &dilation_h_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(152)) goto parse_dilation_w;
        break;
      }

      // optional uint32 dilation_w = 19;
      case 19: {
        if (tag == 152) {
         parse_dilation_w:
          set_has_dilation_w();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &dilation_w_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(160)) goto parse_dilation;
        break;
      }

      // optional uint32 dilation = 20;
      case 20: {
        if (tag == 160) {
         parse_dilation:
          set_has_dilation();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &dilation_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ConvolutionParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ConvolutionParameter)
  return false;
#undef DO_
}

void ConvolutionParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ConvolutionParameter)
  // optional uint32 num_output = 1;
  if (has_num_output()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->num_output(), output);
  }

  // optional bool bias_term = 2 [default = true];
  if (has_bias_term()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->bias_term(), output);
  }

  // optional uint32 pad = 3 [default = 0];
  if (has_pad()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->pad(), output);
  }

  // optional uint32 kernel_size = 4;
  if (has_kernel_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->kernel_size(), output);
  }

  // optional uint32 group = 5 [default = 1];
  if (has_group()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->group(), output);
  }

  // optional uint32 stride = 6 [default = 1];
  if (has_stride()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->stride(), output);
  }

  // optional .caffe.FillerParameter weight_filler = 7;
  if (has_weight_filler()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      7, *this->weight_filler_, output);
  }

  // optional .caffe.FillerParameter bias_filler = 8;
  if (has_bias_filler()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      8, *this->bias_filler_, output);
  }

  // optional uint32 pad_h = 9 [default = 0];
  if (has_pad_h()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(9, this->pad_h(), output);
  }

  // optional uint32 pad_w = 10 [default = 0];
  if (has_pad_w()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(10, this->pad_w(), output);
  }

  // optional uint32 kernel_h = 11;
  if (has_kernel_h()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(11, this->kernel_h(), output);
  }

  // optional uint32 kernel_w = 12;
  if (has_kernel_w()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(12, this->kernel_w(), output);
  }

  // optional uint32 stride_h = 13;
  if (has_stride_h()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(13, this->stride_h(), output);
  }

  // optional uint32 stride_w = 14;
  if (has_stride_w()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(14, this->stride_w(), output);
  }

  // optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
  if (has_engine()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      15, this->engine(), output);
  }

  // optional uint32 dilation_h = 18;
  if (has_dilation_h()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(18, this->dilation_h(), output);
  }

  // optional uint32 dilation_w = 19;
  if (has_dilation_w()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(19, this->dilation_w(), output);
  }

  // optional uint32 dilation = 20;
  if (has_dilation()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(20, this->dilation(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ConvolutionParameter)
}

::google::protobuf::uint8* ConvolutionParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ConvolutionParameter)
  // optional uint32 num_output = 1;
  if (has_num_output()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->num_output(), target);
  }

  // optional bool bias_term = 2 [default = true];
  if (has_bias_term()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->bias_term(), target);
  }

  // optional uint32 pad = 3 [default = 0];
  if (has_pad()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->pad(), target);
  }

  // optional uint32 kernel_size = 4;
  if (has_kernel_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->kernel_size(), target);
  }

  // optional uint32 group = 5 [default = 1];
  if (has_group()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->group(), target);
  }

  // optional uint32 stride = 6 [default = 1];
  if (has_stride()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->stride(), target);
  }

  // optional .caffe.FillerParameter weight_filler = 7;
  if (has_weight_filler()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        7, *this->weight_filler_, false, target);
  }

  // optional .caffe.FillerParameter bias_filler = 8;
  if (has_bias_filler()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        8, *this->bias_filler_, false, target);
  }

  // optional uint32 pad_h = 9 [default = 0];
  if (has_pad_h()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(9, this->pad_h(), target);
  }

  // optional uint32 pad_w = 10 [default = 0];
  if (has_pad_w()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(10, this->pad_w(), target);
  }

  // optional uint32 kernel_h = 11;
  if (has_kernel_h()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(11, this->kernel_h(), target);
  }

  // optional uint32 kernel_w = 12;
  if (has_kernel_w()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(12, this->kernel_w(), target);
  }

  // optional uint32 stride_h = 13;
  if (has_stride_h()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(13, this->stride_h(), target);
  }

  // optional uint32 stride_w = 14;
  if (has_stride_w()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(14, this->stride_w(), target);
  }

  // optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
  if (has_engine()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      15, this->engine(), target);
  }

  // optional uint32 dilation_h = 18;
  if (has_dilation_h()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(18, this->dilation_h(), target);
  }

  // optional uint32 dilation_w = 19;
  if (has_dilation_w()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(19, this->dilation_w(), target);
  }

  // optional uint32 dilation = 20;
  if (has_dilation()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(20, this->dilation(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 255u) {
    // optional uint32 num_output = 1;
    if (has_num_output()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->num_output());
    }

    // optional bool bias_term = 2 [default = true];
    if (has_bias_term()) {
      total_size += 1 + 1;
    }

    // optional uint32 pad = 3 [default = 0];
    if (has_pad()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->pad());
    }

    // optional uint32 pad_h = 9 [default = 0];
    if (has_pad_h()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->pad_h());
    }

    // optional uint32 pad_w = 10 [default = 0];
    if (has_pad_w()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->pad_w());
    }

    // optional uint32 kernel_size = 4;
    if (has_kernel_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->kernel_size());
    }

    // optional uint32 kernel_h = 11;
    if (has_kernel_h()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->kernel_h());
    }

    // optional uint32 kernel_w = 12;
    if (has_kernel_w()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->kernel_w());
    }

  }
  if (_has_bits_[8 / 32] & 65280u) {
    // optional uint32 group = 5 [default = 1];
    if (has_group()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->group());
    }

    // optional uint32 stride = 6 [default = 1];
    if (has_stride()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->stride());
    }

    // optional uint32 stride_h = 13;
    if (has_stride_h()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->stride_h());
    }

    // optional uint32 stride_w = 14;
    if (has_stride_w()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->stride_w());
    }

    // optional .caffe.FillerParameter weight_filler = 7;
    if (has_weight_filler()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->weight_filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 8;
    if (has_bias_filler()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->bias_filler_);
    }

    // optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
    if (has_engine()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->engine());
    }

    // optional uint32 dilation_h = 18;
    if (has_dilation_h()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->dilation_h());
    }

  }
  if (_has_bits_[16 / 32] & 196608u) {
    // optional uint32 dilation_w = 19;
    if (has_dilation_w()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->dilation_w());
    }

    // optional uint32 dilation = 20;
    if (has_dilation()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->dilation());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ConvolutionParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ConvolutionParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ConvolutionParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ConvolutionParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ConvolutionParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ConvolutionParameter)
    UnsafeMergeFrom(*source);
  }
}

void ConvolutionParameter::MergeFrom(const ConvolutionParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ConvolutionParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ConvolutionParameter::UnsafeMergeFrom(const ConvolutionParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_num_output()) {
      set_num_output(from.num_output());
    }
    if (from.has_bias_term()) {
      set_bias_term(from.bias_term());
    }
    if (from.has_pad()) {
      set_pad(from.pad());
    }
    if (from.has_pad_h()) {
      set_pad_h(from.pad_h());
    }
    if (from.has_pad_w()) {
      set_pad_w(from.pad_w());
    }
    if (from.has_kernel_size()) {
      set_kernel_size(from.kernel_size());
    }
    if (from.has_kernel_h()) {
      set_kernel_h(from.kernel_h());
    }
    if (from.has_kernel_w()) {
      set_kernel_w(from.kernel_w());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_group()) {
      set_group(from.group());
    }
    if (from.has_stride()) {
      set_stride(from.stride());
    }
    if (from.has_stride_h()) {
      set_stride_h(from.stride_h());
    }
    if (from.has_stride_w()) {
      set_stride_w(from.stride_w());
    }
    if (from.has_weight_filler()) {
      mutable_weight_filler()->::caffe::FillerParameter::MergeFrom(from.weight_filler());
    }
    if (from.has_bias_filler()) {
      mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from.bias_filler());
    }
    if (from.has_engine()) {
      set_engine(from.engine());
    }
    if (from.has_dilation_h()) {
      set_dilation_h(from.dilation_h());
    }
  }
  if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    if (from.has_dilation_w()) {
      set_dilation_w(from.dilation_w());
    }
    if (from.has_dilation()) {
      set_dilation(from.dilation());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ConvolutionParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ConvolutionParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ConvolutionParameter::IsInitialized() const {

  return true;
}

void ConvolutionParameter::Swap(ConvolutionParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ConvolutionParameter::InternalSwap(ConvolutionParameter* other) {
  std::swap(num_output_, other->num_output_);
  std::swap(bias_term_, other->bias_term_);
  std::swap(pad_, other->pad_);
  std::swap(pad_h_, other->pad_h_);
  std::swap(pad_w_, other->pad_w_);
  std::swap(kernel_size_, other->kernel_size_);
  std::swap(kernel_h_, other->kernel_h_);
  std::swap(kernel_w_, other->kernel_w_);
  std::swap(group_, other->group_);
  std::swap(stride_, other->stride_);
  std::swap(stride_h_, other->stride_h_);
  std::swap(stride_w_, other->stride_w_);
  std::swap(weight_filler_, other->weight_filler_);
  std::swap(bias_filler_, other->bias_filler_);
  std::swap(engine_, other->engine_);
  std::swap(dilation_h_, other->dilation_h_);
  std::swap(dilation_w_, other->dilation_w_);
  std::swap(dilation_, other->dilation_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ConvolutionParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ConvolutionParameter_descriptor_;
  metadata.reflection = ConvolutionParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ConvolutionParameter

// optional uint32 num_output = 1;
bool ConvolutionParameter::has_num_output() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ConvolutionParameter::set_has_num_output() {
  _has_bits_[0] |= 0x00000001u;
}
void ConvolutionParameter::clear_has_num_output() {
  _has_bits_[0] &= ~0x00000001u;
}
void ConvolutionParameter::clear_num_output() {
  num_output_ = 0u;
  clear_has_num_output();
}
::google::protobuf::uint32 ConvolutionParameter::num_output() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.num_output)
  return num_output_;
}
void ConvolutionParameter::set_num_output(::google::protobuf::uint32 value) {
  set_has_num_output();
  num_output_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.num_output)
}

// optional bool bias_term = 2 [default = true];
bool ConvolutionParameter::has_bias_term() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ConvolutionParameter::set_has_bias_term() {
  _has_bits_[0] |= 0x00000002u;
}
void ConvolutionParameter::clear_has_bias_term() {
  _has_bits_[0] &= ~0x00000002u;
}
void ConvolutionParameter::clear_bias_term() {
  bias_term_ = true;
  clear_has_bias_term();
}
bool ConvolutionParameter::bias_term() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.bias_term)
  return bias_term_;
}
void ConvolutionParameter::set_bias_term(bool value) {
  set_has_bias_term();
  bias_term_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.bias_term)
}

// optional uint32 pad = 3 [default = 0];
bool ConvolutionParameter::has_pad() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void ConvolutionParameter::set_has_pad() {
  _has_bits_[0] |= 0x00000004u;
}
void ConvolutionParameter::clear_has_pad() {
  _has_bits_[0] &= ~0x00000004u;
}
void ConvolutionParameter::clear_pad() {
  pad_ = 0u;
  clear_has_pad();
}
::google::protobuf::uint32 ConvolutionParameter::pad() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.pad)
  return pad_;
}
void ConvolutionParameter::set_pad(::google::protobuf::uint32 value) {
  set_has_pad();
  pad_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.pad)
}

// optional uint32 pad_h = 9 [default = 0];
bool ConvolutionParameter::has_pad_h() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void ConvolutionParameter::set_has_pad_h() {
  _has_bits_[0] |= 0x00000008u;
}
void ConvolutionParameter::clear_has_pad_h() {
  _has_bits_[0] &= ~0x00000008u;
}
void ConvolutionParameter::clear_pad_h() {
  pad_h_ = 0u;
  clear_has_pad_h();
}
::google::protobuf::uint32 ConvolutionParameter::pad_h() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.pad_h)
  return pad_h_;
}
void ConvolutionParameter::set_pad_h(::google::protobuf::uint32 value) {
  set_has_pad_h();
  pad_h_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.pad_h)
}

// optional uint32 pad_w = 10 [default = 0];
bool ConvolutionParameter::has_pad_w() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void ConvolutionParameter::set_has_pad_w() {
  _has_bits_[0] |= 0x00000010u;
}
void ConvolutionParameter::clear_has_pad_w() {
  _has_bits_[0] &= ~0x00000010u;
}
void ConvolutionParameter::clear_pad_w() {
  pad_w_ = 0u;
  clear_has_pad_w();
}
::google::protobuf::uint32 ConvolutionParameter::pad_w() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.pad_w)
  return pad_w_;
}
void ConvolutionParameter::set_pad_w(::google::protobuf::uint32 value) {
  set_has_pad_w();
  pad_w_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.pad_w)
}

// optional uint32 kernel_size = 4;
bool ConvolutionParameter::has_kernel_size() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void ConvolutionParameter::set_has_kernel_size() {
  _has_bits_[0] |= 0x00000020u;
}
void ConvolutionParameter::clear_has_kernel_size() {
  _has_bits_[0] &= ~0x00000020u;
}
void ConvolutionParameter::clear_kernel_size() {
  kernel_size_ = 0u;
  clear_has_kernel_size();
}
::google::protobuf::uint32 ConvolutionParameter::kernel_size() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.kernel_size)
  return kernel_size_;
}
void ConvolutionParameter::set_kernel_size(::google::protobuf::uint32 value) {
  set_has_kernel_size();
  kernel_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.kernel_size)
}

// optional uint32 kernel_h = 11;
bool ConvolutionParameter::has_kernel_h() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void ConvolutionParameter::set_has_kernel_h() {
  _has_bits_[0] |= 0x00000040u;
}
void ConvolutionParameter::clear_has_kernel_h() {
  _has_bits_[0] &= ~0x00000040u;
}
void ConvolutionParameter::clear_kernel_h() {
  kernel_h_ = 0u;
  clear_has_kernel_h();
}
::google::protobuf::uint32 ConvolutionParameter::kernel_h() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.kernel_h)
  return kernel_h_;
}
void ConvolutionParameter::set_kernel_h(::google::protobuf::uint32 value) {
  set_has_kernel_h();
  kernel_h_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.kernel_h)
}

// optional uint32 kernel_w = 12;
bool ConvolutionParameter::has_kernel_w() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
void ConvolutionParameter::set_has_kernel_w() {
  _has_bits_[0] |= 0x00000080u;
}
void ConvolutionParameter::clear_has_kernel_w() {
  _has_bits_[0] &= ~0x00000080u;
}
void ConvolutionParameter::clear_kernel_w() {
  kernel_w_ = 0u;
  clear_has_kernel_w();
}
::google::protobuf::uint32 ConvolutionParameter::kernel_w() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.kernel_w)
  return kernel_w_;
}
void ConvolutionParameter::set_kernel_w(::google::protobuf::uint32 value) {
  set_has_kernel_w();
  kernel_w_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.kernel_w)
}

// optional uint32 group = 5 [default = 1];
bool ConvolutionParameter::has_group() const {
  return (_has_bits_[0] & 0x00000100u) != 0;
}
void ConvolutionParameter::set_has_group() {
  _has_bits_[0] |= 0x00000100u;
}
void ConvolutionParameter::clear_has_group() {
  _has_bits_[0] &= ~0x00000100u;
}
void ConvolutionParameter::clear_group() {
  group_ = 1u;
  clear_has_group();
}
::google::protobuf::uint32 ConvolutionParameter::group() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.group)
  return group_;
}
void ConvolutionParameter::set_group(::google::protobuf::uint32 value) {
  set_has_group();
  group_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.group)
}

// optional uint32 stride = 6 [default = 1];
bool ConvolutionParameter::has_stride() const {
  return (_has_bits_[0] & 0x00000200u) != 0;
}
void ConvolutionParameter::set_has_stride() {
  _has_bits_[0] |= 0x00000200u;
}
void ConvolutionParameter::clear_has_stride() {
  _has_bits_[0] &= ~0x00000200u;
}
void ConvolutionParameter::clear_stride() {
  stride_ = 1u;
  clear_has_stride();
}
::google::protobuf::uint32 ConvolutionParameter::stride() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.stride)
  return stride_;
}
void ConvolutionParameter::set_stride(::google::protobuf::uint32 value) {
  set_has_stride();
  stride_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.stride)
}

// optional uint32 stride_h = 13;
bool ConvolutionParameter::has_stride_h() const {
  return (_has_bits_[0] & 0x00000400u) != 0;
}
void ConvolutionParameter::set_has_stride_h() {
  _has_bits_[0] |= 0x00000400u;
}
void ConvolutionParameter::clear_has_stride_h() {
  _has_bits_[0] &= ~0x00000400u;
}
void ConvolutionParameter::clear_stride_h() {
  stride_h_ = 0u;
  clear_has_stride_h();
}
::google::protobuf::uint32 ConvolutionParameter::stride_h() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.stride_h)
  return stride_h_;
}
void ConvolutionParameter::set_stride_h(::google::protobuf::uint32 value) {
  set_has_stride_h();
  stride_h_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.stride_h)
}

// optional uint32 stride_w = 14;
bool ConvolutionParameter::has_stride_w() const {
  return (_has_bits_[0] & 0x00000800u) != 0;
}
void ConvolutionParameter::set_has_stride_w() {
  _has_bits_[0] |= 0x00000800u;
}
void ConvolutionParameter::clear_has_stride_w() {
  _has_bits_[0] &= ~0x00000800u;
}
void ConvolutionParameter::clear_stride_w() {
  stride_w_ = 0u;
  clear_has_stride_w();
}
::google::protobuf::uint32 ConvolutionParameter::stride_w() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.stride_w)
  return stride_w_;
}
void ConvolutionParameter::set_stride_w(::google::protobuf::uint32 value) {
  set_has_stride_w();
  stride_w_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.stride_w)
}

// optional .caffe.FillerParameter weight_filler = 7;
bool ConvolutionParameter::has_weight_filler() const {
  return (_has_bits_[0] & 0x00001000u) != 0;
}
void ConvolutionParameter::set_has_weight_filler() {
  _has_bits_[0] |= 0x00001000u;
}
void ConvolutionParameter::clear_has_weight_filler() {
  _has_bits_[0] &= ~0x00001000u;
}
void ConvolutionParameter::clear_weight_filler() {
  if (weight_filler_ != NULL) weight_filler_->::caffe::FillerParameter::Clear();
  clear_has_weight_filler();
}
const ::caffe::FillerParameter& ConvolutionParameter::weight_filler() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.weight_filler)
  return weight_filler_ != NULL ? *weight_filler_
                         : *::caffe::FillerParameter::internal_default_instance();
}
::caffe::FillerParameter* ConvolutionParameter::mutable_weight_filler() {
  set_has_weight_filler();
  if (weight_filler_ == NULL) {
    weight_filler_ = new ::caffe::FillerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.ConvolutionParameter.weight_filler)
  return weight_filler_;
}
::caffe::FillerParameter* ConvolutionParameter::release_weight_filler() {
  // @@protoc_insertion_point(field_release:caffe.ConvolutionParameter.weight_filler)
  clear_has_weight_filler();
  ::caffe::FillerParameter* temp = weight_filler_;
  weight_filler_ = NULL;
  return temp;
}
void ConvolutionParameter::set_allocated_weight_filler(::caffe::FillerParameter* weight_filler) {
  delete weight_filler_;
  weight_filler_ = weight_filler;
  if (weight_filler) {
    set_has_weight_filler();
  } else {
    clear_has_weight_filler();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.ConvolutionParameter.weight_filler)
}

// optional .caffe.FillerParameter bias_filler = 8;
bool ConvolutionParameter::has_bias_filler() const {
  return (_has_bits_[0] & 0x00002000u) != 0;
}
void ConvolutionParameter::set_has_bias_filler() {
  _has_bits_[0] |= 0x00002000u;
}
void ConvolutionParameter::clear_has_bias_filler() {
  _has_bits_[0] &= ~0x00002000u;
}
void ConvolutionParameter::clear_bias_filler() {
  if (bias_filler_ != NULL) bias_filler_->::caffe::FillerParameter::Clear();
  clear_has_bias_filler();
}
const ::caffe::FillerParameter& ConvolutionParameter::bias_filler() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.bias_filler)
  return bias_filler_ != NULL ? *bias_filler_
                         : *::caffe::FillerParameter::internal_default_instance();
}
::caffe::FillerParameter* ConvolutionParameter::mutable_bias_filler() {
  set_has_bias_filler();
  if (bias_filler_ == NULL) {
    bias_filler_ = new ::caffe::FillerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.ConvolutionParameter.bias_filler)
  return bias_filler_;
}
::caffe::FillerParameter* ConvolutionParameter::release_bias_filler() {
  // @@protoc_insertion_point(field_release:caffe.ConvolutionParameter.bias_filler)
  clear_has_bias_filler();
  ::caffe::FillerParameter* temp = bias_filler_;
  bias_filler_ = NULL;
  return temp;
}
void ConvolutionParameter::set_allocated_bias_filler(::caffe::FillerParameter* bias_filler) {
  delete bias_filler_;
  bias_filler_ = bias_filler;
  if (bias_filler) {
    set_has_bias_filler();
  } else {
    clear_has_bias_filler();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.ConvolutionParameter.bias_filler)
}

// optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
bool ConvolutionParameter::has_engine() const {
  return (_has_bits_[0] & 0x00004000u) != 0;
}
void ConvolutionParameter::set_has_engine() {
  _has_bits_[0] |= 0x00004000u;
}
void ConvolutionParameter::clear_has_engine() {
  _has_bits_[0] &= ~0x00004000u;
}
void ConvolutionParameter::clear_engine() {
  engine_ = 0;
  clear_has_engine();
}
::caffe::ConvolutionParameter_Engine ConvolutionParameter::engine() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.engine)
  return static_cast< ::caffe::ConvolutionParameter_Engine >(engine_);
}
void ConvolutionParameter::set_engine(::caffe::ConvolutionParameter_Engine value) {
  assert(::caffe::ConvolutionParameter_Engine_IsValid(value));
  set_has_engine();
  engine_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.engine)
}

// optional uint32 dilation_h = 18;
bool ConvolutionParameter::has_dilation_h() const {
  return (_has_bits_[0] & 0x00008000u) != 0;
}
void ConvolutionParameter::set_has_dilation_h() {
  _has_bits_[0] |= 0x00008000u;
}
void ConvolutionParameter::clear_has_dilation_h() {
  _has_bits_[0] &= ~0x00008000u;
}
void ConvolutionParameter::clear_dilation_h() {
  dilation_h_ = 0u;
  clear_has_dilation_h();
}
::google::protobuf::uint32 ConvolutionParameter::dilation_h() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.dilation_h)
  return dilation_h_;
}
void ConvolutionParameter::set_dilation_h(::google::protobuf::uint32 value) {
  set_has_dilation_h();
  dilation_h_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.dilation_h)
}

// optional uint32 dilation_w = 19;
bool ConvolutionParameter::has_dilation_w() const {
  return (_has_bits_[0] & 0x00010000u) != 0;
}
void ConvolutionParameter::set_has_dilation_w() {
  _has_bits_[0] |= 0x00010000u;
}
void ConvolutionParameter::clear_has_dilation_w() {
  _has_bits_[0] &= ~0x00010000u;
}
void ConvolutionParameter::clear_dilation_w() {
  dilation_w_ = 0u;
  clear_has_dilation_w();
}
::google::protobuf::uint32 ConvolutionParameter::dilation_w() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.dilation_w)
  return dilation_w_;
}
void ConvolutionParameter::set_dilation_w(::google::protobuf::uint32 value) {
  set_has_dilation_w();
  dilation_w_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.dilation_w)
}

// optional uint32 dilation = 20;
bool ConvolutionParameter::has_dilation() const {
  return (_has_bits_[0] & 0x00020000u) != 0;
}
void ConvolutionParameter::set_has_dilation() {
  _has_bits_[0] |= 0x00020000u;
}
void ConvolutionParameter::clear_has_dilation() {
  _has_bits_[0] &= ~0x00020000u;
}
void ConvolutionParameter::clear_dilation() {
  dilation_ = 0u;
  clear_has_dilation();
}
::google::protobuf::uint32 ConvolutionParameter::dilation() const {
  // @@protoc_insertion_point(field_get:caffe.ConvolutionParameter.dilation)
  return dilation_;
}
void ConvolutionParameter::set_dilation(::google::protobuf::uint32 value) {
  set_has_dilation();
  dilation_ = value;
  // @@protoc_insertion_point(field_set:caffe.ConvolutionParameter.dilation)
}

inline const ConvolutionParameter* ConvolutionParameter::internal_default_instance() {
  return &ConvolutionParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* DataParameter_DB_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DataParameter_DB_descriptor_;
}
bool DataParameter_DB_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const DataParameter_DB DataParameter::LEVELDB;
const DataParameter_DB DataParameter::LMDB;
const DataParameter_DB DataParameter::DB_MIN;
const DataParameter_DB DataParameter::DB_MAX;
const int DataParameter::DB_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DataParameter::kSourceFieldNumber;
const int DataParameter::kBatchSizeFieldNumber;
const int DataParameter::kRandSkipFieldNumber;
const int DataParameter::kBackendFieldNumber;
const int DataParameter::kScaleFieldNumber;
const int DataParameter::kMeanFileFieldNumber;
const int DataParameter::kCropSizeFieldNumber;
const int DataParameter::kMirrorFieldNumber;
const int DataParameter::kForceEncodedColorFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DataParameter::DataParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.DataParameter)
}

void DataParameter::InitAsDefaultInstance() {
}

DataParameter::DataParameter(const DataParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.DataParameter)
}

void DataParameter::SharedCtor() {
  _cached_size_ = 0;
  source_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  mean_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&batch_size_, 0, reinterpret_cast<char*>(&force_encoded_color_) -
    reinterpret_cast<char*>(&batch_size_) + sizeof(force_encoded_color_));
  scale_ = 1;
}

DataParameter::~DataParameter() {
  // @@protoc_insertion_point(destructor:caffe.DataParameter)
  SharedDtor();
}

void DataParameter::SharedDtor() {
  source_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  mean_file_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void DataParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DataParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DataParameter_descriptor_;
}

const DataParameter& DataParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<DataParameter> DataParameter_default_instance_;

DataParameter* DataParameter::New(::google::protobuf::Arena* arena) const {
  DataParameter* n = new DataParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.DataParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(DataParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<DataParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 255u) {
    ZR_(batch_size_, mirror_);
    if (has_source()) {
      source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    scale_ = 1;
    if (has_mean_file()) {
      mean_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
  }
  force_encoded_color_ = false;

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool DataParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.DataParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string source = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_source()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->source().data(), this->source().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.DataParameter.source");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_scale;
        break;
      }

      // optional float scale = 2 [default = 1];
      case 2: {
        if (tag == 21) {
         parse_scale:
          set_has_scale();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &scale_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_mean_file;
        break;
      }

      // optional string mean_file = 3;
      case 3: {
        if (tag == 26) {
         parse_mean_file:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_mean_file()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->mean_file().data(), this->mean_file().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.DataParameter.mean_file");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_batch_size;
        break;
      }

      // optional uint32 batch_size = 4;
      case 4: {
        if (tag == 32) {
         parse_batch_size:
          set_has_batch_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &batch_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_crop_size;
        break;
      }

      // optional uint32 crop_size = 5 [default = 0];
      case 5: {
        if (tag == 40) {
         parse_crop_size:
          set_has_crop_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &crop_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_mirror;
        break;
      }

      // optional bool mirror = 6 [default = false];
      case 6: {
        if (tag == 48) {
         parse_mirror:
          set_has_mirror();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &mirror_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(56)) goto parse_rand_skip;
        break;
      }

      // optional uint32 rand_skip = 7 [default = 0];
      case 7: {
        if (tag == 56) {
         parse_rand_skip:
          set_has_rand_skip();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &rand_skip_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(64)) goto parse_backend;
        break;
      }

      // optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB];
      case 8: {
        if (tag == 64) {
         parse_backend:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::DataParameter_DB_IsValid(value)) {
            set_backend(static_cast< ::caffe::DataParameter_DB >(value));
          } else {
            mutable_unknown_fields()->AddVarint(8, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(72)) goto parse_force_encoded_color;
        break;
      }

      // optional bool force_encoded_color = 9 [default = false];
      case 9: {
        if (tag == 72) {
         parse_force_encoded_color:
          set_has_force_encoded_color();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &force_encoded_color_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.DataParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.DataParameter)
  return false;
#undef DO_
}

void DataParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.DataParameter)
  // optional string source = 1;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.DataParameter.source");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->source(), output);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->scale(), output);
  }

  // optional string mean_file = 3;
  if (has_mean_file()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->mean_file().data(), this->mean_file().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.DataParameter.mean_file");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->mean_file(), output);
  }

  // optional uint32 batch_size = 4;
  if (has_batch_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->batch_size(), output);
  }

  // optional uint32 crop_size = 5 [default = 0];
  if (has_crop_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->crop_size(), output);
  }

  // optional bool mirror = 6 [default = false];
  if (has_mirror()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->mirror(), output);
  }

  // optional uint32 rand_skip = 7 [default = 0];
  if (has_rand_skip()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->rand_skip(), output);
  }

  // optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB];
  if (has_backend()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      8, this->backend(), output);
  }

  // optional bool force_encoded_color = 9 [default = false];
  if (has_force_encoded_color()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(9, this->force_encoded_color(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.DataParameter)
}

::google::protobuf::uint8* DataParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.DataParameter)
  // optional string source = 1;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.DataParameter.source");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->source(), target);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->scale(), target);
  }

  // optional string mean_file = 3;
  if (has_mean_file()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->mean_file().data(), this->mean_file().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.DataParameter.mean_file");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->mean_file(), target);
  }

  // optional uint32 batch_size = 4;
  if (has_batch_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->batch_size(), target);
  }

  // optional uint32 crop_size = 5 [default = 0];
  if (has_crop_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->crop_size(), target);
  }

  // optional bool mirror = 6 [default = false];
  if (has_mirror()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->mirror(), target);
  }

  // optional uint32 rand_skip = 7 [default = 0];
  if (has_rand_skip()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->rand_skip(), target);
  }

  // optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB];
  if (has_backend()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      8, this->backend(), target);
  }

  // optional bool force_encoded_color = 9 [default = false];
  if (has_force_encoded_color()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(9, this->force_encoded_color(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 255u) {
    // optional string source = 1;
    if (has_source()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->source());
    }

    // optional uint32 batch_size = 4;
    if (has_batch_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->batch_size());
    }

    // optional uint32 rand_skip = 7 [default = 0];
    if (has_rand_skip()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->rand_skip());
    }

    // optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB];
    if (has_backend()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->backend());
    }

    // optional float scale = 2 [default = 1];
    if (has_scale()) {
      total_size += 1 + 4;
    }

    // optional string mean_file = 3;
    if (has_mean_file()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->mean_file());
    }

    // optional uint32 crop_size = 5 [default = 0];
    if (has_crop_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->crop_size());
    }

    // optional bool mirror = 6 [default = false];
    if (has_mirror()) {
      total_size += 1 + 1;
    }

  }
  // optional bool force_encoded_color = 9 [default = false];
  if (has_force_encoded_color()) {
    total_size += 1 + 1;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DataParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.DataParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const DataParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DataParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.DataParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.DataParameter)
    UnsafeMergeFrom(*source);
  }
}

void DataParameter::MergeFrom(const DataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.DataParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void DataParameter::UnsafeMergeFrom(const DataParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_source()) {
      set_has_source();
      source_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_);
    }
    if (from.has_batch_size()) {
      set_batch_size(from.batch_size());
    }
    if (from.has_rand_skip()) {
      set_rand_skip(from.rand_skip());
    }
    if (from.has_backend()) {
      set_backend(from.backend());
    }
    if (from.has_scale()) {
      set_scale(from.scale());
    }
    if (from.has_mean_file()) {
      set_has_mean_file();
      mean_file_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mean_file_);
    }
    if (from.has_crop_size()) {
      set_crop_size(from.crop_size());
    }
    if (from.has_mirror()) {
      set_mirror(from.mirror());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_force_encoded_color()) {
      set_force_encoded_color(from.force_encoded_color());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void DataParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.DataParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool DataParameter::IsInitialized() const {

  return true;
}

void DataParameter::Swap(DataParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DataParameter::InternalSwap(DataParameter* other) {
  source_.Swap(&other->source_);
  std::swap(batch_size_, other->batch_size_);
  std::swap(rand_skip_, other->rand_skip_);
  std::swap(backend_, other->backend_);
  std::swap(scale_, other->scale_);
  mean_file_.Swap(&other->mean_file_);
  std::swap(crop_size_, other->crop_size_);
  std::swap(mirror_, other->mirror_);
  std::swap(force_encoded_color_, other->force_encoded_color_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DataParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DataParameter_descriptor_;
  metadata.reflection = DataParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DataParameter

// optional string source = 1;
bool DataParameter::has_source() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void DataParameter::set_has_source() {
  _has_bits_[0] |= 0x00000001u;
}
void DataParameter::clear_has_source() {
  _has_bits_[0] &= ~0x00000001u;
}
void DataParameter::clear_source() {
  source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_source();
}
const ::std::string& DataParameter::source() const {
  // @@protoc_insertion_point(field_get:caffe.DataParameter.source)
  return source_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void DataParameter::set_source(const ::std::string& value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.DataParameter.source)
}
void DataParameter::set_source(const char* value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.DataParameter.source)
}
void DataParameter::set_source(const char* value, size_t size) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.DataParameter.source)
}
::std::string* DataParameter::mutable_source() {
  set_has_source();
  // @@protoc_insertion_point(field_mutable:caffe.DataParameter.source)
  return source_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* DataParameter::release_source() {
  // @@protoc_insertion_point(field_release:caffe.DataParameter.source)
  clear_has_source();
  return source_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void DataParameter::set_allocated_source(::std::string* source) {
  if (source != NULL) {
    set_has_source();
  } else {
    clear_has_source();
  }
  source_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source);
  // @@protoc_insertion_point(field_set_allocated:caffe.DataParameter.source)
}

// optional uint32 batch_size = 4;
bool DataParameter::has_batch_size() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void DataParameter::set_has_batch_size() {
  _has_bits_[0] |= 0x00000002u;
}
void DataParameter::clear_has_batch_size() {
  _has_bits_[0] &= ~0x00000002u;
}
void DataParameter::clear_batch_size() {
  batch_size_ = 0u;
  clear_has_batch_size();
}
::google::protobuf::uint32 DataParameter::batch_size() const {
  // @@protoc_insertion_point(field_get:caffe.DataParameter.batch_size)
  return batch_size_;
}
void DataParameter::set_batch_size(::google::protobuf::uint32 value) {
  set_has_batch_size();
  batch_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.DataParameter.batch_size)
}

// optional uint32 rand_skip = 7 [default = 0];
bool DataParameter::has_rand_skip() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void DataParameter::set_has_rand_skip() {
  _has_bits_[0] |= 0x00000004u;
}
void DataParameter::clear_has_rand_skip() {
  _has_bits_[0] &= ~0x00000004u;
}
void DataParameter::clear_rand_skip() {
  rand_skip_ = 0u;
  clear_has_rand_skip();
}
::google::protobuf::uint32 DataParameter::rand_skip() const {
  // @@protoc_insertion_point(field_get:caffe.DataParameter.rand_skip)
  return rand_skip_;
}
void DataParameter::set_rand_skip(::google::protobuf::uint32 value) {
  set_has_rand_skip();
  rand_skip_ = value;
  // @@protoc_insertion_point(field_set:caffe.DataParameter.rand_skip)
}

// optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB];
bool DataParameter::has_backend() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void DataParameter::set_has_backend() {
  _has_bits_[0] |= 0x00000008u;
}
void DataParameter::clear_has_backend() {
  _has_bits_[0] &= ~0x00000008u;
}
void DataParameter::clear_backend() {
  backend_ = 0;
  clear_has_backend();
}
::caffe::DataParameter_DB DataParameter::backend() const {
  // @@protoc_insertion_point(field_get:caffe.DataParameter.backend)
  return static_cast< ::caffe::DataParameter_DB >(backend_);
}
void DataParameter::set_backend(::caffe::DataParameter_DB value) {
  assert(::caffe::DataParameter_DB_IsValid(value));
  set_has_backend();
  backend_ = value;
  // @@protoc_insertion_point(field_set:caffe.DataParameter.backend)
}

// optional float scale = 2 [default = 1];
bool DataParameter::has_scale() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void DataParameter::set_has_scale() {
  _has_bits_[0] |= 0x00000010u;
}
void DataParameter::clear_has_scale() {
  _has_bits_[0] &= ~0x00000010u;
}
void DataParameter::clear_scale() {
  scale_ = 1;
  clear_has_scale();
}
float DataParameter::scale() const {
  // @@protoc_insertion_point(field_get:caffe.DataParameter.scale)
  return scale_;
}
void DataParameter::set_scale(float value) {
  set_has_scale();
  scale_ = value;
  // @@protoc_insertion_point(field_set:caffe.DataParameter.scale)
}

// optional string mean_file = 3;
bool DataParameter::has_mean_file() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void DataParameter::set_has_mean_file() {
  _has_bits_[0] |= 0x00000020u;
}
void DataParameter::clear_has_mean_file() {
  _has_bits_[0] &= ~0x00000020u;
}
void DataParameter::clear_mean_file() {
  mean_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_mean_file();
}
const ::std::string& DataParameter::mean_file() const {
  // @@protoc_insertion_point(field_get:caffe.DataParameter.mean_file)
  return mean_file_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void DataParameter::set_mean_file(const ::std::string& value) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.DataParameter.mean_file)
}
void DataParameter::set_mean_file(const char* value) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.DataParameter.mean_file)
}
void DataParameter::set_mean_file(const char* value, size_t size) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.DataParameter.mean_file)
}
::std::string* DataParameter::mutable_mean_file() {
  set_has_mean_file();
  // @@protoc_insertion_point(field_mutable:caffe.DataParameter.mean_file)
  return mean_file_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* DataParameter::release_mean_file() {
  // @@protoc_insertion_point(field_release:caffe.DataParameter.mean_file)
  clear_has_mean_file();
  return mean_file_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void DataParameter::set_allocated_mean_file(::std::string* mean_file) {
  if (mean_file != NULL) {
    set_has_mean_file();
  } else {
    clear_has_mean_file();
  }
  mean_file_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), mean_file);
  // @@protoc_insertion_point(field_set_allocated:caffe.DataParameter.mean_file)
}

// optional uint32 crop_size = 5 [default = 0];
bool DataParameter::has_crop_size() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void DataParameter::set_has_crop_size() {
  _has_bits_[0] |= 0x00000040u;
}
void DataParameter::clear_has_crop_size() {
  _has_bits_[0] &= ~0x00000040u;
}
void DataParameter::clear_crop_size() {
  crop_size_ = 0u;
  clear_has_crop_size();
}
::google::protobuf::uint32 DataParameter::crop_size() const {
  // @@protoc_insertion_point(field_get:caffe.DataParameter.crop_size)
  return crop_size_;
}
void DataParameter::set_crop_size(::google::protobuf::uint32 value) {
  set_has_crop_size();
  crop_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.DataParameter.crop_size)
}

// optional bool mirror = 6 [default = false];
bool DataParameter::has_mirror() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
void DataParameter::set_has_mirror() {
  _has_bits_[0] |= 0x00000080u;
}
void DataParameter::clear_has_mirror() {
  _has_bits_[0] &= ~0x00000080u;
}
void DataParameter::clear_mirror() {
  mirror_ = false;
  clear_has_mirror();
}
bool DataParameter::mirror() const {
  // @@protoc_insertion_point(field_get:caffe.DataParameter.mirror)
  return mirror_;
}
void DataParameter::set_mirror(bool value) {
  set_has_mirror();
  mirror_ = value;
  // @@protoc_insertion_point(field_set:caffe.DataParameter.mirror)
}

// optional bool force_encoded_color = 9 [default = false];
bool DataParameter::has_force_encoded_color() const {
  return (_has_bits_[0] & 0x00000100u) != 0;
}
void DataParameter::set_has_force_encoded_color() {
  _has_bits_[0] |= 0x00000100u;
}
void DataParameter::clear_has_force_encoded_color() {
  _has_bits_[0] &= ~0x00000100u;
}
void DataParameter::clear_force_encoded_color() {
  force_encoded_color_ = false;
  clear_has_force_encoded_color();
}
bool DataParameter::force_encoded_color() const {
  // @@protoc_insertion_point(field_get:caffe.DataParameter.force_encoded_color)
  return force_encoded_color_;
}
void DataParameter::set_force_encoded_color(bool value) {
  set_has_force_encoded_color();
  force_encoded_color_ = value;
  // @@protoc_insertion_point(field_set:caffe.DataParameter.force_encoded_color)
}

inline const DataParameter* DataParameter::internal_default_instance() {
  return &DataParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DropoutParameter::kDropoutRatioFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DropoutParameter::DropoutParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.DropoutParameter)
}

void DropoutParameter::InitAsDefaultInstance() {
}

DropoutParameter::DropoutParameter(const DropoutParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.DropoutParameter)
}

void DropoutParameter::SharedCtor() {
  _cached_size_ = 0;
  dropout_ratio_ = 0.5f;
}

DropoutParameter::~DropoutParameter() {
  // @@protoc_insertion_point(destructor:caffe.DropoutParameter)
  SharedDtor();
}

void DropoutParameter::SharedDtor() {
}

void DropoutParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DropoutParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DropoutParameter_descriptor_;
}

const DropoutParameter& DropoutParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<DropoutParameter> DropoutParameter_default_instance_;

DropoutParameter* DropoutParameter::New(::google::protobuf::Arena* arena) const {
  DropoutParameter* n = new DropoutParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DropoutParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.DropoutParameter)
  dropout_ratio_ = 0.5f;
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool DropoutParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.DropoutParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float dropout_ratio = 1 [default = 0.5];
      case 1: {
        if (tag == 13) {
          set_has_dropout_ratio();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &dropout_ratio_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.DropoutParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.DropoutParameter)
  return false;
#undef DO_
}

void DropoutParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.DropoutParameter)
  // optional float dropout_ratio = 1 [default = 0.5];
  if (has_dropout_ratio()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->dropout_ratio(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.DropoutParameter)
}

::google::protobuf::uint8* DropoutParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.DropoutParameter)
  // optional float dropout_ratio = 1 [default = 0.5];
  if (has_dropout_ratio()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->dropout_ratio(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // optional float dropout_ratio = 1 [default = 0.5];
  if (has_dropout_ratio()) {
    total_size += 1 + 4;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DropoutParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.DropoutParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const DropoutParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DropoutParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.DropoutParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.DropoutParameter)
    UnsafeMergeFrom(*source);
  }
}

void DropoutParameter::MergeFrom(const DropoutParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.DropoutParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void DropoutParameter::UnsafeMergeFrom(const DropoutParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_dropout_ratio()) {
      set_dropout_ratio(from.dropout_ratio());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void DropoutParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.DropoutParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool DropoutParameter::IsInitialized() const {

  return true;
}

void DropoutParameter::Swap(DropoutParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DropoutParameter::InternalSwap(DropoutParameter* other) {
  std::swap(dropout_ratio_, other->dropout_ratio_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DropoutParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DropoutParameter_descriptor_;
  metadata.reflection = DropoutParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DropoutParameter

// optional float dropout_ratio = 1 [default = 0.5];
bool DropoutParameter::has_dropout_ratio() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void DropoutParameter::set_has_dropout_ratio() {
  _has_bits_[0] |= 0x00000001u;
}
void DropoutParameter::clear_has_dropout_ratio() {
  _has_bits_[0] &= ~0x00000001u;
}
void DropoutParameter::clear_dropout_ratio() {
  dropout_ratio_ = 0.5f;
  clear_has_dropout_ratio();
}
float DropoutParameter::dropout_ratio() const {
  // @@protoc_insertion_point(field_get:caffe.DropoutParameter.dropout_ratio)
  return dropout_ratio_;
}
void DropoutParameter::set_dropout_ratio(float value) {
  set_has_dropout_ratio();
  dropout_ratio_ = value;
  // @@protoc_insertion_point(field_set:caffe.DropoutParameter.dropout_ratio)
}

inline const DropoutParameter* DropoutParameter::internal_default_instance() {
  return &DropoutParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DummyDataParameter::kDataFillerFieldNumber;
const int DummyDataParameter::kShapeFieldNumber;
const int DummyDataParameter::kNumFieldNumber;
const int DummyDataParameter::kChannelsFieldNumber;
const int DummyDataParameter::kHeightFieldNumber;
const int DummyDataParameter::kWidthFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DummyDataParameter::DummyDataParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.DummyDataParameter)
}

void DummyDataParameter::InitAsDefaultInstance() {
}

DummyDataParameter::DummyDataParameter(const DummyDataParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.DummyDataParameter)
}

void DummyDataParameter::SharedCtor() {
  _cached_size_ = 0;
}

DummyDataParameter::~DummyDataParameter() {
  // @@protoc_insertion_point(destructor:caffe.DummyDataParameter)
  SharedDtor();
}

void DummyDataParameter::SharedDtor() {
}

void DummyDataParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* DummyDataParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return DummyDataParameter_descriptor_;
}

const DummyDataParameter& DummyDataParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<DummyDataParameter> DummyDataParameter_default_instance_;

DummyDataParameter* DummyDataParameter::New(::google::protobuf::Arena* arena) const {
  DummyDataParameter* n = new DummyDataParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DummyDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.DummyDataParameter)
  data_filler_.Clear();
  shape_.Clear();
  num_.Clear();
  channels_.Clear();
  height_.Clear();
  width_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool DummyDataParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.DummyDataParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .caffe.FillerParameter data_filler = 1;
      case 1: {
        if (tag == 10) {
          DO_(input->IncrementRecursionDepth());
         parse_loop_data_filler:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_data_filler()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(10)) goto parse_loop_data_filler;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectTag(16)) goto parse_num;
        break;
      }

      // repeated uint32 num = 2;
      case 2: {
        if (tag == 16) {
         parse_num:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 1, 16, input, this->mutable_num())));
        } else if (tag == 18) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_num())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_num;
        if (input->ExpectTag(24)) goto parse_channels;
        break;
      }

      // repeated uint32 channels = 3;
      case 3: {
        if (tag == 24) {
         parse_channels:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 1, 24, input, this->mutable_channels())));
        } else if (tag == 26) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_channels())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_channels;
        if (input->ExpectTag(32)) goto parse_height;
        break;
      }

      // repeated uint32 height = 4;
      case 4: {
        if (tag == 32) {
         parse_height:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 1, 32, input, this->mutable_height())));
        } else if (tag == 34) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_height())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_height;
        if (input->ExpectTag(40)) goto parse_width;
        break;
      }

      // repeated uint32 width = 5;
      case 5: {
        if (tag == 40) {
         parse_width:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 1, 40, input, this->mutable_width())));
        } else if (tag == 42) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_width())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_width;
        if (input->ExpectTag(50)) goto parse_shape;
        break;
      }

      // repeated .caffe.BlobShape shape = 6;
      case 6: {
        if (tag == 50) {
         parse_shape:
          DO_(input->IncrementRecursionDepth());
         parse_loop_shape:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_shape()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(50)) goto parse_loop_shape;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.DummyDataParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.DummyDataParameter)
  return false;
#undef DO_
}

void DummyDataParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.DummyDataParameter)
  // repeated .caffe.FillerParameter data_filler = 1;
  for (unsigned int i = 0, n = this->data_filler_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, this->data_filler(i), output);
  }

  // repeated uint32 num = 2;
  for (int i = 0; i < this->num_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      2, this->num(i), output);
  }

  // repeated uint32 channels = 3;
  for (int i = 0; i < this->channels_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      3, this->channels(i), output);
  }

  // repeated uint32 height = 4;
  for (int i = 0; i < this->height_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      4, this->height(i), output);
  }

  // repeated uint32 width = 5;
  for (int i = 0; i < this->width_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      5, this->width(i), output);
  }

  // repeated .caffe.BlobShape shape = 6;
  for (unsigned int i = 0, n = this->shape_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, this->shape(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.DummyDataParameter)
}

::google::protobuf::uint8* DummyDataParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.DummyDataParameter)
  // repeated .caffe.FillerParameter data_filler = 1;
  for (unsigned int i = 0, n = this->data_filler_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        1, this->data_filler(i), false, target);
  }

  // repeated uint32 num = 2;
  for (int i = 0; i < this->num_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32ToArray(2, this->num(i), target);
  }

  // repeated uint32 channels = 3;
  for (int i = 0; i < this->channels_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32ToArray(3, this->channels(i), target);
  }

  // repeated uint32 height = 4;
  for (int i = 0; i < this->height_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32ToArray(4, this->height(i), target);
  }

  // repeated uint32 width = 5;
  for (int i = 0; i < this->width_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32ToArray(5, this->width(i), target);
  }

  // repeated .caffe.BlobShape shape = 6;
  for (unsigned int i = 0, n = this->shape_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        6, this->shape(i), false, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // repeated .caffe.FillerParameter data_filler = 1;
  {
    unsigned int count = this->data_filler_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->data_filler(i));
    }
  }

  // repeated .caffe.BlobShape shape = 6;
  {
    unsigned int count = this->shape_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->shape(i));
    }
  }

  // repeated uint32 num = 2;
  {
    size_t data_size = 0;
    unsigned int count = this->num_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->num(i));
    }
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->num_size());
    total_size += data_size;
  }

  // repeated uint32 channels = 3;
  {
    size_t data_size = 0;
    unsigned int count = this->channels_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->channels(i));
    }
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->channels_size());
    total_size += data_size;
  }

  // repeated uint32 height = 4;
  {
    size_t data_size = 0;
    unsigned int count = this->height_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->height(i));
    }
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->height_size());
    total_size += data_size;
  }

  // repeated uint32 width = 5;
  {
    size_t data_size = 0;
    unsigned int count = this->width_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->width(i));
    }
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->width_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DummyDataParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.DummyDataParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const DummyDataParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const DummyDataParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.DummyDataParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.DummyDataParameter)
    UnsafeMergeFrom(*source);
  }
}

void DummyDataParameter::MergeFrom(const DummyDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.DummyDataParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void DummyDataParameter::UnsafeMergeFrom(const DummyDataParameter& from) {
  GOOGLE_DCHECK(&from != this);
  data_filler_.MergeFrom(from.data_filler_);
  shape_.MergeFrom(from.shape_);
  num_.UnsafeMergeFrom(from.num_);
  channels_.UnsafeMergeFrom(from.channels_);
  height_.UnsafeMergeFrom(from.height_);
  width_.UnsafeMergeFrom(from.width_);
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void DummyDataParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.DummyDataParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool DummyDataParameter::IsInitialized() const {

  return true;
}

void DummyDataParameter::Swap(DummyDataParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DummyDataParameter::InternalSwap(DummyDataParameter* other) {
  data_filler_.UnsafeArenaSwap(&other->data_filler_);
  shape_.UnsafeArenaSwap(&other->shape_);
  num_.UnsafeArenaSwap(&other->num_);
  channels_.UnsafeArenaSwap(&other->channels_);
  height_.UnsafeArenaSwap(&other->height_);
  width_.UnsafeArenaSwap(&other->width_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata DummyDataParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = DummyDataParameter_descriptor_;
  metadata.reflection = DummyDataParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DummyDataParameter

// repeated .caffe.FillerParameter data_filler = 1;
int DummyDataParameter::data_filler_size() const {
  return data_filler_.size();
}
void DummyDataParameter::clear_data_filler() {
  data_filler_.Clear();
}
const ::caffe::FillerParameter& DummyDataParameter::data_filler(int index) const {
  // @@protoc_insertion_point(field_get:caffe.DummyDataParameter.data_filler)
  return data_filler_.Get(index);
}
::caffe::FillerParameter* DummyDataParameter::mutable_data_filler(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.DummyDataParameter.data_filler)
  return data_filler_.Mutable(index);
}
::caffe::FillerParameter* DummyDataParameter::add_data_filler() {
  // @@protoc_insertion_point(field_add:caffe.DummyDataParameter.data_filler)
  return data_filler_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::FillerParameter >*
DummyDataParameter::mutable_data_filler() {
  // @@protoc_insertion_point(field_mutable_list:caffe.DummyDataParameter.data_filler)
  return &data_filler_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::FillerParameter >&
DummyDataParameter::data_filler() const {
  // @@protoc_insertion_point(field_list:caffe.DummyDataParameter.data_filler)
  return data_filler_;
}

// repeated .caffe.BlobShape shape = 6;
int DummyDataParameter::shape_size() const {
  return shape_.size();
}
void DummyDataParameter::clear_shape() {
  shape_.Clear();
}
const ::caffe::BlobShape& DummyDataParameter::shape(int index) const {
  // @@protoc_insertion_point(field_get:caffe.DummyDataParameter.shape)
  return shape_.Get(index);
}
::caffe::BlobShape* DummyDataParameter::mutable_shape(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.DummyDataParameter.shape)
  return shape_.Mutable(index);
}
::caffe::BlobShape* DummyDataParameter::add_shape() {
  // @@protoc_insertion_point(field_add:caffe.DummyDataParameter.shape)
  return shape_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::BlobShape >*
DummyDataParameter::mutable_shape() {
  // @@protoc_insertion_point(field_mutable_list:caffe.DummyDataParameter.shape)
  return &shape_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::BlobShape >&
DummyDataParameter::shape() const {
  // @@protoc_insertion_point(field_list:caffe.DummyDataParameter.shape)
  return shape_;
}

// repeated uint32 num = 2;
int DummyDataParameter::num_size() const {
  return num_.size();
}
void DummyDataParameter::clear_num() {
  num_.Clear();
}
::google::protobuf::uint32 DummyDataParameter::num(int index) const {
  // @@protoc_insertion_point(field_get:caffe.DummyDataParameter.num)
  return num_.Get(index);
}
void DummyDataParameter::set_num(int index, ::google::protobuf::uint32 value) {
  num_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.DummyDataParameter.num)
}
void DummyDataParameter::add_num(::google::protobuf::uint32 value) {
  num_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.DummyDataParameter.num)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
DummyDataParameter::num() const {
  // @@protoc_insertion_point(field_list:caffe.DummyDataParameter.num)
  return num_;
}
::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
DummyDataParameter::mutable_num() {
  // @@protoc_insertion_point(field_mutable_list:caffe.DummyDataParameter.num)
  return &num_;
}

// repeated uint32 channels = 3;
int DummyDataParameter::channels_size() const {
  return channels_.size();
}
void DummyDataParameter::clear_channels() {
  channels_.Clear();
}
::google::protobuf::uint32 DummyDataParameter::channels(int index) const {
  // @@protoc_insertion_point(field_get:caffe.DummyDataParameter.channels)
  return channels_.Get(index);
}
void DummyDataParameter::set_channels(int index, ::google::protobuf::uint32 value) {
  channels_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.DummyDataParameter.channels)
}
void DummyDataParameter::add_channels(::google::protobuf::uint32 value) {
  channels_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.DummyDataParameter.channels)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
DummyDataParameter::channels() const {
  // @@protoc_insertion_point(field_list:caffe.DummyDataParameter.channels)
  return channels_;
}
::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
DummyDataParameter::mutable_channels() {
  // @@protoc_insertion_point(field_mutable_list:caffe.DummyDataParameter.channels)
  return &channels_;
}

// repeated uint32 height = 4;
int DummyDataParameter::height_size() const {
  return height_.size();
}
void DummyDataParameter::clear_height() {
  height_.Clear();
}
::google::protobuf::uint32 DummyDataParameter::height(int index) const {
  // @@protoc_insertion_point(field_get:caffe.DummyDataParameter.height)
  return height_.Get(index);
}
void DummyDataParameter::set_height(int index, ::google::protobuf::uint32 value) {
  height_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.DummyDataParameter.height)
}
void DummyDataParameter::add_height(::google::protobuf::uint32 value) {
  height_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.DummyDataParameter.height)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
DummyDataParameter::height() const {
  // @@protoc_insertion_point(field_list:caffe.DummyDataParameter.height)
  return height_;
}
::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
DummyDataParameter::mutable_height() {
  // @@protoc_insertion_point(field_mutable_list:caffe.DummyDataParameter.height)
  return &height_;
}

// repeated uint32 width = 5;
int DummyDataParameter::width_size() const {
  return width_.size();
}
void DummyDataParameter::clear_width() {
  width_.Clear();
}
::google::protobuf::uint32 DummyDataParameter::width(int index) const {
  // @@protoc_insertion_point(field_get:caffe.DummyDataParameter.width)
  return width_.Get(index);
}
void DummyDataParameter::set_width(int index, ::google::protobuf::uint32 value) {
  width_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.DummyDataParameter.width)
}
void DummyDataParameter::add_width(::google::protobuf::uint32 value) {
  width_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.DummyDataParameter.width)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
DummyDataParameter::width() const {
  // @@protoc_insertion_point(field_list:caffe.DummyDataParameter.width)
  return width_;
}
::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
DummyDataParameter::mutable_width() {
  // @@protoc_insertion_point(field_mutable_list:caffe.DummyDataParameter.width)
  return &width_;
}

inline const DummyDataParameter* DummyDataParameter::internal_default_instance() {
  return &DummyDataParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* EltwiseParameter_EltwiseOp_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return EltwiseParameter_EltwiseOp_descriptor_;
}
bool EltwiseParameter_EltwiseOp_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const EltwiseParameter_EltwiseOp EltwiseParameter::PROD;
const EltwiseParameter_EltwiseOp EltwiseParameter::SUM;
const EltwiseParameter_EltwiseOp EltwiseParameter::MAX;
const EltwiseParameter_EltwiseOp EltwiseParameter::EltwiseOp_MIN;
const EltwiseParameter_EltwiseOp EltwiseParameter::EltwiseOp_MAX;
const int EltwiseParameter::EltwiseOp_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int EltwiseParameter::kOperationFieldNumber;
const int EltwiseParameter::kCoeffFieldNumber;
const int EltwiseParameter::kStableProdGradFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

EltwiseParameter::EltwiseParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.EltwiseParameter)
}

void EltwiseParameter::InitAsDefaultInstance() {
}

EltwiseParameter::EltwiseParameter(const EltwiseParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.EltwiseParameter)
}

void EltwiseParameter::SharedCtor() {
  _cached_size_ = 0;
  operation_ = 1;
  stable_prod_grad_ = true;
}

EltwiseParameter::~EltwiseParameter() {
  // @@protoc_insertion_point(destructor:caffe.EltwiseParameter)
  SharedDtor();
}

void EltwiseParameter::SharedDtor() {
}

void EltwiseParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* EltwiseParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return EltwiseParameter_descriptor_;
}

const EltwiseParameter& EltwiseParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<EltwiseParameter> EltwiseParameter_default_instance_;

EltwiseParameter* EltwiseParameter::New(::google::protobuf::Arena* arena) const {
  EltwiseParameter* n = new EltwiseParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void EltwiseParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.EltwiseParameter)
  if (_has_bits_[0 / 32] & 5u) {
    operation_ = 1;
    stable_prod_grad_ = true;
  }
  coeff_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool EltwiseParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.EltwiseParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::EltwiseParameter_EltwiseOp_IsValid(value)) {
            set_operation(static_cast< ::caffe::EltwiseParameter_EltwiseOp >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_coeff;
        break;
      }

      // repeated float coeff = 2;
      case 2: {
        if (tag == 21) {
         parse_coeff:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 21, input, this->mutable_coeff())));
        } else if (tag == 18) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_coeff())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_coeff;
        if (input->ExpectTag(24)) goto parse_stable_prod_grad;
        break;
      }

      // optional bool stable_prod_grad = 3 [default = true];
      case 3: {
        if (tag == 24) {
         parse_stable_prod_grad:
          set_has_stable_prod_grad();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &stable_prod_grad_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.EltwiseParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.EltwiseParameter)
  return false;
#undef DO_
}

void EltwiseParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.EltwiseParameter)
  // optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
  if (has_operation()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->operation(), output);
  }

  // repeated float coeff = 2;
  for (int i = 0; i < this->coeff_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      2, this->coeff(i), output);
  }

  // optional bool stable_prod_grad = 3 [default = true];
  if (has_stable_prod_grad()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->stable_prod_grad(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.EltwiseParameter)
}

::google::protobuf::uint8* EltwiseParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.EltwiseParameter)
  // optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
  if (has_operation()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->operation(), target);
  }

  // repeated float coeff = 2;
  for (int i = 0; i < this->coeff_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(2, this->coeff(i), target);
  }

  // optional bool stable_prod_grad = 3 [default = true];
  if (has_stable_prod_grad()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->stable_prod_grad(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 5u) {
    // optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
    if (has_operation()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->operation());
    }

    // optional bool stable_prod_grad = 3 [default = true];
    if (has_stable_prod_grad()) {
      total_size += 1 + 1;
    }

  }
  // repeated float coeff = 2;
  {
    size_t data_size = 0;
    unsigned int count = this->coeff_size();
    data_size = 4UL * count;
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->coeff_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void EltwiseParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.EltwiseParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const EltwiseParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const EltwiseParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.EltwiseParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.EltwiseParameter)
    UnsafeMergeFrom(*source);
  }
}

void EltwiseParameter::MergeFrom(const EltwiseParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.EltwiseParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void EltwiseParameter::UnsafeMergeFrom(const EltwiseParameter& from) {
  GOOGLE_DCHECK(&from != this);
  coeff_.UnsafeMergeFrom(from.coeff_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_operation()) {
      set_operation(from.operation());
    }
    if (from.has_stable_prod_grad()) {
      set_stable_prod_grad(from.stable_prod_grad());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void EltwiseParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.EltwiseParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool EltwiseParameter::IsInitialized() const {

  return true;
}

void EltwiseParameter::Swap(EltwiseParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void EltwiseParameter::InternalSwap(EltwiseParameter* other) {
  std::swap(operation_, other->operation_);
  coeff_.UnsafeArenaSwap(&other->coeff_);
  std::swap(stable_prod_grad_, other->stable_prod_grad_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata EltwiseParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = EltwiseParameter_descriptor_;
  metadata.reflection = EltwiseParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// EltwiseParameter

// optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
bool EltwiseParameter::has_operation() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void EltwiseParameter::set_has_operation() {
  _has_bits_[0] |= 0x00000001u;
}
void EltwiseParameter::clear_has_operation() {
  _has_bits_[0] &= ~0x00000001u;
}
void EltwiseParameter::clear_operation() {
  operation_ = 1;
  clear_has_operation();
}
::caffe::EltwiseParameter_EltwiseOp EltwiseParameter::operation() const {
  // @@protoc_insertion_point(field_get:caffe.EltwiseParameter.operation)
  return static_cast< ::caffe::EltwiseParameter_EltwiseOp >(operation_);
}
void EltwiseParameter::set_operation(::caffe::EltwiseParameter_EltwiseOp value) {
  assert(::caffe::EltwiseParameter_EltwiseOp_IsValid(value));
  set_has_operation();
  operation_ = value;
  // @@protoc_insertion_point(field_set:caffe.EltwiseParameter.operation)
}

// repeated float coeff = 2;
int EltwiseParameter::coeff_size() const {
  return coeff_.size();
}
void EltwiseParameter::clear_coeff() {
  coeff_.Clear();
}
float EltwiseParameter::coeff(int index) const {
  // @@protoc_insertion_point(field_get:caffe.EltwiseParameter.coeff)
  return coeff_.Get(index);
}
void EltwiseParameter::set_coeff(int index, float value) {
  coeff_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.EltwiseParameter.coeff)
}
void EltwiseParameter::add_coeff(float value) {
  coeff_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.EltwiseParameter.coeff)
}
const ::google::protobuf::RepeatedField< float >&
EltwiseParameter::coeff() const {
  // @@protoc_insertion_point(field_list:caffe.EltwiseParameter.coeff)
  return coeff_;
}
::google::protobuf::RepeatedField< float >*
EltwiseParameter::mutable_coeff() {
  // @@protoc_insertion_point(field_mutable_list:caffe.EltwiseParameter.coeff)
  return &coeff_;
}

// optional bool stable_prod_grad = 3 [default = true];
bool EltwiseParameter::has_stable_prod_grad() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void EltwiseParameter::set_has_stable_prod_grad() {
  _has_bits_[0] |= 0x00000004u;
}
void EltwiseParameter::clear_has_stable_prod_grad() {
  _has_bits_[0] &= ~0x00000004u;
}
void EltwiseParameter::clear_stable_prod_grad() {
  stable_prod_grad_ = true;
  clear_has_stable_prod_grad();
}
bool EltwiseParameter::stable_prod_grad() const {
  // @@protoc_insertion_point(field_get:caffe.EltwiseParameter.stable_prod_grad)
  return stable_prod_grad_;
}
void EltwiseParameter::set_stable_prod_grad(bool value) {
  set_has_stable_prod_grad();
  stable_prod_grad_ = value;
  // @@protoc_insertion_point(field_set:caffe.EltwiseParameter.stable_prod_grad)
}

inline const EltwiseParameter* EltwiseParameter::internal_default_instance() {
  return &EltwiseParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ExpParameter::kBaseFieldNumber;
const int ExpParameter::kScaleFieldNumber;
const int ExpParameter::kShiftFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ExpParameter::ExpParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ExpParameter)
}

void ExpParameter::InitAsDefaultInstance() {
}

ExpParameter::ExpParameter(const ExpParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ExpParameter)
}

void ExpParameter::SharedCtor() {
  _cached_size_ = 0;
  shift_ = 0;
  base_ = -1;
  scale_ = 1;
}

ExpParameter::~ExpParameter() {
  // @@protoc_insertion_point(destructor:caffe.ExpParameter)
  SharedDtor();
}

void ExpParameter::SharedDtor() {
}

void ExpParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ExpParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ExpParameter_descriptor_;
}

const ExpParameter& ExpParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ExpParameter> ExpParameter_default_instance_;

ExpParameter* ExpParameter::New(::google::protobuf::Arena* arena) const {
  ExpParameter* n = new ExpParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ExpParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ExpParameter)
  if (_has_bits_[0 / 32] & 7u) {
    base_ = -1;
    scale_ = 1;
    shift_ = 0;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ExpParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ExpParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float base = 1 [default = -1];
      case 1: {
        if (tag == 13) {
          set_has_base();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &base_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_scale;
        break;
      }

      // optional float scale = 2 [default = 1];
      case 2: {
        if (tag == 21) {
         parse_scale:
          set_has_scale();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &scale_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_shift;
        break;
      }

      // optional float shift = 3 [default = 0];
      case 3: {
        if (tag == 29) {
         parse_shift:
          set_has_shift();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &shift_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ExpParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ExpParameter)
  return false;
#undef DO_
}

void ExpParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ExpParameter)
  // optional float base = 1 [default = -1];
  if (has_base()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->base(), output);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->scale(), output);
  }

  // optional float shift = 3 [default = 0];
  if (has_shift()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->shift(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ExpParameter)
}

::google::protobuf::uint8* ExpParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ExpParameter)
  // optional float base = 1 [default = -1];
  if (has_base()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->base(), target);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->scale(), target);
  }

  // optional float shift = 3 [default = 0];
  if (has_shift()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->shift(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 7u) {
    // optional float base = 1 [default = -1];
    if (has_base()) {
      total_size += 1 + 4;
    }

    // optional float scale = 2 [default = 1];
    if (has_scale()) {
      total_size += 1 + 4;
    }

    // optional float shift = 3 [default = 0];
    if (has_shift()) {
      total_size += 1 + 4;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ExpParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ExpParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ExpParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ExpParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ExpParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ExpParameter)
    UnsafeMergeFrom(*source);
  }
}

void ExpParameter::MergeFrom(const ExpParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ExpParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ExpParameter::UnsafeMergeFrom(const ExpParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_base()) {
      set_base(from.base());
    }
    if (from.has_scale()) {
      set_scale(from.scale());
    }
    if (from.has_shift()) {
      set_shift(from.shift());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ExpParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ExpParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ExpParameter::IsInitialized() const {

  return true;
}

void ExpParameter::Swap(ExpParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ExpParameter::InternalSwap(ExpParameter* other) {
  std::swap(base_, other->base_);
  std::swap(scale_, other->scale_);
  std::swap(shift_, other->shift_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ExpParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ExpParameter_descriptor_;
  metadata.reflection = ExpParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ExpParameter

// optional float base = 1 [default = -1];
bool ExpParameter::has_base() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ExpParameter::set_has_base() {
  _has_bits_[0] |= 0x00000001u;
}
void ExpParameter::clear_has_base() {
  _has_bits_[0] &= ~0x00000001u;
}
void ExpParameter::clear_base() {
  base_ = -1;
  clear_has_base();
}
float ExpParameter::base() const {
  // @@protoc_insertion_point(field_get:caffe.ExpParameter.base)
  return base_;
}
void ExpParameter::set_base(float value) {
  set_has_base();
  base_ = value;
  // @@protoc_insertion_point(field_set:caffe.ExpParameter.base)
}

// optional float scale = 2 [default = 1];
bool ExpParameter::has_scale() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ExpParameter::set_has_scale() {
  _has_bits_[0] |= 0x00000002u;
}
void ExpParameter::clear_has_scale() {
  _has_bits_[0] &= ~0x00000002u;
}
void ExpParameter::clear_scale() {
  scale_ = 1;
  clear_has_scale();
}
float ExpParameter::scale() const {
  // @@protoc_insertion_point(field_get:caffe.ExpParameter.scale)
  return scale_;
}
void ExpParameter::set_scale(float value) {
  set_has_scale();
  scale_ = value;
  // @@protoc_insertion_point(field_set:caffe.ExpParameter.scale)
}

// optional float shift = 3 [default = 0];
bool ExpParameter::has_shift() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void ExpParameter::set_has_shift() {
  _has_bits_[0] |= 0x00000004u;
}
void ExpParameter::clear_has_shift() {
  _has_bits_[0] &= ~0x00000004u;
}
void ExpParameter::clear_shift() {
  shift_ = 0;
  clear_has_shift();
}
float ExpParameter::shift() const {
  // @@protoc_insertion_point(field_get:caffe.ExpParameter.shift)
  return shift_;
}
void ExpParameter::set_shift(float value) {
  set_has_shift();
  shift_ = value;
  // @@protoc_insertion_point(field_set:caffe.ExpParameter.shift)
}

inline const ExpParameter* ExpParameter::internal_default_instance() {
  return &ExpParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int FlattenParameter::kAxisFieldNumber;
const int FlattenParameter::kEndAxisFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

FlattenParameter::FlattenParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.FlattenParameter)
}

void FlattenParameter::InitAsDefaultInstance() {
}

FlattenParameter::FlattenParameter(const FlattenParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.FlattenParameter)
}

void FlattenParameter::SharedCtor() {
  _cached_size_ = 0;
  axis_ = 1;
  end_axis_ = -1;
}

FlattenParameter::~FlattenParameter() {
  // @@protoc_insertion_point(destructor:caffe.FlattenParameter)
  SharedDtor();
}

void FlattenParameter::SharedDtor() {
}

void FlattenParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* FlattenParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return FlattenParameter_descriptor_;
}

const FlattenParameter& FlattenParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<FlattenParameter> FlattenParameter_default_instance_;

FlattenParameter* FlattenParameter::New(::google::protobuf::Arena* arena) const {
  FlattenParameter* n = new FlattenParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void FlattenParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.FlattenParameter)
  if (_has_bits_[0 / 32] & 3u) {
    axis_ = 1;
    end_axis_ = -1;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool FlattenParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.FlattenParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int32 axis = 1 [default = 1];
      case 1: {
        if (tag == 8) {
          set_has_axis();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &axis_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_end_axis;
        break;
      }

      // optional int32 end_axis = 2 [default = -1];
      case 2: {
        if (tag == 16) {
         parse_end_axis:
          set_has_end_axis();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &end_axis_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.FlattenParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.FlattenParameter)
  return false;
#undef DO_
}

void FlattenParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.FlattenParameter)
  // optional int32 axis = 1 [default = 1];
  if (has_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->axis(), output);
  }

  // optional int32 end_axis = 2 [default = -1];
  if (has_end_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->end_axis(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.FlattenParameter)
}

::google::protobuf::uint8* FlattenParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.FlattenParameter)
  // optional int32 axis = 1 [default = 1];
  if (has_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->axis(), target);
  }

  // optional int32 end_axis = 2 [default = -1];
  if (has_end_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->end_axis(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 3u) {
    // optional int32 axis = 1 [default = 1];
    if (has_axis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->axis());
    }

    // optional int32 end_axis = 2 [default = -1];
    if (has_end_axis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->end_axis());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void FlattenParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.FlattenParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const FlattenParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const FlattenParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.FlattenParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.FlattenParameter)
    UnsafeMergeFrom(*source);
  }
}

void FlattenParameter::MergeFrom(const FlattenParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.FlattenParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void FlattenParameter::UnsafeMergeFrom(const FlattenParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_axis()) {
      set_axis(from.axis());
    }
    if (from.has_end_axis()) {
      set_end_axis(from.end_axis());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void FlattenParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.FlattenParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool FlattenParameter::IsInitialized() const {

  return true;
}

void FlattenParameter::Swap(FlattenParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void FlattenParameter::InternalSwap(FlattenParameter* other) {
  std::swap(axis_, other->axis_);
  std::swap(end_axis_, other->end_axis_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata FlattenParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = FlattenParameter_descriptor_;
  metadata.reflection = FlattenParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// FlattenParameter

// optional int32 axis = 1 [default = 1];
bool FlattenParameter::has_axis() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void FlattenParameter::set_has_axis() {
  _has_bits_[0] |= 0x00000001u;
}
void FlattenParameter::clear_has_axis() {
  _has_bits_[0] &= ~0x00000001u;
}
void FlattenParameter::clear_axis() {
  axis_ = 1;
  clear_has_axis();
}
::google::protobuf::int32 FlattenParameter::axis() const {
  // @@protoc_insertion_point(field_get:caffe.FlattenParameter.axis)
  return axis_;
}
void FlattenParameter::set_axis(::google::protobuf::int32 value) {
  set_has_axis();
  axis_ = value;
  // @@protoc_insertion_point(field_set:caffe.FlattenParameter.axis)
}

// optional int32 end_axis = 2 [default = -1];
bool FlattenParameter::has_end_axis() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void FlattenParameter::set_has_end_axis() {
  _has_bits_[0] |= 0x00000002u;
}
void FlattenParameter::clear_has_end_axis() {
  _has_bits_[0] &= ~0x00000002u;
}
void FlattenParameter::clear_end_axis() {
  end_axis_ = -1;
  clear_has_end_axis();
}
::google::protobuf::int32 FlattenParameter::end_axis() const {
  // @@protoc_insertion_point(field_get:caffe.FlattenParameter.end_axis)
  return end_axis_;
}
void FlattenParameter::set_end_axis(::google::protobuf::int32 value) {
  set_has_end_axis();
  end_axis_ = value;
  // @@protoc_insertion_point(field_set:caffe.FlattenParameter.end_axis)
}

inline const FlattenParameter* FlattenParameter::internal_default_instance() {
  return &FlattenParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int HDF5DataParameter::kSourceFieldNumber;
const int HDF5DataParameter::kBatchSizeFieldNumber;
const int HDF5DataParameter::kShuffleFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

HDF5DataParameter::HDF5DataParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.HDF5DataParameter)
}

void HDF5DataParameter::InitAsDefaultInstance() {
}

HDF5DataParameter::HDF5DataParameter(const HDF5DataParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.HDF5DataParameter)
}

void HDF5DataParameter::SharedCtor() {
  _cached_size_ = 0;
  source_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&batch_size_, 0, reinterpret_cast<char*>(&shuffle_) -
    reinterpret_cast<char*>(&batch_size_) + sizeof(shuffle_));
}

HDF5DataParameter::~HDF5DataParameter() {
  // @@protoc_insertion_point(destructor:caffe.HDF5DataParameter)
  SharedDtor();
}

void HDF5DataParameter::SharedDtor() {
  source_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void HDF5DataParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* HDF5DataParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return HDF5DataParameter_descriptor_;
}

const HDF5DataParameter& HDF5DataParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<HDF5DataParameter> HDF5DataParameter_default_instance_;

HDF5DataParameter* HDF5DataParameter::New(::google::protobuf::Arena* arena) const {
  HDF5DataParameter* n = new HDF5DataParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void HDF5DataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.HDF5DataParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(HDF5DataParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<HDF5DataParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 7u) {
    ZR_(batch_size_, shuffle_);
    if (has_source()) {
      source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
  }

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool HDF5DataParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.HDF5DataParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string source = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_source()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->source().data(), this->source().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.HDF5DataParameter.source");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_batch_size;
        break;
      }

      // optional uint32 batch_size = 2;
      case 2: {
        if (tag == 16) {
         parse_batch_size:
          set_has_batch_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &batch_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_shuffle;
        break;
      }

      // optional bool shuffle = 3 [default = false];
      case 3: {
        if (tag == 24) {
         parse_shuffle:
          set_has_shuffle();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &shuffle_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.HDF5DataParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.HDF5DataParameter)
  return false;
#undef DO_
}

void HDF5DataParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.HDF5DataParameter)
  // optional string source = 1;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.HDF5DataParameter.source");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->source(), output);
  }

  // optional uint32 batch_size = 2;
  if (has_batch_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->batch_size(), output);
  }

  // optional bool shuffle = 3 [default = false];
  if (has_shuffle()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->shuffle(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.HDF5DataParameter)
}

::google::protobuf::uint8* HDF5DataParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.HDF5DataParameter)
  // optional string source = 1;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.HDF5DataParameter.source");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->source(), target);
  }

  // optional uint32 batch_size = 2;
  if (has_batch_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->batch_size(), target);
  }

  // optional bool shuffle = 3 [default = false];
  if (has_shuffle()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(3, this->shuffle(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 7u) {
    // optional string source = 1;
    if (has_source()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->source());
    }

    // optional uint32 batch_size = 2;
    if (has_batch_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->batch_size());
    }

    // optional bool shuffle = 3 [default = false];
    if (has_shuffle()) {
      total_size += 1 + 1;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void HDF5DataParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.HDF5DataParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const HDF5DataParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const HDF5DataParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.HDF5DataParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.HDF5DataParameter)
    UnsafeMergeFrom(*source);
  }
}

void HDF5DataParameter::MergeFrom(const HDF5DataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.HDF5DataParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void HDF5DataParameter::UnsafeMergeFrom(const HDF5DataParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_source()) {
      set_has_source();
      source_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_);
    }
    if (from.has_batch_size()) {
      set_batch_size(from.batch_size());
    }
    if (from.has_shuffle()) {
      set_shuffle(from.shuffle());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void HDF5DataParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.HDF5DataParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool HDF5DataParameter::IsInitialized() const {

  return true;
}

void HDF5DataParameter::Swap(HDF5DataParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void HDF5DataParameter::InternalSwap(HDF5DataParameter* other) {
  source_.Swap(&other->source_);
  std::swap(batch_size_, other->batch_size_);
  std::swap(shuffle_, other->shuffle_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata HDF5DataParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = HDF5DataParameter_descriptor_;
  metadata.reflection = HDF5DataParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// HDF5DataParameter

// optional string source = 1;
bool HDF5DataParameter::has_source() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void HDF5DataParameter::set_has_source() {
  _has_bits_[0] |= 0x00000001u;
}
void HDF5DataParameter::clear_has_source() {
  _has_bits_[0] &= ~0x00000001u;
}
void HDF5DataParameter::clear_source() {
  source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_source();
}
const ::std::string& HDF5DataParameter::source() const {
  // @@protoc_insertion_point(field_get:caffe.HDF5DataParameter.source)
  return source_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void HDF5DataParameter::set_source(const ::std::string& value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.HDF5DataParameter.source)
}
void HDF5DataParameter::set_source(const char* value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.HDF5DataParameter.source)
}
void HDF5DataParameter::set_source(const char* value, size_t size) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.HDF5DataParameter.source)
}
::std::string* HDF5DataParameter::mutable_source() {
  set_has_source();
  // @@protoc_insertion_point(field_mutable:caffe.HDF5DataParameter.source)
  return source_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* HDF5DataParameter::release_source() {
  // @@protoc_insertion_point(field_release:caffe.HDF5DataParameter.source)
  clear_has_source();
  return source_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void HDF5DataParameter::set_allocated_source(::std::string* source) {
  if (source != NULL) {
    set_has_source();
  } else {
    clear_has_source();
  }
  source_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source);
  // @@protoc_insertion_point(field_set_allocated:caffe.HDF5DataParameter.source)
}

// optional uint32 batch_size = 2;
bool HDF5DataParameter::has_batch_size() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void HDF5DataParameter::set_has_batch_size() {
  _has_bits_[0] |= 0x00000002u;
}
void HDF5DataParameter::clear_has_batch_size() {
  _has_bits_[0] &= ~0x00000002u;
}
void HDF5DataParameter::clear_batch_size() {
  batch_size_ = 0u;
  clear_has_batch_size();
}
::google::protobuf::uint32 HDF5DataParameter::batch_size() const {
  // @@protoc_insertion_point(field_get:caffe.HDF5DataParameter.batch_size)
  return batch_size_;
}
void HDF5DataParameter::set_batch_size(::google::protobuf::uint32 value) {
  set_has_batch_size();
  batch_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.HDF5DataParameter.batch_size)
}

// optional bool shuffle = 3 [default = false];
bool HDF5DataParameter::has_shuffle() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void HDF5DataParameter::set_has_shuffle() {
  _has_bits_[0] |= 0x00000004u;
}
void HDF5DataParameter::clear_has_shuffle() {
  _has_bits_[0] &= ~0x00000004u;
}
void HDF5DataParameter::clear_shuffle() {
  shuffle_ = false;
  clear_has_shuffle();
}
bool HDF5DataParameter::shuffle() const {
  // @@protoc_insertion_point(field_get:caffe.HDF5DataParameter.shuffle)
  return shuffle_;
}
void HDF5DataParameter::set_shuffle(bool value) {
  set_has_shuffle();
  shuffle_ = value;
  // @@protoc_insertion_point(field_set:caffe.HDF5DataParameter.shuffle)
}

inline const HDF5DataParameter* HDF5DataParameter::internal_default_instance() {
  return &HDF5DataParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int HDF5OutputParameter::kFileNameFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

HDF5OutputParameter::HDF5OutputParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.HDF5OutputParameter)
}

void HDF5OutputParameter::InitAsDefaultInstance() {
}

HDF5OutputParameter::HDF5OutputParameter(const HDF5OutputParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.HDF5OutputParameter)
}

void HDF5OutputParameter::SharedCtor() {
  _cached_size_ = 0;
  file_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

HDF5OutputParameter::~HDF5OutputParameter() {
  // @@protoc_insertion_point(destructor:caffe.HDF5OutputParameter)
  SharedDtor();
}

void HDF5OutputParameter::SharedDtor() {
  file_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void HDF5OutputParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* HDF5OutputParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return HDF5OutputParameter_descriptor_;
}

const HDF5OutputParameter& HDF5OutputParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<HDF5OutputParameter> HDF5OutputParameter_default_instance_;

HDF5OutputParameter* HDF5OutputParameter::New(::google::protobuf::Arena* arena) const {
  HDF5OutputParameter* n = new HDF5OutputParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void HDF5OutputParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.HDF5OutputParameter)
  if (has_file_name()) {
    file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool HDF5OutputParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.HDF5OutputParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string file_name = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_file_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->file_name().data(), this->file_name().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.HDF5OutputParameter.file_name");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.HDF5OutputParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.HDF5OutputParameter)
  return false;
#undef DO_
}

void HDF5OutputParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.HDF5OutputParameter)
  // optional string file_name = 1;
  if (has_file_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->file_name().data(), this->file_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.HDF5OutputParameter.file_name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->file_name(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.HDF5OutputParameter)
}

::google::protobuf::uint8* HDF5OutputParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.HDF5OutputParameter)
  // optional string file_name = 1;
  if (has_file_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->file_name().data(), this->file_name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.HDF5OutputParameter.file_name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->file_name(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // optional string file_name = 1;
  if (has_file_name()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->file_name());
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void HDF5OutputParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.HDF5OutputParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const HDF5OutputParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const HDF5OutputParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.HDF5OutputParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.HDF5OutputParameter)
    UnsafeMergeFrom(*source);
  }
}

void HDF5OutputParameter::MergeFrom(const HDF5OutputParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.HDF5OutputParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void HDF5OutputParameter::UnsafeMergeFrom(const HDF5OutputParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_file_name()) {
      set_has_file_name();
      file_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.file_name_);
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void HDF5OutputParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.HDF5OutputParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool HDF5OutputParameter::IsInitialized() const {

  return true;
}

void HDF5OutputParameter::Swap(HDF5OutputParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void HDF5OutputParameter::InternalSwap(HDF5OutputParameter* other) {
  file_name_.Swap(&other->file_name_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata HDF5OutputParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = HDF5OutputParameter_descriptor_;
  metadata.reflection = HDF5OutputParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// HDF5OutputParameter

// optional string file_name = 1;
bool HDF5OutputParameter::has_file_name() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void HDF5OutputParameter::set_has_file_name() {
  _has_bits_[0] |= 0x00000001u;
}
void HDF5OutputParameter::clear_has_file_name() {
  _has_bits_[0] &= ~0x00000001u;
}
void HDF5OutputParameter::clear_file_name() {
  file_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_file_name();
}
const ::std::string& HDF5OutputParameter::file_name() const {
  // @@protoc_insertion_point(field_get:caffe.HDF5OutputParameter.file_name)
  return file_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void HDF5OutputParameter::set_file_name(const ::std::string& value) {
  set_has_file_name();
  file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.HDF5OutputParameter.file_name)
}
void HDF5OutputParameter::set_file_name(const char* value) {
  set_has_file_name();
  file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.HDF5OutputParameter.file_name)
}
void HDF5OutputParameter::set_file_name(const char* value, size_t size) {
  set_has_file_name();
  file_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.HDF5OutputParameter.file_name)
}
::std::string* HDF5OutputParameter::mutable_file_name() {
  set_has_file_name();
  // @@protoc_insertion_point(field_mutable:caffe.HDF5OutputParameter.file_name)
  return file_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* HDF5OutputParameter::release_file_name() {
  // @@protoc_insertion_point(field_release:caffe.HDF5OutputParameter.file_name)
  clear_has_file_name();
  return file_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void HDF5OutputParameter::set_allocated_file_name(::std::string* file_name) {
  if (file_name != NULL) {
    set_has_file_name();
  } else {
    clear_has_file_name();
  }
  file_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), file_name);
  // @@protoc_insertion_point(field_set_allocated:caffe.HDF5OutputParameter.file_name)
}

inline const HDF5OutputParameter* HDF5OutputParameter::internal_default_instance() {
  return &HDF5OutputParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* HingeLossParameter_Norm_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return HingeLossParameter_Norm_descriptor_;
}
bool HingeLossParameter_Norm_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const HingeLossParameter_Norm HingeLossParameter::L1;
const HingeLossParameter_Norm HingeLossParameter::L2;
const HingeLossParameter_Norm HingeLossParameter::Norm_MIN;
const HingeLossParameter_Norm HingeLossParameter::Norm_MAX;
const int HingeLossParameter::Norm_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int HingeLossParameter::kNormFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

HingeLossParameter::HingeLossParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.HingeLossParameter)
}

void HingeLossParameter::InitAsDefaultInstance() {
}

HingeLossParameter::HingeLossParameter(const HingeLossParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.HingeLossParameter)
}

void HingeLossParameter::SharedCtor() {
  _cached_size_ = 0;
  norm_ = 1;
}

HingeLossParameter::~HingeLossParameter() {
  // @@protoc_insertion_point(destructor:caffe.HingeLossParameter)
  SharedDtor();
}

void HingeLossParameter::SharedDtor() {
}

void HingeLossParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* HingeLossParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return HingeLossParameter_descriptor_;
}

const HingeLossParameter& HingeLossParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<HingeLossParameter> HingeLossParameter_default_instance_;

HingeLossParameter* HingeLossParameter::New(::google::protobuf::Arena* arena) const {
  HingeLossParameter* n = new HingeLossParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void HingeLossParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.HingeLossParameter)
  norm_ = 1;
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool HingeLossParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.HingeLossParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::HingeLossParameter_Norm_IsValid(value)) {
            set_norm(static_cast< ::caffe::HingeLossParameter_Norm >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.HingeLossParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.HingeLossParameter)
  return false;
#undef DO_
}

void HingeLossParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.HingeLossParameter)
  // optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
  if (has_norm()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->norm(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.HingeLossParameter)
}

::google::protobuf::uint8* HingeLossParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.HingeLossParameter)
  // optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
  if (has_norm()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->norm(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
  if (has_norm()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->norm());
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void HingeLossParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.HingeLossParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const HingeLossParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const HingeLossParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.HingeLossParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.HingeLossParameter)
    UnsafeMergeFrom(*source);
  }
}

void HingeLossParameter::MergeFrom(const HingeLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.HingeLossParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void HingeLossParameter::UnsafeMergeFrom(const HingeLossParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_norm()) {
      set_norm(from.norm());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void HingeLossParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.HingeLossParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool HingeLossParameter::IsInitialized() const {

  return true;
}

void HingeLossParameter::Swap(HingeLossParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void HingeLossParameter::InternalSwap(HingeLossParameter* other) {
  std::swap(norm_, other->norm_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata HingeLossParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = HingeLossParameter_descriptor_;
  metadata.reflection = HingeLossParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// HingeLossParameter

// optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
bool HingeLossParameter::has_norm() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void HingeLossParameter::set_has_norm() {
  _has_bits_[0] |= 0x00000001u;
}
void HingeLossParameter::clear_has_norm() {
  _has_bits_[0] &= ~0x00000001u;
}
void HingeLossParameter::clear_norm() {
  norm_ = 1;
  clear_has_norm();
}
::caffe::HingeLossParameter_Norm HingeLossParameter::norm() const {
  // @@protoc_insertion_point(field_get:caffe.HingeLossParameter.norm)
  return static_cast< ::caffe::HingeLossParameter_Norm >(norm_);
}
void HingeLossParameter::set_norm(::caffe::HingeLossParameter_Norm value) {
  assert(::caffe::HingeLossParameter_Norm_IsValid(value));
  set_has_norm();
  norm_ = value;
  // @@protoc_insertion_point(field_set:caffe.HingeLossParameter.norm)
}

inline const HingeLossParameter* HingeLossParameter::internal_default_instance() {
  return &HingeLossParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ImageDataParameter::kSourceFieldNumber;
const int ImageDataParameter::kBatchSizeFieldNumber;
const int ImageDataParameter::kRandSkipFieldNumber;
const int ImageDataParameter::kShuffleFieldNumber;
const int ImageDataParameter::kNewHeightFieldNumber;
const int ImageDataParameter::kNewWidthFieldNumber;
const int ImageDataParameter::kIsColorFieldNumber;
const int ImageDataParameter::kScaleFieldNumber;
const int ImageDataParameter::kMeanFileFieldNumber;
const int ImageDataParameter::kCropSizeFieldNumber;
const int ImageDataParameter::kMirrorFieldNumber;
const int ImageDataParameter::kRootFolderFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ImageDataParameter::ImageDataParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ImageDataParameter)
}

void ImageDataParameter::InitAsDefaultInstance() {
}

ImageDataParameter::ImageDataParameter(const ImageDataParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ImageDataParameter)
}

void ImageDataParameter::SharedCtor() {
  _cached_size_ = 0;
  source_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  mean_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  root_folder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&batch_size_, 0, reinterpret_cast<char*>(&crop_size_) -
    reinterpret_cast<char*>(&batch_size_) + sizeof(crop_size_));
  is_color_ = true;
  scale_ = 1;
}

ImageDataParameter::~ImageDataParameter() {
  // @@protoc_insertion_point(destructor:caffe.ImageDataParameter)
  SharedDtor();
}

void ImageDataParameter::SharedDtor() {
  source_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  mean_file_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  root_folder_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void ImageDataParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ImageDataParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ImageDataParameter_descriptor_;
}

const ImageDataParameter& ImageDataParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ImageDataParameter> ImageDataParameter_default_instance_;

ImageDataParameter* ImageDataParameter::New(::google::protobuf::Arena* arena) const {
  ImageDataParameter* n = new ImageDataParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ImageDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ImageDataParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(ImageDataParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<ImageDataParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 255u) {
    ZR_(batch_size_, shuffle_);
    if (has_source()) {
      source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    is_color_ = true;
    scale_ = 1;
  }
  if (_has_bits_[8 / 32] & 3840u) {
    ZR_(mirror_, crop_size_);
    if (has_mean_file()) {
      mean_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    if (has_root_folder()) {
      root_folder_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
  }

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ImageDataParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ImageDataParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string source = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_source()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->source().data(), this->source().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.ImageDataParameter.source");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_scale;
        break;
      }

      // optional float scale = 2 [default = 1];
      case 2: {
        if (tag == 21) {
         parse_scale:
          set_has_scale();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &scale_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_mean_file;
        break;
      }

      // optional string mean_file = 3;
      case 3: {
        if (tag == 26) {
         parse_mean_file:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_mean_file()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->mean_file().data(), this->mean_file().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.ImageDataParameter.mean_file");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_batch_size;
        break;
      }

      // optional uint32 batch_size = 4;
      case 4: {
        if (tag == 32) {
         parse_batch_size:
          set_has_batch_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &batch_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_crop_size;
        break;
      }

      // optional uint32 crop_size = 5 [default = 0];
      case 5: {
        if (tag == 40) {
         parse_crop_size:
          set_has_crop_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &crop_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_mirror;
        break;
      }

      // optional bool mirror = 6 [default = false];
      case 6: {
        if (tag == 48) {
         parse_mirror:
          set_has_mirror();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &mirror_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(56)) goto parse_rand_skip;
        break;
      }

      // optional uint32 rand_skip = 7 [default = 0];
      case 7: {
        if (tag == 56) {
         parse_rand_skip:
          set_has_rand_skip();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &rand_skip_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(64)) goto parse_shuffle;
        break;
      }

      // optional bool shuffle = 8 [default = false];
      case 8: {
        if (tag == 64) {
         parse_shuffle:
          set_has_shuffle();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &shuffle_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(72)) goto parse_new_height;
        break;
      }

      // optional uint32 new_height = 9 [default = 0];
      case 9: {
        if (tag == 72) {
         parse_new_height:
          set_has_new_height();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &new_height_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(80)) goto parse_new_width;
        break;
      }

      // optional uint32 new_width = 10 [default = 0];
      case 10: {
        if (tag == 80) {
         parse_new_width:
          set_has_new_width();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &new_width_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(88)) goto parse_is_color;
        break;
      }

      // optional bool is_color = 11 [default = true];
      case 11: {
        if (tag == 88) {
         parse_is_color:
          set_has_is_color();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &is_color_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(98)) goto parse_root_folder;
        break;
      }

      // optional string root_folder = 12 [default = ""];
      case 12: {
        if (tag == 98) {
         parse_root_folder:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_root_folder()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->root_folder().data(), this->root_folder().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.ImageDataParameter.root_folder");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ImageDataParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ImageDataParameter)
  return false;
#undef DO_
}

void ImageDataParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ImageDataParameter)
  // optional string source = 1;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.ImageDataParameter.source");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->source(), output);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->scale(), output);
  }

  // optional string mean_file = 3;
  if (has_mean_file()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->mean_file().data(), this->mean_file().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.ImageDataParameter.mean_file");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->mean_file(), output);
  }

  // optional uint32 batch_size = 4;
  if (has_batch_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->batch_size(), output);
  }

  // optional uint32 crop_size = 5 [default = 0];
  if (has_crop_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->crop_size(), output);
  }

  // optional bool mirror = 6 [default = false];
  if (has_mirror()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->mirror(), output);
  }

  // optional uint32 rand_skip = 7 [default = 0];
  if (has_rand_skip()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->rand_skip(), output);
  }

  // optional bool shuffle = 8 [default = false];
  if (has_shuffle()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(8, this->shuffle(), output);
  }

  // optional uint32 new_height = 9 [default = 0];
  if (has_new_height()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(9, this->new_height(), output);
  }

  // optional uint32 new_width = 10 [default = 0];
  if (has_new_width()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(10, this->new_width(), output);
  }

  // optional bool is_color = 11 [default = true];
  if (has_is_color()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(11, this->is_color(), output);
  }

  // optional string root_folder = 12 [default = ""];
  if (has_root_folder()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->root_folder().data(), this->root_folder().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.ImageDataParameter.root_folder");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      12, this->root_folder(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ImageDataParameter)
}

::google::protobuf::uint8* ImageDataParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ImageDataParameter)
  // optional string source = 1;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.ImageDataParameter.source");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->source(), target);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->scale(), target);
  }

  // optional string mean_file = 3;
  if (has_mean_file()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->mean_file().data(), this->mean_file().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.ImageDataParameter.mean_file");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->mean_file(), target);
  }

  // optional uint32 batch_size = 4;
  if (has_batch_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->batch_size(), target);
  }

  // optional uint32 crop_size = 5 [default = 0];
  if (has_crop_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->crop_size(), target);
  }

  // optional bool mirror = 6 [default = false];
  if (has_mirror()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->mirror(), target);
  }

  // optional uint32 rand_skip = 7 [default = 0];
  if (has_rand_skip()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->rand_skip(), target);
  }

  // optional bool shuffle = 8 [default = false];
  if (has_shuffle()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(8, this->shuffle(), target);
  }

  // optional uint32 new_height = 9 [default = 0];
  if (has_new_height()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(9, this->new_height(), target);
  }

  // optional uint32 new_width = 10 [default = 0];
  if (has_new_width()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(10, this->new_width(), target);
  }

  // optional bool is_color = 11 [default = true];
  if (has_is_color()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(11, this->is_color(), target);
  }

  // optional string root_folder = 12 [default = ""];
  if (has_root_folder()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->root_folder().data(), this->root_folder().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.ImageDataParameter.root_folder");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        12, this->root_folder(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 255u) {
    // optional string source = 1;
    if (has_source()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->source());
    }

    // optional uint32 batch_size = 4;
    if (has_batch_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->batch_size());
    }

    // optional uint32 rand_skip = 7 [default = 0];
    if (has_rand_skip()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->rand_skip());
    }

    // optional bool shuffle = 8 [default = false];
    if (has_shuffle()) {
      total_size += 1 + 1;
    }

    // optional uint32 new_height = 9 [default = 0];
    if (has_new_height()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->new_height());
    }

    // optional uint32 new_width = 10 [default = 0];
    if (has_new_width()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->new_width());
    }

    // optional bool is_color = 11 [default = true];
    if (has_is_color()) {
      total_size += 1 + 1;
    }

    // optional float scale = 2 [default = 1];
    if (has_scale()) {
      total_size += 1 + 4;
    }

  }
  if (_has_bits_[8 / 32] & 3840u) {
    // optional string mean_file = 3;
    if (has_mean_file()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->mean_file());
    }

    // optional uint32 crop_size = 5 [default = 0];
    if (has_crop_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->crop_size());
    }

    // optional bool mirror = 6 [default = false];
    if (has_mirror()) {
      total_size += 1 + 1;
    }

    // optional string root_folder = 12 [default = ""];
    if (has_root_folder()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->root_folder());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ImageDataParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ImageDataParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ImageDataParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ImageDataParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ImageDataParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ImageDataParameter)
    UnsafeMergeFrom(*source);
  }
}

void ImageDataParameter::MergeFrom(const ImageDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ImageDataParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ImageDataParameter::UnsafeMergeFrom(const ImageDataParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_source()) {
      set_has_source();
      source_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_);
    }
    if (from.has_batch_size()) {
      set_batch_size(from.batch_size());
    }
    if (from.has_rand_skip()) {
      set_rand_skip(from.rand_skip());
    }
    if (from.has_shuffle()) {
      set_shuffle(from.shuffle());
    }
    if (from.has_new_height()) {
      set_new_height(from.new_height());
    }
    if (from.has_new_width()) {
      set_new_width(from.new_width());
    }
    if (from.has_is_color()) {
      set_is_color(from.is_color());
    }
    if (from.has_scale()) {
      set_scale(from.scale());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_mean_file()) {
      set_has_mean_file();
      mean_file_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mean_file_);
    }
    if (from.has_crop_size()) {
      set_crop_size(from.crop_size());
    }
    if (from.has_mirror()) {
      set_mirror(from.mirror());
    }
    if (from.has_root_folder()) {
      set_has_root_folder();
      root_folder_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.root_folder_);
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ImageDataParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ImageDataParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ImageDataParameter::IsInitialized() const {

  return true;
}

void ImageDataParameter::Swap(ImageDataParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ImageDataParameter::InternalSwap(ImageDataParameter* other) {
  source_.Swap(&other->source_);
  std::swap(batch_size_, other->batch_size_);
  std::swap(rand_skip_, other->rand_skip_);
  std::swap(shuffle_, other->shuffle_);
  std::swap(new_height_, other->new_height_);
  std::swap(new_width_, other->new_width_);
  std::swap(is_color_, other->is_color_);
  std::swap(scale_, other->scale_);
  mean_file_.Swap(&other->mean_file_);
  std::swap(crop_size_, other->crop_size_);
  std::swap(mirror_, other->mirror_);
  root_folder_.Swap(&other->root_folder_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ImageDataParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ImageDataParameter_descriptor_;
  metadata.reflection = ImageDataParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ImageDataParameter

// optional string source = 1;
bool ImageDataParameter::has_source() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ImageDataParameter::set_has_source() {
  _has_bits_[0] |= 0x00000001u;
}
void ImageDataParameter::clear_has_source() {
  _has_bits_[0] &= ~0x00000001u;
}
void ImageDataParameter::clear_source() {
  source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_source();
}
const ::std::string& ImageDataParameter::source() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.source)
  return source_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ImageDataParameter::set_source(const ::std::string& value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.source)
}
void ImageDataParameter::set_source(const char* value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.ImageDataParameter.source)
}
void ImageDataParameter::set_source(const char* value, size_t size) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.ImageDataParameter.source)
}
::std::string* ImageDataParameter::mutable_source() {
  set_has_source();
  // @@protoc_insertion_point(field_mutable:caffe.ImageDataParameter.source)
  return source_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* ImageDataParameter::release_source() {
  // @@protoc_insertion_point(field_release:caffe.ImageDataParameter.source)
  clear_has_source();
  return source_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ImageDataParameter::set_allocated_source(::std::string* source) {
  if (source != NULL) {
    set_has_source();
  } else {
    clear_has_source();
  }
  source_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source);
  // @@protoc_insertion_point(field_set_allocated:caffe.ImageDataParameter.source)
}

// optional uint32 batch_size = 4;
bool ImageDataParameter::has_batch_size() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ImageDataParameter::set_has_batch_size() {
  _has_bits_[0] |= 0x00000002u;
}
void ImageDataParameter::clear_has_batch_size() {
  _has_bits_[0] &= ~0x00000002u;
}
void ImageDataParameter::clear_batch_size() {
  batch_size_ = 0u;
  clear_has_batch_size();
}
::google::protobuf::uint32 ImageDataParameter::batch_size() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.batch_size)
  return batch_size_;
}
void ImageDataParameter::set_batch_size(::google::protobuf::uint32 value) {
  set_has_batch_size();
  batch_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.batch_size)
}

// optional uint32 rand_skip = 7 [default = 0];
bool ImageDataParameter::has_rand_skip() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void ImageDataParameter::set_has_rand_skip() {
  _has_bits_[0] |= 0x00000004u;
}
void ImageDataParameter::clear_has_rand_skip() {
  _has_bits_[0] &= ~0x00000004u;
}
void ImageDataParameter::clear_rand_skip() {
  rand_skip_ = 0u;
  clear_has_rand_skip();
}
::google::protobuf::uint32 ImageDataParameter::rand_skip() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.rand_skip)
  return rand_skip_;
}
void ImageDataParameter::set_rand_skip(::google::protobuf::uint32 value) {
  set_has_rand_skip();
  rand_skip_ = value;
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.rand_skip)
}

// optional bool shuffle = 8 [default = false];
bool ImageDataParameter::has_shuffle() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void ImageDataParameter::set_has_shuffle() {
  _has_bits_[0] |= 0x00000008u;
}
void ImageDataParameter::clear_has_shuffle() {
  _has_bits_[0] &= ~0x00000008u;
}
void ImageDataParameter::clear_shuffle() {
  shuffle_ = false;
  clear_has_shuffle();
}
bool ImageDataParameter::shuffle() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.shuffle)
  return shuffle_;
}
void ImageDataParameter::set_shuffle(bool value) {
  set_has_shuffle();
  shuffle_ = value;
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.shuffle)
}

// optional uint32 new_height = 9 [default = 0];
bool ImageDataParameter::has_new_height() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void ImageDataParameter::set_has_new_height() {
  _has_bits_[0] |= 0x00000010u;
}
void ImageDataParameter::clear_has_new_height() {
  _has_bits_[0] &= ~0x00000010u;
}
void ImageDataParameter::clear_new_height() {
  new_height_ = 0u;
  clear_has_new_height();
}
::google::protobuf::uint32 ImageDataParameter::new_height() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.new_height)
  return new_height_;
}
void ImageDataParameter::set_new_height(::google::protobuf::uint32 value) {
  set_has_new_height();
  new_height_ = value;
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.new_height)
}

// optional uint32 new_width = 10 [default = 0];
bool ImageDataParameter::has_new_width() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void ImageDataParameter::set_has_new_width() {
  _has_bits_[0] |= 0x00000020u;
}
void ImageDataParameter::clear_has_new_width() {
  _has_bits_[0] &= ~0x00000020u;
}
void ImageDataParameter::clear_new_width() {
  new_width_ = 0u;
  clear_has_new_width();
}
::google::protobuf::uint32 ImageDataParameter::new_width() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.new_width)
  return new_width_;
}
void ImageDataParameter::set_new_width(::google::protobuf::uint32 value) {
  set_has_new_width();
  new_width_ = value;
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.new_width)
}

// optional bool is_color = 11 [default = true];
bool ImageDataParameter::has_is_color() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void ImageDataParameter::set_has_is_color() {
  _has_bits_[0] |= 0x00000040u;
}
void ImageDataParameter::clear_has_is_color() {
  _has_bits_[0] &= ~0x00000040u;
}
void ImageDataParameter::clear_is_color() {
  is_color_ = true;
  clear_has_is_color();
}
bool ImageDataParameter::is_color() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.is_color)
  return is_color_;
}
void ImageDataParameter::set_is_color(bool value) {
  set_has_is_color();
  is_color_ = value;
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.is_color)
}

// optional float scale = 2 [default = 1];
bool ImageDataParameter::has_scale() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
void ImageDataParameter::set_has_scale() {
  _has_bits_[0] |= 0x00000080u;
}
void ImageDataParameter::clear_has_scale() {
  _has_bits_[0] &= ~0x00000080u;
}
void ImageDataParameter::clear_scale() {
  scale_ = 1;
  clear_has_scale();
}
float ImageDataParameter::scale() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.scale)
  return scale_;
}
void ImageDataParameter::set_scale(float value) {
  set_has_scale();
  scale_ = value;
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.scale)
}

// optional string mean_file = 3;
bool ImageDataParameter::has_mean_file() const {
  return (_has_bits_[0] & 0x00000100u) != 0;
}
void ImageDataParameter::set_has_mean_file() {
  _has_bits_[0] |= 0x00000100u;
}
void ImageDataParameter::clear_has_mean_file() {
  _has_bits_[0] &= ~0x00000100u;
}
void ImageDataParameter::clear_mean_file() {
  mean_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_mean_file();
}
const ::std::string& ImageDataParameter::mean_file() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.mean_file)
  return mean_file_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ImageDataParameter::set_mean_file(const ::std::string& value) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.mean_file)
}
void ImageDataParameter::set_mean_file(const char* value) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.ImageDataParameter.mean_file)
}
void ImageDataParameter::set_mean_file(const char* value, size_t size) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.ImageDataParameter.mean_file)
}
::std::string* ImageDataParameter::mutable_mean_file() {
  set_has_mean_file();
  // @@protoc_insertion_point(field_mutable:caffe.ImageDataParameter.mean_file)
  return mean_file_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* ImageDataParameter::release_mean_file() {
  // @@protoc_insertion_point(field_release:caffe.ImageDataParameter.mean_file)
  clear_has_mean_file();
  return mean_file_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ImageDataParameter::set_allocated_mean_file(::std::string* mean_file) {
  if (mean_file != NULL) {
    set_has_mean_file();
  } else {
    clear_has_mean_file();
  }
  mean_file_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), mean_file);
  // @@protoc_insertion_point(field_set_allocated:caffe.ImageDataParameter.mean_file)
}

// optional uint32 crop_size = 5 [default = 0];
bool ImageDataParameter::has_crop_size() const {
  return (_has_bits_[0] & 0x00000200u) != 0;
}
void ImageDataParameter::set_has_crop_size() {
  _has_bits_[0] |= 0x00000200u;
}
void ImageDataParameter::clear_has_crop_size() {
  _has_bits_[0] &= ~0x00000200u;
}
void ImageDataParameter::clear_crop_size() {
  crop_size_ = 0u;
  clear_has_crop_size();
}
::google::protobuf::uint32 ImageDataParameter::crop_size() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.crop_size)
  return crop_size_;
}
void ImageDataParameter::set_crop_size(::google::protobuf::uint32 value) {
  set_has_crop_size();
  crop_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.crop_size)
}

// optional bool mirror = 6 [default = false];
bool ImageDataParameter::has_mirror() const {
  return (_has_bits_[0] & 0x00000400u) != 0;
}
void ImageDataParameter::set_has_mirror() {
  _has_bits_[0] |= 0x00000400u;
}
void ImageDataParameter::clear_has_mirror() {
  _has_bits_[0] &= ~0x00000400u;
}
void ImageDataParameter::clear_mirror() {
  mirror_ = false;
  clear_has_mirror();
}
bool ImageDataParameter::mirror() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.mirror)
  return mirror_;
}
void ImageDataParameter::set_mirror(bool value) {
  set_has_mirror();
  mirror_ = value;
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.mirror)
}

// optional string root_folder = 12 [default = ""];
bool ImageDataParameter::has_root_folder() const {
  return (_has_bits_[0] & 0x00000800u) != 0;
}
void ImageDataParameter::set_has_root_folder() {
  _has_bits_[0] |= 0x00000800u;
}
void ImageDataParameter::clear_has_root_folder() {
  _has_bits_[0] &= ~0x00000800u;
}
void ImageDataParameter::clear_root_folder() {
  root_folder_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_root_folder();
}
const ::std::string& ImageDataParameter::root_folder() const {
  // @@protoc_insertion_point(field_get:caffe.ImageDataParameter.root_folder)
  return root_folder_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ImageDataParameter::set_root_folder(const ::std::string& value) {
  set_has_root_folder();
  root_folder_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.ImageDataParameter.root_folder)
}
void ImageDataParameter::set_root_folder(const char* value) {
  set_has_root_folder();
  root_folder_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.ImageDataParameter.root_folder)
}
void ImageDataParameter::set_root_folder(const char* value, size_t size) {
  set_has_root_folder();
  root_folder_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.ImageDataParameter.root_folder)
}
::std::string* ImageDataParameter::mutable_root_folder() {
  set_has_root_folder();
  // @@protoc_insertion_point(field_mutable:caffe.ImageDataParameter.root_folder)
  return root_folder_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* ImageDataParameter::release_root_folder() {
  // @@protoc_insertion_point(field_release:caffe.ImageDataParameter.root_folder)
  clear_has_root_folder();
  return root_folder_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void ImageDataParameter::set_allocated_root_folder(::std::string* root_folder) {
  if (root_folder != NULL) {
    set_has_root_folder();
  } else {
    clear_has_root_folder();
  }
  root_folder_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), root_folder);
  // @@protoc_insertion_point(field_set_allocated:caffe.ImageDataParameter.root_folder)
}

inline const ImageDataParameter* ImageDataParameter::internal_default_instance() {
  return &ImageDataParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int InfogainLossParameter::kSourceFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

InfogainLossParameter::InfogainLossParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.InfogainLossParameter)
}

void InfogainLossParameter::InitAsDefaultInstance() {
}

InfogainLossParameter::InfogainLossParameter(const InfogainLossParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.InfogainLossParameter)
}

void InfogainLossParameter::SharedCtor() {
  _cached_size_ = 0;
  source_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

InfogainLossParameter::~InfogainLossParameter() {
  // @@protoc_insertion_point(destructor:caffe.InfogainLossParameter)
  SharedDtor();
}

void InfogainLossParameter::SharedDtor() {
  source_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void InfogainLossParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* InfogainLossParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return InfogainLossParameter_descriptor_;
}

const InfogainLossParameter& InfogainLossParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<InfogainLossParameter> InfogainLossParameter_default_instance_;

InfogainLossParameter* InfogainLossParameter::New(::google::protobuf::Arena* arena) const {
  InfogainLossParameter* n = new InfogainLossParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void InfogainLossParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.InfogainLossParameter)
  if (has_source()) {
    source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool InfogainLossParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.InfogainLossParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string source = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_source()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->source().data(), this->source().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.InfogainLossParameter.source");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.InfogainLossParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.InfogainLossParameter)
  return false;
#undef DO_
}

void InfogainLossParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.InfogainLossParameter)
  // optional string source = 1;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.InfogainLossParameter.source");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->source(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.InfogainLossParameter)
}

::google::protobuf::uint8* InfogainLossParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.InfogainLossParameter)
  // optional string source = 1;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.InfogainLossParameter.source");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->source(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // optional string source = 1;
  if (has_source()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->source());
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void InfogainLossParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.InfogainLossParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const InfogainLossParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const InfogainLossParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.InfogainLossParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.InfogainLossParameter)
    UnsafeMergeFrom(*source);
  }
}

void InfogainLossParameter::MergeFrom(const InfogainLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.InfogainLossParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void InfogainLossParameter::UnsafeMergeFrom(const InfogainLossParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_source()) {
      set_has_source();
      source_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_);
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void InfogainLossParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.InfogainLossParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool InfogainLossParameter::IsInitialized() const {

  return true;
}

void InfogainLossParameter::Swap(InfogainLossParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void InfogainLossParameter::InternalSwap(InfogainLossParameter* other) {
  source_.Swap(&other->source_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata InfogainLossParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = InfogainLossParameter_descriptor_;
  metadata.reflection = InfogainLossParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// InfogainLossParameter

// optional string source = 1;
bool InfogainLossParameter::has_source() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void InfogainLossParameter::set_has_source() {
  _has_bits_[0] |= 0x00000001u;
}
void InfogainLossParameter::clear_has_source() {
  _has_bits_[0] &= ~0x00000001u;
}
void InfogainLossParameter::clear_source() {
  source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_source();
}
const ::std::string& InfogainLossParameter::source() const {
  // @@protoc_insertion_point(field_get:caffe.InfogainLossParameter.source)
  return source_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InfogainLossParameter::set_source(const ::std::string& value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.InfogainLossParameter.source)
}
void InfogainLossParameter::set_source(const char* value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.InfogainLossParameter.source)
}
void InfogainLossParameter::set_source(const char* value, size_t size) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.InfogainLossParameter.source)
}
::std::string* InfogainLossParameter::mutable_source() {
  set_has_source();
  // @@protoc_insertion_point(field_mutable:caffe.InfogainLossParameter.source)
  return source_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InfogainLossParameter::release_source() {
  // @@protoc_insertion_point(field_release:caffe.InfogainLossParameter.source)
  clear_has_source();
  return source_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InfogainLossParameter::set_allocated_source(::std::string* source) {
  if (source != NULL) {
    set_has_source();
  } else {
    clear_has_source();
  }
  source_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source);
  // @@protoc_insertion_point(field_set_allocated:caffe.InfogainLossParameter.source)
}

inline const InfogainLossParameter* InfogainLossParameter::internal_default_instance() {
  return &InfogainLossParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int InnerProductParameter::kNumOutputFieldNumber;
const int InnerProductParameter::kBiasTermFieldNumber;
const int InnerProductParameter::kWeightFillerFieldNumber;
const int InnerProductParameter::kBiasFillerFieldNumber;
const int InnerProductParameter::kAxisFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

InnerProductParameter::InnerProductParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.InnerProductParameter)
}

void InnerProductParameter::InitAsDefaultInstance() {
  weight_filler_ = const_cast< ::caffe::FillerParameter*>(
      ::caffe::FillerParameter::internal_default_instance());
  bias_filler_ = const_cast< ::caffe::FillerParameter*>(
      ::caffe::FillerParameter::internal_default_instance());
}

InnerProductParameter::InnerProductParameter(const InnerProductParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.InnerProductParameter)
}

void InnerProductParameter::SharedCtor() {
  _cached_size_ = 0;
  weight_filler_ = NULL;
  bias_filler_ = NULL;
  num_output_ = 0u;
  bias_term_ = true;
  axis_ = 1;
}

InnerProductParameter::~InnerProductParameter() {
  // @@protoc_insertion_point(destructor:caffe.InnerProductParameter)
  SharedDtor();
}

void InnerProductParameter::SharedDtor() {
  if (this != &InnerProductParameter_default_instance_.get()) {
    delete weight_filler_;
    delete bias_filler_;
  }
}

void InnerProductParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* InnerProductParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return InnerProductParameter_descriptor_;
}

const InnerProductParameter& InnerProductParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<InnerProductParameter> InnerProductParameter_default_instance_;

InnerProductParameter* InnerProductParameter::New(::google::protobuf::Arena* arena) const {
  InnerProductParameter* n = new InnerProductParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void InnerProductParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.InnerProductParameter)
  if (_has_bits_[0 / 32] & 31u) {
    num_output_ = 0u;
    bias_term_ = true;
    if (has_weight_filler()) {
      if (weight_filler_ != NULL) weight_filler_->::caffe::FillerParameter::Clear();
    }
    if (has_bias_filler()) {
      if (bias_filler_ != NULL) bias_filler_->::caffe::FillerParameter::Clear();
    }
    axis_ = 1;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool InnerProductParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.InnerProductParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint32 num_output = 1;
      case 1: {
        if (tag == 8) {
          set_has_num_output();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &num_output_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_bias_term;
        break;
      }

      // optional bool bias_term = 2 [default = true];
      case 2: {
        if (tag == 16) {
         parse_bias_term:
          set_has_bias_term();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &bias_term_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_weight_filler;
        break;
      }

      // optional .caffe.FillerParameter weight_filler = 3;
      case 3: {
        if (tag == 26) {
         parse_weight_filler:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_weight_filler()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(34)) goto parse_bias_filler;
        break;
      }

      // optional .caffe.FillerParameter bias_filler = 4;
      case 4: {
        if (tag == 34) {
         parse_bias_filler:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_bias_filler()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_axis;
        break;
      }

      // optional int32 axis = 5 [default = 1];
      case 5: {
        if (tag == 40) {
         parse_axis:
          set_has_axis();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &axis_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.InnerProductParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.InnerProductParameter)
  return false;
#undef DO_
}

void InnerProductParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.InnerProductParameter)
  // optional uint32 num_output = 1;
  if (has_num_output()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->num_output(), output);
  }

  // optional bool bias_term = 2 [default = true];
  if (has_bias_term()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->bias_term(), output);
  }

  // optional .caffe.FillerParameter weight_filler = 3;
  if (has_weight_filler()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, *this->weight_filler_, output);
  }

  // optional .caffe.FillerParameter bias_filler = 4;
  if (has_bias_filler()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, *this->bias_filler_, output);
  }

  // optional int32 axis = 5 [default = 1];
  if (has_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->axis(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.InnerProductParameter)
}

::google::protobuf::uint8* InnerProductParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.InnerProductParameter)
  // optional uint32 num_output = 1;
  if (has_num_output()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->num_output(), target);
  }

  // optional bool bias_term = 2 [default = true];
  if (has_bias_term()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->bias_term(), target);
  }

  // optional .caffe.FillerParameter weight_filler = 3;
  if (has_weight_filler()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        3, *this->weight_filler_, false, target);
  }

  // optional .caffe.FillerParameter bias_filler = 4;
  if (has_bias_filler()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        4, *this->bias_filler_, false, target);
  }

  // optional int32 axis = 5 [default = 1];
  if (has_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->axis(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 31u) {
    // optional uint32 num_output = 1;
    if (has_num_output()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->num_output());
    }

    // optional bool bias_term = 2 [default = true];
    if (has_bias_term()) {
      total_size += 1 + 1;
    }

    // optional .caffe.FillerParameter weight_filler = 3;
    if (has_weight_filler()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->weight_filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 4;
    if (has_bias_filler()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->bias_filler_);
    }

    // optional int32 axis = 5 [default = 1];
    if (has_axis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->axis());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void InnerProductParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.InnerProductParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const InnerProductParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const InnerProductParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.InnerProductParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.InnerProductParameter)
    UnsafeMergeFrom(*source);
  }
}

void InnerProductParameter::MergeFrom(const InnerProductParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.InnerProductParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void InnerProductParameter::UnsafeMergeFrom(const InnerProductParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_num_output()) {
      set_num_output(from.num_output());
    }
    if (from.has_bias_term()) {
      set_bias_term(from.bias_term());
    }
    if (from.has_weight_filler()) {
      mutable_weight_filler()->::caffe::FillerParameter::MergeFrom(from.weight_filler());
    }
    if (from.has_bias_filler()) {
      mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from.bias_filler());
    }
    if (from.has_axis()) {
      set_axis(from.axis());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void InnerProductParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.InnerProductParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool InnerProductParameter::IsInitialized() const {

  return true;
}

void InnerProductParameter::Swap(InnerProductParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void InnerProductParameter::InternalSwap(InnerProductParameter* other) {
  std::swap(num_output_, other->num_output_);
  std::swap(bias_term_, other->bias_term_);
  std::swap(weight_filler_, other->weight_filler_);
  std::swap(bias_filler_, other->bias_filler_);
  std::swap(axis_, other->axis_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata InnerProductParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = InnerProductParameter_descriptor_;
  metadata.reflection = InnerProductParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// InnerProductParameter

// optional uint32 num_output = 1;
bool InnerProductParameter::has_num_output() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void InnerProductParameter::set_has_num_output() {
  _has_bits_[0] |= 0x00000001u;
}
void InnerProductParameter::clear_has_num_output() {
  _has_bits_[0] &= ~0x00000001u;
}
void InnerProductParameter::clear_num_output() {
  num_output_ = 0u;
  clear_has_num_output();
}
::google::protobuf::uint32 InnerProductParameter::num_output() const {
  // @@protoc_insertion_point(field_get:caffe.InnerProductParameter.num_output)
  return num_output_;
}
void InnerProductParameter::set_num_output(::google::protobuf::uint32 value) {
  set_has_num_output();
  num_output_ = value;
  // @@protoc_insertion_point(field_set:caffe.InnerProductParameter.num_output)
}

// optional bool bias_term = 2 [default = true];
bool InnerProductParameter::has_bias_term() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void InnerProductParameter::set_has_bias_term() {
  _has_bits_[0] |= 0x00000002u;
}
void InnerProductParameter::clear_has_bias_term() {
  _has_bits_[0] &= ~0x00000002u;
}
void InnerProductParameter::clear_bias_term() {
  bias_term_ = true;
  clear_has_bias_term();
}
bool InnerProductParameter::bias_term() const {
  // @@protoc_insertion_point(field_get:caffe.InnerProductParameter.bias_term)
  return bias_term_;
}
void InnerProductParameter::set_bias_term(bool value) {
  set_has_bias_term();
  bias_term_ = value;
  // @@protoc_insertion_point(field_set:caffe.InnerProductParameter.bias_term)
}

// optional .caffe.FillerParameter weight_filler = 3;
bool InnerProductParameter::has_weight_filler() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void InnerProductParameter::set_has_weight_filler() {
  _has_bits_[0] |= 0x00000004u;
}
void InnerProductParameter::clear_has_weight_filler() {
  _has_bits_[0] &= ~0x00000004u;
}
void InnerProductParameter::clear_weight_filler() {
  if (weight_filler_ != NULL) weight_filler_->::caffe::FillerParameter::Clear();
  clear_has_weight_filler();
}
const ::caffe::FillerParameter& InnerProductParameter::weight_filler() const {
  // @@protoc_insertion_point(field_get:caffe.InnerProductParameter.weight_filler)
  return weight_filler_ != NULL ? *weight_filler_
                         : *::caffe::FillerParameter::internal_default_instance();
}
::caffe::FillerParameter* InnerProductParameter::mutable_weight_filler() {
  set_has_weight_filler();
  if (weight_filler_ == NULL) {
    weight_filler_ = new ::caffe::FillerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.InnerProductParameter.weight_filler)
  return weight_filler_;
}
::caffe::FillerParameter* InnerProductParameter::release_weight_filler() {
  // @@protoc_insertion_point(field_release:caffe.InnerProductParameter.weight_filler)
  clear_has_weight_filler();
  ::caffe::FillerParameter* temp = weight_filler_;
  weight_filler_ = NULL;
  return temp;
}
void InnerProductParameter::set_allocated_weight_filler(::caffe::FillerParameter* weight_filler) {
  delete weight_filler_;
  weight_filler_ = weight_filler;
  if (weight_filler) {
    set_has_weight_filler();
  } else {
    clear_has_weight_filler();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.InnerProductParameter.weight_filler)
}

// optional .caffe.FillerParameter bias_filler = 4;
bool InnerProductParameter::has_bias_filler() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void InnerProductParameter::set_has_bias_filler() {
  _has_bits_[0] |= 0x00000008u;
}
void InnerProductParameter::clear_has_bias_filler() {
  _has_bits_[0] &= ~0x00000008u;
}
void InnerProductParameter::clear_bias_filler() {
  if (bias_filler_ != NULL) bias_filler_->::caffe::FillerParameter::Clear();
  clear_has_bias_filler();
}
const ::caffe::FillerParameter& InnerProductParameter::bias_filler() const {
  // @@protoc_insertion_point(field_get:caffe.InnerProductParameter.bias_filler)
  return bias_filler_ != NULL ? *bias_filler_
                         : *::caffe::FillerParameter::internal_default_instance();
}
::caffe::FillerParameter* InnerProductParameter::mutable_bias_filler() {
  set_has_bias_filler();
  if (bias_filler_ == NULL) {
    bias_filler_ = new ::caffe::FillerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.InnerProductParameter.bias_filler)
  return bias_filler_;
}
::caffe::FillerParameter* InnerProductParameter::release_bias_filler() {
  // @@protoc_insertion_point(field_release:caffe.InnerProductParameter.bias_filler)
  clear_has_bias_filler();
  ::caffe::FillerParameter* temp = bias_filler_;
  bias_filler_ = NULL;
  return temp;
}
void InnerProductParameter::set_allocated_bias_filler(::caffe::FillerParameter* bias_filler) {
  delete bias_filler_;
  bias_filler_ = bias_filler;
  if (bias_filler) {
    set_has_bias_filler();
  } else {
    clear_has_bias_filler();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.InnerProductParameter.bias_filler)
}

// optional int32 axis = 5 [default = 1];
bool InnerProductParameter::has_axis() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void InnerProductParameter::set_has_axis() {
  _has_bits_[0] |= 0x00000010u;
}
void InnerProductParameter::clear_has_axis() {
  _has_bits_[0] &= ~0x00000010u;
}
void InnerProductParameter::clear_axis() {
  axis_ = 1;
  clear_has_axis();
}
::google::protobuf::int32 InnerProductParameter::axis() const {
  // @@protoc_insertion_point(field_get:caffe.InnerProductParameter.axis)
  return axis_;
}
void InnerProductParameter::set_axis(::google::protobuf::int32 value) {
  set_has_axis();
  axis_ = value;
  // @@protoc_insertion_point(field_set:caffe.InnerProductParameter.axis)
}

inline const InnerProductParameter* InnerProductParameter::internal_default_instance() {
  return &InnerProductParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int LogParameter::kBaseFieldNumber;
const int LogParameter::kScaleFieldNumber;
const int LogParameter::kShiftFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

LogParameter::LogParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.LogParameter)
}

void LogParameter::InitAsDefaultInstance() {
}

LogParameter::LogParameter(const LogParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.LogParameter)
}

void LogParameter::SharedCtor() {
  _cached_size_ = 0;
  shift_ = 0;
  base_ = -1;
  scale_ = 1;
}

LogParameter::~LogParameter() {
  // @@protoc_insertion_point(destructor:caffe.LogParameter)
  SharedDtor();
}

void LogParameter::SharedDtor() {
}

void LogParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* LogParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return LogParameter_descriptor_;
}

const LogParameter& LogParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<LogParameter> LogParameter_default_instance_;

LogParameter* LogParameter::New(::google::protobuf::Arena* arena) const {
  LogParameter* n = new LogParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void LogParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.LogParameter)
  if (_has_bits_[0 / 32] & 7u) {
    base_ = -1;
    scale_ = 1;
    shift_ = 0;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool LogParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.LogParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float base = 1 [default = -1];
      case 1: {
        if (tag == 13) {
          set_has_base();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &base_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_scale;
        break;
      }

      // optional float scale = 2 [default = 1];
      case 2: {
        if (tag == 21) {
         parse_scale:
          set_has_scale();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &scale_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_shift;
        break;
      }

      // optional float shift = 3 [default = 0];
      case 3: {
        if (tag == 29) {
         parse_shift:
          set_has_shift();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &shift_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.LogParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.LogParameter)
  return false;
#undef DO_
}

void LogParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.LogParameter)
  // optional float base = 1 [default = -1];
  if (has_base()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->base(), output);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->scale(), output);
  }

  // optional float shift = 3 [default = 0];
  if (has_shift()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->shift(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.LogParameter)
}

::google::protobuf::uint8* LogParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.LogParameter)
  // optional float base = 1 [default = -1];
  if (has_base()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->base(), target);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->scale(), target);
  }

  // optional float shift = 3 [default = 0];
  if (has_shift()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->shift(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 7u) {
    // optional float base = 1 [default = -1];
    if (has_base()) {
      total_size += 1 + 4;
    }

    // optional float scale = 2 [default = 1];
    if (has_scale()) {
      total_size += 1 + 4;
    }

    // optional float shift = 3 [default = 0];
    if (has_shift()) {
      total_size += 1 + 4;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void LogParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.LogParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const LogParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const LogParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.LogParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.LogParameter)
    UnsafeMergeFrom(*source);
  }
}

void LogParameter::MergeFrom(const LogParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LogParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void LogParameter::UnsafeMergeFrom(const LogParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_base()) {
      set_base(from.base());
    }
    if (from.has_scale()) {
      set_scale(from.scale());
    }
    if (from.has_shift()) {
      set_shift(from.shift());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void LogParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.LogParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool LogParameter::IsInitialized() const {

  return true;
}

void LogParameter::Swap(LogParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void LogParameter::InternalSwap(LogParameter* other) {
  std::swap(base_, other->base_);
  std::swap(scale_, other->scale_);
  std::swap(shift_, other->shift_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata LogParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = LogParameter_descriptor_;
  metadata.reflection = LogParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// LogParameter

// optional float base = 1 [default = -1];
bool LogParameter::has_base() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void LogParameter::set_has_base() {
  _has_bits_[0] |= 0x00000001u;
}
void LogParameter::clear_has_base() {
  _has_bits_[0] &= ~0x00000001u;
}
void LogParameter::clear_base() {
  base_ = -1;
  clear_has_base();
}
float LogParameter::base() const {
  // @@protoc_insertion_point(field_get:caffe.LogParameter.base)
  return base_;
}
void LogParameter::set_base(float value) {
  set_has_base();
  base_ = value;
  // @@protoc_insertion_point(field_set:caffe.LogParameter.base)
}

// optional float scale = 2 [default = 1];
bool LogParameter::has_scale() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void LogParameter::set_has_scale() {
  _has_bits_[0] |= 0x00000002u;
}
void LogParameter::clear_has_scale() {
  _has_bits_[0] &= ~0x00000002u;
}
void LogParameter::clear_scale() {
  scale_ = 1;
  clear_has_scale();
}
float LogParameter::scale() const {
  // @@protoc_insertion_point(field_get:caffe.LogParameter.scale)
  return scale_;
}
void LogParameter::set_scale(float value) {
  set_has_scale();
  scale_ = value;
  // @@protoc_insertion_point(field_set:caffe.LogParameter.scale)
}

// optional float shift = 3 [default = 0];
bool LogParameter::has_shift() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void LogParameter::set_has_shift() {
  _has_bits_[0] |= 0x00000004u;
}
void LogParameter::clear_has_shift() {
  _has_bits_[0] &= ~0x00000004u;
}
void LogParameter::clear_shift() {
  shift_ = 0;
  clear_has_shift();
}
float LogParameter::shift() const {
  // @@protoc_insertion_point(field_get:caffe.LogParameter.shift)
  return shift_;
}
void LogParameter::set_shift(float value) {
  set_has_shift();
  shift_ = value;
  // @@protoc_insertion_point(field_set:caffe.LogParameter.shift)
}

inline const LogParameter* LogParameter::internal_default_instance() {
  return &LogParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* LRNParameter_NormRegion_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return LRNParameter_NormRegion_descriptor_;
}
bool LRNParameter_NormRegion_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const LRNParameter_NormRegion LRNParameter::ACROSS_CHANNELS;
const LRNParameter_NormRegion LRNParameter::WITHIN_CHANNEL;
const LRNParameter_NormRegion LRNParameter::NormRegion_MIN;
const LRNParameter_NormRegion LRNParameter::NormRegion_MAX;
const int LRNParameter::NormRegion_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int LRNParameter::kLocalSizeFieldNumber;
const int LRNParameter::kAlphaFieldNumber;
const int LRNParameter::kBetaFieldNumber;
const int LRNParameter::kNormRegionFieldNumber;
const int LRNParameter::kKFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

LRNParameter::LRNParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.LRNParameter)
}

void LRNParameter::InitAsDefaultInstance() {
}

LRNParameter::LRNParameter(const LRNParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.LRNParameter)
}

void LRNParameter::SharedCtor() {
  _cached_size_ = 0;
  norm_region_ = 0;
  local_size_ = 5u;
  alpha_ = 1;
  beta_ = 0.75f;
  k_ = 1;
}

LRNParameter::~LRNParameter() {
  // @@protoc_insertion_point(destructor:caffe.LRNParameter)
  SharedDtor();
}

void LRNParameter::SharedDtor() {
}

void LRNParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* LRNParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return LRNParameter_descriptor_;
}

const LRNParameter& LRNParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<LRNParameter> LRNParameter_default_instance_;

LRNParameter* LRNParameter::New(::google::protobuf::Arena* arena) const {
  LRNParameter* n = new LRNParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void LRNParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.LRNParameter)
  if (_has_bits_[0 / 32] & 31u) {
    local_size_ = 5u;
    alpha_ = 1;
    beta_ = 0.75f;
    norm_region_ = 0;
    k_ = 1;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool LRNParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.LRNParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint32 local_size = 1 [default = 5];
      case 1: {
        if (tag == 8) {
          set_has_local_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &local_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_alpha;
        break;
      }

      // optional float alpha = 2 [default = 1];
      case 2: {
        if (tag == 21) {
         parse_alpha:
          set_has_alpha();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &alpha_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_beta;
        break;
      }

      // optional float beta = 3 [default = 0.75];
      case 3: {
        if (tag == 29) {
         parse_beta:
          set_has_beta();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &beta_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_norm_region;
        break;
      }

      // optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
      case 4: {
        if (tag == 32) {
         parse_norm_region:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::LRNParameter_NormRegion_IsValid(value)) {
            set_norm_region(static_cast< ::caffe::LRNParameter_NormRegion >(value));
          } else {
            mutable_unknown_fields()->AddVarint(4, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(45)) goto parse_k;
        break;
      }

      // optional float k = 5 [default = 1];
      case 5: {
        if (tag == 45) {
         parse_k:
          set_has_k();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &k_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.LRNParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.LRNParameter)
  return false;
#undef DO_
}

void LRNParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.LRNParameter)
  // optional uint32 local_size = 1 [default = 5];
  if (has_local_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->local_size(), output);
  }

  // optional float alpha = 2 [default = 1];
  if (has_alpha()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->alpha(), output);
  }

  // optional float beta = 3 [default = 0.75];
  if (has_beta()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->beta(), output);
  }

  // optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
  if (has_norm_region()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      4, this->norm_region(), output);
  }

  // optional float k = 5 [default = 1];
  if (has_k()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->k(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.LRNParameter)
}

::google::protobuf::uint8* LRNParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.LRNParameter)
  // optional uint32 local_size = 1 [default = 5];
  if (has_local_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->local_size(), target);
  }

  // optional float alpha = 2 [default = 1];
  if (has_alpha()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->alpha(), target);
  }

  // optional float beta = 3 [default = 0.75];
  if (has_beta()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->beta(), target);
  }

  // optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
  if (has_norm_region()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      4, this->norm_region(), target);
  }

  // optional float k = 5 [default = 1];
  if (has_k()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(5, this->k(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 31u) {
    // optional uint32 local_size = 1 [default = 5];
    if (has_local_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->local_size());
    }

    // optional float alpha = 2 [default = 1];
    if (has_alpha()) {
      total_size += 1 + 4;
    }

    // optional float beta = 3 [default = 0.75];
    if (has_beta()) {
      total_size += 1 + 4;
    }

    // optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
    if (has_norm_region()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->norm_region());
    }

    // optional float k = 5 [default = 1];
    if (has_k()) {
      total_size += 1 + 4;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void LRNParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.LRNParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const LRNParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const LRNParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.LRNParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.LRNParameter)
    UnsafeMergeFrom(*source);
  }
}

void LRNParameter::MergeFrom(const LRNParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.LRNParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void LRNParameter::UnsafeMergeFrom(const LRNParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_local_size()) {
      set_local_size(from.local_size());
    }
    if (from.has_alpha()) {
      set_alpha(from.alpha());
    }
    if (from.has_beta()) {
      set_beta(from.beta());
    }
    if (from.has_norm_region()) {
      set_norm_region(from.norm_region());
    }
    if (from.has_k()) {
      set_k(from.k());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void LRNParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.LRNParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool LRNParameter::IsInitialized() const {

  return true;
}

void LRNParameter::Swap(LRNParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void LRNParameter::InternalSwap(LRNParameter* other) {
  std::swap(local_size_, other->local_size_);
  std::swap(alpha_, other->alpha_);
  std::swap(beta_, other->beta_);
  std::swap(norm_region_, other->norm_region_);
  std::swap(k_, other->k_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata LRNParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = LRNParameter_descriptor_;
  metadata.reflection = LRNParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// LRNParameter

// optional uint32 local_size = 1 [default = 5];
bool LRNParameter::has_local_size() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void LRNParameter::set_has_local_size() {
  _has_bits_[0] |= 0x00000001u;
}
void LRNParameter::clear_has_local_size() {
  _has_bits_[0] &= ~0x00000001u;
}
void LRNParameter::clear_local_size() {
  local_size_ = 5u;
  clear_has_local_size();
}
::google::protobuf::uint32 LRNParameter::local_size() const {
  // @@protoc_insertion_point(field_get:caffe.LRNParameter.local_size)
  return local_size_;
}
void LRNParameter::set_local_size(::google::protobuf::uint32 value) {
  set_has_local_size();
  local_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.LRNParameter.local_size)
}

// optional float alpha = 2 [default = 1];
bool LRNParameter::has_alpha() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void LRNParameter::set_has_alpha() {
  _has_bits_[0] |= 0x00000002u;
}
void LRNParameter::clear_has_alpha() {
  _has_bits_[0] &= ~0x00000002u;
}
void LRNParameter::clear_alpha() {
  alpha_ = 1;
  clear_has_alpha();
}
float LRNParameter::alpha() const {
  // @@protoc_insertion_point(field_get:caffe.LRNParameter.alpha)
  return alpha_;
}
void LRNParameter::set_alpha(float value) {
  set_has_alpha();
  alpha_ = value;
  // @@protoc_insertion_point(field_set:caffe.LRNParameter.alpha)
}

// optional float beta = 3 [default = 0.75];
bool LRNParameter::has_beta() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void LRNParameter::set_has_beta() {
  _has_bits_[0] |= 0x00000004u;
}
void LRNParameter::clear_has_beta() {
  _has_bits_[0] &= ~0x00000004u;
}
void LRNParameter::clear_beta() {
  beta_ = 0.75f;
  clear_has_beta();
}
float LRNParameter::beta() const {
  // @@protoc_insertion_point(field_get:caffe.LRNParameter.beta)
  return beta_;
}
void LRNParameter::set_beta(float value) {
  set_has_beta();
  beta_ = value;
  // @@protoc_insertion_point(field_set:caffe.LRNParameter.beta)
}

// optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
bool LRNParameter::has_norm_region() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void LRNParameter::set_has_norm_region() {
  _has_bits_[0] |= 0x00000008u;
}
void LRNParameter::clear_has_norm_region() {
  _has_bits_[0] &= ~0x00000008u;
}
void LRNParameter::clear_norm_region() {
  norm_region_ = 0;
  clear_has_norm_region();
}
::caffe::LRNParameter_NormRegion LRNParameter::norm_region() const {
  // @@protoc_insertion_point(field_get:caffe.LRNParameter.norm_region)
  return static_cast< ::caffe::LRNParameter_NormRegion >(norm_region_);
}
void LRNParameter::set_norm_region(::caffe::LRNParameter_NormRegion value) {
  assert(::caffe::LRNParameter_NormRegion_IsValid(value));
  set_has_norm_region();
  norm_region_ = value;
  // @@protoc_insertion_point(field_set:caffe.LRNParameter.norm_region)
}

// optional float k = 5 [default = 1];
bool LRNParameter::has_k() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void LRNParameter::set_has_k() {
  _has_bits_[0] |= 0x00000010u;
}
void LRNParameter::clear_has_k() {
  _has_bits_[0] &= ~0x00000010u;
}
void LRNParameter::clear_k() {
  k_ = 1;
  clear_has_k();
}
float LRNParameter::k() const {
  // @@protoc_insertion_point(field_get:caffe.LRNParameter.k)
  return k_;
}
void LRNParameter::set_k(float value) {
  set_has_k();
  k_ = value;
  // @@protoc_insertion_point(field_set:caffe.LRNParameter.k)
}

inline const LRNParameter* LRNParameter::internal_default_instance() {
  return &LRNParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int MemoryDataParameter::kBatchSizeFieldNumber;
const int MemoryDataParameter::kChannelsFieldNumber;
const int MemoryDataParameter::kHeightFieldNumber;
const int MemoryDataParameter::kWidthFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

MemoryDataParameter::MemoryDataParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.MemoryDataParameter)
}

void MemoryDataParameter::InitAsDefaultInstance() {
}

MemoryDataParameter::MemoryDataParameter(const MemoryDataParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.MemoryDataParameter)
}

void MemoryDataParameter::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&batch_size_, 0, reinterpret_cast<char*>(&width_) -
    reinterpret_cast<char*>(&batch_size_) + sizeof(width_));
}

MemoryDataParameter::~MemoryDataParameter() {
  // @@protoc_insertion_point(destructor:caffe.MemoryDataParameter)
  SharedDtor();
}

void MemoryDataParameter::SharedDtor() {
}

void MemoryDataParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* MemoryDataParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return MemoryDataParameter_descriptor_;
}

const MemoryDataParameter& MemoryDataParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<MemoryDataParameter> MemoryDataParameter_default_instance_;

MemoryDataParameter* MemoryDataParameter::New(::google::protobuf::Arena* arena) const {
  MemoryDataParameter* n = new MemoryDataParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void MemoryDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.MemoryDataParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(MemoryDataParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<MemoryDataParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  ZR_(batch_size_, width_);

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool MemoryDataParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.MemoryDataParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint32 batch_size = 1;
      case 1: {
        if (tag == 8) {
          set_has_batch_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &batch_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_channels;
        break;
      }

      // optional uint32 channels = 2;
      case 2: {
        if (tag == 16) {
         parse_channels:
          set_has_channels();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &channels_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_height;
        break;
      }

      // optional uint32 height = 3;
      case 3: {
        if (tag == 24) {
         parse_height:
          set_has_height();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &height_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_width;
        break;
      }

      // optional uint32 width = 4;
      case 4: {
        if (tag == 32) {
         parse_width:
          set_has_width();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &width_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.MemoryDataParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.MemoryDataParameter)
  return false;
#undef DO_
}

void MemoryDataParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.MemoryDataParameter)
  // optional uint32 batch_size = 1;
  if (has_batch_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->batch_size(), output);
  }

  // optional uint32 channels = 2;
  if (has_channels()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->channels(), output);
  }

  // optional uint32 height = 3;
  if (has_height()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->height(), output);
  }

  // optional uint32 width = 4;
  if (has_width()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->width(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.MemoryDataParameter)
}

::google::protobuf::uint8* MemoryDataParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.MemoryDataParameter)
  // optional uint32 batch_size = 1;
  if (has_batch_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->batch_size(), target);
  }

  // optional uint32 channels = 2;
  if (has_channels()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->channels(), target);
  }

  // optional uint32 height = 3;
  if (has_height()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->height(), target);
  }

  // optional uint32 width = 4;
  if (has_width()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->width(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 15u) {
    // optional uint32 batch_size = 1;
    if (has_batch_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->batch_size());
    }

    // optional uint32 channels = 2;
    if (has_channels()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->channels());
    }

    // optional uint32 height = 3;
    if (has_height()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->height());
    }

    // optional uint32 width = 4;
    if (has_width()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->width());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void MemoryDataParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.MemoryDataParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const MemoryDataParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const MemoryDataParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.MemoryDataParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.MemoryDataParameter)
    UnsafeMergeFrom(*source);
  }
}

void MemoryDataParameter::MergeFrom(const MemoryDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.MemoryDataParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void MemoryDataParameter::UnsafeMergeFrom(const MemoryDataParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_batch_size()) {
      set_batch_size(from.batch_size());
    }
    if (from.has_channels()) {
      set_channels(from.channels());
    }
    if (from.has_height()) {
      set_height(from.height());
    }
    if (from.has_width()) {
      set_width(from.width());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void MemoryDataParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.MemoryDataParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool MemoryDataParameter::IsInitialized() const {

  return true;
}

void MemoryDataParameter::Swap(MemoryDataParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void MemoryDataParameter::InternalSwap(MemoryDataParameter* other) {
  std::swap(batch_size_, other->batch_size_);
  std::swap(channels_, other->channels_);
  std::swap(height_, other->height_);
  std::swap(width_, other->width_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata MemoryDataParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = MemoryDataParameter_descriptor_;
  metadata.reflection = MemoryDataParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// MemoryDataParameter

// optional uint32 batch_size = 1;
bool MemoryDataParameter::has_batch_size() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void MemoryDataParameter::set_has_batch_size() {
  _has_bits_[0] |= 0x00000001u;
}
void MemoryDataParameter::clear_has_batch_size() {
  _has_bits_[0] &= ~0x00000001u;
}
void MemoryDataParameter::clear_batch_size() {
  batch_size_ = 0u;
  clear_has_batch_size();
}
::google::protobuf::uint32 MemoryDataParameter::batch_size() const {
  // @@protoc_insertion_point(field_get:caffe.MemoryDataParameter.batch_size)
  return batch_size_;
}
void MemoryDataParameter::set_batch_size(::google::protobuf::uint32 value) {
  set_has_batch_size();
  batch_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.MemoryDataParameter.batch_size)
}

// optional uint32 channels = 2;
bool MemoryDataParameter::has_channels() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void MemoryDataParameter::set_has_channels() {
  _has_bits_[0] |= 0x00000002u;
}
void MemoryDataParameter::clear_has_channels() {
  _has_bits_[0] &= ~0x00000002u;
}
void MemoryDataParameter::clear_channels() {
  channels_ = 0u;
  clear_has_channels();
}
::google::protobuf::uint32 MemoryDataParameter::channels() const {
  // @@protoc_insertion_point(field_get:caffe.MemoryDataParameter.channels)
  return channels_;
}
void MemoryDataParameter::set_channels(::google::protobuf::uint32 value) {
  set_has_channels();
  channels_ = value;
  // @@protoc_insertion_point(field_set:caffe.MemoryDataParameter.channels)
}

// optional uint32 height = 3;
bool MemoryDataParameter::has_height() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void MemoryDataParameter::set_has_height() {
  _has_bits_[0] |= 0x00000004u;
}
void MemoryDataParameter::clear_has_height() {
  _has_bits_[0] &= ~0x00000004u;
}
void MemoryDataParameter::clear_height() {
  height_ = 0u;
  clear_has_height();
}
::google::protobuf::uint32 MemoryDataParameter::height() const {
  // @@protoc_insertion_point(field_get:caffe.MemoryDataParameter.height)
  return height_;
}
void MemoryDataParameter::set_height(::google::protobuf::uint32 value) {
  set_has_height();
  height_ = value;
  // @@protoc_insertion_point(field_set:caffe.MemoryDataParameter.height)
}

// optional uint32 width = 4;
bool MemoryDataParameter::has_width() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void MemoryDataParameter::set_has_width() {
  _has_bits_[0] |= 0x00000008u;
}
void MemoryDataParameter::clear_has_width() {
  _has_bits_[0] &= ~0x00000008u;
}
void MemoryDataParameter::clear_width() {
  width_ = 0u;
  clear_has_width();
}
::google::protobuf::uint32 MemoryDataParameter::width() const {
  // @@protoc_insertion_point(field_get:caffe.MemoryDataParameter.width)
  return width_;
}
void MemoryDataParameter::set_width(::google::protobuf::uint32 value) {
  set_has_width();
  width_ = value;
  // @@protoc_insertion_point(field_set:caffe.MemoryDataParameter.width)
}

inline const MemoryDataParameter* MemoryDataParameter::internal_default_instance() {
  return &MemoryDataParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int MVNParameter::kNormalizeVarianceFieldNumber;
const int MVNParameter::kAcrossChannelsFieldNumber;
const int MVNParameter::kEpsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

MVNParameter::MVNParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.MVNParameter)
}

void MVNParameter::InitAsDefaultInstance() {
}

MVNParameter::MVNParameter(const MVNParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.MVNParameter)
}

void MVNParameter::SharedCtor() {
  _cached_size_ = 0;
  across_channels_ = false;
  normalize_variance_ = true;
  eps_ = 1e-09f;
}

MVNParameter::~MVNParameter() {
  // @@protoc_insertion_point(destructor:caffe.MVNParameter)
  SharedDtor();
}

void MVNParameter::SharedDtor() {
}

void MVNParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* MVNParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return MVNParameter_descriptor_;
}

const MVNParameter& MVNParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<MVNParameter> MVNParameter_default_instance_;

MVNParameter* MVNParameter::New(::google::protobuf::Arena* arena) const {
  MVNParameter* n = new MVNParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void MVNParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.MVNParameter)
  if (_has_bits_[0 / 32] & 7u) {
    normalize_variance_ = true;
    across_channels_ = false;
    eps_ = 1e-09f;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool MVNParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.MVNParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional bool normalize_variance = 1 [default = true];
      case 1: {
        if (tag == 8) {
          set_has_normalize_variance();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &normalize_variance_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_across_channels;
        break;
      }

      // optional bool across_channels = 2 [default = false];
      case 2: {
        if (tag == 16) {
         parse_across_channels:
          set_has_across_channels();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &across_channels_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_eps;
        break;
      }

      // optional float eps = 3 [default = 1e-09];
      case 3: {
        if (tag == 29) {
         parse_eps:
          set_has_eps();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &eps_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.MVNParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.MVNParameter)
  return false;
#undef DO_
}

void MVNParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.MVNParameter)
  // optional bool normalize_variance = 1 [default = true];
  if (has_normalize_variance()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->normalize_variance(), output);
  }

  // optional bool across_channels = 2 [default = false];
  if (has_across_channels()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->across_channels(), output);
  }

  // optional float eps = 3 [default = 1e-09];
  if (has_eps()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->eps(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.MVNParameter)
}

::google::protobuf::uint8* MVNParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.MVNParameter)
  // optional bool normalize_variance = 1 [default = true];
  if (has_normalize_variance()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->normalize_variance(), target);
  }

  // optional bool across_channels = 2 [default = false];
  if (has_across_channels()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->across_channels(), target);
  }

  // optional float eps = 3 [default = 1e-09];
  if (has_eps()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->eps(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 7u) {
    // optional bool normalize_variance = 1 [default = true];
    if (has_normalize_variance()) {
      total_size += 1 + 1;
    }

    // optional bool across_channels = 2 [default = false];
    if (has_across_channels()) {
      total_size += 1 + 1;
    }

    // optional float eps = 3 [default = 1e-09];
    if (has_eps()) {
      total_size += 1 + 4;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void MVNParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.MVNParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const MVNParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const MVNParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.MVNParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.MVNParameter)
    UnsafeMergeFrom(*source);
  }
}

void MVNParameter::MergeFrom(const MVNParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.MVNParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void MVNParameter::UnsafeMergeFrom(const MVNParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_normalize_variance()) {
      set_normalize_variance(from.normalize_variance());
    }
    if (from.has_across_channels()) {
      set_across_channels(from.across_channels());
    }
    if (from.has_eps()) {
      set_eps(from.eps());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void MVNParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.MVNParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool MVNParameter::IsInitialized() const {

  return true;
}

void MVNParameter::Swap(MVNParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void MVNParameter::InternalSwap(MVNParameter* other) {
  std::swap(normalize_variance_, other->normalize_variance_);
  std::swap(across_channels_, other->across_channels_);
  std::swap(eps_, other->eps_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata MVNParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = MVNParameter_descriptor_;
  metadata.reflection = MVNParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// MVNParameter

// optional bool normalize_variance = 1 [default = true];
bool MVNParameter::has_normalize_variance() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void MVNParameter::set_has_normalize_variance() {
  _has_bits_[0] |= 0x00000001u;
}
void MVNParameter::clear_has_normalize_variance() {
  _has_bits_[0] &= ~0x00000001u;
}
void MVNParameter::clear_normalize_variance() {
  normalize_variance_ = true;
  clear_has_normalize_variance();
}
bool MVNParameter::normalize_variance() const {
  // @@protoc_insertion_point(field_get:caffe.MVNParameter.normalize_variance)
  return normalize_variance_;
}
void MVNParameter::set_normalize_variance(bool value) {
  set_has_normalize_variance();
  normalize_variance_ = value;
  // @@protoc_insertion_point(field_set:caffe.MVNParameter.normalize_variance)
}

// optional bool across_channels = 2 [default = false];
bool MVNParameter::has_across_channels() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void MVNParameter::set_has_across_channels() {
  _has_bits_[0] |= 0x00000002u;
}
void MVNParameter::clear_has_across_channels() {
  _has_bits_[0] &= ~0x00000002u;
}
void MVNParameter::clear_across_channels() {
  across_channels_ = false;
  clear_has_across_channels();
}
bool MVNParameter::across_channels() const {
  // @@protoc_insertion_point(field_get:caffe.MVNParameter.across_channels)
  return across_channels_;
}
void MVNParameter::set_across_channels(bool value) {
  set_has_across_channels();
  across_channels_ = value;
  // @@protoc_insertion_point(field_set:caffe.MVNParameter.across_channels)
}

// optional float eps = 3 [default = 1e-09];
bool MVNParameter::has_eps() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void MVNParameter::set_has_eps() {
  _has_bits_[0] |= 0x00000004u;
}
void MVNParameter::clear_has_eps() {
  _has_bits_[0] &= ~0x00000004u;
}
void MVNParameter::clear_eps() {
  eps_ = 1e-09f;
  clear_has_eps();
}
float MVNParameter::eps() const {
  // @@protoc_insertion_point(field_get:caffe.MVNParameter.eps)
  return eps_;
}
void MVNParameter::set_eps(float value) {
  set_has_eps();
  eps_ = value;
  // @@protoc_insertion_point(field_set:caffe.MVNParameter.eps)
}

inline const MVNParameter* MVNParameter::internal_default_instance() {
  return &MVNParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* PoolingParameter_PoolMethod_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PoolingParameter_PoolMethod_descriptor_;
}
bool PoolingParameter_PoolMethod_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const PoolingParameter_PoolMethod PoolingParameter::MAX;
const PoolingParameter_PoolMethod PoolingParameter::AVE;
const PoolingParameter_PoolMethod PoolingParameter::STOCHASTIC;
const PoolingParameter_PoolMethod PoolingParameter::PoolMethod_MIN;
const PoolingParameter_PoolMethod PoolingParameter::PoolMethod_MAX;
const int PoolingParameter::PoolMethod_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* PoolingParameter_Engine_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PoolingParameter_Engine_descriptor_;
}
bool PoolingParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const PoolingParameter_Engine PoolingParameter::DEFAULT;
const PoolingParameter_Engine PoolingParameter::CAFFE;
const PoolingParameter_Engine PoolingParameter::CUDNN;
const PoolingParameter_Engine PoolingParameter::Engine_MIN;
const PoolingParameter_Engine PoolingParameter::Engine_MAX;
const int PoolingParameter::Engine_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int PoolingParameter::kPoolFieldNumber;
const int PoolingParameter::kPadFieldNumber;
const int PoolingParameter::kPadHFieldNumber;
const int PoolingParameter::kPadWFieldNumber;
const int PoolingParameter::kKernelSizeFieldNumber;
const int PoolingParameter::kKernelHFieldNumber;
const int PoolingParameter::kKernelWFieldNumber;
const int PoolingParameter::kStrideFieldNumber;
const int PoolingParameter::kStrideHFieldNumber;
const int PoolingParameter::kStrideWFieldNumber;
const int PoolingParameter::kEngineFieldNumber;
const int PoolingParameter::kGlobalPoolingFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

PoolingParameter::PoolingParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.PoolingParameter)
}

void PoolingParameter::InitAsDefaultInstance() {
}

PoolingParameter::PoolingParameter(const PoolingParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.PoolingParameter)
}

void PoolingParameter::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&pool_, 0, reinterpret_cast<char*>(&global_pooling_) -
    reinterpret_cast<char*>(&pool_) + sizeof(global_pooling_));
  stride_ = 1u;
}

PoolingParameter::~PoolingParameter() {
  // @@protoc_insertion_point(destructor:caffe.PoolingParameter)
  SharedDtor();
}

void PoolingParameter::SharedDtor() {
}

void PoolingParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* PoolingParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PoolingParameter_descriptor_;
}

const PoolingParameter& PoolingParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<PoolingParameter> PoolingParameter_default_instance_;

PoolingParameter* PoolingParameter::New(::google::protobuf::Arena* arena) const {
  PoolingParameter* n = new PoolingParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void PoolingParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.PoolingParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(PoolingParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<PoolingParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 255u) {
    ZR_(pool_, kernel_w_);
    stride_ = 1u;
  }
  ZR_(stride_h_, global_pooling_);

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool PoolingParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.PoolingParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::PoolingParameter_PoolMethod_IsValid(value)) {
            set_pool(static_cast< ::caffe::PoolingParameter_PoolMethod >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_kernel_size;
        break;
      }

      // optional uint32 kernel_size = 2;
      case 2: {
        if (tag == 16) {
         parse_kernel_size:
          set_has_kernel_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &kernel_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_stride;
        break;
      }

      // optional uint32 stride = 3 [default = 1];
      case 3: {
        if (tag == 24) {
         parse_stride:
          set_has_stride();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &stride_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_pad;
        break;
      }

      // optional uint32 pad = 4 [default = 0];
      case 4: {
        if (tag == 32) {
         parse_pad:
          set_has_pad();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &pad_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_kernel_h;
        break;
      }

      // optional uint32 kernel_h = 5;
      case 5: {
        if (tag == 40) {
         parse_kernel_h:
          set_has_kernel_h();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &kernel_h_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_kernel_w;
        break;
      }

      // optional uint32 kernel_w = 6;
      case 6: {
        if (tag == 48) {
         parse_kernel_w:
          set_has_kernel_w();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &kernel_w_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(56)) goto parse_stride_h;
        break;
      }

      // optional uint32 stride_h = 7;
      case 7: {
        if (tag == 56) {
         parse_stride_h:
          set_has_stride_h();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &stride_h_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(64)) goto parse_stride_w;
        break;
      }

      // optional uint32 stride_w = 8;
      case 8: {
        if (tag == 64) {
         parse_stride_w:
          set_has_stride_w();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &stride_w_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(72)) goto parse_pad_h;
        break;
      }

      // optional uint32 pad_h = 9 [default = 0];
      case 9: {
        if (tag == 72) {
         parse_pad_h:
          set_has_pad_h();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &pad_h_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(80)) goto parse_pad_w;
        break;
      }

      // optional uint32 pad_w = 10 [default = 0];
      case 10: {
        if (tag == 80) {
         parse_pad_w:
          set_has_pad_w();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &pad_w_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(88)) goto parse_engine;
        break;
      }

      // optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
      case 11: {
        if (tag == 88) {
         parse_engine:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::PoolingParameter_Engine_IsValid(value)) {
            set_engine(static_cast< ::caffe::PoolingParameter_Engine >(value));
          } else {
            mutable_unknown_fields()->AddVarint(11, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(96)) goto parse_global_pooling;
        break;
      }

      // optional bool global_pooling = 12 [default = false];
      case 12: {
        if (tag == 96) {
         parse_global_pooling:
          set_has_global_pooling();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &global_pooling_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.PoolingParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.PoolingParameter)
  return false;
#undef DO_
}

void PoolingParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.PoolingParameter)
  // optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
  if (has_pool()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->pool(), output);
  }

  // optional uint32 kernel_size = 2;
  if (has_kernel_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->kernel_size(), output);
  }

  // optional uint32 stride = 3 [default = 1];
  if (has_stride()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->stride(), output);
  }

  // optional uint32 pad = 4 [default = 0];
  if (has_pad()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->pad(), output);
  }

  // optional uint32 kernel_h = 5;
  if (has_kernel_h()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->kernel_h(), output);
  }

  // optional uint32 kernel_w = 6;
  if (has_kernel_w()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->kernel_w(), output);
  }

  // optional uint32 stride_h = 7;
  if (has_stride_h()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->stride_h(), output);
  }

  // optional uint32 stride_w = 8;
  if (has_stride_w()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->stride_w(), output);
  }

  // optional uint32 pad_h = 9 [default = 0];
  if (has_pad_h()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(9, this->pad_h(), output);
  }

  // optional uint32 pad_w = 10 [default = 0];
  if (has_pad_w()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(10, this->pad_w(), output);
  }

  // optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
  if (has_engine()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      11, this->engine(), output);
  }

  // optional bool global_pooling = 12 [default = false];
  if (has_global_pooling()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(12, this->global_pooling(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.PoolingParameter)
}

::google::protobuf::uint8* PoolingParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.PoolingParameter)
  // optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
  if (has_pool()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->pool(), target);
  }

  // optional uint32 kernel_size = 2;
  if (has_kernel_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(2, this->kernel_size(), target);
  }

  // optional uint32 stride = 3 [default = 1];
  if (has_stride()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->stride(), target);
  }

  // optional uint32 pad = 4 [default = 0];
  if (has_pad()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->pad(), target);
  }

  // optional uint32 kernel_h = 5;
  if (has_kernel_h()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->kernel_h(), target);
  }

  // optional uint32 kernel_w = 6;
  if (has_kernel_w()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->kernel_w(), target);
  }

  // optional uint32 stride_h = 7;
  if (has_stride_h()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->stride_h(), target);
  }

  // optional uint32 stride_w = 8;
  if (has_stride_w()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->stride_w(), target);
  }

  // optional uint32 pad_h = 9 [default = 0];
  if (has_pad_h()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(9, this->pad_h(), target);
  }

  // optional uint32 pad_w = 10 [default = 0];
  if (has_pad_w()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(10, this->pad_w(), target);
  }

  // optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
  if (has_engine()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      11, this->engine(), target);
  }

  // optional bool global_pooling = 12 [default = false];
  if (has_global_pooling()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(12, this->global_pooling(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 255u) {
    // optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
    if (has_pool()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->pool());
    }

    // optional uint32 pad = 4 [default = 0];
    if (has_pad()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->pad());
    }

    // optional uint32 pad_h = 9 [default = 0];
    if (has_pad_h()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->pad_h());
    }

    // optional uint32 pad_w = 10 [default = 0];
    if (has_pad_w()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->pad_w());
    }

    // optional uint32 kernel_size = 2;
    if (has_kernel_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->kernel_size());
    }

    // optional uint32 kernel_h = 5;
    if (has_kernel_h()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->kernel_h());
    }

    // optional uint32 kernel_w = 6;
    if (has_kernel_w()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->kernel_w());
    }

    // optional uint32 stride = 3 [default = 1];
    if (has_stride()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->stride());
    }

  }
  if (_has_bits_[8 / 32] & 3840u) {
    // optional uint32 stride_h = 7;
    if (has_stride_h()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->stride_h());
    }

    // optional uint32 stride_w = 8;
    if (has_stride_w()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->stride_w());
    }

    // optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
    if (has_engine()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->engine());
    }

    // optional bool global_pooling = 12 [default = false];
    if (has_global_pooling()) {
      total_size += 1 + 1;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void PoolingParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.PoolingParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const PoolingParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const PoolingParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.PoolingParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.PoolingParameter)
    UnsafeMergeFrom(*source);
  }
}

void PoolingParameter::MergeFrom(const PoolingParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PoolingParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void PoolingParameter::UnsafeMergeFrom(const PoolingParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_pool()) {
      set_pool(from.pool());
    }
    if (from.has_pad()) {
      set_pad(from.pad());
    }
    if (from.has_pad_h()) {
      set_pad_h(from.pad_h());
    }
    if (from.has_pad_w()) {
      set_pad_w(from.pad_w());
    }
    if (from.has_kernel_size()) {
      set_kernel_size(from.kernel_size());
    }
    if (from.has_kernel_h()) {
      set_kernel_h(from.kernel_h());
    }
    if (from.has_kernel_w()) {
      set_kernel_w(from.kernel_w());
    }
    if (from.has_stride()) {
      set_stride(from.stride());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_stride_h()) {
      set_stride_h(from.stride_h());
    }
    if (from.has_stride_w()) {
      set_stride_w(from.stride_w());
    }
    if (from.has_engine()) {
      set_engine(from.engine());
    }
    if (from.has_global_pooling()) {
      set_global_pooling(from.global_pooling());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void PoolingParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.PoolingParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool PoolingParameter::IsInitialized() const {

  return true;
}

void PoolingParameter::Swap(PoolingParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void PoolingParameter::InternalSwap(PoolingParameter* other) {
  std::swap(pool_, other->pool_);
  std::swap(pad_, other->pad_);
  std::swap(pad_h_, other->pad_h_);
  std::swap(pad_w_, other->pad_w_);
  std::swap(kernel_size_, other->kernel_size_);
  std::swap(kernel_h_, other->kernel_h_);
  std::swap(kernel_w_, other->kernel_w_);
  std::swap(stride_, other->stride_);
  std::swap(stride_h_, other->stride_h_);
  std::swap(stride_w_, other->stride_w_);
  std::swap(engine_, other->engine_);
  std::swap(global_pooling_, other->global_pooling_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata PoolingParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = PoolingParameter_descriptor_;
  metadata.reflection = PoolingParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// PoolingParameter

// optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
bool PoolingParameter::has_pool() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void PoolingParameter::set_has_pool() {
  _has_bits_[0] |= 0x00000001u;
}
void PoolingParameter::clear_has_pool() {
  _has_bits_[0] &= ~0x00000001u;
}
void PoolingParameter::clear_pool() {
  pool_ = 0;
  clear_has_pool();
}
::caffe::PoolingParameter_PoolMethod PoolingParameter::pool() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.pool)
  return static_cast< ::caffe::PoolingParameter_PoolMethod >(pool_);
}
void PoolingParameter::set_pool(::caffe::PoolingParameter_PoolMethod value) {
  assert(::caffe::PoolingParameter_PoolMethod_IsValid(value));
  set_has_pool();
  pool_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.pool)
}

// optional uint32 pad = 4 [default = 0];
bool PoolingParameter::has_pad() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void PoolingParameter::set_has_pad() {
  _has_bits_[0] |= 0x00000002u;
}
void PoolingParameter::clear_has_pad() {
  _has_bits_[0] &= ~0x00000002u;
}
void PoolingParameter::clear_pad() {
  pad_ = 0u;
  clear_has_pad();
}
::google::protobuf::uint32 PoolingParameter::pad() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.pad)
  return pad_;
}
void PoolingParameter::set_pad(::google::protobuf::uint32 value) {
  set_has_pad();
  pad_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.pad)
}

// optional uint32 pad_h = 9 [default = 0];
bool PoolingParameter::has_pad_h() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void PoolingParameter::set_has_pad_h() {
  _has_bits_[0] |= 0x00000004u;
}
void PoolingParameter::clear_has_pad_h() {
  _has_bits_[0] &= ~0x00000004u;
}
void PoolingParameter::clear_pad_h() {
  pad_h_ = 0u;
  clear_has_pad_h();
}
::google::protobuf::uint32 PoolingParameter::pad_h() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.pad_h)
  return pad_h_;
}
void PoolingParameter::set_pad_h(::google::protobuf::uint32 value) {
  set_has_pad_h();
  pad_h_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.pad_h)
}

// optional uint32 pad_w = 10 [default = 0];
bool PoolingParameter::has_pad_w() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void PoolingParameter::set_has_pad_w() {
  _has_bits_[0] |= 0x00000008u;
}
void PoolingParameter::clear_has_pad_w() {
  _has_bits_[0] &= ~0x00000008u;
}
void PoolingParameter::clear_pad_w() {
  pad_w_ = 0u;
  clear_has_pad_w();
}
::google::protobuf::uint32 PoolingParameter::pad_w() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.pad_w)
  return pad_w_;
}
void PoolingParameter::set_pad_w(::google::protobuf::uint32 value) {
  set_has_pad_w();
  pad_w_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.pad_w)
}

// optional uint32 kernel_size = 2;
bool PoolingParameter::has_kernel_size() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void PoolingParameter::set_has_kernel_size() {
  _has_bits_[0] |= 0x00000010u;
}
void PoolingParameter::clear_has_kernel_size() {
  _has_bits_[0] &= ~0x00000010u;
}
void PoolingParameter::clear_kernel_size() {
  kernel_size_ = 0u;
  clear_has_kernel_size();
}
::google::protobuf::uint32 PoolingParameter::kernel_size() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.kernel_size)
  return kernel_size_;
}
void PoolingParameter::set_kernel_size(::google::protobuf::uint32 value) {
  set_has_kernel_size();
  kernel_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.kernel_size)
}

// optional uint32 kernel_h = 5;
bool PoolingParameter::has_kernel_h() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void PoolingParameter::set_has_kernel_h() {
  _has_bits_[0] |= 0x00000020u;
}
void PoolingParameter::clear_has_kernel_h() {
  _has_bits_[0] &= ~0x00000020u;
}
void PoolingParameter::clear_kernel_h() {
  kernel_h_ = 0u;
  clear_has_kernel_h();
}
::google::protobuf::uint32 PoolingParameter::kernel_h() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.kernel_h)
  return kernel_h_;
}
void PoolingParameter::set_kernel_h(::google::protobuf::uint32 value) {
  set_has_kernel_h();
  kernel_h_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.kernel_h)
}

// optional uint32 kernel_w = 6;
bool PoolingParameter::has_kernel_w() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void PoolingParameter::set_has_kernel_w() {
  _has_bits_[0] |= 0x00000040u;
}
void PoolingParameter::clear_has_kernel_w() {
  _has_bits_[0] &= ~0x00000040u;
}
void PoolingParameter::clear_kernel_w() {
  kernel_w_ = 0u;
  clear_has_kernel_w();
}
::google::protobuf::uint32 PoolingParameter::kernel_w() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.kernel_w)
  return kernel_w_;
}
void PoolingParameter::set_kernel_w(::google::protobuf::uint32 value) {
  set_has_kernel_w();
  kernel_w_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.kernel_w)
}

// optional uint32 stride = 3 [default = 1];
bool PoolingParameter::has_stride() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
void PoolingParameter::set_has_stride() {
  _has_bits_[0] |= 0x00000080u;
}
void PoolingParameter::clear_has_stride() {
  _has_bits_[0] &= ~0x00000080u;
}
void PoolingParameter::clear_stride() {
  stride_ = 1u;
  clear_has_stride();
}
::google::protobuf::uint32 PoolingParameter::stride() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.stride)
  return stride_;
}
void PoolingParameter::set_stride(::google::protobuf::uint32 value) {
  set_has_stride();
  stride_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.stride)
}

// optional uint32 stride_h = 7;
bool PoolingParameter::has_stride_h() const {
  return (_has_bits_[0] & 0x00000100u) != 0;
}
void PoolingParameter::set_has_stride_h() {
  _has_bits_[0] |= 0x00000100u;
}
void PoolingParameter::clear_has_stride_h() {
  _has_bits_[0] &= ~0x00000100u;
}
void PoolingParameter::clear_stride_h() {
  stride_h_ = 0u;
  clear_has_stride_h();
}
::google::protobuf::uint32 PoolingParameter::stride_h() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.stride_h)
  return stride_h_;
}
void PoolingParameter::set_stride_h(::google::protobuf::uint32 value) {
  set_has_stride_h();
  stride_h_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.stride_h)
}

// optional uint32 stride_w = 8;
bool PoolingParameter::has_stride_w() const {
  return (_has_bits_[0] & 0x00000200u) != 0;
}
void PoolingParameter::set_has_stride_w() {
  _has_bits_[0] |= 0x00000200u;
}
void PoolingParameter::clear_has_stride_w() {
  _has_bits_[0] &= ~0x00000200u;
}
void PoolingParameter::clear_stride_w() {
  stride_w_ = 0u;
  clear_has_stride_w();
}
::google::protobuf::uint32 PoolingParameter::stride_w() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.stride_w)
  return stride_w_;
}
void PoolingParameter::set_stride_w(::google::protobuf::uint32 value) {
  set_has_stride_w();
  stride_w_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.stride_w)
}

// optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
bool PoolingParameter::has_engine() const {
  return (_has_bits_[0] & 0x00000400u) != 0;
}
void PoolingParameter::set_has_engine() {
  _has_bits_[0] |= 0x00000400u;
}
void PoolingParameter::clear_has_engine() {
  _has_bits_[0] &= ~0x00000400u;
}
void PoolingParameter::clear_engine() {
  engine_ = 0;
  clear_has_engine();
}
::caffe::PoolingParameter_Engine PoolingParameter::engine() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.engine)
  return static_cast< ::caffe::PoolingParameter_Engine >(engine_);
}
void PoolingParameter::set_engine(::caffe::PoolingParameter_Engine value) {
  assert(::caffe::PoolingParameter_Engine_IsValid(value));
  set_has_engine();
  engine_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.engine)
}

// optional bool global_pooling = 12 [default = false];
bool PoolingParameter::has_global_pooling() const {
  return (_has_bits_[0] & 0x00000800u) != 0;
}
void PoolingParameter::set_has_global_pooling() {
  _has_bits_[0] |= 0x00000800u;
}
void PoolingParameter::clear_has_global_pooling() {
  _has_bits_[0] &= ~0x00000800u;
}
void PoolingParameter::clear_global_pooling() {
  global_pooling_ = false;
  clear_has_global_pooling();
}
bool PoolingParameter::global_pooling() const {
  // @@protoc_insertion_point(field_get:caffe.PoolingParameter.global_pooling)
  return global_pooling_;
}
void PoolingParameter::set_global_pooling(bool value) {
  set_has_global_pooling();
  global_pooling_ = value;
  // @@protoc_insertion_point(field_set:caffe.PoolingParameter.global_pooling)
}

inline const PoolingParameter* PoolingParameter::internal_default_instance() {
  return &PoolingParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int PowerParameter::kPowerFieldNumber;
const int PowerParameter::kScaleFieldNumber;
const int PowerParameter::kShiftFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

PowerParameter::PowerParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.PowerParameter)
}

void PowerParameter::InitAsDefaultInstance() {
}

PowerParameter::PowerParameter(const PowerParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.PowerParameter)
}

void PowerParameter::SharedCtor() {
  _cached_size_ = 0;
  shift_ = 0;
  power_ = 1;
  scale_ = 1;
}

PowerParameter::~PowerParameter() {
  // @@protoc_insertion_point(destructor:caffe.PowerParameter)
  SharedDtor();
}

void PowerParameter::SharedDtor() {
}

void PowerParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* PowerParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PowerParameter_descriptor_;
}

const PowerParameter& PowerParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<PowerParameter> PowerParameter_default_instance_;

PowerParameter* PowerParameter::New(::google::protobuf::Arena* arena) const {
  PowerParameter* n = new PowerParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void PowerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.PowerParameter)
  if (_has_bits_[0 / 32] & 7u) {
    power_ = 1;
    scale_ = 1;
    shift_ = 0;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool PowerParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.PowerParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float power = 1 [default = 1];
      case 1: {
        if (tag == 13) {
          set_has_power();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &power_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_scale;
        break;
      }

      // optional float scale = 2 [default = 1];
      case 2: {
        if (tag == 21) {
         parse_scale:
          set_has_scale();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &scale_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_shift;
        break;
      }

      // optional float shift = 3 [default = 0];
      case 3: {
        if (tag == 29) {
         parse_shift:
          set_has_shift();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &shift_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.PowerParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.PowerParameter)
  return false;
#undef DO_
}

void PowerParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.PowerParameter)
  // optional float power = 1 [default = 1];
  if (has_power()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->power(), output);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->scale(), output);
  }

  // optional float shift = 3 [default = 0];
  if (has_shift()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->shift(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.PowerParameter)
}

::google::protobuf::uint8* PowerParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.PowerParameter)
  // optional float power = 1 [default = 1];
  if (has_power()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->power(), target);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->scale(), target);
  }

  // optional float shift = 3 [default = 0];
  if (has_shift()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->shift(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 7u) {
    // optional float power = 1 [default = 1];
    if (has_power()) {
      total_size += 1 + 4;
    }

    // optional float scale = 2 [default = 1];
    if (has_scale()) {
      total_size += 1 + 4;
    }

    // optional float shift = 3 [default = 0];
    if (has_shift()) {
      total_size += 1 + 4;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void PowerParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.PowerParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const PowerParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const PowerParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.PowerParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.PowerParameter)
    UnsafeMergeFrom(*source);
  }
}

void PowerParameter::MergeFrom(const PowerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PowerParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void PowerParameter::UnsafeMergeFrom(const PowerParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_power()) {
      set_power(from.power());
    }
    if (from.has_scale()) {
      set_scale(from.scale());
    }
    if (from.has_shift()) {
      set_shift(from.shift());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void PowerParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.PowerParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool PowerParameter::IsInitialized() const {

  return true;
}

void PowerParameter::Swap(PowerParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void PowerParameter::InternalSwap(PowerParameter* other) {
  std::swap(power_, other->power_);
  std::swap(scale_, other->scale_);
  std::swap(shift_, other->shift_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata PowerParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = PowerParameter_descriptor_;
  metadata.reflection = PowerParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// PowerParameter

// optional float power = 1 [default = 1];
bool PowerParameter::has_power() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void PowerParameter::set_has_power() {
  _has_bits_[0] |= 0x00000001u;
}
void PowerParameter::clear_has_power() {
  _has_bits_[0] &= ~0x00000001u;
}
void PowerParameter::clear_power() {
  power_ = 1;
  clear_has_power();
}
float PowerParameter::power() const {
  // @@protoc_insertion_point(field_get:caffe.PowerParameter.power)
  return power_;
}
void PowerParameter::set_power(float value) {
  set_has_power();
  power_ = value;
  // @@protoc_insertion_point(field_set:caffe.PowerParameter.power)
}

// optional float scale = 2 [default = 1];
bool PowerParameter::has_scale() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void PowerParameter::set_has_scale() {
  _has_bits_[0] |= 0x00000002u;
}
void PowerParameter::clear_has_scale() {
  _has_bits_[0] &= ~0x00000002u;
}
void PowerParameter::clear_scale() {
  scale_ = 1;
  clear_has_scale();
}
float PowerParameter::scale() const {
  // @@protoc_insertion_point(field_get:caffe.PowerParameter.scale)
  return scale_;
}
void PowerParameter::set_scale(float value) {
  set_has_scale();
  scale_ = value;
  // @@protoc_insertion_point(field_set:caffe.PowerParameter.scale)
}

// optional float shift = 3 [default = 0];
bool PowerParameter::has_shift() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void PowerParameter::set_has_shift() {
  _has_bits_[0] |= 0x00000004u;
}
void PowerParameter::clear_has_shift() {
  _has_bits_[0] &= ~0x00000004u;
}
void PowerParameter::clear_shift() {
  shift_ = 0;
  clear_has_shift();
}
float PowerParameter::shift() const {
  // @@protoc_insertion_point(field_get:caffe.PowerParameter.shift)
  return shift_;
}
void PowerParameter::set_shift(float value) {
  set_has_shift();
  shift_ = value;
  // @@protoc_insertion_point(field_set:caffe.PowerParameter.shift)
}

inline const PowerParameter* PowerParameter::internal_default_instance() {
  return &PowerParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int PythonParameter::kModuleFieldNumber;
const int PythonParameter::kLayerFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

PythonParameter::PythonParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.PythonParameter)
}

void PythonParameter::InitAsDefaultInstance() {
}

PythonParameter::PythonParameter(const PythonParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.PythonParameter)
}

void PythonParameter::SharedCtor() {
  _cached_size_ = 0;
  module_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  layer_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

PythonParameter::~PythonParameter() {
  // @@protoc_insertion_point(destructor:caffe.PythonParameter)
  SharedDtor();
}

void PythonParameter::SharedDtor() {
  module_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  layer_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void PythonParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* PythonParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PythonParameter_descriptor_;
}

const PythonParameter& PythonParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<PythonParameter> PythonParameter_default_instance_;

PythonParameter* PythonParameter::New(::google::protobuf::Arena* arena) const {
  PythonParameter* n = new PythonParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void PythonParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.PythonParameter)
  if (_has_bits_[0 / 32] & 3u) {
    if (has_module()) {
      module_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    if (has_layer()) {
      layer_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool PythonParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.PythonParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string module = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_module()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->module().data(), this->module().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.PythonParameter.module");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_layer;
        break;
      }

      // optional string layer = 2;
      case 2: {
        if (tag == 18) {
         parse_layer:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_layer()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->layer().data(), this->layer().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.PythonParameter.layer");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.PythonParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.PythonParameter)
  return false;
#undef DO_
}

void PythonParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.PythonParameter)
  // optional string module = 1;
  if (has_module()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->module().data(), this->module().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.PythonParameter.module");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->module(), output);
  }

  // optional string layer = 2;
  if (has_layer()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->layer().data(), this->layer().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.PythonParameter.layer");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->layer(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.PythonParameter)
}

::google::protobuf::uint8* PythonParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.PythonParameter)
  // optional string module = 1;
  if (has_module()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->module().data(), this->module().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.PythonParameter.module");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->module(), target);
  }

  // optional string layer = 2;
  if (has_layer()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->layer().data(), this->layer().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.PythonParameter.layer");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->layer(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 3u) {
    // optional string module = 1;
    if (has_module()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->module());
    }

    // optional string layer = 2;
    if (has_layer()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->layer());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void PythonParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.PythonParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const PythonParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const PythonParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.PythonParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.PythonParameter)
    UnsafeMergeFrom(*source);
  }
}

void PythonParameter::MergeFrom(const PythonParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PythonParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void PythonParameter::UnsafeMergeFrom(const PythonParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_module()) {
      set_has_module();
      module_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.module_);
    }
    if (from.has_layer()) {
      set_has_layer();
      layer_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.layer_);
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void PythonParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.PythonParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool PythonParameter::IsInitialized() const {

  return true;
}

void PythonParameter::Swap(PythonParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void PythonParameter::InternalSwap(PythonParameter* other) {
  module_.Swap(&other->module_);
  layer_.Swap(&other->layer_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata PythonParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = PythonParameter_descriptor_;
  metadata.reflection = PythonParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// PythonParameter

// optional string module = 1;
bool PythonParameter::has_module() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void PythonParameter::set_has_module() {
  _has_bits_[0] |= 0x00000001u;
}
void PythonParameter::clear_has_module() {
  _has_bits_[0] &= ~0x00000001u;
}
void PythonParameter::clear_module() {
  module_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_module();
}
const ::std::string& PythonParameter::module() const {
  // @@protoc_insertion_point(field_get:caffe.PythonParameter.module)
  return module_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void PythonParameter::set_module(const ::std::string& value) {
  set_has_module();
  module_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.PythonParameter.module)
}
void PythonParameter::set_module(const char* value) {
  set_has_module();
  module_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.PythonParameter.module)
}
void PythonParameter::set_module(const char* value, size_t size) {
  set_has_module();
  module_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.PythonParameter.module)
}
::std::string* PythonParameter::mutable_module() {
  set_has_module();
  // @@protoc_insertion_point(field_mutable:caffe.PythonParameter.module)
  return module_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* PythonParameter::release_module() {
  // @@protoc_insertion_point(field_release:caffe.PythonParameter.module)
  clear_has_module();
  return module_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void PythonParameter::set_allocated_module(::std::string* module) {
  if (module != NULL) {
    set_has_module();
  } else {
    clear_has_module();
  }
  module_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), module);
  // @@protoc_insertion_point(field_set_allocated:caffe.PythonParameter.module)
}

// optional string layer = 2;
bool PythonParameter::has_layer() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void PythonParameter::set_has_layer() {
  _has_bits_[0] |= 0x00000002u;
}
void PythonParameter::clear_has_layer() {
  _has_bits_[0] &= ~0x00000002u;
}
void PythonParameter::clear_layer() {
  layer_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_layer();
}
const ::std::string& PythonParameter::layer() const {
  // @@protoc_insertion_point(field_get:caffe.PythonParameter.layer)
  return layer_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void PythonParameter::set_layer(const ::std::string& value) {
  set_has_layer();
  layer_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.PythonParameter.layer)
}
void PythonParameter::set_layer(const char* value) {
  set_has_layer();
  layer_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.PythonParameter.layer)
}
void PythonParameter::set_layer(const char* value, size_t size) {
  set_has_layer();
  layer_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.PythonParameter.layer)
}
::std::string* PythonParameter::mutable_layer() {
  set_has_layer();
  // @@protoc_insertion_point(field_mutable:caffe.PythonParameter.layer)
  return layer_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* PythonParameter::release_layer() {
  // @@protoc_insertion_point(field_release:caffe.PythonParameter.layer)
  clear_has_layer();
  return layer_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void PythonParameter::set_allocated_layer(::std::string* layer) {
  if (layer != NULL) {
    set_has_layer();
  } else {
    clear_has_layer();
  }
  layer_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), layer);
  // @@protoc_insertion_point(field_set_allocated:caffe.PythonParameter.layer)
}

inline const PythonParameter* PythonParameter::internal_default_instance() {
  return &PythonParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* ReductionParameter_ReductionOp_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ReductionParameter_ReductionOp_descriptor_;
}
bool ReductionParameter_ReductionOp_IsValid(int value) {
  switch (value) {
    case 1:
    case 2:
    case 3:
    case 4:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const ReductionParameter_ReductionOp ReductionParameter::SUM;
const ReductionParameter_ReductionOp ReductionParameter::ASUM;
const ReductionParameter_ReductionOp ReductionParameter::SUMSQ;
const ReductionParameter_ReductionOp ReductionParameter::MEAN;
const ReductionParameter_ReductionOp ReductionParameter::ReductionOp_MIN;
const ReductionParameter_ReductionOp ReductionParameter::ReductionOp_MAX;
const int ReductionParameter::ReductionOp_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ReductionParameter::kOperationFieldNumber;
const int ReductionParameter::kAxisFieldNumber;
const int ReductionParameter::kCoeffFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ReductionParameter::ReductionParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ReductionParameter)
}

void ReductionParameter::InitAsDefaultInstance() {
}

ReductionParameter::ReductionParameter(const ReductionParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ReductionParameter)
}

void ReductionParameter::SharedCtor() {
  _cached_size_ = 0;
  axis_ = 0;
  operation_ = 1;
  coeff_ = 1;
}

ReductionParameter::~ReductionParameter() {
  // @@protoc_insertion_point(destructor:caffe.ReductionParameter)
  SharedDtor();
}

void ReductionParameter::SharedDtor() {
}

void ReductionParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ReductionParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ReductionParameter_descriptor_;
}

const ReductionParameter& ReductionParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ReductionParameter> ReductionParameter_default_instance_;

ReductionParameter* ReductionParameter::New(::google::protobuf::Arena* arena) const {
  ReductionParameter* n = new ReductionParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ReductionParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ReductionParameter)
  if (_has_bits_[0 / 32] & 7u) {
    operation_ = 1;
    axis_ = 0;
    coeff_ = 1;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ReductionParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ReductionParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::ReductionParameter_ReductionOp_IsValid(value)) {
            set_operation(static_cast< ::caffe::ReductionParameter_ReductionOp >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_axis;
        break;
      }

      // optional int32 axis = 2 [default = 0];
      case 2: {
        if (tag == 16) {
         parse_axis:
          set_has_axis();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &axis_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_coeff;
        break;
      }

      // optional float coeff = 3 [default = 1];
      case 3: {
        if (tag == 29) {
         parse_coeff:
          set_has_coeff();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &coeff_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ReductionParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ReductionParameter)
  return false;
#undef DO_
}

void ReductionParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ReductionParameter)
  // optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
  if (has_operation()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->operation(), output);
  }

  // optional int32 axis = 2 [default = 0];
  if (has_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->axis(), output);
  }

  // optional float coeff = 3 [default = 1];
  if (has_coeff()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->coeff(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ReductionParameter)
}

::google::protobuf::uint8* ReductionParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ReductionParameter)
  // optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
  if (has_operation()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->operation(), target);
  }

  // optional int32 axis = 2 [default = 0];
  if (has_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->axis(), target);
  }

  // optional float coeff = 3 [default = 1];
  if (has_coeff()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->coeff(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 7u) {
    // optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
    if (has_operation()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->operation());
    }

    // optional int32 axis = 2 [default = 0];
    if (has_axis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->axis());
    }

    // optional float coeff = 3 [default = 1];
    if (has_coeff()) {
      total_size += 1 + 4;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ReductionParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ReductionParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ReductionParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ReductionParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ReductionParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ReductionParameter)
    UnsafeMergeFrom(*source);
  }
}

void ReductionParameter::MergeFrom(const ReductionParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ReductionParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ReductionParameter::UnsafeMergeFrom(const ReductionParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_operation()) {
      set_operation(from.operation());
    }
    if (from.has_axis()) {
      set_axis(from.axis());
    }
    if (from.has_coeff()) {
      set_coeff(from.coeff());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ReductionParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ReductionParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ReductionParameter::IsInitialized() const {

  return true;
}

void ReductionParameter::Swap(ReductionParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ReductionParameter::InternalSwap(ReductionParameter* other) {
  std::swap(operation_, other->operation_);
  std::swap(axis_, other->axis_);
  std::swap(coeff_, other->coeff_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ReductionParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ReductionParameter_descriptor_;
  metadata.reflection = ReductionParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ReductionParameter

// optional .caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
bool ReductionParameter::has_operation() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ReductionParameter::set_has_operation() {
  _has_bits_[0] |= 0x00000001u;
}
void ReductionParameter::clear_has_operation() {
  _has_bits_[0] &= ~0x00000001u;
}
void ReductionParameter::clear_operation() {
  operation_ = 1;
  clear_has_operation();
}
::caffe::ReductionParameter_ReductionOp ReductionParameter::operation() const {
  // @@protoc_insertion_point(field_get:caffe.ReductionParameter.operation)
  return static_cast< ::caffe::ReductionParameter_ReductionOp >(operation_);
}
void ReductionParameter::set_operation(::caffe::ReductionParameter_ReductionOp value) {
  assert(::caffe::ReductionParameter_ReductionOp_IsValid(value));
  set_has_operation();
  operation_ = value;
  // @@protoc_insertion_point(field_set:caffe.ReductionParameter.operation)
}

// optional int32 axis = 2 [default = 0];
bool ReductionParameter::has_axis() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ReductionParameter::set_has_axis() {
  _has_bits_[0] |= 0x00000002u;
}
void ReductionParameter::clear_has_axis() {
  _has_bits_[0] &= ~0x00000002u;
}
void ReductionParameter::clear_axis() {
  axis_ = 0;
  clear_has_axis();
}
::google::protobuf::int32 ReductionParameter::axis() const {
  // @@protoc_insertion_point(field_get:caffe.ReductionParameter.axis)
  return axis_;
}
void ReductionParameter::set_axis(::google::protobuf::int32 value) {
  set_has_axis();
  axis_ = value;
  // @@protoc_insertion_point(field_set:caffe.ReductionParameter.axis)
}

// optional float coeff = 3 [default = 1];
bool ReductionParameter::has_coeff() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void ReductionParameter::set_has_coeff() {
  _has_bits_[0] |= 0x00000004u;
}
void ReductionParameter::clear_has_coeff() {
  _has_bits_[0] &= ~0x00000004u;
}
void ReductionParameter::clear_coeff() {
  coeff_ = 1;
  clear_has_coeff();
}
float ReductionParameter::coeff() const {
  // @@protoc_insertion_point(field_get:caffe.ReductionParameter.coeff)
  return coeff_;
}
void ReductionParameter::set_coeff(float value) {
  set_has_coeff();
  coeff_ = value;
  // @@protoc_insertion_point(field_set:caffe.ReductionParameter.coeff)
}

inline const ReductionParameter* ReductionParameter::internal_default_instance() {
  return &ReductionParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* ReLUParameter_Engine_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ReLUParameter_Engine_descriptor_;
}
bool ReLUParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const ReLUParameter_Engine ReLUParameter::DEFAULT;
const ReLUParameter_Engine ReLUParameter::CAFFE;
const ReLUParameter_Engine ReLUParameter::CUDNN;
const ReLUParameter_Engine ReLUParameter::Engine_MIN;
const ReLUParameter_Engine ReLUParameter::Engine_MAX;
const int ReLUParameter::Engine_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ReLUParameter::kNegativeSlopeFieldNumber;
const int ReLUParameter::kEngineFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ReLUParameter::ReLUParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ReLUParameter)
}

void ReLUParameter::InitAsDefaultInstance() {
}

ReLUParameter::ReLUParameter(const ReLUParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ReLUParameter)
}

void ReLUParameter::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&negative_slope_, 0, reinterpret_cast<char*>(&engine_) -
    reinterpret_cast<char*>(&negative_slope_) + sizeof(engine_));
}

ReLUParameter::~ReLUParameter() {
  // @@protoc_insertion_point(destructor:caffe.ReLUParameter)
  SharedDtor();
}

void ReLUParameter::SharedDtor() {
}

void ReLUParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ReLUParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ReLUParameter_descriptor_;
}

const ReLUParameter& ReLUParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ReLUParameter> ReLUParameter_default_instance_;

ReLUParameter* ReLUParameter::New(::google::protobuf::Arena* arena) const {
  ReLUParameter* n = new ReLUParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ReLUParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ReLUParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(ReLUParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<ReLUParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  ZR_(negative_slope_, engine_);

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ReLUParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ReLUParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float negative_slope = 1 [default = 0];
      case 1: {
        if (tag == 13) {
          set_has_negative_slope();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &negative_slope_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_engine;
        break;
      }

      // optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
      case 2: {
        if (tag == 16) {
         parse_engine:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::ReLUParameter_Engine_IsValid(value)) {
            set_engine(static_cast< ::caffe::ReLUParameter_Engine >(value));
          } else {
            mutable_unknown_fields()->AddVarint(2, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ReLUParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ReLUParameter)
  return false;
#undef DO_
}

void ReLUParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ReLUParameter)
  // optional float negative_slope = 1 [default = 0];
  if (has_negative_slope()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->negative_slope(), output);
  }

  // optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
  if (has_engine()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->engine(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ReLUParameter)
}

::google::protobuf::uint8* ReLUParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ReLUParameter)
  // optional float negative_slope = 1 [default = 0];
  if (has_negative_slope()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->negative_slope(), target);
  }

  // optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
  if (has_engine()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->engine(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 3u) {
    // optional float negative_slope = 1 [default = 0];
    if (has_negative_slope()) {
      total_size += 1 + 4;
    }

    // optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
    if (has_engine()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->engine());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ReLUParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ReLUParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ReLUParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ReLUParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ReLUParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ReLUParameter)
    UnsafeMergeFrom(*source);
  }
}

void ReLUParameter::MergeFrom(const ReLUParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ReLUParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ReLUParameter::UnsafeMergeFrom(const ReLUParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_negative_slope()) {
      set_negative_slope(from.negative_slope());
    }
    if (from.has_engine()) {
      set_engine(from.engine());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ReLUParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ReLUParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ReLUParameter::IsInitialized() const {

  return true;
}

void ReLUParameter::Swap(ReLUParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ReLUParameter::InternalSwap(ReLUParameter* other) {
  std::swap(negative_slope_, other->negative_slope_);
  std::swap(engine_, other->engine_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ReLUParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ReLUParameter_descriptor_;
  metadata.reflection = ReLUParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ReLUParameter

// optional float negative_slope = 1 [default = 0];
bool ReLUParameter::has_negative_slope() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ReLUParameter::set_has_negative_slope() {
  _has_bits_[0] |= 0x00000001u;
}
void ReLUParameter::clear_has_negative_slope() {
  _has_bits_[0] &= ~0x00000001u;
}
void ReLUParameter::clear_negative_slope() {
  negative_slope_ = 0;
  clear_has_negative_slope();
}
float ReLUParameter::negative_slope() const {
  // @@protoc_insertion_point(field_get:caffe.ReLUParameter.negative_slope)
  return negative_slope_;
}
void ReLUParameter::set_negative_slope(float value) {
  set_has_negative_slope();
  negative_slope_ = value;
  // @@protoc_insertion_point(field_set:caffe.ReLUParameter.negative_slope)
}

// optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
bool ReLUParameter::has_engine() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ReLUParameter::set_has_engine() {
  _has_bits_[0] |= 0x00000002u;
}
void ReLUParameter::clear_has_engine() {
  _has_bits_[0] &= ~0x00000002u;
}
void ReLUParameter::clear_engine() {
  engine_ = 0;
  clear_has_engine();
}
::caffe::ReLUParameter_Engine ReLUParameter::engine() const {
  // @@protoc_insertion_point(field_get:caffe.ReLUParameter.engine)
  return static_cast< ::caffe::ReLUParameter_Engine >(engine_);
}
void ReLUParameter::set_engine(::caffe::ReLUParameter_Engine value) {
  assert(::caffe::ReLUParameter_Engine_IsValid(value));
  set_has_engine();
  engine_ = value;
  // @@protoc_insertion_point(field_set:caffe.ReLUParameter.engine)
}

inline const ReLUParameter* ReLUParameter::internal_default_instance() {
  return &ReLUParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ReshapeParameter::kShapeFieldNumber;
const int ReshapeParameter::kAxisFieldNumber;
const int ReshapeParameter::kNumAxesFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ReshapeParameter::ReshapeParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ReshapeParameter)
}

void ReshapeParameter::InitAsDefaultInstance() {
  shape_ = const_cast< ::caffe::BlobShape*>(
      ::caffe::BlobShape::internal_default_instance());
}

ReshapeParameter::ReshapeParameter(const ReshapeParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ReshapeParameter)
}

void ReshapeParameter::SharedCtor() {
  _cached_size_ = 0;
  shape_ = NULL;
  axis_ = 0;
  num_axes_ = -1;
}

ReshapeParameter::~ReshapeParameter() {
  // @@protoc_insertion_point(destructor:caffe.ReshapeParameter)
  SharedDtor();
}

void ReshapeParameter::SharedDtor() {
  if (this != &ReshapeParameter_default_instance_.get()) {
    delete shape_;
  }
}

void ReshapeParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ReshapeParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ReshapeParameter_descriptor_;
}

const ReshapeParameter& ReshapeParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ReshapeParameter> ReshapeParameter_default_instance_;

ReshapeParameter* ReshapeParameter::New(::google::protobuf::Arena* arena) const {
  ReshapeParameter* n = new ReshapeParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ReshapeParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ReshapeParameter)
  if (_has_bits_[0 / 32] & 7u) {
    if (has_shape()) {
      if (shape_ != NULL) shape_->::caffe::BlobShape::Clear();
    }
    axis_ = 0;
    num_axes_ = -1;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ReshapeParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ReshapeParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.BlobShape shape = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_shape()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_axis;
        break;
      }

      // optional int32 axis = 2 [default = 0];
      case 2: {
        if (tag == 16) {
         parse_axis:
          set_has_axis();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &axis_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_num_axes;
        break;
      }

      // optional int32 num_axes = 3 [default = -1];
      case 3: {
        if (tag == 24) {
         parse_num_axes:
          set_has_num_axes();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &num_axes_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ReshapeParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ReshapeParameter)
  return false;
#undef DO_
}

void ReshapeParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ReshapeParameter)
  // optional .caffe.BlobShape shape = 1;
  if (has_shape()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, *this->shape_, output);
  }

  // optional int32 axis = 2 [default = 0];
  if (has_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->axis(), output);
  }

  // optional int32 num_axes = 3 [default = -1];
  if (has_num_axes()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->num_axes(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ReshapeParameter)
}

::google::protobuf::uint8* ReshapeParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ReshapeParameter)
  // optional .caffe.BlobShape shape = 1;
  if (has_shape()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        1, *this->shape_, false, target);
  }

  // optional int32 axis = 2 [default = 0];
  if (has_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->axis(), target);
  }

  // optional int32 num_axes = 3 [default = -1];
  if (has_num_axes()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->num_axes(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 7u) {
    // optional .caffe.BlobShape shape = 1;
    if (has_shape()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->shape_);
    }

    // optional int32 axis = 2 [default = 0];
    if (has_axis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->axis());
    }

    // optional int32 num_axes = 3 [default = -1];
    if (has_num_axes()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->num_axes());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ReshapeParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ReshapeParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ReshapeParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ReshapeParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ReshapeParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ReshapeParameter)
    UnsafeMergeFrom(*source);
  }
}

void ReshapeParameter::MergeFrom(const ReshapeParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ReshapeParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ReshapeParameter::UnsafeMergeFrom(const ReshapeParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_shape()) {
      mutable_shape()->::caffe::BlobShape::MergeFrom(from.shape());
    }
    if (from.has_axis()) {
      set_axis(from.axis());
    }
    if (from.has_num_axes()) {
      set_num_axes(from.num_axes());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ReshapeParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ReshapeParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ReshapeParameter::IsInitialized() const {

  return true;
}

void ReshapeParameter::Swap(ReshapeParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ReshapeParameter::InternalSwap(ReshapeParameter* other) {
  std::swap(shape_, other->shape_);
  std::swap(axis_, other->axis_);
  std::swap(num_axes_, other->num_axes_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ReshapeParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ReshapeParameter_descriptor_;
  metadata.reflection = ReshapeParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ReshapeParameter

// optional .caffe.BlobShape shape = 1;
bool ReshapeParameter::has_shape() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ReshapeParameter::set_has_shape() {
  _has_bits_[0] |= 0x00000001u;
}
void ReshapeParameter::clear_has_shape() {
  _has_bits_[0] &= ~0x00000001u;
}
void ReshapeParameter::clear_shape() {
  if (shape_ != NULL) shape_->::caffe::BlobShape::Clear();
  clear_has_shape();
}
const ::caffe::BlobShape& ReshapeParameter::shape() const {
  // @@protoc_insertion_point(field_get:caffe.ReshapeParameter.shape)
  return shape_ != NULL ? *shape_
                         : *::caffe::BlobShape::internal_default_instance();
}
::caffe::BlobShape* ReshapeParameter::mutable_shape() {
  set_has_shape();
  if (shape_ == NULL) {
    shape_ = new ::caffe::BlobShape;
  }
  // @@protoc_insertion_point(field_mutable:caffe.ReshapeParameter.shape)
  return shape_;
}
::caffe::BlobShape* ReshapeParameter::release_shape() {
  // @@protoc_insertion_point(field_release:caffe.ReshapeParameter.shape)
  clear_has_shape();
  ::caffe::BlobShape* temp = shape_;
  shape_ = NULL;
  return temp;
}
void ReshapeParameter::set_allocated_shape(::caffe::BlobShape* shape) {
  delete shape_;
  shape_ = shape;
  if (shape) {
    set_has_shape();
  } else {
    clear_has_shape();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.ReshapeParameter.shape)
}

// optional int32 axis = 2 [default = 0];
bool ReshapeParameter::has_axis() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ReshapeParameter::set_has_axis() {
  _has_bits_[0] |= 0x00000002u;
}
void ReshapeParameter::clear_has_axis() {
  _has_bits_[0] &= ~0x00000002u;
}
void ReshapeParameter::clear_axis() {
  axis_ = 0;
  clear_has_axis();
}
::google::protobuf::int32 ReshapeParameter::axis() const {
  // @@protoc_insertion_point(field_get:caffe.ReshapeParameter.axis)
  return axis_;
}
void ReshapeParameter::set_axis(::google::protobuf::int32 value) {
  set_has_axis();
  axis_ = value;
  // @@protoc_insertion_point(field_set:caffe.ReshapeParameter.axis)
}

// optional int32 num_axes = 3 [default = -1];
bool ReshapeParameter::has_num_axes() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void ReshapeParameter::set_has_num_axes() {
  _has_bits_[0] |= 0x00000004u;
}
void ReshapeParameter::clear_has_num_axes() {
  _has_bits_[0] &= ~0x00000004u;
}
void ReshapeParameter::clear_num_axes() {
  num_axes_ = -1;
  clear_has_num_axes();
}
::google::protobuf::int32 ReshapeParameter::num_axes() const {
  // @@protoc_insertion_point(field_get:caffe.ReshapeParameter.num_axes)
  return num_axes_;
}
void ReshapeParameter::set_num_axes(::google::protobuf::int32 value) {
  set_has_num_axes();
  num_axes_ = value;
  // @@protoc_insertion_point(field_set:caffe.ReshapeParameter.num_axes)
}

inline const ReshapeParameter* ReshapeParameter::internal_default_instance() {
  return &ReshapeParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* SigmoidParameter_Engine_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SigmoidParameter_Engine_descriptor_;
}
bool SigmoidParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const SigmoidParameter_Engine SigmoidParameter::DEFAULT;
const SigmoidParameter_Engine SigmoidParameter::CAFFE;
const SigmoidParameter_Engine SigmoidParameter::CUDNN;
const SigmoidParameter_Engine SigmoidParameter::Engine_MIN;
const SigmoidParameter_Engine SigmoidParameter::Engine_MAX;
const int SigmoidParameter::Engine_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int SigmoidParameter::kEngineFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

SigmoidParameter::SigmoidParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.SigmoidParameter)
}

void SigmoidParameter::InitAsDefaultInstance() {
}

SigmoidParameter::SigmoidParameter(const SigmoidParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.SigmoidParameter)
}

void SigmoidParameter::SharedCtor() {
  _cached_size_ = 0;
  engine_ = 0;
}

SigmoidParameter::~SigmoidParameter() {
  // @@protoc_insertion_point(destructor:caffe.SigmoidParameter)
  SharedDtor();
}

void SigmoidParameter::SharedDtor() {
}

void SigmoidParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SigmoidParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SigmoidParameter_descriptor_;
}

const SigmoidParameter& SigmoidParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<SigmoidParameter> SigmoidParameter_default_instance_;

SigmoidParameter* SigmoidParameter::New(::google::protobuf::Arena* arena) const {
  SigmoidParameter* n = new SigmoidParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void SigmoidParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.SigmoidParameter)
  engine_ = 0;
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool SigmoidParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.SigmoidParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::SigmoidParameter_Engine_IsValid(value)) {
            set_engine(static_cast< ::caffe::SigmoidParameter_Engine >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.SigmoidParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.SigmoidParameter)
  return false;
#undef DO_
}

void SigmoidParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.SigmoidParameter)
  // optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
  if (has_engine()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->engine(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.SigmoidParameter)
}

::google::protobuf::uint8* SigmoidParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.SigmoidParameter)
  // optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
  if (has_engine()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->engine(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
  if (has_engine()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->engine());
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SigmoidParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.SigmoidParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const SigmoidParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const SigmoidParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.SigmoidParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.SigmoidParameter)
    UnsafeMergeFrom(*source);
  }
}

void SigmoidParameter::MergeFrom(const SigmoidParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SigmoidParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void SigmoidParameter::UnsafeMergeFrom(const SigmoidParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_engine()) {
      set_engine(from.engine());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void SigmoidParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.SigmoidParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool SigmoidParameter::IsInitialized() const {

  return true;
}

void SigmoidParameter::Swap(SigmoidParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void SigmoidParameter::InternalSwap(SigmoidParameter* other) {
  std::swap(engine_, other->engine_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata SigmoidParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SigmoidParameter_descriptor_;
  metadata.reflection = SigmoidParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// SigmoidParameter

// optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
bool SigmoidParameter::has_engine() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void SigmoidParameter::set_has_engine() {
  _has_bits_[0] |= 0x00000001u;
}
void SigmoidParameter::clear_has_engine() {
  _has_bits_[0] &= ~0x00000001u;
}
void SigmoidParameter::clear_engine() {
  engine_ = 0;
  clear_has_engine();
}
::caffe::SigmoidParameter_Engine SigmoidParameter::engine() const {
  // @@protoc_insertion_point(field_get:caffe.SigmoidParameter.engine)
  return static_cast< ::caffe::SigmoidParameter_Engine >(engine_);
}
void SigmoidParameter::set_engine(::caffe::SigmoidParameter_Engine value) {
  assert(::caffe::SigmoidParameter_Engine_IsValid(value));
  set_has_engine();
  engine_ = value;
  // @@protoc_insertion_point(field_set:caffe.SigmoidParameter.engine)
}

inline const SigmoidParameter* SigmoidParameter::internal_default_instance() {
  return &SigmoidParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int SliceParameter::kAxisFieldNumber;
const int SliceParameter::kSlicePointFieldNumber;
const int SliceParameter::kSliceDimFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

SliceParameter::SliceParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.SliceParameter)
}

void SliceParameter::InitAsDefaultInstance() {
}

SliceParameter::SliceParameter(const SliceParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.SliceParameter)
}

void SliceParameter::SharedCtor() {
  _cached_size_ = 0;
  axis_ = 1;
  slice_dim_ = 1u;
}

SliceParameter::~SliceParameter() {
  // @@protoc_insertion_point(destructor:caffe.SliceParameter)
  SharedDtor();
}

void SliceParameter::SharedDtor() {
}

void SliceParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SliceParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SliceParameter_descriptor_;
}

const SliceParameter& SliceParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<SliceParameter> SliceParameter_default_instance_;

SliceParameter* SliceParameter::New(::google::protobuf::Arena* arena) const {
  SliceParameter* n = new SliceParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void SliceParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.SliceParameter)
  if (_has_bits_[0 / 32] & 5u) {
    axis_ = 1;
    slice_dim_ = 1u;
  }
  slice_point_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool SliceParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.SliceParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint32 slice_dim = 1 [default = 1];
      case 1: {
        if (tag == 8) {
          set_has_slice_dim();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &slice_dim_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_slice_point;
        break;
      }

      // repeated uint32 slice_point = 2;
      case 2: {
        if (tag == 16) {
         parse_slice_point:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 1, 16, input, this->mutable_slice_point())));
        } else if (tag == 18) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, this->mutable_slice_point())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_slice_point;
        if (input->ExpectTag(24)) goto parse_axis;
        break;
      }

      // optional int32 axis = 3 [default = 1];
      case 3: {
        if (tag == 24) {
         parse_axis:
          set_has_axis();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &axis_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.SliceParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.SliceParameter)
  return false;
#undef DO_
}

void SliceParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.SliceParameter)
  // optional uint32 slice_dim = 1 [default = 1];
  if (has_slice_dim()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->slice_dim(), output);
  }

  // repeated uint32 slice_point = 2;
  for (int i = 0; i < this->slice_point_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(
      2, this->slice_point(i), output);
  }

  // optional int32 axis = 3 [default = 1];
  if (has_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(3, this->axis(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.SliceParameter)
}

::google::protobuf::uint8* SliceParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.SliceParameter)
  // optional uint32 slice_dim = 1 [default = 1];
  if (has_slice_dim()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->slice_dim(), target);
  }

  // repeated uint32 slice_point = 2;
  for (int i = 0; i < this->slice_point_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteUInt32ToArray(2, this->slice_point(i), target);
  }

  // optional int32 axis = 3 [default = 1];
  if (has_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(3, this->axis(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 5u) {
    // optional int32 axis = 3 [default = 1];
    if (has_axis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->axis());
    }

    // optional uint32 slice_dim = 1 [default = 1];
    if (has_slice_dim()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->slice_dim());
    }

  }
  // repeated uint32 slice_point = 2;
  {
    size_t data_size = 0;
    unsigned int count = this->slice_point_size();
    for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::
        UInt32Size(this->slice_point(i));
    }
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->slice_point_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SliceParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.SliceParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const SliceParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const SliceParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.SliceParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.SliceParameter)
    UnsafeMergeFrom(*source);
  }
}

void SliceParameter::MergeFrom(const SliceParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SliceParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void SliceParameter::UnsafeMergeFrom(const SliceParameter& from) {
  GOOGLE_DCHECK(&from != this);
  slice_point_.UnsafeMergeFrom(from.slice_point_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_axis()) {
      set_axis(from.axis());
    }
    if (from.has_slice_dim()) {
      set_slice_dim(from.slice_dim());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void SliceParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.SliceParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool SliceParameter::IsInitialized() const {

  return true;
}

void SliceParameter::Swap(SliceParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void SliceParameter::InternalSwap(SliceParameter* other) {
  std::swap(axis_, other->axis_);
  slice_point_.UnsafeArenaSwap(&other->slice_point_);
  std::swap(slice_dim_, other->slice_dim_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata SliceParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SliceParameter_descriptor_;
  metadata.reflection = SliceParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// SliceParameter

// optional int32 axis = 3 [default = 1];
bool SliceParameter::has_axis() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void SliceParameter::set_has_axis() {
  _has_bits_[0] |= 0x00000001u;
}
void SliceParameter::clear_has_axis() {
  _has_bits_[0] &= ~0x00000001u;
}
void SliceParameter::clear_axis() {
  axis_ = 1;
  clear_has_axis();
}
::google::protobuf::int32 SliceParameter::axis() const {
  // @@protoc_insertion_point(field_get:caffe.SliceParameter.axis)
  return axis_;
}
void SliceParameter::set_axis(::google::protobuf::int32 value) {
  set_has_axis();
  axis_ = value;
  // @@protoc_insertion_point(field_set:caffe.SliceParameter.axis)
}

// repeated uint32 slice_point = 2;
int SliceParameter::slice_point_size() const {
  return slice_point_.size();
}
void SliceParameter::clear_slice_point() {
  slice_point_.Clear();
}
::google::protobuf::uint32 SliceParameter::slice_point(int index) const {
  // @@protoc_insertion_point(field_get:caffe.SliceParameter.slice_point)
  return slice_point_.Get(index);
}
void SliceParameter::set_slice_point(int index, ::google::protobuf::uint32 value) {
  slice_point_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.SliceParameter.slice_point)
}
void SliceParameter::add_slice_point(::google::protobuf::uint32 value) {
  slice_point_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.SliceParameter.slice_point)
}
const ::google::protobuf::RepeatedField< ::google::protobuf::uint32 >&
SliceParameter::slice_point() const {
  // @@protoc_insertion_point(field_list:caffe.SliceParameter.slice_point)
  return slice_point_;
}
::google::protobuf::RepeatedField< ::google::protobuf::uint32 >*
SliceParameter::mutable_slice_point() {
  // @@protoc_insertion_point(field_mutable_list:caffe.SliceParameter.slice_point)
  return &slice_point_;
}

// optional uint32 slice_dim = 1 [default = 1];
bool SliceParameter::has_slice_dim() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void SliceParameter::set_has_slice_dim() {
  _has_bits_[0] |= 0x00000004u;
}
void SliceParameter::clear_has_slice_dim() {
  _has_bits_[0] &= ~0x00000004u;
}
void SliceParameter::clear_slice_dim() {
  slice_dim_ = 1u;
  clear_has_slice_dim();
}
::google::protobuf::uint32 SliceParameter::slice_dim() const {
  // @@protoc_insertion_point(field_get:caffe.SliceParameter.slice_dim)
  return slice_dim_;
}
void SliceParameter::set_slice_dim(::google::protobuf::uint32 value) {
  set_has_slice_dim();
  slice_dim_ = value;
  // @@protoc_insertion_point(field_set:caffe.SliceParameter.slice_dim)
}

inline const SliceParameter* SliceParameter::internal_default_instance() {
  return &SliceParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* SoftmaxParameter_Engine_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SoftmaxParameter_Engine_descriptor_;
}
bool SoftmaxParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const SoftmaxParameter_Engine SoftmaxParameter::DEFAULT;
const SoftmaxParameter_Engine SoftmaxParameter::CAFFE;
const SoftmaxParameter_Engine SoftmaxParameter::CUDNN;
const SoftmaxParameter_Engine SoftmaxParameter::Engine_MIN;
const SoftmaxParameter_Engine SoftmaxParameter::Engine_MAX;
const int SoftmaxParameter::Engine_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int SoftmaxParameter::kEngineFieldNumber;
const int SoftmaxParameter::kAxisFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

SoftmaxParameter::SoftmaxParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.SoftmaxParameter)
}

void SoftmaxParameter::InitAsDefaultInstance() {
}

SoftmaxParameter::SoftmaxParameter(const SoftmaxParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.SoftmaxParameter)
}

void SoftmaxParameter::SharedCtor() {
  _cached_size_ = 0;
  engine_ = 0;
  axis_ = 1;
}

SoftmaxParameter::~SoftmaxParameter() {
  // @@protoc_insertion_point(destructor:caffe.SoftmaxParameter)
  SharedDtor();
}

void SoftmaxParameter::SharedDtor() {
}

void SoftmaxParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SoftmaxParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SoftmaxParameter_descriptor_;
}

const SoftmaxParameter& SoftmaxParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<SoftmaxParameter> SoftmaxParameter_default_instance_;

SoftmaxParameter* SoftmaxParameter::New(::google::protobuf::Arena* arena) const {
  SoftmaxParameter* n = new SoftmaxParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void SoftmaxParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.SoftmaxParameter)
  if (_has_bits_[0 / 32] & 3u) {
    engine_ = 0;
    axis_ = 1;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool SoftmaxParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.SoftmaxParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::SoftmaxParameter_Engine_IsValid(value)) {
            set_engine(static_cast< ::caffe::SoftmaxParameter_Engine >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_axis;
        break;
      }

      // optional int32 axis = 2 [default = 1];
      case 2: {
        if (tag == 16) {
         parse_axis:
          set_has_axis();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &axis_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.SoftmaxParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.SoftmaxParameter)
  return false;
#undef DO_
}

void SoftmaxParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.SoftmaxParameter)
  // optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
  if (has_engine()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->engine(), output);
  }

  // optional int32 axis = 2 [default = 1];
  if (has_axis()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->axis(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.SoftmaxParameter)
}

::google::protobuf::uint8* SoftmaxParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.SoftmaxParameter)
  // optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
  if (has_engine()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->engine(), target);
  }

  // optional int32 axis = 2 [default = 1];
  if (has_axis()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->axis(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 3u) {
    // optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
    if (has_engine()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->engine());
    }

    // optional int32 axis = 2 [default = 1];
    if (has_axis()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->axis());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SoftmaxParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.SoftmaxParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const SoftmaxParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const SoftmaxParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.SoftmaxParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.SoftmaxParameter)
    UnsafeMergeFrom(*source);
  }
}

void SoftmaxParameter::MergeFrom(const SoftmaxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SoftmaxParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void SoftmaxParameter::UnsafeMergeFrom(const SoftmaxParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_engine()) {
      set_engine(from.engine());
    }
    if (from.has_axis()) {
      set_axis(from.axis());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void SoftmaxParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.SoftmaxParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool SoftmaxParameter::IsInitialized() const {

  return true;
}

void SoftmaxParameter::Swap(SoftmaxParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void SoftmaxParameter::InternalSwap(SoftmaxParameter* other) {
  std::swap(engine_, other->engine_);
  std::swap(axis_, other->axis_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata SoftmaxParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SoftmaxParameter_descriptor_;
  metadata.reflection = SoftmaxParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// SoftmaxParameter

// optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
bool SoftmaxParameter::has_engine() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void SoftmaxParameter::set_has_engine() {
  _has_bits_[0] |= 0x00000001u;
}
void SoftmaxParameter::clear_has_engine() {
  _has_bits_[0] &= ~0x00000001u;
}
void SoftmaxParameter::clear_engine() {
  engine_ = 0;
  clear_has_engine();
}
::caffe::SoftmaxParameter_Engine SoftmaxParameter::engine() const {
  // @@protoc_insertion_point(field_get:caffe.SoftmaxParameter.engine)
  return static_cast< ::caffe::SoftmaxParameter_Engine >(engine_);
}
void SoftmaxParameter::set_engine(::caffe::SoftmaxParameter_Engine value) {
  assert(::caffe::SoftmaxParameter_Engine_IsValid(value));
  set_has_engine();
  engine_ = value;
  // @@protoc_insertion_point(field_set:caffe.SoftmaxParameter.engine)
}

// optional int32 axis = 2 [default = 1];
bool SoftmaxParameter::has_axis() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void SoftmaxParameter::set_has_axis() {
  _has_bits_[0] |= 0x00000002u;
}
void SoftmaxParameter::clear_has_axis() {
  _has_bits_[0] &= ~0x00000002u;
}
void SoftmaxParameter::clear_axis() {
  axis_ = 1;
  clear_has_axis();
}
::google::protobuf::int32 SoftmaxParameter::axis() const {
  // @@protoc_insertion_point(field_get:caffe.SoftmaxParameter.axis)
  return axis_;
}
void SoftmaxParameter::set_axis(::google::protobuf::int32 value) {
  set_has_axis();
  axis_ = value;
  // @@protoc_insertion_point(field_set:caffe.SoftmaxParameter.axis)
}

inline const SoftmaxParameter* SoftmaxParameter::internal_default_instance() {
  return &SoftmaxParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* TanHParameter_Engine_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TanHParameter_Engine_descriptor_;
}
bool TanHParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const TanHParameter_Engine TanHParameter::DEFAULT;
const TanHParameter_Engine TanHParameter::CAFFE;
const TanHParameter_Engine TanHParameter::CUDNN;
const TanHParameter_Engine TanHParameter::Engine_MIN;
const TanHParameter_Engine TanHParameter::Engine_MAX;
const int TanHParameter::Engine_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TanHParameter::kEngineFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TanHParameter::TanHParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.TanHParameter)
}

void TanHParameter::InitAsDefaultInstance() {
}

TanHParameter::TanHParameter(const TanHParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.TanHParameter)
}

void TanHParameter::SharedCtor() {
  _cached_size_ = 0;
  engine_ = 0;
}

TanHParameter::~TanHParameter() {
  // @@protoc_insertion_point(destructor:caffe.TanHParameter)
  SharedDtor();
}

void TanHParameter::SharedDtor() {
}

void TanHParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* TanHParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return TanHParameter_descriptor_;
}

const TanHParameter& TanHParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<TanHParameter> TanHParameter_default_instance_;

TanHParameter* TanHParameter::New(::google::protobuf::Arena* arena) const {
  TanHParameter* n = new TanHParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void TanHParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.TanHParameter)
  engine_ = 0;
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool TanHParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.TanHParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
      case 1: {
        if (tag == 8) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::TanHParameter_Engine_IsValid(value)) {
            set_engine(static_cast< ::caffe::TanHParameter_Engine >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.TanHParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.TanHParameter)
  return false;
#undef DO_
}

void TanHParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.TanHParameter)
  // optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
  if (has_engine()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->engine(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.TanHParameter)
}

::google::protobuf::uint8* TanHParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.TanHParameter)
  // optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
  if (has_engine()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1, this->engine(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
  if (has_engine()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::EnumSize(this->engine());
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void TanHParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.TanHParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const TanHParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const TanHParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.TanHParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.TanHParameter)
    UnsafeMergeFrom(*source);
  }
}

void TanHParameter::MergeFrom(const TanHParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.TanHParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void TanHParameter::UnsafeMergeFrom(const TanHParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_engine()) {
      set_engine(from.engine());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void TanHParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.TanHParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool TanHParameter::IsInitialized() const {

  return true;
}

void TanHParameter::Swap(TanHParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TanHParameter::InternalSwap(TanHParameter* other) {
  std::swap(engine_, other->engine_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata TanHParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = TanHParameter_descriptor_;
  metadata.reflection = TanHParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// TanHParameter

// optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
bool TanHParameter::has_engine() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void TanHParameter::set_has_engine() {
  _has_bits_[0] |= 0x00000001u;
}
void TanHParameter::clear_has_engine() {
  _has_bits_[0] &= ~0x00000001u;
}
void TanHParameter::clear_engine() {
  engine_ = 0;
  clear_has_engine();
}
::caffe::TanHParameter_Engine TanHParameter::engine() const {
  // @@protoc_insertion_point(field_get:caffe.TanHParameter.engine)
  return static_cast< ::caffe::TanHParameter_Engine >(engine_);
}
void TanHParameter::set_engine(::caffe::TanHParameter_Engine value) {
  assert(::caffe::TanHParameter_Engine_IsValid(value));
  set_has_engine();
  engine_ = value;
  // @@protoc_insertion_point(field_set:caffe.TanHParameter.engine)
}

inline const TanHParameter* TanHParameter::internal_default_instance() {
  return &TanHParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ThresholdParameter::kThresholdFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ThresholdParameter::ThresholdParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.ThresholdParameter)
}

void ThresholdParameter::InitAsDefaultInstance() {
}

ThresholdParameter::ThresholdParameter(const ThresholdParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.ThresholdParameter)
}

void ThresholdParameter::SharedCtor() {
  _cached_size_ = 0;
  threshold_ = 0;
}

ThresholdParameter::~ThresholdParameter() {
  // @@protoc_insertion_point(destructor:caffe.ThresholdParameter)
  SharedDtor();
}

void ThresholdParameter::SharedDtor() {
}

void ThresholdParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* ThresholdParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return ThresholdParameter_descriptor_;
}

const ThresholdParameter& ThresholdParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<ThresholdParameter> ThresholdParameter_default_instance_;

ThresholdParameter* ThresholdParameter::New(::google::protobuf::Arena* arena) const {
  ThresholdParameter* n = new ThresholdParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ThresholdParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.ThresholdParameter)
  threshold_ = 0;
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool ThresholdParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.ThresholdParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float threshold = 1 [default = 0];
      case 1: {
        if (tag == 13) {
          set_has_threshold();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &threshold_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.ThresholdParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.ThresholdParameter)
  return false;
#undef DO_
}

void ThresholdParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.ThresholdParameter)
  // optional float threshold = 1 [default = 0];
  if (has_threshold()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->threshold(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.ThresholdParameter)
}

::google::protobuf::uint8* ThresholdParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.ThresholdParameter)
  // optional float threshold = 1 [default = 0];
  if (has_threshold()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->threshold(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  // optional float threshold = 1 [default = 0];
  if (has_threshold()) {
    total_size += 1 + 4;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ThresholdParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.ThresholdParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const ThresholdParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ThresholdParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.ThresholdParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.ThresholdParameter)
    UnsafeMergeFrom(*source);
  }
}

void ThresholdParameter::MergeFrom(const ThresholdParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.ThresholdParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void ThresholdParameter::UnsafeMergeFrom(const ThresholdParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_threshold()) {
      set_threshold(from.threshold());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void ThresholdParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.ThresholdParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ThresholdParameter::IsInitialized() const {

  return true;
}

void ThresholdParameter::Swap(ThresholdParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ThresholdParameter::InternalSwap(ThresholdParameter* other) {
  std::swap(threshold_, other->threshold_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata ThresholdParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = ThresholdParameter_descriptor_;
  metadata.reflection = ThresholdParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ThresholdParameter

// optional float threshold = 1 [default = 0];
bool ThresholdParameter::has_threshold() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ThresholdParameter::set_has_threshold() {
  _has_bits_[0] |= 0x00000001u;
}
void ThresholdParameter::clear_has_threshold() {
  _has_bits_[0] &= ~0x00000001u;
}
void ThresholdParameter::clear_threshold() {
  threshold_ = 0;
  clear_has_threshold();
}
float ThresholdParameter::threshold() const {
  // @@protoc_insertion_point(field_get:caffe.ThresholdParameter.threshold)
  return threshold_;
}
void ThresholdParameter::set_threshold(float value) {
  set_has_threshold();
  threshold_ = value;
  // @@protoc_insertion_point(field_set:caffe.ThresholdParameter.threshold)
}

inline const ThresholdParameter* ThresholdParameter::internal_default_instance() {
  return &ThresholdParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

::std::string* WindowDataParameter::_default_crop_mode_ = NULL;
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int WindowDataParameter::kSourceFieldNumber;
const int WindowDataParameter::kScaleFieldNumber;
const int WindowDataParameter::kMeanFileFieldNumber;
const int WindowDataParameter::kBatchSizeFieldNumber;
const int WindowDataParameter::kCropSizeFieldNumber;
const int WindowDataParameter::kMirrorFieldNumber;
const int WindowDataParameter::kFgThresholdFieldNumber;
const int WindowDataParameter::kBgThresholdFieldNumber;
const int WindowDataParameter::kFgFractionFieldNumber;
const int WindowDataParameter::kContextPadFieldNumber;
const int WindowDataParameter::kCropModeFieldNumber;
const int WindowDataParameter::kCacheImagesFieldNumber;
const int WindowDataParameter::kRootFolderFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

WindowDataParameter::WindowDataParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.WindowDataParameter)
}

void WindowDataParameter::InitAsDefaultInstance() {
}

WindowDataParameter::WindowDataParameter(const WindowDataParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.WindowDataParameter)
}

void WindowDataParameter::SharedCtor() {
  _cached_size_ = 0;
  source_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  mean_file_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  crop_mode_.UnsafeSetDefault(_default_crop_mode_);
  root_folder_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&batch_size_, 0, 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)
  SharedDtor();
}

void WindowDataParameter::SharedDtor() {
  source_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  mean_file_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  crop_mode_.DestroyNoArena(_default_crop_mode_);
  root_folder_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void WindowDataParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* WindowDataParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return WindowDataParameter_descriptor_;
}

const WindowDataParameter& WindowDataParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<WindowDataParameter> WindowDataParameter_default_instance_;

WindowDataParameter* WindowDataParameter::New(::google::protobuf::Arena* arena) const {
  WindowDataParameter* n = new WindowDataParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void WindowDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.WindowDataParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(WindowDataParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<WindowDataParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 255u) {
    ZR_(batch_size_, mirror_);
    if (has_source()) {
      source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    scale_ = 1;
    if (has_mean_file()) {
      mean_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    fg_threshold_ = 0.5f;
    bg_threshold_ = 0.5f;
  }
  if (_has_bits_[8 / 32] & 7936u) {
    ZR_(cache_images_, context_pad_);
    fg_fraction_ = 0.25f;
    if (has_crop_mode()) {
      crop_mode_.ClearToDefaultNoArena(_default_crop_mode_);
    }
    if (has_root_folder()) {
      root_folder_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
  }

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool WindowDataParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.WindowDataParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string source = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_source()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->source().data(), this->source().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.WindowDataParameter.source");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_scale;
        break;
      }

      // optional float scale = 2 [default = 1];
      case 2: {
        if (tag == 21) {
         parse_scale:
          set_has_scale();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &scale_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_mean_file;
        break;
      }

      // optional string mean_file = 3;
      case 3: {
        if (tag == 26) {
         parse_mean_file:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_mean_file()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->mean_file().data(), this->mean_file().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.WindowDataParameter.mean_file");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_batch_size;
        break;
      }

      // optional uint32 batch_size = 4;
      case 4: {
        if (tag == 32) {
         parse_batch_size:
          set_has_batch_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &batch_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_crop_size;
        break;
      }

      // optional uint32 crop_size = 5 [default = 0];
      case 5: {
        if (tag == 40) {
         parse_crop_size:
          set_has_crop_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &crop_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_mirror;
        break;
      }

      // optional bool mirror = 6 [default = false];
      case 6: {
        if (tag == 48) {
         parse_mirror:
          set_has_mirror();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &mirror_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(61)) goto parse_fg_threshold;
        break;
      }

      // optional float fg_threshold = 7 [default = 0.5];
      case 7: {
        if (tag == 61) {
         parse_fg_threshold:
          set_has_fg_threshold();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &fg_threshold_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(69)) goto parse_bg_threshold;
        break;
      }

      // optional float bg_threshold = 8 [default = 0.5];
      case 8: {
        if (tag == 69) {
         parse_bg_threshold:
          set_has_bg_threshold();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &bg_threshold_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(77)) goto parse_fg_fraction;
        break;
      }

      // optional float fg_fraction = 9 [default = 0.25];
      case 9: {
        if (tag == 77) {
         parse_fg_fraction:
          set_has_fg_fraction();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &fg_fraction_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(80)) goto parse_context_pad;
        break;
      }

      // optional uint32 context_pad = 10 [default = 0];
      case 10: {
        if (tag == 80) {
         parse_context_pad:
          set_has_context_pad();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &context_pad_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(90)) goto parse_crop_mode;
        break;
      }

      // optional string crop_mode = 11 [default = "warp"];
      case 11: {
        if (tag == 90) {
         parse_crop_mode:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_crop_mode()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->crop_mode().data(), this->crop_mode().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.WindowDataParameter.crop_mode");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(96)) goto parse_cache_images;
        break;
      }

      // optional bool cache_images = 12 [default = false];
      case 12: {
        if (tag == 96) {
         parse_cache_images:
          set_has_cache_images();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &cache_images_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(106)) goto parse_root_folder;
        break;
      }

      // optional string root_folder = 13 [default = ""];
      case 13: {
        if (tag == 106) {
         parse_root_folder:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_root_folder()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->root_folder().data(), this->root_folder().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.WindowDataParameter.root_folder");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.WindowDataParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.WindowDataParameter)
  return false;
#undef DO_
}

void WindowDataParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.WindowDataParameter)
  // optional string source = 1;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.WindowDataParameter.source");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->source(), output);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->scale(), output);
  }

  // optional string mean_file = 3;
  if (has_mean_file()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->mean_file().data(), this->mean_file().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.WindowDataParameter.mean_file");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->mean_file(), output);
  }

  // optional uint32 batch_size = 4;
  if (has_batch_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(4, this->batch_size(), output);
  }

  // optional uint32 crop_size = 5 [default = 0];
  if (has_crop_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(5, this->crop_size(), output);
  }

  // optional bool mirror = 6 [default = false];
  if (has_mirror()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->mirror(), output);
  }

  // optional float fg_threshold = 7 [default = 0.5];
  if (has_fg_threshold()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->fg_threshold(), output);
  }

  // optional float bg_threshold = 8 [default = 0.5];
  if (has_bg_threshold()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(8, this->bg_threshold(), output);
  }

  // optional float fg_fraction = 9 [default = 0.25];
  if (has_fg_fraction()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(9, this->fg_fraction(), output);
  }

  // optional uint32 context_pad = 10 [default = 0];
  if (has_context_pad()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(10, this->context_pad(), output);
  }

  // optional string crop_mode = 11 [default = "warp"];
  if (has_crop_mode()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->crop_mode().data(), this->crop_mode().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.WindowDataParameter.crop_mode");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      11, this->crop_mode(), output);
  }

  // optional bool cache_images = 12 [default = false];
  if (has_cache_images()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(12, this->cache_images(), output);
  }

  // optional string root_folder = 13 [default = ""];
  if (has_root_folder()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->root_folder().data(), this->root_folder().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.WindowDataParameter.root_folder");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      13, this->root_folder(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.WindowDataParameter)
}

::google::protobuf::uint8* WindowDataParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.WindowDataParameter)
  // optional string source = 1;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.WindowDataParameter.source");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->source(), target);
  }

  // optional float scale = 2 [default = 1];
  if (has_scale()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->scale(), target);
  }

  // optional string mean_file = 3;
  if (has_mean_file()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->mean_file().data(), this->mean_file().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.WindowDataParameter.mean_file");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->mean_file(), target);
  }

  // optional uint32 batch_size = 4;
  if (has_batch_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(4, this->batch_size(), target);
  }

  // optional uint32 crop_size = 5 [default = 0];
  if (has_crop_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(5, this->crop_size(), target);
  }

  // optional bool mirror = 6 [default = false];
  if (has_mirror()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->mirror(), target);
  }

  // optional float fg_threshold = 7 [default = 0.5];
  if (has_fg_threshold()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->fg_threshold(), target);
  }

  // optional float bg_threshold = 8 [default = 0.5];
  if (has_bg_threshold()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(8, this->bg_threshold(), target);
  }

  // optional float fg_fraction = 9 [default = 0.25];
  if (has_fg_fraction()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, this->fg_fraction(), target);
  }

  // optional uint32 context_pad = 10 [default = 0];
  if (has_context_pad()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(10, this->context_pad(), target);
  }

  // optional string crop_mode = 11 [default = "warp"];
  if (has_crop_mode()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->crop_mode().data(), this->crop_mode().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.WindowDataParameter.crop_mode");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        11, this->crop_mode(), target);
  }

  // optional bool cache_images = 12 [default = false];
  if (has_cache_images()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(12, this->cache_images(), target);
  }

  // optional string root_folder = 13 [default = ""];
  if (has_root_folder()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->root_folder().data(), this->root_folder().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.WindowDataParameter.root_folder");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        13, this->root_folder(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 255u) {
    // optional string source = 1;
    if (has_source()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->source());
    }

    // optional float scale = 2 [default = 1];
    if (has_scale()) {
      total_size += 1 + 4;
    }

    // optional string mean_file = 3;
    if (has_mean_file()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->mean_file());
    }

    // optional uint32 batch_size = 4;
    if (has_batch_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->batch_size());
    }

    // optional uint32 crop_size = 5 [default = 0];
    if (has_crop_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->crop_size());
    }

    // optional bool mirror = 6 [default = false];
    if (has_mirror()) {
      total_size += 1 + 1;
    }

    // optional float fg_threshold = 7 [default = 0.5];
    if (has_fg_threshold()) {
      total_size += 1 + 4;
    }

    // optional float bg_threshold = 8 [default = 0.5];
    if (has_bg_threshold()) {
      total_size += 1 + 4;
    }

  }
  if (_has_bits_[8 / 32] & 7936u) {
    // optional float fg_fraction = 9 [default = 0.25];
    if (has_fg_fraction()) {
      total_size += 1 + 4;
    }

    // optional uint32 context_pad = 10 [default = 0];
    if (has_context_pad()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->context_pad());
    }

    // optional string crop_mode = 11 [default = "warp"];
    if (has_crop_mode()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->crop_mode());
    }

    // optional bool cache_images = 12 [default = false];
    if (has_cache_images()) {
      total_size += 1 + 1;
    }

    // optional string root_folder = 13 [default = ""];
    if (has_root_folder()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->root_folder());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void WindowDataParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.WindowDataParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const WindowDataParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const WindowDataParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.WindowDataParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.WindowDataParameter)
    UnsafeMergeFrom(*source);
  }
}

void WindowDataParameter::MergeFrom(const WindowDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.WindowDataParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void WindowDataParameter::UnsafeMergeFrom(const WindowDataParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_source()) {
      set_has_source();
      source_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_);
    }
    if (from.has_scale()) {
      set_scale(from.scale());
    }
    if (from.has_mean_file()) {
      set_has_mean_file();
      mean_file_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mean_file_);
    }
    if (from.has_batch_size()) {
      set_batch_size(from.batch_size());
    }
    if (from.has_crop_size()) {
      set_crop_size(from.crop_size());
    }
    if (from.has_mirror()) {
      set_mirror(from.mirror());
    }
    if (from.has_fg_threshold()) {
      set_fg_threshold(from.fg_threshold());
    }
    if (from.has_bg_threshold()) {
      set_bg_threshold(from.bg_threshold());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_fg_fraction()) {
      set_fg_fraction(from.fg_fraction());
    }
    if (from.has_context_pad()) {
      set_context_pad(from.context_pad());
    }
    if (from.has_crop_mode()) {
      set_has_crop_mode();
      crop_mode_.AssignWithDefault(_default_crop_mode_, from.crop_mode_);
    }
    if (from.has_cache_images()) {
      set_cache_images(from.cache_images());
    }
    if (from.has_root_folder()) {
      set_has_root_folder();
      root_folder_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.root_folder_);
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void WindowDataParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.WindowDataParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool WindowDataParameter::IsInitialized() const {

  return true;
}

void WindowDataParameter::Swap(WindowDataParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void WindowDataParameter::InternalSwap(WindowDataParameter* other) {
  source_.Swap(&other->source_);
  std::swap(scale_, other->scale_);
  mean_file_.Swap(&other->mean_file_);
  std::swap(batch_size_, other->batch_size_);
  std::swap(crop_size_, other->crop_size_);
  std::swap(mirror_, other->mirror_);
  std::swap(fg_threshold_, other->fg_threshold_);
  std::swap(bg_threshold_, other->bg_threshold_);
  std::swap(fg_fraction_, other->fg_fraction_);
  std::swap(context_pad_, other->context_pad_);
  crop_mode_.Swap(&other->crop_mode_);
  std::swap(cache_images_, other->cache_images_);
  root_folder_.Swap(&other->root_folder_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata WindowDataParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = WindowDataParameter_descriptor_;
  metadata.reflection = WindowDataParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// WindowDataParameter

// optional string source = 1;
bool WindowDataParameter::has_source() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void WindowDataParameter::set_has_source() {
  _has_bits_[0] |= 0x00000001u;
}
void WindowDataParameter::clear_has_source() {
  _has_bits_[0] &= ~0x00000001u;
}
void WindowDataParameter::clear_source() {
  source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_source();
}
const ::std::string& WindowDataParameter::source() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.source)
  return source_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void WindowDataParameter::set_source(const ::std::string& value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.source)
}
void WindowDataParameter::set_source(const char* value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.WindowDataParameter.source)
}
void WindowDataParameter::set_source(const char* value, size_t size) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.WindowDataParameter.source)
}
::std::string* WindowDataParameter::mutable_source() {
  set_has_source();
  // @@protoc_insertion_point(field_mutable:caffe.WindowDataParameter.source)
  return source_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* WindowDataParameter::release_source() {
  // @@protoc_insertion_point(field_release:caffe.WindowDataParameter.source)
  clear_has_source();
  return source_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void WindowDataParameter::set_allocated_source(::std::string* source) {
  if (source != NULL) {
    set_has_source();
  } else {
    clear_has_source();
  }
  source_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source);
  // @@protoc_insertion_point(field_set_allocated:caffe.WindowDataParameter.source)
}

// optional float scale = 2 [default = 1];
bool WindowDataParameter::has_scale() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void WindowDataParameter::set_has_scale() {
  _has_bits_[0] |= 0x00000002u;
}
void WindowDataParameter::clear_has_scale() {
  _has_bits_[0] &= ~0x00000002u;
}
void WindowDataParameter::clear_scale() {
  scale_ = 1;
  clear_has_scale();
}
float WindowDataParameter::scale() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.scale)
  return scale_;
}
void WindowDataParameter::set_scale(float value) {
  set_has_scale();
  scale_ = value;
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.scale)
}

// optional string mean_file = 3;
bool WindowDataParameter::has_mean_file() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void WindowDataParameter::set_has_mean_file() {
  _has_bits_[0] |= 0x00000004u;
}
void WindowDataParameter::clear_has_mean_file() {
  _has_bits_[0] &= ~0x00000004u;
}
void WindowDataParameter::clear_mean_file() {
  mean_file_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_mean_file();
}
const ::std::string& WindowDataParameter::mean_file() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.mean_file)
  return mean_file_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void WindowDataParameter::set_mean_file(const ::std::string& value) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.mean_file)
}
void WindowDataParameter::set_mean_file(const char* value) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.WindowDataParameter.mean_file)
}
void WindowDataParameter::set_mean_file(const char* value, size_t size) {
  set_has_mean_file();
  mean_file_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.WindowDataParameter.mean_file)
}
::std::string* WindowDataParameter::mutable_mean_file() {
  set_has_mean_file();
  // @@protoc_insertion_point(field_mutable:caffe.WindowDataParameter.mean_file)
  return mean_file_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* WindowDataParameter::release_mean_file() {
  // @@protoc_insertion_point(field_release:caffe.WindowDataParameter.mean_file)
  clear_has_mean_file();
  return mean_file_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void WindowDataParameter::set_allocated_mean_file(::std::string* mean_file) {
  if (mean_file != NULL) {
    set_has_mean_file();
  } else {
    clear_has_mean_file();
  }
  mean_file_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), mean_file);
  // @@protoc_insertion_point(field_set_allocated:caffe.WindowDataParameter.mean_file)
}

// optional uint32 batch_size = 4;
bool WindowDataParameter::has_batch_size() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void WindowDataParameter::set_has_batch_size() {
  _has_bits_[0] |= 0x00000008u;
}
void WindowDataParameter::clear_has_batch_size() {
  _has_bits_[0] &= ~0x00000008u;
}
void WindowDataParameter::clear_batch_size() {
  batch_size_ = 0u;
  clear_has_batch_size();
}
::google::protobuf::uint32 WindowDataParameter::batch_size() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.batch_size)
  return batch_size_;
}
void WindowDataParameter::set_batch_size(::google::protobuf::uint32 value) {
  set_has_batch_size();
  batch_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.batch_size)
}

// optional uint32 crop_size = 5 [default = 0];
bool WindowDataParameter::has_crop_size() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void WindowDataParameter::set_has_crop_size() {
  _has_bits_[0] |= 0x00000010u;
}
void WindowDataParameter::clear_has_crop_size() {
  _has_bits_[0] &= ~0x00000010u;
}
void WindowDataParameter::clear_crop_size() {
  crop_size_ = 0u;
  clear_has_crop_size();
}
::google::protobuf::uint32 WindowDataParameter::crop_size() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.crop_size)
  return crop_size_;
}
void WindowDataParameter::set_crop_size(::google::protobuf::uint32 value) {
  set_has_crop_size();
  crop_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.crop_size)
}

// optional bool mirror = 6 [default = false];
bool WindowDataParameter::has_mirror() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void WindowDataParameter::set_has_mirror() {
  _has_bits_[0] |= 0x00000020u;
}
void WindowDataParameter::clear_has_mirror() {
  _has_bits_[0] &= ~0x00000020u;
}
void WindowDataParameter::clear_mirror() {
  mirror_ = false;
  clear_has_mirror();
}
bool WindowDataParameter::mirror() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.mirror)
  return mirror_;
}
void WindowDataParameter::set_mirror(bool value) {
  set_has_mirror();
  mirror_ = value;
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.mirror)
}

// optional float fg_threshold = 7 [default = 0.5];
bool WindowDataParameter::has_fg_threshold() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void WindowDataParameter::set_has_fg_threshold() {
  _has_bits_[0] |= 0x00000040u;
}
void WindowDataParameter::clear_has_fg_threshold() {
  _has_bits_[0] &= ~0x00000040u;
}
void WindowDataParameter::clear_fg_threshold() {
  fg_threshold_ = 0.5f;
  clear_has_fg_threshold();
}
float WindowDataParameter::fg_threshold() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.fg_threshold)
  return fg_threshold_;
}
void WindowDataParameter::set_fg_threshold(float value) {
  set_has_fg_threshold();
  fg_threshold_ = value;
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.fg_threshold)
}

// optional float bg_threshold = 8 [default = 0.5];
bool WindowDataParameter::has_bg_threshold() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
void WindowDataParameter::set_has_bg_threshold() {
  _has_bits_[0] |= 0x00000080u;
}
void WindowDataParameter::clear_has_bg_threshold() {
  _has_bits_[0] &= ~0x00000080u;
}
void WindowDataParameter::clear_bg_threshold() {
  bg_threshold_ = 0.5f;
  clear_has_bg_threshold();
}
float WindowDataParameter::bg_threshold() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.bg_threshold)
  return bg_threshold_;
}
void WindowDataParameter::set_bg_threshold(float value) {
  set_has_bg_threshold();
  bg_threshold_ = value;
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.bg_threshold)
}

// optional float fg_fraction = 9 [default = 0.25];
bool WindowDataParameter::has_fg_fraction() const {
  return (_has_bits_[0] & 0x00000100u) != 0;
}
void WindowDataParameter::set_has_fg_fraction() {
  _has_bits_[0] |= 0x00000100u;
}
void WindowDataParameter::clear_has_fg_fraction() {
  _has_bits_[0] &= ~0x00000100u;
}
void WindowDataParameter::clear_fg_fraction() {
  fg_fraction_ = 0.25f;
  clear_has_fg_fraction();
}
float WindowDataParameter::fg_fraction() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.fg_fraction)
  return fg_fraction_;
}
void WindowDataParameter::set_fg_fraction(float value) {
  set_has_fg_fraction();
  fg_fraction_ = value;
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.fg_fraction)
}

// optional uint32 context_pad = 10 [default = 0];
bool WindowDataParameter::has_context_pad() const {
  return (_has_bits_[0] & 0x00000200u) != 0;
}
void WindowDataParameter::set_has_context_pad() {
  _has_bits_[0] |= 0x00000200u;
}
void WindowDataParameter::clear_has_context_pad() {
  _has_bits_[0] &= ~0x00000200u;
}
void WindowDataParameter::clear_context_pad() {
  context_pad_ = 0u;
  clear_has_context_pad();
}
::google::protobuf::uint32 WindowDataParameter::context_pad() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.context_pad)
  return context_pad_;
}
void WindowDataParameter::set_context_pad(::google::protobuf::uint32 value) {
  set_has_context_pad();
  context_pad_ = value;
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.context_pad)
}

// optional string crop_mode = 11 [default = "warp"];
bool WindowDataParameter::has_crop_mode() const {
  return (_has_bits_[0] & 0x00000400u) != 0;
}
void WindowDataParameter::set_has_crop_mode() {
  _has_bits_[0] |= 0x00000400u;
}
void WindowDataParameter::clear_has_crop_mode() {
  _has_bits_[0] &= ~0x00000400u;
}
void WindowDataParameter::clear_crop_mode() {
  crop_mode_.ClearToDefaultNoArena(_default_crop_mode_);
  clear_has_crop_mode();
}
const ::std::string& WindowDataParameter::crop_mode() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.crop_mode)
  return crop_mode_.GetNoArena(_default_crop_mode_);
}
void WindowDataParameter::set_crop_mode(const ::std::string& value) {
  set_has_crop_mode();
  crop_mode_.SetNoArena(_default_crop_mode_, value);
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.crop_mode)
}
void WindowDataParameter::set_crop_mode(const char* value) {
  set_has_crop_mode();
  crop_mode_.SetNoArena(_default_crop_mode_, ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.WindowDataParameter.crop_mode)
}
void WindowDataParameter::set_crop_mode(const char* value, size_t size) {
  set_has_crop_mode();
  crop_mode_.SetNoArena(_default_crop_mode_,
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.WindowDataParameter.crop_mode)
}
::std::string* WindowDataParameter::mutable_crop_mode() {
  set_has_crop_mode();
  // @@protoc_insertion_point(field_mutable:caffe.WindowDataParameter.crop_mode)
  return crop_mode_.MutableNoArena(_default_crop_mode_);
}
::std::string* WindowDataParameter::release_crop_mode() {
  // @@protoc_insertion_point(field_release:caffe.WindowDataParameter.crop_mode)
  clear_has_crop_mode();
  return crop_mode_.ReleaseNoArena(_default_crop_mode_);
}
void WindowDataParameter::set_allocated_crop_mode(::std::string* crop_mode) {
  if (crop_mode != NULL) {
    set_has_crop_mode();
  } else {
    clear_has_crop_mode();
  }
  crop_mode_.SetAllocatedNoArena(_default_crop_mode_, crop_mode);
  // @@protoc_insertion_point(field_set_allocated:caffe.WindowDataParameter.crop_mode)
}

// optional bool cache_images = 12 [default = false];
bool WindowDataParameter::has_cache_images() const {
  return (_has_bits_[0] & 0x00000800u) != 0;
}
void WindowDataParameter::set_has_cache_images() {
  _has_bits_[0] |= 0x00000800u;
}
void WindowDataParameter::clear_has_cache_images() {
  _has_bits_[0] &= ~0x00000800u;
}
void WindowDataParameter::clear_cache_images() {
  cache_images_ = false;
  clear_has_cache_images();
}
bool WindowDataParameter::cache_images() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.cache_images)
  return cache_images_;
}
void WindowDataParameter::set_cache_images(bool value) {
  set_has_cache_images();
  cache_images_ = value;
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.cache_images)
}

// optional string root_folder = 13 [default = ""];
bool WindowDataParameter::has_root_folder() const {
  return (_has_bits_[0] & 0x00001000u) != 0;
}
void WindowDataParameter::set_has_root_folder() {
  _has_bits_[0] |= 0x00001000u;
}
void WindowDataParameter::clear_has_root_folder() {
  _has_bits_[0] &= ~0x00001000u;
}
void WindowDataParameter::clear_root_folder() {
  root_folder_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_root_folder();
}
const ::std::string& WindowDataParameter::root_folder() const {
  // @@protoc_insertion_point(field_get:caffe.WindowDataParameter.root_folder)
  return root_folder_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void WindowDataParameter::set_root_folder(const ::std::string& value) {
  set_has_root_folder();
  root_folder_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.WindowDataParameter.root_folder)
}
void WindowDataParameter::set_root_folder(const char* value) {
  set_has_root_folder();
  root_folder_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.WindowDataParameter.root_folder)
}
void WindowDataParameter::set_root_folder(const char* value, size_t size) {
  set_has_root_folder();
  root_folder_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.WindowDataParameter.root_folder)
}
::std::string* WindowDataParameter::mutable_root_folder() {
  set_has_root_folder();
  // @@protoc_insertion_point(field_mutable:caffe.WindowDataParameter.root_folder)
  return root_folder_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* WindowDataParameter::release_root_folder() {
  // @@protoc_insertion_point(field_release:caffe.WindowDataParameter.root_folder)
  clear_has_root_folder();
  return root_folder_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void WindowDataParameter::set_allocated_root_folder(::std::string* root_folder) {
  if (root_folder != NULL) {
    set_has_root_folder();
  } else {
    clear_has_root_folder();
  }
  root_folder_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), root_folder);
  // @@protoc_insertion_point(field_set_allocated:caffe.WindowDataParameter.root_folder)
}

inline const WindowDataParameter* WindowDataParameter::internal_default_instance() {
  return &WindowDataParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* SPPParameter_PoolMethod_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SPPParameter_PoolMethod_descriptor_;
}
bool SPPParameter_PoolMethod_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const SPPParameter_PoolMethod SPPParameter::MAX;
const SPPParameter_PoolMethod SPPParameter::AVE;
const SPPParameter_PoolMethod SPPParameter::STOCHASTIC;
const SPPParameter_PoolMethod SPPParameter::PoolMethod_MIN;
const SPPParameter_PoolMethod SPPParameter::PoolMethod_MAX;
const int SPPParameter::PoolMethod_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* SPPParameter_Engine_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SPPParameter_Engine_descriptor_;
}
bool SPPParameter_Engine_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const SPPParameter_Engine SPPParameter::DEFAULT;
const SPPParameter_Engine SPPParameter::CAFFE;
const SPPParameter_Engine SPPParameter::CUDNN;
const SPPParameter_Engine SPPParameter::Engine_MIN;
const SPPParameter_Engine SPPParameter::Engine_MAX;
const int SPPParameter::Engine_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int SPPParameter::kPyramidHeightFieldNumber;
const int SPPParameter::kPoolFieldNumber;
const int SPPParameter::kEngineFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

SPPParameter::SPPParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.SPPParameter)
}

void SPPParameter::InitAsDefaultInstance() {
}

SPPParameter::SPPParameter(const SPPParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.SPPParameter)
}

void SPPParameter::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&pyramid_height_, 0, reinterpret_cast<char*>(&engine_) -
    reinterpret_cast<char*>(&pyramid_height_) + sizeof(engine_));
}

SPPParameter::~SPPParameter() {
  // @@protoc_insertion_point(destructor:caffe.SPPParameter)
  SharedDtor();
}

void SPPParameter::SharedDtor() {
}

void SPPParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* SPPParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return SPPParameter_descriptor_;
}

const SPPParameter& SPPParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<SPPParameter> SPPParameter_default_instance_;

SPPParameter* SPPParameter::New(::google::protobuf::Arena* arena) const {
  SPPParameter* n = new SPPParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void SPPParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.SPPParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(SPPParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<SPPParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  ZR_(pyramid_height_, engine_);

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool SPPParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.SPPParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional uint32 pyramid_height = 1;
      case 1: {
        if (tag == 8) {
          set_has_pyramid_height();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &pyramid_height_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_pool;
        break;
      }

      // optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
      case 2: {
        if (tag == 16) {
         parse_pool:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::SPPParameter_PoolMethod_IsValid(value)) {
            set_pool(static_cast< ::caffe::SPPParameter_PoolMethod >(value));
          } else {
            mutable_unknown_fields()->AddVarint(2, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_engine;
        break;
      }

      // optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
      case 6: {
        if (tag == 48) {
         parse_engine:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::SPPParameter_Engine_IsValid(value)) {
            set_engine(static_cast< ::caffe::SPPParameter_Engine >(value));
          } else {
            mutable_unknown_fields()->AddVarint(6, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.SPPParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.SPPParameter)
  return false;
#undef DO_
}

void SPPParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.SPPParameter)
  // optional uint32 pyramid_height = 1;
  if (has_pyramid_height()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->pyramid_height(), output);
  }

  // optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
  if (has_pool()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      2, this->pool(), output);
  }

  // optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
  if (has_engine()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      6, this->engine(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.SPPParameter)
}

::google::protobuf::uint8* SPPParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.SPPParameter)
  // optional uint32 pyramid_height = 1;
  if (has_pyramid_height()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->pyramid_height(), target);
  }

  // optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
  if (has_pool()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      2, this->pool(), target);
  }

  // optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
  if (has_engine()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      6, this->engine(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 7u) {
    // optional uint32 pyramid_height = 1;
    if (has_pyramid_height()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->pyramid_height());
    }

    // optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
    if (has_pool()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->pool());
    }

    // optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
    if (has_engine()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->engine());
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void SPPParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.SPPParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const SPPParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const SPPParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.SPPParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.SPPParameter)
    UnsafeMergeFrom(*source);
  }
}

void SPPParameter::MergeFrom(const SPPParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.SPPParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void SPPParameter::UnsafeMergeFrom(const SPPParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_pyramid_height()) {
      set_pyramid_height(from.pyramid_height());
    }
    if (from.has_pool()) {
      set_pool(from.pool());
    }
    if (from.has_engine()) {
      set_engine(from.engine());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void SPPParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.SPPParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool SPPParameter::IsInitialized() const {

  return true;
}

void SPPParameter::Swap(SPPParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void SPPParameter::InternalSwap(SPPParameter* other) {
  std::swap(pyramid_height_, other->pyramid_height_);
  std::swap(pool_, other->pool_);
  std::swap(engine_, other->engine_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata SPPParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = SPPParameter_descriptor_;
  metadata.reflection = SPPParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// SPPParameter

// optional uint32 pyramid_height = 1;
bool SPPParameter::has_pyramid_height() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void SPPParameter::set_has_pyramid_height() {
  _has_bits_[0] |= 0x00000001u;
}
void SPPParameter::clear_has_pyramid_height() {
  _has_bits_[0] &= ~0x00000001u;
}
void SPPParameter::clear_pyramid_height() {
  pyramid_height_ = 0u;
  clear_has_pyramid_height();
}
::google::protobuf::uint32 SPPParameter::pyramid_height() const {
  // @@protoc_insertion_point(field_get:caffe.SPPParameter.pyramid_height)
  return pyramid_height_;
}
void SPPParameter::set_pyramid_height(::google::protobuf::uint32 value) {
  set_has_pyramid_height();
  pyramid_height_ = value;
  // @@protoc_insertion_point(field_set:caffe.SPPParameter.pyramid_height)
}

// optional .caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
bool SPPParameter::has_pool() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void SPPParameter::set_has_pool() {
  _has_bits_[0] |= 0x00000002u;
}
void SPPParameter::clear_has_pool() {
  _has_bits_[0] &= ~0x00000002u;
}
void SPPParameter::clear_pool() {
  pool_ = 0;
  clear_has_pool();
}
::caffe::SPPParameter_PoolMethod SPPParameter::pool() const {
  // @@protoc_insertion_point(field_get:caffe.SPPParameter.pool)
  return static_cast< ::caffe::SPPParameter_PoolMethod >(pool_);
}
void SPPParameter::set_pool(::caffe::SPPParameter_PoolMethod value) {
  assert(::caffe::SPPParameter_PoolMethod_IsValid(value));
  set_has_pool();
  pool_ = value;
  // @@protoc_insertion_point(field_set:caffe.SPPParameter.pool)
}

// optional .caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
bool SPPParameter::has_engine() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void SPPParameter::set_has_engine() {
  _has_bits_[0] |= 0x00000004u;
}
void SPPParameter::clear_has_engine() {
  _has_bits_[0] &= ~0x00000004u;
}
void SPPParameter::clear_engine() {
  engine_ = 0;
  clear_has_engine();
}
::caffe::SPPParameter_Engine SPPParameter::engine() const {
  // @@protoc_insertion_point(field_get:caffe.SPPParameter.engine)
  return static_cast< ::caffe::SPPParameter_Engine >(engine_);
}
void SPPParameter::set_engine(::caffe::SPPParameter_Engine value) {
  assert(::caffe::SPPParameter_Engine_IsValid(value));
  set_has_engine();
  engine_ = value;
  // @@protoc_insertion_point(field_set:caffe.SPPParameter.engine)
}

inline const SPPParameter* SPPParameter::internal_default_instance() {
  return &SPPParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* V1LayerParameter_LayerType_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return V1LayerParameter_LayerType_descriptor_;
}
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 !defined(_MSC_VER) || _MSC_VER >= 1900
const V1LayerParameter_LayerType V1LayerParameter::NONE;
const V1LayerParameter_LayerType V1LayerParameter::ABSVAL;
const V1LayerParameter_LayerType V1LayerParameter::ACCURACY;
const V1LayerParameter_LayerType V1LayerParameter::ARGMAX;
const V1LayerParameter_LayerType V1LayerParameter::BNLL;
const V1LayerParameter_LayerType V1LayerParameter::CONCAT;
const V1LayerParameter_LayerType V1LayerParameter::CONTRASTIVE_LOSS;
const V1LayerParameter_LayerType V1LayerParameter::CONVOLUTION;
const V1LayerParameter_LayerType V1LayerParameter::DATA;
const V1LayerParameter_LayerType V1LayerParameter::DECONVOLUTION;
const V1LayerParameter_LayerType V1LayerParameter::DROPOUT;
const V1LayerParameter_LayerType V1LayerParameter::DUMMY_DATA;
const V1LayerParameter_LayerType V1LayerParameter::EUCLIDEAN_LOSS;
const V1LayerParameter_LayerType V1LayerParameter::ELTWISE;
const V1LayerParameter_LayerType V1LayerParameter::EXP;
const V1LayerParameter_LayerType V1LayerParameter::FLATTEN;
const V1LayerParameter_LayerType V1LayerParameter::HDF5_DATA;
const V1LayerParameter_LayerType V1LayerParameter::HDF5_OUTPUT;
const V1LayerParameter_LayerType V1LayerParameter::HINGE_LOSS;
const V1LayerParameter_LayerType V1LayerParameter::IM2COL;
const V1LayerParameter_LayerType V1LayerParameter::IMAGE_DATA;
const V1LayerParameter_LayerType V1LayerParameter::INFOGAIN_LOSS;
const V1LayerParameter_LayerType V1LayerParameter::INNER_PRODUCT;
const V1LayerParameter_LayerType V1LayerParameter::LRN;
const V1LayerParameter_LayerType V1LayerParameter::MEMORY_DATA;
const V1LayerParameter_LayerType V1LayerParameter::MULTINOMIAL_LOGISTIC_LOSS;
const V1LayerParameter_LayerType V1LayerParameter::MVN;
const V1LayerParameter_LayerType V1LayerParameter::POOLING;
const V1LayerParameter_LayerType V1LayerParameter::POWER;
const V1LayerParameter_LayerType V1LayerParameter::RELU;
const V1LayerParameter_LayerType V1LayerParameter::SIGMOID;
const V1LayerParameter_LayerType V1LayerParameter::SIGMOID_CROSS_ENTROPY_LOSS;
const V1LayerParameter_LayerType V1LayerParameter::SILENCE;
const V1LayerParameter_LayerType V1LayerParameter::SOFTMAX;
const V1LayerParameter_LayerType V1LayerParameter::SOFTMAX_LOSS;
const V1LayerParameter_LayerType V1LayerParameter::SPLIT;
const V1LayerParameter_LayerType V1LayerParameter::SLICE;
const V1LayerParameter_LayerType V1LayerParameter::TANH;
const V1LayerParameter_LayerType V1LayerParameter::WINDOW_DATA;
const V1LayerParameter_LayerType V1LayerParameter::THRESHOLD;
const V1LayerParameter_LayerType V1LayerParameter::LayerType_MIN;
const V1LayerParameter_LayerType V1LayerParameter::LayerType_MAX;
const int V1LayerParameter::LayerType_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
const ::google::protobuf::EnumDescriptor* V1LayerParameter_DimCheckMode_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return V1LayerParameter_DimCheckMode_descriptor_;
}
bool V1LayerParameter_DimCheckMode_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const V1LayerParameter_DimCheckMode V1LayerParameter::STRICT;
const V1LayerParameter_DimCheckMode V1LayerParameter::PERMISSIVE;
const V1LayerParameter_DimCheckMode V1LayerParameter::DimCheckMode_MIN;
const V1LayerParameter_DimCheckMode V1LayerParameter::DimCheckMode_MAX;
const int V1LayerParameter::DimCheckMode_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int V1LayerParameter::kBottomFieldNumber;
const int V1LayerParameter::kTopFieldNumber;
const int V1LayerParameter::kNameFieldNumber;
const int V1LayerParameter::kIncludeFieldNumber;
const int V1LayerParameter::kExcludeFieldNumber;
const int V1LayerParameter::kTypeFieldNumber;
const int V1LayerParameter::kBlobsFieldNumber;
const int V1LayerParameter::kParamFieldNumber;
const int V1LayerParameter::kBlobShareModeFieldNumber;
const int V1LayerParameter::kBlobsLrFieldNumber;
const int V1LayerParameter::kWeightDecayFieldNumber;
const int V1LayerParameter::kLossWeightFieldNumber;
const int V1LayerParameter::kAccuracyParamFieldNumber;
const int V1LayerParameter::kArgmaxParamFieldNumber;
const int V1LayerParameter::kConcatParamFieldNumber;
const int V1LayerParameter::kContrastiveLossParamFieldNumber;
const int V1LayerParameter::kConvolutionParamFieldNumber;
const int V1LayerParameter::kDataParamFieldNumber;
const int V1LayerParameter::kDropoutParamFieldNumber;
const int V1LayerParameter::kDummyDataParamFieldNumber;
const int V1LayerParameter::kEltwiseParamFieldNumber;
const int V1LayerParameter::kExpParamFieldNumber;
const int V1LayerParameter::kHdf5DataParamFieldNumber;
const int V1LayerParameter::kHdf5OutputParamFieldNumber;
const int V1LayerParameter::kHingeLossParamFieldNumber;
const int V1LayerParameter::kImageDataParamFieldNumber;
const int V1LayerParameter::kInfogainLossParamFieldNumber;
const int V1LayerParameter::kInnerProductParamFieldNumber;
const int V1LayerParameter::kLrnParamFieldNumber;
const int V1LayerParameter::kMemoryDataParamFieldNumber;
const int V1LayerParameter::kMvnParamFieldNumber;
const int V1LayerParameter::kPoolingParamFieldNumber;
const int V1LayerParameter::kPowerParamFieldNumber;
const int V1LayerParameter::kReluParamFieldNumber;
const int V1LayerParameter::kSigmoidParamFieldNumber;
const int V1LayerParameter::kSoftmaxParamFieldNumber;
const int V1LayerParameter::kSliceParamFieldNumber;
const int V1LayerParameter::kTanhParamFieldNumber;
const int V1LayerParameter::kThresholdParamFieldNumber;
const int V1LayerParameter::kWindowDataParamFieldNumber;
const int V1LayerParameter::kTransformParamFieldNumber;
const int V1LayerParameter::kLossParamFieldNumber;
const int V1LayerParameter::kLayerFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

V1LayerParameter::V1LayerParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.V1LayerParameter)
}

void V1LayerParameter::InitAsDefaultInstance() {
  accuracy_param_ = const_cast< ::caffe::AccuracyParameter*>(
      ::caffe::AccuracyParameter::internal_default_instance());
  argmax_param_ = const_cast< ::caffe::ArgMaxParameter*>(
      ::caffe::ArgMaxParameter::internal_default_instance());
  concat_param_ = const_cast< ::caffe::ConcatParameter*>(
      ::caffe::ConcatParameter::internal_default_instance());
  contrastive_loss_param_ = const_cast< ::caffe::ContrastiveLossParameter*>(
      ::caffe::ContrastiveLossParameter::internal_default_instance());
  convolution_param_ = const_cast< ::caffe::ConvolutionParameter*>(
      ::caffe::ConvolutionParameter::internal_default_instance());
  data_param_ = const_cast< ::caffe::DataParameter*>(
      ::caffe::DataParameter::internal_default_instance());
  dropout_param_ = const_cast< ::caffe::DropoutParameter*>(
      ::caffe::DropoutParameter::internal_default_instance());
  dummy_data_param_ = const_cast< ::caffe::DummyDataParameter*>(
      ::caffe::DummyDataParameter::internal_default_instance());
  eltwise_param_ = const_cast< ::caffe::EltwiseParameter*>(
      ::caffe::EltwiseParameter::internal_default_instance());
  exp_param_ = const_cast< ::caffe::ExpParameter*>(
      ::caffe::ExpParameter::internal_default_instance());
  hdf5_data_param_ = const_cast< ::caffe::HDF5DataParameter*>(
      ::caffe::HDF5DataParameter::internal_default_instance());
  hdf5_output_param_ = const_cast< ::caffe::HDF5OutputParameter*>(
      ::caffe::HDF5OutputParameter::internal_default_instance());
  hinge_loss_param_ = const_cast< ::caffe::HingeLossParameter*>(
      ::caffe::HingeLossParameter::internal_default_instance());
  image_data_param_ = const_cast< ::caffe::ImageDataParameter*>(
      ::caffe::ImageDataParameter::internal_default_instance());
  infogain_loss_param_ = const_cast< ::caffe::InfogainLossParameter*>(
      ::caffe::InfogainLossParameter::internal_default_instance());
  inner_product_param_ = const_cast< ::caffe::InnerProductParameter*>(
      ::caffe::InnerProductParameter::internal_default_instance());
  lrn_param_ = const_cast< ::caffe::LRNParameter*>(
      ::caffe::LRNParameter::internal_default_instance());
  memory_data_param_ = const_cast< ::caffe::MemoryDataParameter*>(
      ::caffe::MemoryDataParameter::internal_default_instance());
  mvn_param_ = const_cast< ::caffe::MVNParameter*>(
      ::caffe::MVNParameter::internal_default_instance());
  pooling_param_ = const_cast< ::caffe::PoolingParameter*>(
      ::caffe::PoolingParameter::internal_default_instance());
  power_param_ = const_cast< ::caffe::PowerParameter*>(
      ::caffe::PowerParameter::internal_default_instance());
  relu_param_ = const_cast< ::caffe::ReLUParameter*>(
      ::caffe::ReLUParameter::internal_default_instance());
  sigmoid_param_ = const_cast< ::caffe::SigmoidParameter*>(
      ::caffe::SigmoidParameter::internal_default_instance());
  softmax_param_ = const_cast< ::caffe::SoftmaxParameter*>(
      ::caffe::SoftmaxParameter::internal_default_instance());
  slice_param_ = const_cast< ::caffe::SliceParameter*>(
      ::caffe::SliceParameter::internal_default_instance());
  tanh_param_ = const_cast< ::caffe::TanHParameter*>(
      ::caffe::TanHParameter::internal_default_instance());
  threshold_param_ = const_cast< ::caffe::ThresholdParameter*>(
      ::caffe::ThresholdParameter::internal_default_instance());
  window_data_param_ = const_cast< ::caffe::WindowDataParameter*>(
      ::caffe::WindowDataParameter::internal_default_instance());
  transform_param_ = const_cast< ::caffe::TransformationParameter*>(
      ::caffe::TransformationParameter::internal_default_instance());
  loss_param_ = const_cast< ::caffe::LossParameter*>(
      ::caffe::LossParameter::internal_default_instance());
  layer_ = const_cast< ::caffe::V0LayerParameter*>(
      ::caffe::V0LayerParameter::internal_default_instance());
}

V1LayerParameter::V1LayerParameter(const V1LayerParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.V1LayerParameter)
}

void V1LayerParameter::SharedCtor() {
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  accuracy_param_ = NULL;
  argmax_param_ = NULL;
  concat_param_ = NULL;
  contrastive_loss_param_ = NULL;
  convolution_param_ = NULL;
  data_param_ = NULL;
  dropout_param_ = NULL;
  dummy_data_param_ = NULL;
  eltwise_param_ = NULL;
  exp_param_ = NULL;
  hdf5_data_param_ = NULL;
  hdf5_output_param_ = NULL;
  hinge_loss_param_ = NULL;
  image_data_param_ = NULL;
  infogain_loss_param_ = NULL;
  inner_product_param_ = NULL;
  lrn_param_ = NULL;
  memory_data_param_ = NULL;
  mvn_param_ = NULL;
  pooling_param_ = NULL;
  power_param_ = NULL;
  relu_param_ = NULL;
  sigmoid_param_ = NULL;
  softmax_param_ = NULL;
  slice_param_ = NULL;
  tanh_param_ = NULL;
  threshold_param_ = NULL;
  window_data_param_ = NULL;
  transform_param_ = NULL;
  loss_param_ = NULL;
  layer_ = NULL;
  type_ = 0;
  _cached_size_ = 0;
}

V1LayerParameter::~V1LayerParameter() {
  // @@protoc_insertion_point(destructor:caffe.V1LayerParameter)
  SharedDtor();
}

void V1LayerParameter::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != &V1LayerParameter_default_instance_.get()) {
    delete accuracy_param_;
    delete argmax_param_;
    delete concat_param_;
    delete contrastive_loss_param_;
    delete convolution_param_;
    delete data_param_;
    delete dropout_param_;
    delete dummy_data_param_;
    delete eltwise_param_;
    delete exp_param_;
    delete hdf5_data_param_;
    delete hdf5_output_param_;
    delete hinge_loss_param_;
    delete image_data_param_;
    delete infogain_loss_param_;
    delete inner_product_param_;
    delete lrn_param_;
    delete memory_data_param_;
    delete mvn_param_;
    delete pooling_param_;
    delete power_param_;
    delete relu_param_;
    delete sigmoid_param_;
    delete softmax_param_;
    delete slice_param_;
    delete tanh_param_;
    delete threshold_param_;
    delete window_data_param_;
    delete transform_param_;
    delete loss_param_;
    delete layer_;
  }
}

void V1LayerParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* V1LayerParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return V1LayerParameter_descriptor_;
}

const V1LayerParameter& V1LayerParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<V1LayerParameter> V1LayerParameter_default_instance_;

V1LayerParameter* V1LayerParameter::New(::google::protobuf::Arena* arena) const {
  V1LayerParameter* n = new V1LayerParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void V1LayerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.V1LayerParameter)
  if (_has_bits_[0 / 32] & 36u) {
    if (has_name()) {
      name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    type_ = 0;
  }
  if (_has_bits_[8 / 32] & 61440u) {
    if (has_accuracy_param()) {
      if (accuracy_param_ != NULL) accuracy_param_->::caffe::AccuracyParameter::Clear();
    }
    if (has_argmax_param()) {
      if (argmax_param_ != NULL) argmax_param_->::caffe::ArgMaxParameter::Clear();
    }
    if (has_concat_param()) {
      if (concat_param_ != NULL) concat_param_->::caffe::ConcatParameter::Clear();
    }
    if (has_contrastive_loss_param()) {
      if (contrastive_loss_param_ != NULL) contrastive_loss_param_->::caffe::ContrastiveLossParameter::Clear();
    }
  }
  if (_has_bits_[16 / 32] & 16711680u) {
    if (has_convolution_param()) {
      if (convolution_param_ != NULL) convolution_param_->::caffe::ConvolutionParameter::Clear();
    }
    if (has_data_param()) {
      if (data_param_ != NULL) data_param_->::caffe::DataParameter::Clear();
    }
    if (has_dropout_param()) {
      if (dropout_param_ != NULL) dropout_param_->::caffe::DropoutParameter::Clear();
    }
    if (has_dummy_data_param()) {
      if (dummy_data_param_ != NULL) dummy_data_param_->::caffe::DummyDataParameter::Clear();
    }
    if (has_eltwise_param()) {
      if (eltwise_param_ != NULL) eltwise_param_->::caffe::EltwiseParameter::Clear();
    }
    if (has_exp_param()) {
      if (exp_param_ != NULL) exp_param_->::caffe::ExpParameter::Clear();
    }
    if (has_hdf5_data_param()) {
      if (hdf5_data_param_ != NULL) hdf5_data_param_->::caffe::HDF5DataParameter::Clear();
    }
    if (has_hdf5_output_param()) {
      if (hdf5_output_param_ != NULL) hdf5_output_param_->::caffe::HDF5OutputParameter::Clear();
    }
  }
  if (_has_bits_[24 / 32] & 4278190080u) {
    if (has_hinge_loss_param()) {
      if (hinge_loss_param_ != NULL) hinge_loss_param_->::caffe::HingeLossParameter::Clear();
    }
    if (has_image_data_param()) {
      if (image_data_param_ != NULL) image_data_param_->::caffe::ImageDataParameter::Clear();
    }
    if (has_infogain_loss_param()) {
      if (infogain_loss_param_ != NULL) infogain_loss_param_->::caffe::InfogainLossParameter::Clear();
    }
    if (has_inner_product_param()) {
      if (inner_product_param_ != NULL) inner_product_param_->::caffe::InnerProductParameter::Clear();
    }
    if (has_lrn_param()) {
      if (lrn_param_ != NULL) lrn_param_->::caffe::LRNParameter::Clear();
    }
    if (has_memory_data_param()) {
      if (memory_data_param_ != NULL) memory_data_param_->::caffe::MemoryDataParameter::Clear();
    }
    if (has_mvn_param()) {
      if (mvn_param_ != NULL) mvn_param_->::caffe::MVNParameter::Clear();
    }
    if (has_pooling_param()) {
      if (pooling_param_ != NULL) pooling_param_->::caffe::PoolingParameter::Clear();
    }
  }
  if (_has_bits_[32 / 32] & 255u) {
    if (has_power_param()) {
      if (power_param_ != NULL) power_param_->::caffe::PowerParameter::Clear();
    }
    if (has_relu_param()) {
      if (relu_param_ != NULL) relu_param_->::caffe::ReLUParameter::Clear();
    }
    if (has_sigmoid_param()) {
      if (sigmoid_param_ != NULL) sigmoid_param_->::caffe::SigmoidParameter::Clear();
    }
    if (has_softmax_param()) {
      if (softmax_param_ != NULL) softmax_param_->::caffe::SoftmaxParameter::Clear();
    }
    if (has_slice_param()) {
      if (slice_param_ != NULL) slice_param_->::caffe::SliceParameter::Clear();
    }
    if (has_tanh_param()) {
      if (tanh_param_ != NULL) tanh_param_->::caffe::TanHParameter::Clear();
    }
    if (has_threshold_param()) {
      if (threshold_param_ != NULL) threshold_param_->::caffe::ThresholdParameter::Clear();
    }
    if (has_window_data_param()) {
      if (window_data_param_ != NULL) window_data_param_->::caffe::WindowDataParameter::Clear();
    }
  }
  if (_has_bits_[40 / 32] & 1792u) {
    if (has_transform_param()) {
      if (transform_param_ != NULL) transform_param_->::caffe::TransformationParameter::Clear();
    }
    if (has_loss_param()) {
      if (loss_param_ != NULL) loss_param_->::caffe::LossParameter::Clear();
    }
    if (has_layer()) {
      if (layer_ != NULL) layer_->::caffe::V0LayerParameter::Clear();
    }
  }
  bottom_.Clear();
  top_.Clear();
  include_.Clear();
  exclude_.Clear();
  blobs_.Clear();
  param_.Clear();
  blob_share_mode_.Clear();
  blobs_lr_.Clear();
  weight_decay_.Clear();
  loss_weight_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool V1LayerParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.V1LayerParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.V0LayerParameter layer = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_layer()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_bottom;
        break;
      }

      // repeated string bottom = 2;
      case 2: {
        if (tag == 18) {
         parse_bottom:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_bottom()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->bottom(this->bottom_size() - 1).data(),
            this->bottom(this->bottom_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.V1LayerParameter.bottom");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_bottom;
        if (input->ExpectTag(26)) goto parse_top;
        break;
      }

      // repeated string top = 3;
      case 3: {
        if (tag == 26) {
         parse_top:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_top()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->top(this->top_size() - 1).data(),
            this->top(this->top_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.V1LayerParameter.top");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(26)) goto parse_top;
        if (input->ExpectTag(34)) goto parse_name;
        break;
      }

      // optional string name = 4;
      case 4: {
        if (tag == 34) {
         parse_name:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.V1LayerParameter.name");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_type;
        break;
      }

      // optional .caffe.V1LayerParameter.LayerType type = 5;
      case 5: {
        if (tag == 40) {
         parse_type:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::V1LayerParameter_LayerType_IsValid(value)) {
            set_type(static_cast< ::caffe::V1LayerParameter_LayerType >(value));
          } else {
            mutable_unknown_fields()->AddVarint(5, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(50)) goto parse_blobs;
        break;
      }

      // repeated .caffe.BlobProto blobs = 6;
      case 6: {
        if (tag == 50) {
         parse_blobs:
          DO_(input->IncrementRecursionDepth());
         parse_loop_blobs:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_blobs()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(50)) goto parse_loop_blobs;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectTag(61)) goto parse_blobs_lr;
        break;
      }

      // repeated float blobs_lr = 7;
      case 7: {
        if (tag == 61) {
         parse_blobs_lr:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 61, input, this->mutable_blobs_lr())));
        } else if (tag == 58) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_blobs_lr())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(61)) goto parse_blobs_lr;
        if (input->ExpectTag(69)) goto parse_weight_decay;
        break;
      }

      // repeated float weight_decay = 8;
      case 8: {
        if (tag == 69) {
         parse_weight_decay:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 1, 69, input, this->mutable_weight_decay())));
        } else if (tag == 66) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_weight_decay())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(69)) goto parse_weight_decay;
        if (input->ExpectTag(74)) goto parse_concat_param;
        break;
      }

      // optional .caffe.ConcatParameter concat_param = 9;
      case 9: {
        if (tag == 74) {
         parse_concat_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_concat_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(82)) goto parse_convolution_param;
        break;
      }

      // optional .caffe.ConvolutionParameter convolution_param = 10;
      case 10: {
        if (tag == 82) {
         parse_convolution_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_convolution_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(90)) goto parse_data_param;
        break;
      }

      // optional .caffe.DataParameter data_param = 11;
      case 11: {
        if (tag == 90) {
         parse_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(98)) goto parse_dropout_param;
        break;
      }

      // optional .caffe.DropoutParameter dropout_param = 12;
      case 12: {
        if (tag == 98) {
         parse_dropout_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_dropout_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(106)) goto parse_hdf5_data_param;
        break;
      }

      // optional .caffe.HDF5DataParameter hdf5_data_param = 13;
      case 13: {
        if (tag == 106) {
         parse_hdf5_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_hdf5_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(114)) goto parse_hdf5_output_param;
        break;
      }

      // optional .caffe.HDF5OutputParameter hdf5_output_param = 14;
      case 14: {
        if (tag == 114) {
         parse_hdf5_output_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_hdf5_output_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(122)) goto parse_image_data_param;
        break;
      }

      // optional .caffe.ImageDataParameter image_data_param = 15;
      case 15: {
        if (tag == 122) {
         parse_image_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_image_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(130)) goto parse_infogain_loss_param;
        break;
      }

      // optional .caffe.InfogainLossParameter infogain_loss_param = 16;
      case 16: {
        if (tag == 130) {
         parse_infogain_loss_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_infogain_loss_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(138)) goto parse_inner_product_param;
        break;
      }

      // optional .caffe.InnerProductParameter inner_product_param = 17;
      case 17: {
        if (tag == 138) {
         parse_inner_product_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_inner_product_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(146)) goto parse_lrn_param;
        break;
      }

      // optional .caffe.LRNParameter lrn_param = 18;
      case 18: {
        if (tag == 146) {
         parse_lrn_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_lrn_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(154)) goto parse_pooling_param;
        break;
      }

      // optional .caffe.PoolingParameter pooling_param = 19;
      case 19: {
        if (tag == 154) {
         parse_pooling_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_pooling_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(162)) goto parse_window_data_param;
        break;
      }

      // optional .caffe.WindowDataParameter window_data_param = 20;
      case 20: {
        if (tag == 162) {
         parse_window_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_window_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(170)) goto parse_power_param;
        break;
      }

      // optional .caffe.PowerParameter power_param = 21;
      case 21: {
        if (tag == 170) {
         parse_power_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_power_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(178)) goto parse_memory_data_param;
        break;
      }

      // optional .caffe.MemoryDataParameter memory_data_param = 22;
      case 22: {
        if (tag == 178) {
         parse_memory_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_memory_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(186)) goto parse_argmax_param;
        break;
      }

      // optional .caffe.ArgMaxParameter argmax_param = 23;
      case 23: {
        if (tag == 186) {
         parse_argmax_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_argmax_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(194)) goto parse_eltwise_param;
        break;
      }

      // optional .caffe.EltwiseParameter eltwise_param = 24;
      case 24: {
        if (tag == 194) {
         parse_eltwise_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_eltwise_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(202)) goto parse_threshold_param;
        break;
      }

      // optional .caffe.ThresholdParameter threshold_param = 25;
      case 25: {
        if (tag == 202) {
         parse_threshold_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_threshold_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(210)) goto parse_dummy_data_param;
        break;
      }

      // optional .caffe.DummyDataParameter dummy_data_param = 26;
      case 26: {
        if (tag == 210) {
         parse_dummy_data_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_dummy_data_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(218)) goto parse_accuracy_param;
        break;
      }

      // optional .caffe.AccuracyParameter accuracy_param = 27;
      case 27: {
        if (tag == 218) {
         parse_accuracy_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_accuracy_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(234)) goto parse_hinge_loss_param;
        break;
      }

      // optional .caffe.HingeLossParameter hinge_loss_param = 29;
      case 29: {
        if (tag == 234) {
         parse_hinge_loss_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_hinge_loss_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(242)) goto parse_relu_param;
        break;
      }

      // optional .caffe.ReLUParameter relu_param = 30;
      case 30: {
        if (tag == 242) {
         parse_relu_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_relu_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(250)) goto parse_slice_param;
        break;
      }

      // optional .caffe.SliceParameter slice_param = 31;
      case 31: {
        if (tag == 250) {
         parse_slice_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_slice_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(258)) goto parse_include;
        break;
      }

      // repeated .caffe.NetStateRule include = 32;
      case 32: {
        if (tag == 258) {
         parse_include:
          DO_(input->IncrementRecursionDepth());
         parse_loop_include:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_include()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(258)) goto parse_loop_include;
        if (input->ExpectTag(266)) goto parse_loop_exclude;
        input->UnsafeDecrementRecursionDepth();
        break;
      }

      // repeated .caffe.NetStateRule exclude = 33;
      case 33: {
        if (tag == 266) {
          DO_(input->IncrementRecursionDepth());
         parse_loop_exclude:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_exclude()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(266)) goto parse_loop_exclude;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectTag(274)) goto parse_mvn_param;
        break;
      }

      // optional .caffe.MVNParameter mvn_param = 34;
      case 34: {
        if (tag == 274) {
         parse_mvn_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_mvn_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(285)) goto parse_loss_weight;
        break;
      }

      // repeated float loss_weight = 35;
      case 35: {
        if (tag == 285) {
         parse_loss_weight:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 2, 285, input, this->mutable_loss_weight())));
        } else if (tag == 282) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_loss_weight())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(285)) goto parse_loss_weight;
        if (input->ExpectTag(290)) goto parse_transform_param;
        break;
      }

      // optional .caffe.TransformationParameter transform_param = 36;
      case 36: {
        if (tag == 290) {
         parse_transform_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_transform_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(298)) goto parse_tanh_param;
        break;
      }

      // optional .caffe.TanHParameter tanh_param = 37;
      case 37: {
        if (tag == 298) {
         parse_tanh_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_tanh_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(306)) goto parse_sigmoid_param;
        break;
      }

      // optional .caffe.SigmoidParameter sigmoid_param = 38;
      case 38: {
        if (tag == 306) {
         parse_sigmoid_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_sigmoid_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(314)) goto parse_softmax_param;
        break;
      }

      // optional .caffe.SoftmaxParameter softmax_param = 39;
      case 39: {
        if (tag == 314) {
         parse_softmax_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_softmax_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(322)) goto parse_contrastive_loss_param;
        break;
      }

      // optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40;
      case 40: {
        if (tag == 322) {
         parse_contrastive_loss_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_contrastive_loss_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(330)) goto parse_exp_param;
        break;
      }

      // optional .caffe.ExpParameter exp_param = 41;
      case 41: {
        if (tag == 330) {
         parse_exp_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_exp_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(338)) goto parse_loss_param;
        break;
      }

      // optional .caffe.LossParameter loss_param = 42;
      case 42: {
        if (tag == 338) {
         parse_loss_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_loss_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(8010)) goto parse_param;
        break;
      }

      // repeated string param = 1001;
      case 1001: {
        if (tag == 8010) {
         parse_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_param()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->param(this->param_size() - 1).data(),
            this->param(this->param_size() - 1).length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.V1LayerParameter.param");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(8010)) goto parse_param;
        if (input->ExpectTag(8016)) goto parse_blob_share_mode;
        break;
      }

      // repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
      case 1002: {
        if (tag == 8016) {
         parse_blob_share_mode:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::V1LayerParameter_DimCheckMode_IsValid(value)) {
            add_blob_share_mode(static_cast< ::caffe::V1LayerParameter_DimCheckMode >(value));
          } else {
            mutable_unknown_fields()->AddVarint(1002, value);
          }
        } else if (tag == 8018) {
          DO_((::google::protobuf::internal::WireFormat::ReadPackedEnumPreserveUnknowns(
                 input,
                 1002,
                 ::caffe::V1LayerParameter_DimCheckMode_IsValid,
                 mutable_unknown_fields(),
                 this->mutable_blob_share_mode())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(8016)) goto parse_blob_share_mode;
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.V1LayerParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.V1LayerParameter)
  return false;
#undef DO_
}

void V1LayerParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.V1LayerParameter)
  // optional .caffe.V0LayerParameter layer = 1;
  if (has_layer()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, *this->layer_, output);
  }

  // repeated string bottom = 2;
  for (int i = 0; i < this->bottom_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->bottom(i).data(), this->bottom(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V1LayerParameter.bottom");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      2, this->bottom(i), output);
  }

  // repeated string top = 3;
  for (int i = 0; i < this->top_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->top(i).data(), this->top(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V1LayerParameter.top");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      3, this->top(i), output);
  }

  // optional string name = 4;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V1LayerParameter.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      4, this->name(), output);
  }

  // optional .caffe.V1LayerParameter.LayerType type = 5;
  if (has_type()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      5, this->type(), output);
  }

  // repeated .caffe.BlobProto blobs = 6;
  for (unsigned int i = 0, n = this->blobs_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, this->blobs(i), output);
  }

  // repeated float blobs_lr = 7;
  for (int i = 0; i < this->blobs_lr_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      7, this->blobs_lr(i), output);
  }

  // repeated float weight_decay = 8;
  for (int i = 0; i < this->weight_decay_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      8, this->weight_decay(i), output);
  }

  // optional .caffe.ConcatParameter concat_param = 9;
  if (has_concat_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      9, *this->concat_param_, output);
  }

  // optional .caffe.ConvolutionParameter convolution_param = 10;
  if (has_convolution_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      10, *this->convolution_param_, output);
  }

  // optional .caffe.DataParameter data_param = 11;
  if (has_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      11, *this->data_param_, output);
  }

  // optional .caffe.DropoutParameter dropout_param = 12;
  if (has_dropout_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      12, *this->dropout_param_, output);
  }

  // optional .caffe.HDF5DataParameter hdf5_data_param = 13;
  if (has_hdf5_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      13, *this->hdf5_data_param_, output);
  }

  // optional .caffe.HDF5OutputParameter hdf5_output_param = 14;
  if (has_hdf5_output_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      14, *this->hdf5_output_param_, output);
  }

  // optional .caffe.ImageDataParameter image_data_param = 15;
  if (has_image_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      15, *this->image_data_param_, output);
  }

  // optional .caffe.InfogainLossParameter infogain_loss_param = 16;
  if (has_infogain_loss_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      16, *this->infogain_loss_param_, output);
  }

  // optional .caffe.InnerProductParameter inner_product_param = 17;
  if (has_inner_product_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      17, *this->inner_product_param_, output);
  }

  // optional .caffe.LRNParameter lrn_param = 18;
  if (has_lrn_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      18, *this->lrn_param_, output);
  }

  // optional .caffe.PoolingParameter pooling_param = 19;
  if (has_pooling_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      19, *this->pooling_param_, output);
  }

  // optional .caffe.WindowDataParameter window_data_param = 20;
  if (has_window_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      20, *this->window_data_param_, output);
  }

  // optional .caffe.PowerParameter power_param = 21;
  if (has_power_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      21, *this->power_param_, output);
  }

  // optional .caffe.MemoryDataParameter memory_data_param = 22;
  if (has_memory_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      22, *this->memory_data_param_, output);
  }

  // optional .caffe.ArgMaxParameter argmax_param = 23;
  if (has_argmax_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      23, *this->argmax_param_, output);
  }

  // optional .caffe.EltwiseParameter eltwise_param = 24;
  if (has_eltwise_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      24, *this->eltwise_param_, output);
  }

  // optional .caffe.ThresholdParameter threshold_param = 25;
  if (has_threshold_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      25, *this->threshold_param_, output);
  }

  // optional .caffe.DummyDataParameter dummy_data_param = 26;
  if (has_dummy_data_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      26, *this->dummy_data_param_, output);
  }

  // optional .caffe.AccuracyParameter accuracy_param = 27;
  if (has_accuracy_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      27, *this->accuracy_param_, output);
  }

  // optional .caffe.HingeLossParameter hinge_loss_param = 29;
  if (has_hinge_loss_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      29, *this->hinge_loss_param_, output);
  }

  // optional .caffe.ReLUParameter relu_param = 30;
  if (has_relu_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      30, *this->relu_param_, output);
  }

  // optional .caffe.SliceParameter slice_param = 31;
  if (has_slice_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      31, *this->slice_param_, output);
  }

  // repeated .caffe.NetStateRule include = 32;
  for (unsigned int i = 0, n = this->include_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      32, this->include(i), output);
  }

  // repeated .caffe.NetStateRule exclude = 33;
  for (unsigned int i = 0, n = this->exclude_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      33, this->exclude(i), output);
  }

  // optional .caffe.MVNParameter mvn_param = 34;
  if (has_mvn_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      34, *this->mvn_param_, output);
  }

  // repeated float loss_weight = 35;
  for (int i = 0; i < this->loss_weight_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      35, this->loss_weight(i), output);
  }

  // optional .caffe.TransformationParameter transform_param = 36;
  if (has_transform_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      36, *this->transform_param_, output);
  }

  // optional .caffe.TanHParameter tanh_param = 37;
  if (has_tanh_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      37, *this->tanh_param_, output);
  }

  // optional .caffe.SigmoidParameter sigmoid_param = 38;
  if (has_sigmoid_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      38, *this->sigmoid_param_, output);
  }

  // optional .caffe.SoftmaxParameter softmax_param = 39;
  if (has_softmax_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      39, *this->softmax_param_, output);
  }

  // optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40;
  if (has_contrastive_loss_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      40, *this->contrastive_loss_param_, output);
  }

  // optional .caffe.ExpParameter exp_param = 41;
  if (has_exp_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      41, *this->exp_param_, output);
  }

  // optional .caffe.LossParameter loss_param = 42;
  if (has_loss_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      42, *this->loss_param_, output);
  }

  // repeated string param = 1001;
  for (int i = 0; i < this->param_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->param(i).data(), this->param(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V1LayerParameter.param");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1001, this->param(i), output);
  }

  // repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
  for (int i = 0; i < this->blob_share_mode_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1002, this->blob_share_mode(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.V1LayerParameter)
}

::google::protobuf::uint8* V1LayerParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.V1LayerParameter)
  // optional .caffe.V0LayerParameter layer = 1;
  if (has_layer()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        1, *this->layer_, false, target);
  }

  // repeated string bottom = 2;
  for (int i = 0; i < this->bottom_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->bottom(i).data(), this->bottom(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V1LayerParameter.bottom");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(2, this->bottom(i), target);
  }

  // repeated string top = 3;
  for (int i = 0; i < this->top_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->top(i).data(), this->top(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V1LayerParameter.top");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(3, this->top(i), target);
  }

  // optional string name = 4;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V1LayerParameter.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        4, this->name(), target);
  }

  // optional .caffe.V1LayerParameter.LayerType type = 5;
  if (has_type()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      5, this->type(), target);
  }

  // repeated .caffe.BlobProto blobs = 6;
  for (unsigned int i = 0, n = this->blobs_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        6, this->blobs(i), false, target);
  }

  // repeated float blobs_lr = 7;
  for (int i = 0; i < this->blobs_lr_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(7, this->blobs_lr(i), target);
  }

  // repeated float weight_decay = 8;
  for (int i = 0; i < this->weight_decay_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(8, this->weight_decay(i), target);
  }

  // optional .caffe.ConcatParameter concat_param = 9;
  if (has_concat_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        9, *this->concat_param_, false, target);
  }

  // optional .caffe.ConvolutionParameter convolution_param = 10;
  if (has_convolution_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        10, *this->convolution_param_, false, target);
  }

  // optional .caffe.DataParameter data_param = 11;
  if (has_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        11, *this->data_param_, false, target);
  }

  // optional .caffe.DropoutParameter dropout_param = 12;
  if (has_dropout_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        12, *this->dropout_param_, false, target);
  }

  // optional .caffe.HDF5DataParameter hdf5_data_param = 13;
  if (has_hdf5_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        13, *this->hdf5_data_param_, false, target);
  }

  // optional .caffe.HDF5OutputParameter hdf5_output_param = 14;
  if (has_hdf5_output_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        14, *this->hdf5_output_param_, false, target);
  }

  // optional .caffe.ImageDataParameter image_data_param = 15;
  if (has_image_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        15, *this->image_data_param_, false, target);
  }

  // optional .caffe.InfogainLossParameter infogain_loss_param = 16;
  if (has_infogain_loss_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        16, *this->infogain_loss_param_, false, target);
  }

  // optional .caffe.InnerProductParameter inner_product_param = 17;
  if (has_inner_product_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        17, *this->inner_product_param_, false, target);
  }

  // optional .caffe.LRNParameter lrn_param = 18;
  if (has_lrn_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        18, *this->lrn_param_, false, target);
  }

  // optional .caffe.PoolingParameter pooling_param = 19;
  if (has_pooling_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        19, *this->pooling_param_, false, target);
  }

  // optional .caffe.WindowDataParameter window_data_param = 20;
  if (has_window_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        20, *this->window_data_param_, false, target);
  }

  // optional .caffe.PowerParameter power_param = 21;
  if (has_power_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        21, *this->power_param_, false, target);
  }

  // optional .caffe.MemoryDataParameter memory_data_param = 22;
  if (has_memory_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        22, *this->memory_data_param_, false, target);
  }

  // optional .caffe.ArgMaxParameter argmax_param = 23;
  if (has_argmax_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        23, *this->argmax_param_, false, target);
  }

  // optional .caffe.EltwiseParameter eltwise_param = 24;
  if (has_eltwise_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        24, *this->eltwise_param_, false, target);
  }

  // optional .caffe.ThresholdParameter threshold_param = 25;
  if (has_threshold_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        25, *this->threshold_param_, false, target);
  }

  // optional .caffe.DummyDataParameter dummy_data_param = 26;
  if (has_dummy_data_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        26, *this->dummy_data_param_, false, target);
  }

  // optional .caffe.AccuracyParameter accuracy_param = 27;
  if (has_accuracy_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        27, *this->accuracy_param_, false, target);
  }

  // optional .caffe.HingeLossParameter hinge_loss_param = 29;
  if (has_hinge_loss_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        29, *this->hinge_loss_param_, false, target);
  }

  // optional .caffe.ReLUParameter relu_param = 30;
  if (has_relu_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        30, *this->relu_param_, false, target);
  }

  // optional .caffe.SliceParameter slice_param = 31;
  if (has_slice_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        31, *this->slice_param_, false, target);
  }

  // repeated .caffe.NetStateRule include = 32;
  for (unsigned int i = 0, n = this->include_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        32, this->include(i), false, target);
  }

  // repeated .caffe.NetStateRule exclude = 33;
  for (unsigned int i = 0, n = this->exclude_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        33, this->exclude(i), false, target);
  }

  // optional .caffe.MVNParameter mvn_param = 34;
  if (has_mvn_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        34, *this->mvn_param_, false, target);
  }

  // repeated float loss_weight = 35;
  for (int i = 0; i < this->loss_weight_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(35, this->loss_weight(i), target);
  }

  // optional .caffe.TransformationParameter transform_param = 36;
  if (has_transform_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        36, *this->transform_param_, false, target);
  }

  // optional .caffe.TanHParameter tanh_param = 37;
  if (has_tanh_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        37, *this->tanh_param_, false, target);
  }

  // optional .caffe.SigmoidParameter sigmoid_param = 38;
  if (has_sigmoid_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        38, *this->sigmoid_param_, false, target);
  }

  // optional .caffe.SoftmaxParameter softmax_param = 39;
  if (has_softmax_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        39, *this->softmax_param_, false, target);
  }

  // optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40;
  if (has_contrastive_loss_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        40, *this->contrastive_loss_param_, false, target);
  }

  // optional .caffe.ExpParameter exp_param = 41;
  if (has_exp_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        41, *this->exp_param_, false, target);
  }

  // optional .caffe.LossParameter loss_param = 42;
  if (has_loss_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        42, *this->loss_param_, false, target);
  }

  // repeated string param = 1001;
  for (int i = 0; i < this->param_size(); i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->param(i).data(), this->param(i).length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V1LayerParameter.param");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(1001, this->param(i), target);
  }

  // repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
  for (int i = 0; i < this->blob_share_mode_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      1002, this->blob_share_mode(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[2 / 32] & 36u) {
    // optional string name = 4;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional .caffe.V1LayerParameter.LayerType type = 5;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
    }

  }
  if (_has_bits_[12 / 32] & 61440u) {
    // optional .caffe.AccuracyParameter accuracy_param = 27;
    if (has_accuracy_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->accuracy_param_);
    }

    // optional .caffe.ArgMaxParameter argmax_param = 23;
    if (has_argmax_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->argmax_param_);
    }

    // optional .caffe.ConcatParameter concat_param = 9;
    if (has_concat_param()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->concat_param_);
    }

    // optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40;
    if (has_contrastive_loss_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->contrastive_loss_param_);
    }

  }
  if (_has_bits_[16 / 32] & 16711680u) {
    // optional .caffe.ConvolutionParameter convolution_param = 10;
    if (has_convolution_param()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->convolution_param_);
    }

    // optional .caffe.DataParameter data_param = 11;
    if (has_data_param()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->data_param_);
    }

    // optional .caffe.DropoutParameter dropout_param = 12;
    if (has_dropout_param()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->dropout_param_);
    }

    // optional .caffe.DummyDataParameter dummy_data_param = 26;
    if (has_dummy_data_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->dummy_data_param_);
    }

    // optional .caffe.EltwiseParameter eltwise_param = 24;
    if (has_eltwise_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->eltwise_param_);
    }

    // optional .caffe.ExpParameter exp_param = 41;
    if (has_exp_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->exp_param_);
    }

    // optional .caffe.HDF5DataParameter hdf5_data_param = 13;
    if (has_hdf5_data_param()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->hdf5_data_param_);
    }

    // optional .caffe.HDF5OutputParameter hdf5_output_param = 14;
    if (has_hdf5_output_param()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->hdf5_output_param_);
    }

  }
  if (_has_bits_[24 / 32] & 4278190080u) {
    // optional .caffe.HingeLossParameter hinge_loss_param = 29;
    if (has_hinge_loss_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->hinge_loss_param_);
    }

    // optional .caffe.ImageDataParameter image_data_param = 15;
    if (has_image_data_param()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->image_data_param_);
    }

    // optional .caffe.InfogainLossParameter infogain_loss_param = 16;
    if (has_infogain_loss_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->infogain_loss_param_);
    }

    // optional .caffe.InnerProductParameter inner_product_param = 17;
    if (has_inner_product_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->inner_product_param_);
    }

    // optional .caffe.LRNParameter lrn_param = 18;
    if (has_lrn_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->lrn_param_);
    }

    // optional .caffe.MemoryDataParameter memory_data_param = 22;
    if (has_memory_data_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->memory_data_param_);
    }

    // optional .caffe.MVNParameter mvn_param = 34;
    if (has_mvn_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->mvn_param_);
    }

    // optional .caffe.PoolingParameter pooling_param = 19;
    if (has_pooling_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->pooling_param_);
    }

  }
  if (_has_bits_[32 / 32] & 255u) {
    // optional .caffe.PowerParameter power_param = 21;
    if (has_power_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->power_param_);
    }

    // optional .caffe.ReLUParameter relu_param = 30;
    if (has_relu_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->relu_param_);
    }

    // optional .caffe.SigmoidParameter sigmoid_param = 38;
    if (has_sigmoid_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->sigmoid_param_);
    }

    // optional .caffe.SoftmaxParameter softmax_param = 39;
    if (has_softmax_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->softmax_param_);
    }

    // optional .caffe.SliceParameter slice_param = 31;
    if (has_slice_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->slice_param_);
    }

    // optional .caffe.TanHParameter tanh_param = 37;
    if (has_tanh_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->tanh_param_);
    }

    // optional .caffe.ThresholdParameter threshold_param = 25;
    if (has_threshold_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->threshold_param_);
    }

    // optional .caffe.WindowDataParameter window_data_param = 20;
    if (has_window_data_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->window_data_param_);
    }

  }
  if (_has_bits_[40 / 32] & 1792u) {
    // optional .caffe.TransformationParameter transform_param = 36;
    if (has_transform_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->transform_param_);
    }

    // optional .caffe.LossParameter loss_param = 42;
    if (has_loss_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->loss_param_);
    }

    // optional .caffe.V0LayerParameter layer = 1;
    if (has_layer()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->layer_);
    }

  }
  // repeated string bottom = 2;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->bottom_size());
  for (int i = 0; i < this->bottom_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->bottom(i));
  }

  // repeated string top = 3;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->top_size());
  for (int i = 0; i < this->top_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->top(i));
  }

  // repeated .caffe.NetStateRule include = 32;
  {
    unsigned int count = this->include_size();
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->include(i));
    }
  }

  // repeated .caffe.NetStateRule exclude = 33;
  {
    unsigned int count = this->exclude_size();
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->exclude(i));
    }
  }

  // repeated .caffe.BlobProto blobs = 6;
  {
    unsigned int count = this->blobs_size();
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->blobs(i));
    }
  }

  // repeated string param = 1001;
  total_size += 2 *
      ::google::protobuf::internal::FromIntSize(this->param_size());
  for (int i = 0; i < this->param_size(); i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->param(i));
  }

  // repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
  {
    size_t data_size = 0;
    unsigned int count = this->blob_share_mode_size();for (unsigned int i = 0; i < count; i++) {
      data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
        this->blob_share_mode(i));
    }
    total_size += (2UL * count) + data_size;
  }

  // repeated float blobs_lr = 7;
  {
    size_t data_size = 0;
    unsigned int count = this->blobs_lr_size();
    data_size = 4UL * count;
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->blobs_lr_size());
    total_size += data_size;
  }

  // repeated float weight_decay = 8;
  {
    size_t data_size = 0;
    unsigned int count = this->weight_decay_size();
    data_size = 4UL * count;
    total_size += 1 *
                  ::google::protobuf::internal::FromIntSize(this->weight_decay_size());
    total_size += data_size;
  }

  // repeated float loss_weight = 35;
  {
    size_t data_size = 0;
    unsigned int count = this->loss_weight_size();
    data_size = 4UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->loss_weight_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void V1LayerParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.V1LayerParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const V1LayerParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const V1LayerParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.V1LayerParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.V1LayerParameter)
    UnsafeMergeFrom(*source);
  }
}

void V1LayerParameter::MergeFrom(const V1LayerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.V1LayerParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void V1LayerParameter::UnsafeMergeFrom(const V1LayerParameter& from) {
  GOOGLE_DCHECK(&from != this);
  bottom_.UnsafeMergeFrom(from.bottom_);
  top_.UnsafeMergeFrom(from.top_);
  include_.MergeFrom(from.include_);
  exclude_.MergeFrom(from.exclude_);
  blobs_.MergeFrom(from.blobs_);
  param_.UnsafeMergeFrom(from.param_);
  blob_share_mode_.UnsafeMergeFrom(from.blob_share_mode_);
  blobs_lr_.UnsafeMergeFrom(from.blobs_lr_);
  weight_decay_.UnsafeMergeFrom(from.weight_decay_);
  loss_weight_.UnsafeMergeFrom(from.loss_weight_);
  if (from._has_bits_[2 / 32] & (0xffu << (2 % 32))) {
    if (from.has_name()) {
      set_has_name();
      name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
    }
    if (from.has_type()) {
      set_type(from.type());
    }
  }
  if (from._has_bits_[12 / 32] & (0xffu << (12 % 32))) {
    if (from.has_accuracy_param()) {
      mutable_accuracy_param()->::caffe::AccuracyParameter::MergeFrom(from.accuracy_param());
    }
    if (from.has_argmax_param()) {
      mutable_argmax_param()->::caffe::ArgMaxParameter::MergeFrom(from.argmax_param());
    }
    if (from.has_concat_param()) {
      mutable_concat_param()->::caffe::ConcatParameter::MergeFrom(from.concat_param());
    }
    if (from.has_contrastive_loss_param()) {
      mutable_contrastive_loss_param()->::caffe::ContrastiveLossParameter::MergeFrom(from.contrastive_loss_param());
    }
  }
  if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    if (from.has_convolution_param()) {
      mutable_convolution_param()->::caffe::ConvolutionParameter::MergeFrom(from.convolution_param());
    }
    if (from.has_data_param()) {
      mutable_data_param()->::caffe::DataParameter::MergeFrom(from.data_param());
    }
    if (from.has_dropout_param()) {
      mutable_dropout_param()->::caffe::DropoutParameter::MergeFrom(from.dropout_param());
    }
    if (from.has_dummy_data_param()) {
      mutable_dummy_data_param()->::caffe::DummyDataParameter::MergeFrom(from.dummy_data_param());
    }
    if (from.has_eltwise_param()) {
      mutable_eltwise_param()->::caffe::EltwiseParameter::MergeFrom(from.eltwise_param());
    }
    if (from.has_exp_param()) {
      mutable_exp_param()->::caffe::ExpParameter::MergeFrom(from.exp_param());
    }
    if (from.has_hdf5_data_param()) {
      mutable_hdf5_data_param()->::caffe::HDF5DataParameter::MergeFrom(from.hdf5_data_param());
    }
    if (from.has_hdf5_output_param()) {
      mutable_hdf5_output_param()->::caffe::HDF5OutputParameter::MergeFrom(from.hdf5_output_param());
    }
  }
  if (from._has_bits_[24 / 32] & (0xffu << (24 % 32))) {
    if (from.has_hinge_loss_param()) {
      mutable_hinge_loss_param()->::caffe::HingeLossParameter::MergeFrom(from.hinge_loss_param());
    }
    if (from.has_image_data_param()) {
      mutable_image_data_param()->::caffe::ImageDataParameter::MergeFrom(from.image_data_param());
    }
    if (from.has_infogain_loss_param()) {
      mutable_infogain_loss_param()->::caffe::InfogainLossParameter::MergeFrom(from.infogain_loss_param());
    }
    if (from.has_inner_product_param()) {
      mutable_inner_product_param()->::caffe::InnerProductParameter::MergeFrom(from.inner_product_param());
    }
    if (from.has_lrn_param()) {
      mutable_lrn_param()->::caffe::LRNParameter::MergeFrom(from.lrn_param());
    }
    if (from.has_memory_data_param()) {
      mutable_memory_data_param()->::caffe::MemoryDataParameter::MergeFrom(from.memory_data_param());
    }
    if (from.has_mvn_param()) {
      mutable_mvn_param()->::caffe::MVNParameter::MergeFrom(from.mvn_param());
    }
    if (from.has_pooling_param()) {
      mutable_pooling_param()->::caffe::PoolingParameter::MergeFrom(from.pooling_param());
    }
  }
  if (from._has_bits_[32 / 32] & (0xffu << (32 % 32))) {
    if (from.has_power_param()) {
      mutable_power_param()->::caffe::PowerParameter::MergeFrom(from.power_param());
    }
    if (from.has_relu_param()) {
      mutable_relu_param()->::caffe::ReLUParameter::MergeFrom(from.relu_param());
    }
    if (from.has_sigmoid_param()) {
      mutable_sigmoid_param()->::caffe::SigmoidParameter::MergeFrom(from.sigmoid_param());
    }
    if (from.has_softmax_param()) {
      mutable_softmax_param()->::caffe::SoftmaxParameter::MergeFrom(from.softmax_param());
    }
    if (from.has_slice_param()) {
      mutable_slice_param()->::caffe::SliceParameter::MergeFrom(from.slice_param());
    }
    if (from.has_tanh_param()) {
      mutable_tanh_param()->::caffe::TanHParameter::MergeFrom(from.tanh_param());
    }
    if (from.has_threshold_param()) {
      mutable_threshold_param()->::caffe::ThresholdParameter::MergeFrom(from.threshold_param());
    }
    if (from.has_window_data_param()) {
      mutable_window_data_param()->::caffe::WindowDataParameter::MergeFrom(from.window_data_param());
    }
  }
  if (from._has_bits_[40 / 32] & (0xffu << (40 % 32))) {
    if (from.has_transform_param()) {
      mutable_transform_param()->::caffe::TransformationParameter::MergeFrom(from.transform_param());
    }
    if (from.has_loss_param()) {
      mutable_loss_param()->::caffe::LossParameter::MergeFrom(from.loss_param());
    }
    if (from.has_layer()) {
      mutable_layer()->::caffe::V0LayerParameter::MergeFrom(from.layer());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void V1LayerParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.V1LayerParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool V1LayerParameter::IsInitialized() const {

  return true;
}

void V1LayerParameter::Swap(V1LayerParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void V1LayerParameter::InternalSwap(V1LayerParameter* other) {
  bottom_.UnsafeArenaSwap(&other->bottom_);
  top_.UnsafeArenaSwap(&other->top_);
  name_.Swap(&other->name_);
  include_.UnsafeArenaSwap(&other->include_);
  exclude_.UnsafeArenaSwap(&other->exclude_);
  std::swap(type_, other->type_);
  blobs_.UnsafeArenaSwap(&other->blobs_);
  param_.UnsafeArenaSwap(&other->param_);
  blob_share_mode_.UnsafeArenaSwap(&other->blob_share_mode_);
  blobs_lr_.UnsafeArenaSwap(&other->blobs_lr_);
  weight_decay_.UnsafeArenaSwap(&other->weight_decay_);
  loss_weight_.UnsafeArenaSwap(&other->loss_weight_);
  std::swap(accuracy_param_, other->accuracy_param_);
  std::swap(argmax_param_, other->argmax_param_);
  std::swap(concat_param_, other->concat_param_);
  std::swap(contrastive_loss_param_, other->contrastive_loss_param_);
  std::swap(convolution_param_, other->convolution_param_);
  std::swap(data_param_, other->data_param_);
  std::swap(dropout_param_, other->dropout_param_);
  std::swap(dummy_data_param_, other->dummy_data_param_);
  std::swap(eltwise_param_, other->eltwise_param_);
  std::swap(exp_param_, other->exp_param_);
  std::swap(hdf5_data_param_, other->hdf5_data_param_);
  std::swap(hdf5_output_param_, other->hdf5_output_param_);
  std::swap(hinge_loss_param_, other->hinge_loss_param_);
  std::swap(image_data_param_, other->image_data_param_);
  std::swap(infogain_loss_param_, other->infogain_loss_param_);
  std::swap(inner_product_param_, other->inner_product_param_);
  std::swap(lrn_param_, other->lrn_param_);
  std::swap(memory_data_param_, other->memory_data_param_);
  std::swap(mvn_param_, other->mvn_param_);
  std::swap(pooling_param_, other->pooling_param_);
  std::swap(power_param_, other->power_param_);
  std::swap(relu_param_, other->relu_param_);
  std::swap(sigmoid_param_, other->sigmoid_param_);
  std::swap(softmax_param_, other->softmax_param_);
  std::swap(slice_param_, other->slice_param_);
  std::swap(tanh_param_, other->tanh_param_);
  std::swap(threshold_param_, other->threshold_param_);
  std::swap(window_data_param_, other->window_data_param_);
  std::swap(transform_param_, other->transform_param_);
  std::swap(loss_param_, other->loss_param_);
  std::swap(layer_, other->layer_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  std::swap(_has_bits_[1], other->_has_bits_[1]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata V1LayerParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = V1LayerParameter_descriptor_;
  metadata.reflection = V1LayerParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// V1LayerParameter

// repeated string bottom = 2;
int V1LayerParameter::bottom_size() const {
  return bottom_.size();
}
void V1LayerParameter::clear_bottom() {
  bottom_.Clear();
}
const ::std::string& V1LayerParameter::bottom(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.bottom)
  return bottom_.Get(index);
}
::std::string* V1LayerParameter::mutable_bottom(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.bottom)
  return bottom_.Mutable(index);
}
void V1LayerParameter::set_bottom(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:caffe.V1LayerParameter.bottom)
  bottom_.Mutable(index)->assign(value);
}
void V1LayerParameter::set_bottom(int index, const char* value) {
  bottom_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:caffe.V1LayerParameter.bottom)
}
void V1LayerParameter::set_bottom(int index, const char* value, size_t size) {
  bottom_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:caffe.V1LayerParameter.bottom)
}
::std::string* V1LayerParameter::add_bottom() {
  // @@protoc_insertion_point(field_add_mutable:caffe.V1LayerParameter.bottom)
  return bottom_.Add();
}
void V1LayerParameter::add_bottom(const ::std::string& value) {
  bottom_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:caffe.V1LayerParameter.bottom)
}
void V1LayerParameter::add_bottom(const char* value) {
  bottom_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:caffe.V1LayerParameter.bottom)
}
void V1LayerParameter::add_bottom(const char* value, size_t size) {
  bottom_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:caffe.V1LayerParameter.bottom)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
V1LayerParameter::bottom() const {
  // @@protoc_insertion_point(field_list:caffe.V1LayerParameter.bottom)
  return bottom_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
V1LayerParameter::mutable_bottom() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V1LayerParameter.bottom)
  return &bottom_;
}

// repeated string top = 3;
int V1LayerParameter::top_size() const {
  return top_.size();
}
void V1LayerParameter::clear_top() {
  top_.Clear();
}
const ::std::string& V1LayerParameter::top(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.top)
  return top_.Get(index);
}
::std::string* V1LayerParameter::mutable_top(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.top)
  return top_.Mutable(index);
}
void V1LayerParameter::set_top(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:caffe.V1LayerParameter.top)
  top_.Mutable(index)->assign(value);
}
void V1LayerParameter::set_top(int index, const char* value) {
  top_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:caffe.V1LayerParameter.top)
}
void V1LayerParameter::set_top(int index, const char* value, size_t size) {
  top_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:caffe.V1LayerParameter.top)
}
::std::string* V1LayerParameter::add_top() {
  // @@protoc_insertion_point(field_add_mutable:caffe.V1LayerParameter.top)
  return top_.Add();
}
void V1LayerParameter::add_top(const ::std::string& value) {
  top_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:caffe.V1LayerParameter.top)
}
void V1LayerParameter::add_top(const char* value) {
  top_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:caffe.V1LayerParameter.top)
}
void V1LayerParameter::add_top(const char* value, size_t size) {
  top_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:caffe.V1LayerParameter.top)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
V1LayerParameter::top() const {
  // @@protoc_insertion_point(field_list:caffe.V1LayerParameter.top)
  return top_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
V1LayerParameter::mutable_top() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V1LayerParameter.top)
  return &top_;
}

// optional string name = 4;
bool V1LayerParameter::has_name() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void V1LayerParameter::set_has_name() {
  _has_bits_[0] |= 0x00000004u;
}
void V1LayerParameter::clear_has_name() {
  _has_bits_[0] &= ~0x00000004u;
}
void V1LayerParameter::clear_name() {
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_name();
}
const ::std::string& V1LayerParameter::name() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.name)
  return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void V1LayerParameter::set_name(const ::std::string& value) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.V1LayerParameter.name)
}
void V1LayerParameter::set_name(const char* value) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.V1LayerParameter.name)
}
void V1LayerParameter::set_name(const char* value, size_t size) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.V1LayerParameter.name)
}
::std::string* V1LayerParameter::mutable_name() {
  set_has_name();
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.name)
  return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* V1LayerParameter::release_name() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.name)
  clear_has_name();
  return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void V1LayerParameter::set_allocated_name(::std::string* name) {
  if (name != NULL) {
    set_has_name();
  } else {
    clear_has_name();
  }
  name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.name)
}

// repeated .caffe.NetStateRule include = 32;
int V1LayerParameter::include_size() const {
  return include_.size();
}
void V1LayerParameter::clear_include() {
  include_.Clear();
}
const ::caffe::NetStateRule& V1LayerParameter::include(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.include)
  return include_.Get(index);
}
::caffe::NetStateRule* V1LayerParameter::mutable_include(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.include)
  return include_.Mutable(index);
}
::caffe::NetStateRule* V1LayerParameter::add_include() {
  // @@protoc_insertion_point(field_add:caffe.V1LayerParameter.include)
  return include_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::NetStateRule >*
V1LayerParameter::mutable_include() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V1LayerParameter.include)
  return &include_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::NetStateRule >&
V1LayerParameter::include() const {
  // @@protoc_insertion_point(field_list:caffe.V1LayerParameter.include)
  return include_;
}

// repeated .caffe.NetStateRule exclude = 33;
int V1LayerParameter::exclude_size() const {
  return exclude_.size();
}
void V1LayerParameter::clear_exclude() {
  exclude_.Clear();
}
const ::caffe::NetStateRule& V1LayerParameter::exclude(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.exclude)
  return exclude_.Get(index);
}
::caffe::NetStateRule* V1LayerParameter::mutable_exclude(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.exclude)
  return exclude_.Mutable(index);
}
::caffe::NetStateRule* V1LayerParameter::add_exclude() {
  // @@protoc_insertion_point(field_add:caffe.V1LayerParameter.exclude)
  return exclude_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::NetStateRule >*
V1LayerParameter::mutable_exclude() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V1LayerParameter.exclude)
  return &exclude_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::NetStateRule >&
V1LayerParameter::exclude() const {
  // @@protoc_insertion_point(field_list:caffe.V1LayerParameter.exclude)
  return exclude_;
}

// optional .caffe.V1LayerParameter.LayerType type = 5;
bool V1LayerParameter::has_type() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void V1LayerParameter::set_has_type() {
  _has_bits_[0] |= 0x00000020u;
}
void V1LayerParameter::clear_has_type() {
  _has_bits_[0] &= ~0x00000020u;
}
void V1LayerParameter::clear_type() {
  type_ = 0;
  clear_has_type();
}
::caffe::V1LayerParameter_LayerType V1LayerParameter::type() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.type)
  return static_cast< ::caffe::V1LayerParameter_LayerType >(type_);
}
void V1LayerParameter::set_type(::caffe::V1LayerParameter_LayerType value) {
  assert(::caffe::V1LayerParameter_LayerType_IsValid(value));
  set_has_type();
  type_ = value;
  // @@protoc_insertion_point(field_set:caffe.V1LayerParameter.type)
}

// repeated .caffe.BlobProto blobs = 6;
int V1LayerParameter::blobs_size() const {
  return blobs_.size();
}
void V1LayerParameter::clear_blobs() {
  blobs_.Clear();
}
const ::caffe::BlobProto& V1LayerParameter::blobs(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.blobs)
  return blobs_.Get(index);
}
::caffe::BlobProto* V1LayerParameter::mutable_blobs(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.blobs)
  return blobs_.Mutable(index);
}
::caffe::BlobProto* V1LayerParameter::add_blobs() {
  // @@protoc_insertion_point(field_add:caffe.V1LayerParameter.blobs)
  return blobs_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::BlobProto >*
V1LayerParameter::mutable_blobs() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V1LayerParameter.blobs)
  return &blobs_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::BlobProto >&
V1LayerParameter::blobs() const {
  // @@protoc_insertion_point(field_list:caffe.V1LayerParameter.blobs)
  return blobs_;
}

// repeated string param = 1001;
int V1LayerParameter::param_size() const {
  return param_.size();
}
void V1LayerParameter::clear_param() {
  param_.Clear();
}
const ::std::string& V1LayerParameter::param(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.param)
  return param_.Get(index);
}
::std::string* V1LayerParameter::mutable_param(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.param)
  return param_.Mutable(index);
}
void V1LayerParameter::set_param(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:caffe.V1LayerParameter.param)
  param_.Mutable(index)->assign(value);
}
void V1LayerParameter::set_param(int index, const char* value) {
  param_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:caffe.V1LayerParameter.param)
}
void V1LayerParameter::set_param(int index, const char* value, size_t size) {
  param_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:caffe.V1LayerParameter.param)
}
::std::string* V1LayerParameter::add_param() {
  // @@protoc_insertion_point(field_add_mutable:caffe.V1LayerParameter.param)
  return param_.Add();
}
void V1LayerParameter::add_param(const ::std::string& value) {
  param_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:caffe.V1LayerParameter.param)
}
void V1LayerParameter::add_param(const char* value) {
  param_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:caffe.V1LayerParameter.param)
}
void V1LayerParameter::add_param(const char* value, size_t size) {
  param_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:caffe.V1LayerParameter.param)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
V1LayerParameter::param() const {
  // @@protoc_insertion_point(field_list:caffe.V1LayerParameter.param)
  return param_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
V1LayerParameter::mutable_param() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V1LayerParameter.param)
  return &param_;
}

// repeated .caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
int V1LayerParameter::blob_share_mode_size() const {
  return blob_share_mode_.size();
}
void V1LayerParameter::clear_blob_share_mode() {
  blob_share_mode_.Clear();
}
::caffe::V1LayerParameter_DimCheckMode V1LayerParameter::blob_share_mode(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.blob_share_mode)
  return static_cast< ::caffe::V1LayerParameter_DimCheckMode >(blob_share_mode_.Get(index));
}
void V1LayerParameter::set_blob_share_mode(int index, ::caffe::V1LayerParameter_DimCheckMode value) {
  assert(::caffe::V1LayerParameter_DimCheckMode_IsValid(value));
  blob_share_mode_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.V1LayerParameter.blob_share_mode)
}
void V1LayerParameter::add_blob_share_mode(::caffe::V1LayerParameter_DimCheckMode value) {
  assert(::caffe::V1LayerParameter_DimCheckMode_IsValid(value));
  blob_share_mode_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.V1LayerParameter.blob_share_mode)
}
const ::google::protobuf::RepeatedField<int>&
V1LayerParameter::blob_share_mode() const {
  // @@protoc_insertion_point(field_list:caffe.V1LayerParameter.blob_share_mode)
  return blob_share_mode_;
}
::google::protobuf::RepeatedField<int>*
V1LayerParameter::mutable_blob_share_mode() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V1LayerParameter.blob_share_mode)
  return &blob_share_mode_;
}

// repeated float blobs_lr = 7;
int V1LayerParameter::blobs_lr_size() const {
  return blobs_lr_.size();
}
void V1LayerParameter::clear_blobs_lr() {
  blobs_lr_.Clear();
}
float V1LayerParameter::blobs_lr(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.blobs_lr)
  return blobs_lr_.Get(index);
}
void V1LayerParameter::set_blobs_lr(int index, float value) {
  blobs_lr_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.V1LayerParameter.blobs_lr)
}
void V1LayerParameter::add_blobs_lr(float value) {
  blobs_lr_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.V1LayerParameter.blobs_lr)
}
const ::google::protobuf::RepeatedField< float >&
V1LayerParameter::blobs_lr() const {
  // @@protoc_insertion_point(field_list:caffe.V1LayerParameter.blobs_lr)
  return blobs_lr_;
}
::google::protobuf::RepeatedField< float >*
V1LayerParameter::mutable_blobs_lr() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V1LayerParameter.blobs_lr)
  return &blobs_lr_;
}

// repeated float weight_decay = 8;
int V1LayerParameter::weight_decay_size() const {
  return weight_decay_.size();
}
void V1LayerParameter::clear_weight_decay() {
  weight_decay_.Clear();
}
float V1LayerParameter::weight_decay(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.weight_decay)
  return weight_decay_.Get(index);
}
void V1LayerParameter::set_weight_decay(int index, float value) {
  weight_decay_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.V1LayerParameter.weight_decay)
}
void V1LayerParameter::add_weight_decay(float value) {
  weight_decay_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.V1LayerParameter.weight_decay)
}
const ::google::protobuf::RepeatedField< float >&
V1LayerParameter::weight_decay() const {
  // @@protoc_insertion_point(field_list:caffe.V1LayerParameter.weight_decay)
  return weight_decay_;
}
::google::protobuf::RepeatedField< float >*
V1LayerParameter::mutable_weight_decay() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V1LayerParameter.weight_decay)
  return &weight_decay_;
}

// repeated float loss_weight = 35;
int V1LayerParameter::loss_weight_size() const {
  return loss_weight_.size();
}
void V1LayerParameter::clear_loss_weight() {
  loss_weight_.Clear();
}
float V1LayerParameter::loss_weight(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.loss_weight)
  return loss_weight_.Get(index);
}
void V1LayerParameter::set_loss_weight(int index, float value) {
  loss_weight_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.V1LayerParameter.loss_weight)
}
void V1LayerParameter::add_loss_weight(float value) {
  loss_weight_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.V1LayerParameter.loss_weight)
}
const ::google::protobuf::RepeatedField< float >&
V1LayerParameter::loss_weight() const {
  // @@protoc_insertion_point(field_list:caffe.V1LayerParameter.loss_weight)
  return loss_weight_;
}
::google::protobuf::RepeatedField< float >*
V1LayerParameter::mutable_loss_weight() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V1LayerParameter.loss_weight)
  return &loss_weight_;
}

// optional .caffe.AccuracyParameter accuracy_param = 27;
bool V1LayerParameter::has_accuracy_param() const {
  return (_has_bits_[0] & 0x00001000u) != 0;
}
void V1LayerParameter::set_has_accuracy_param() {
  _has_bits_[0] |= 0x00001000u;
}
void V1LayerParameter::clear_has_accuracy_param() {
  _has_bits_[0] &= ~0x00001000u;
}
void V1LayerParameter::clear_accuracy_param() {
  if (accuracy_param_ != NULL) accuracy_param_->::caffe::AccuracyParameter::Clear();
  clear_has_accuracy_param();
}
const ::caffe::AccuracyParameter& V1LayerParameter::accuracy_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.accuracy_param)
  return accuracy_param_ != NULL ? *accuracy_param_
                         : *::caffe::AccuracyParameter::internal_default_instance();
}
::caffe::AccuracyParameter* V1LayerParameter::mutable_accuracy_param() {
  set_has_accuracy_param();
  if (accuracy_param_ == NULL) {
    accuracy_param_ = new ::caffe::AccuracyParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.accuracy_param)
  return accuracy_param_;
}
::caffe::AccuracyParameter* V1LayerParameter::release_accuracy_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.accuracy_param)
  clear_has_accuracy_param();
  ::caffe::AccuracyParameter* temp = accuracy_param_;
  accuracy_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_accuracy_param(::caffe::AccuracyParameter* accuracy_param) {
  delete accuracy_param_;
  accuracy_param_ = accuracy_param;
  if (accuracy_param) {
    set_has_accuracy_param();
  } else {
    clear_has_accuracy_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.accuracy_param)
}

// optional .caffe.ArgMaxParameter argmax_param = 23;
bool V1LayerParameter::has_argmax_param() const {
  return (_has_bits_[0] & 0x00002000u) != 0;
}
void V1LayerParameter::set_has_argmax_param() {
  _has_bits_[0] |= 0x00002000u;
}
void V1LayerParameter::clear_has_argmax_param() {
  _has_bits_[0] &= ~0x00002000u;
}
void V1LayerParameter::clear_argmax_param() {
  if (argmax_param_ != NULL) argmax_param_->::caffe::ArgMaxParameter::Clear();
  clear_has_argmax_param();
}
const ::caffe::ArgMaxParameter& V1LayerParameter::argmax_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.argmax_param)
  return argmax_param_ != NULL ? *argmax_param_
                         : *::caffe::ArgMaxParameter::internal_default_instance();
}
::caffe::ArgMaxParameter* V1LayerParameter::mutable_argmax_param() {
  set_has_argmax_param();
  if (argmax_param_ == NULL) {
    argmax_param_ = new ::caffe::ArgMaxParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.argmax_param)
  return argmax_param_;
}
::caffe::ArgMaxParameter* V1LayerParameter::release_argmax_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.argmax_param)
  clear_has_argmax_param();
  ::caffe::ArgMaxParameter* temp = argmax_param_;
  argmax_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_argmax_param(::caffe::ArgMaxParameter* argmax_param) {
  delete argmax_param_;
  argmax_param_ = argmax_param;
  if (argmax_param) {
    set_has_argmax_param();
  } else {
    clear_has_argmax_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.argmax_param)
}

// optional .caffe.ConcatParameter concat_param = 9;
bool V1LayerParameter::has_concat_param() const {
  return (_has_bits_[0] & 0x00004000u) != 0;
}
void V1LayerParameter::set_has_concat_param() {
  _has_bits_[0] |= 0x00004000u;
}
void V1LayerParameter::clear_has_concat_param() {
  _has_bits_[0] &= ~0x00004000u;
}
void V1LayerParameter::clear_concat_param() {
  if (concat_param_ != NULL) concat_param_->::caffe::ConcatParameter::Clear();
  clear_has_concat_param();
}
const ::caffe::ConcatParameter& V1LayerParameter::concat_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.concat_param)
  return concat_param_ != NULL ? *concat_param_
                         : *::caffe::ConcatParameter::internal_default_instance();
}
::caffe::ConcatParameter* V1LayerParameter::mutable_concat_param() {
  set_has_concat_param();
  if (concat_param_ == NULL) {
    concat_param_ = new ::caffe::ConcatParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.concat_param)
  return concat_param_;
}
::caffe::ConcatParameter* V1LayerParameter::release_concat_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.concat_param)
  clear_has_concat_param();
  ::caffe::ConcatParameter* temp = concat_param_;
  concat_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_concat_param(::caffe::ConcatParameter* concat_param) {
  delete concat_param_;
  concat_param_ = concat_param;
  if (concat_param) {
    set_has_concat_param();
  } else {
    clear_has_concat_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.concat_param)
}

// optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40;
bool V1LayerParameter::has_contrastive_loss_param() const {
  return (_has_bits_[0] & 0x00008000u) != 0;
}
void V1LayerParameter::set_has_contrastive_loss_param() {
  _has_bits_[0] |= 0x00008000u;
}
void V1LayerParameter::clear_has_contrastive_loss_param() {
  _has_bits_[0] &= ~0x00008000u;
}
void V1LayerParameter::clear_contrastive_loss_param() {
  if (contrastive_loss_param_ != NULL) contrastive_loss_param_->::caffe::ContrastiveLossParameter::Clear();
  clear_has_contrastive_loss_param();
}
const ::caffe::ContrastiveLossParameter& V1LayerParameter::contrastive_loss_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.contrastive_loss_param)
  return contrastive_loss_param_ != NULL ? *contrastive_loss_param_
                         : *::caffe::ContrastiveLossParameter::internal_default_instance();
}
::caffe::ContrastiveLossParameter* V1LayerParameter::mutable_contrastive_loss_param() {
  set_has_contrastive_loss_param();
  if (contrastive_loss_param_ == NULL) {
    contrastive_loss_param_ = new ::caffe::ContrastiveLossParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.contrastive_loss_param)
  return contrastive_loss_param_;
}
::caffe::ContrastiveLossParameter* V1LayerParameter::release_contrastive_loss_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.contrastive_loss_param)
  clear_has_contrastive_loss_param();
  ::caffe::ContrastiveLossParameter* temp = contrastive_loss_param_;
  contrastive_loss_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_contrastive_loss_param(::caffe::ContrastiveLossParameter* contrastive_loss_param) {
  delete contrastive_loss_param_;
  contrastive_loss_param_ = contrastive_loss_param;
  if (contrastive_loss_param) {
    set_has_contrastive_loss_param();
  } else {
    clear_has_contrastive_loss_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.contrastive_loss_param)
}

// optional .caffe.ConvolutionParameter convolution_param = 10;
bool V1LayerParameter::has_convolution_param() const {
  return (_has_bits_[0] & 0x00010000u) != 0;
}
void V1LayerParameter::set_has_convolution_param() {
  _has_bits_[0] |= 0x00010000u;
}
void V1LayerParameter::clear_has_convolution_param() {
  _has_bits_[0] &= ~0x00010000u;
}
void V1LayerParameter::clear_convolution_param() {
  if (convolution_param_ != NULL) convolution_param_->::caffe::ConvolutionParameter::Clear();
  clear_has_convolution_param();
}
const ::caffe::ConvolutionParameter& V1LayerParameter::convolution_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.convolution_param)
  return convolution_param_ != NULL ? *convolution_param_
                         : *::caffe::ConvolutionParameter::internal_default_instance();
}
::caffe::ConvolutionParameter* V1LayerParameter::mutable_convolution_param() {
  set_has_convolution_param();
  if (convolution_param_ == NULL) {
    convolution_param_ = new ::caffe::ConvolutionParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.convolution_param)
  return convolution_param_;
}
::caffe::ConvolutionParameter* V1LayerParameter::release_convolution_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.convolution_param)
  clear_has_convolution_param();
  ::caffe::ConvolutionParameter* temp = convolution_param_;
  convolution_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_convolution_param(::caffe::ConvolutionParameter* convolution_param) {
  delete convolution_param_;
  convolution_param_ = convolution_param;
  if (convolution_param) {
    set_has_convolution_param();
  } else {
    clear_has_convolution_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.convolution_param)
}

// optional .caffe.DataParameter data_param = 11;
bool V1LayerParameter::has_data_param() const {
  return (_has_bits_[0] & 0x00020000u) != 0;
}
void V1LayerParameter::set_has_data_param() {
  _has_bits_[0] |= 0x00020000u;
}
void V1LayerParameter::clear_has_data_param() {
  _has_bits_[0] &= ~0x00020000u;
}
void V1LayerParameter::clear_data_param() {
  if (data_param_ != NULL) data_param_->::caffe::DataParameter::Clear();
  clear_has_data_param();
}
const ::caffe::DataParameter& V1LayerParameter::data_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.data_param)
  return data_param_ != NULL ? *data_param_
                         : *::caffe::DataParameter::internal_default_instance();
}
::caffe::DataParameter* V1LayerParameter::mutable_data_param() {
  set_has_data_param();
  if (data_param_ == NULL) {
    data_param_ = new ::caffe::DataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.data_param)
  return data_param_;
}
::caffe::DataParameter* V1LayerParameter::release_data_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.data_param)
  clear_has_data_param();
  ::caffe::DataParameter* temp = data_param_;
  data_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_data_param(::caffe::DataParameter* data_param) {
  delete data_param_;
  data_param_ = data_param;
  if (data_param) {
    set_has_data_param();
  } else {
    clear_has_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.data_param)
}

// optional .caffe.DropoutParameter dropout_param = 12;
bool V1LayerParameter::has_dropout_param() const {
  return (_has_bits_[0] & 0x00040000u) != 0;
}
void V1LayerParameter::set_has_dropout_param() {
  _has_bits_[0] |= 0x00040000u;
}
void V1LayerParameter::clear_has_dropout_param() {
  _has_bits_[0] &= ~0x00040000u;
}
void V1LayerParameter::clear_dropout_param() {
  if (dropout_param_ != NULL) dropout_param_->::caffe::DropoutParameter::Clear();
  clear_has_dropout_param();
}
const ::caffe::DropoutParameter& V1LayerParameter::dropout_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.dropout_param)
  return dropout_param_ != NULL ? *dropout_param_
                         : *::caffe::DropoutParameter::internal_default_instance();
}
::caffe::DropoutParameter* V1LayerParameter::mutable_dropout_param() {
  set_has_dropout_param();
  if (dropout_param_ == NULL) {
    dropout_param_ = new ::caffe::DropoutParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.dropout_param)
  return dropout_param_;
}
::caffe::DropoutParameter* V1LayerParameter::release_dropout_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.dropout_param)
  clear_has_dropout_param();
  ::caffe::DropoutParameter* temp = dropout_param_;
  dropout_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_dropout_param(::caffe::DropoutParameter* dropout_param) {
  delete dropout_param_;
  dropout_param_ = dropout_param;
  if (dropout_param) {
    set_has_dropout_param();
  } else {
    clear_has_dropout_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.dropout_param)
}

// optional .caffe.DummyDataParameter dummy_data_param = 26;
bool V1LayerParameter::has_dummy_data_param() const {
  return (_has_bits_[0] & 0x00080000u) != 0;
}
void V1LayerParameter::set_has_dummy_data_param() {
  _has_bits_[0] |= 0x00080000u;
}
void V1LayerParameter::clear_has_dummy_data_param() {
  _has_bits_[0] &= ~0x00080000u;
}
void V1LayerParameter::clear_dummy_data_param() {
  if (dummy_data_param_ != NULL) dummy_data_param_->::caffe::DummyDataParameter::Clear();
  clear_has_dummy_data_param();
}
const ::caffe::DummyDataParameter& V1LayerParameter::dummy_data_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.dummy_data_param)
  return dummy_data_param_ != NULL ? *dummy_data_param_
                         : *::caffe::DummyDataParameter::internal_default_instance();
}
::caffe::DummyDataParameter* V1LayerParameter::mutable_dummy_data_param() {
  set_has_dummy_data_param();
  if (dummy_data_param_ == NULL) {
    dummy_data_param_ = new ::caffe::DummyDataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.dummy_data_param)
  return dummy_data_param_;
}
::caffe::DummyDataParameter* V1LayerParameter::release_dummy_data_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.dummy_data_param)
  clear_has_dummy_data_param();
  ::caffe::DummyDataParameter* temp = dummy_data_param_;
  dummy_data_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_dummy_data_param(::caffe::DummyDataParameter* dummy_data_param) {
  delete dummy_data_param_;
  dummy_data_param_ = dummy_data_param;
  if (dummy_data_param) {
    set_has_dummy_data_param();
  } else {
    clear_has_dummy_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.dummy_data_param)
}

// optional .caffe.EltwiseParameter eltwise_param = 24;
bool V1LayerParameter::has_eltwise_param() const {
  return (_has_bits_[0] & 0x00100000u) != 0;
}
void V1LayerParameter::set_has_eltwise_param() {
  _has_bits_[0] |= 0x00100000u;
}
void V1LayerParameter::clear_has_eltwise_param() {
  _has_bits_[0] &= ~0x00100000u;
}
void V1LayerParameter::clear_eltwise_param() {
  if (eltwise_param_ != NULL) eltwise_param_->::caffe::EltwiseParameter::Clear();
  clear_has_eltwise_param();
}
const ::caffe::EltwiseParameter& V1LayerParameter::eltwise_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.eltwise_param)
  return eltwise_param_ != NULL ? *eltwise_param_
                         : *::caffe::EltwiseParameter::internal_default_instance();
}
::caffe::EltwiseParameter* V1LayerParameter::mutable_eltwise_param() {
  set_has_eltwise_param();
  if (eltwise_param_ == NULL) {
    eltwise_param_ = new ::caffe::EltwiseParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.eltwise_param)
  return eltwise_param_;
}
::caffe::EltwiseParameter* V1LayerParameter::release_eltwise_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.eltwise_param)
  clear_has_eltwise_param();
  ::caffe::EltwiseParameter* temp = eltwise_param_;
  eltwise_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_eltwise_param(::caffe::EltwiseParameter* eltwise_param) {
  delete eltwise_param_;
  eltwise_param_ = eltwise_param;
  if (eltwise_param) {
    set_has_eltwise_param();
  } else {
    clear_has_eltwise_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.eltwise_param)
}

// optional .caffe.ExpParameter exp_param = 41;
bool V1LayerParameter::has_exp_param() const {
  return (_has_bits_[0] & 0x00200000u) != 0;
}
void V1LayerParameter::set_has_exp_param() {
  _has_bits_[0] |= 0x00200000u;
}
void V1LayerParameter::clear_has_exp_param() {
  _has_bits_[0] &= ~0x00200000u;
}
void V1LayerParameter::clear_exp_param() {
  if (exp_param_ != NULL) exp_param_->::caffe::ExpParameter::Clear();
  clear_has_exp_param();
}
const ::caffe::ExpParameter& V1LayerParameter::exp_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.exp_param)
  return exp_param_ != NULL ? *exp_param_
                         : *::caffe::ExpParameter::internal_default_instance();
}
::caffe::ExpParameter* V1LayerParameter::mutable_exp_param() {
  set_has_exp_param();
  if (exp_param_ == NULL) {
    exp_param_ = new ::caffe::ExpParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.exp_param)
  return exp_param_;
}
::caffe::ExpParameter* V1LayerParameter::release_exp_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.exp_param)
  clear_has_exp_param();
  ::caffe::ExpParameter* temp = exp_param_;
  exp_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_exp_param(::caffe::ExpParameter* exp_param) {
  delete exp_param_;
  exp_param_ = exp_param;
  if (exp_param) {
    set_has_exp_param();
  } else {
    clear_has_exp_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.exp_param)
}

// optional .caffe.HDF5DataParameter hdf5_data_param = 13;
bool V1LayerParameter::has_hdf5_data_param() const {
  return (_has_bits_[0] & 0x00400000u) != 0;
}
void V1LayerParameter::set_has_hdf5_data_param() {
  _has_bits_[0] |= 0x00400000u;
}
void V1LayerParameter::clear_has_hdf5_data_param() {
  _has_bits_[0] &= ~0x00400000u;
}
void V1LayerParameter::clear_hdf5_data_param() {
  if (hdf5_data_param_ != NULL) hdf5_data_param_->::caffe::HDF5DataParameter::Clear();
  clear_has_hdf5_data_param();
}
const ::caffe::HDF5DataParameter& V1LayerParameter::hdf5_data_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.hdf5_data_param)
  return hdf5_data_param_ != NULL ? *hdf5_data_param_
                         : *::caffe::HDF5DataParameter::internal_default_instance();
}
::caffe::HDF5DataParameter* V1LayerParameter::mutable_hdf5_data_param() {
  set_has_hdf5_data_param();
  if (hdf5_data_param_ == NULL) {
    hdf5_data_param_ = new ::caffe::HDF5DataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.hdf5_data_param)
  return hdf5_data_param_;
}
::caffe::HDF5DataParameter* V1LayerParameter::release_hdf5_data_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.hdf5_data_param)
  clear_has_hdf5_data_param();
  ::caffe::HDF5DataParameter* temp = hdf5_data_param_;
  hdf5_data_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_hdf5_data_param(::caffe::HDF5DataParameter* hdf5_data_param) {
  delete hdf5_data_param_;
  hdf5_data_param_ = hdf5_data_param;
  if (hdf5_data_param) {
    set_has_hdf5_data_param();
  } else {
    clear_has_hdf5_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.hdf5_data_param)
}

// optional .caffe.HDF5OutputParameter hdf5_output_param = 14;
bool V1LayerParameter::has_hdf5_output_param() const {
  return (_has_bits_[0] & 0x00800000u) != 0;
}
void V1LayerParameter::set_has_hdf5_output_param() {
  _has_bits_[0] |= 0x00800000u;
}
void V1LayerParameter::clear_has_hdf5_output_param() {
  _has_bits_[0] &= ~0x00800000u;
}
void V1LayerParameter::clear_hdf5_output_param() {
  if (hdf5_output_param_ != NULL) hdf5_output_param_->::caffe::HDF5OutputParameter::Clear();
  clear_has_hdf5_output_param();
}
const ::caffe::HDF5OutputParameter& V1LayerParameter::hdf5_output_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.hdf5_output_param)
  return hdf5_output_param_ != NULL ? *hdf5_output_param_
                         : *::caffe::HDF5OutputParameter::internal_default_instance();
}
::caffe::HDF5OutputParameter* V1LayerParameter::mutable_hdf5_output_param() {
  set_has_hdf5_output_param();
  if (hdf5_output_param_ == NULL) {
    hdf5_output_param_ = new ::caffe::HDF5OutputParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.hdf5_output_param)
  return hdf5_output_param_;
}
::caffe::HDF5OutputParameter* V1LayerParameter::release_hdf5_output_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.hdf5_output_param)
  clear_has_hdf5_output_param();
  ::caffe::HDF5OutputParameter* temp = hdf5_output_param_;
  hdf5_output_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_hdf5_output_param(::caffe::HDF5OutputParameter* hdf5_output_param) {
  delete hdf5_output_param_;
  hdf5_output_param_ = hdf5_output_param;
  if (hdf5_output_param) {
    set_has_hdf5_output_param();
  } else {
    clear_has_hdf5_output_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.hdf5_output_param)
}

// optional .caffe.HingeLossParameter hinge_loss_param = 29;
bool V1LayerParameter::has_hinge_loss_param() const {
  return (_has_bits_[0] & 0x01000000u) != 0;
}
void V1LayerParameter::set_has_hinge_loss_param() {
  _has_bits_[0] |= 0x01000000u;
}
void V1LayerParameter::clear_has_hinge_loss_param() {
  _has_bits_[0] &= ~0x01000000u;
}
void V1LayerParameter::clear_hinge_loss_param() {
  if (hinge_loss_param_ != NULL) hinge_loss_param_->::caffe::HingeLossParameter::Clear();
  clear_has_hinge_loss_param();
}
const ::caffe::HingeLossParameter& V1LayerParameter::hinge_loss_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.hinge_loss_param)
  return hinge_loss_param_ != NULL ? *hinge_loss_param_
                         : *::caffe::HingeLossParameter::internal_default_instance();
}
::caffe::HingeLossParameter* V1LayerParameter::mutable_hinge_loss_param() {
  set_has_hinge_loss_param();
  if (hinge_loss_param_ == NULL) {
    hinge_loss_param_ = new ::caffe::HingeLossParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.hinge_loss_param)
  return hinge_loss_param_;
}
::caffe::HingeLossParameter* V1LayerParameter::release_hinge_loss_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.hinge_loss_param)
  clear_has_hinge_loss_param();
  ::caffe::HingeLossParameter* temp = hinge_loss_param_;
  hinge_loss_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_hinge_loss_param(::caffe::HingeLossParameter* hinge_loss_param) {
  delete hinge_loss_param_;
  hinge_loss_param_ = hinge_loss_param;
  if (hinge_loss_param) {
    set_has_hinge_loss_param();
  } else {
    clear_has_hinge_loss_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.hinge_loss_param)
}

// optional .caffe.ImageDataParameter image_data_param = 15;
bool V1LayerParameter::has_image_data_param() const {
  return (_has_bits_[0] & 0x02000000u) != 0;
}
void V1LayerParameter::set_has_image_data_param() {
  _has_bits_[0] |= 0x02000000u;
}
void V1LayerParameter::clear_has_image_data_param() {
  _has_bits_[0] &= ~0x02000000u;
}
void V1LayerParameter::clear_image_data_param() {
  if (image_data_param_ != NULL) image_data_param_->::caffe::ImageDataParameter::Clear();
  clear_has_image_data_param();
}
const ::caffe::ImageDataParameter& V1LayerParameter::image_data_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.image_data_param)
  return image_data_param_ != NULL ? *image_data_param_
                         : *::caffe::ImageDataParameter::internal_default_instance();
}
::caffe::ImageDataParameter* V1LayerParameter::mutable_image_data_param() {
  set_has_image_data_param();
  if (image_data_param_ == NULL) {
    image_data_param_ = new ::caffe::ImageDataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.image_data_param)
  return image_data_param_;
}
::caffe::ImageDataParameter* V1LayerParameter::release_image_data_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.image_data_param)
  clear_has_image_data_param();
  ::caffe::ImageDataParameter* temp = image_data_param_;
  image_data_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_image_data_param(::caffe::ImageDataParameter* image_data_param) {
  delete image_data_param_;
  image_data_param_ = image_data_param;
  if (image_data_param) {
    set_has_image_data_param();
  } else {
    clear_has_image_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.image_data_param)
}

// optional .caffe.InfogainLossParameter infogain_loss_param = 16;
bool V1LayerParameter::has_infogain_loss_param() const {
  return (_has_bits_[0] & 0x04000000u) != 0;
}
void V1LayerParameter::set_has_infogain_loss_param() {
  _has_bits_[0] |= 0x04000000u;
}
void V1LayerParameter::clear_has_infogain_loss_param() {
  _has_bits_[0] &= ~0x04000000u;
}
void V1LayerParameter::clear_infogain_loss_param() {
  if (infogain_loss_param_ != NULL) infogain_loss_param_->::caffe::InfogainLossParameter::Clear();
  clear_has_infogain_loss_param();
}
const ::caffe::InfogainLossParameter& V1LayerParameter::infogain_loss_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.infogain_loss_param)
  return infogain_loss_param_ != NULL ? *infogain_loss_param_
                         : *::caffe::InfogainLossParameter::internal_default_instance();
}
::caffe::InfogainLossParameter* V1LayerParameter::mutable_infogain_loss_param() {
  set_has_infogain_loss_param();
  if (infogain_loss_param_ == NULL) {
    infogain_loss_param_ = new ::caffe::InfogainLossParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.infogain_loss_param)
  return infogain_loss_param_;
}
::caffe::InfogainLossParameter* V1LayerParameter::release_infogain_loss_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.infogain_loss_param)
  clear_has_infogain_loss_param();
  ::caffe::InfogainLossParameter* temp = infogain_loss_param_;
  infogain_loss_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_infogain_loss_param(::caffe::InfogainLossParameter* infogain_loss_param) {
  delete infogain_loss_param_;
  infogain_loss_param_ = infogain_loss_param;
  if (infogain_loss_param) {
    set_has_infogain_loss_param();
  } else {
    clear_has_infogain_loss_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.infogain_loss_param)
}

// optional .caffe.InnerProductParameter inner_product_param = 17;
bool V1LayerParameter::has_inner_product_param() const {
  return (_has_bits_[0] & 0x08000000u) != 0;
}
void V1LayerParameter::set_has_inner_product_param() {
  _has_bits_[0] |= 0x08000000u;
}
void V1LayerParameter::clear_has_inner_product_param() {
  _has_bits_[0] &= ~0x08000000u;
}
void V1LayerParameter::clear_inner_product_param() {
  if (inner_product_param_ != NULL) inner_product_param_->::caffe::InnerProductParameter::Clear();
  clear_has_inner_product_param();
}
const ::caffe::InnerProductParameter& V1LayerParameter::inner_product_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.inner_product_param)
  return inner_product_param_ != NULL ? *inner_product_param_
                         : *::caffe::InnerProductParameter::internal_default_instance();
}
::caffe::InnerProductParameter* V1LayerParameter::mutable_inner_product_param() {
  set_has_inner_product_param();
  if (inner_product_param_ == NULL) {
    inner_product_param_ = new ::caffe::InnerProductParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.inner_product_param)
  return inner_product_param_;
}
::caffe::InnerProductParameter* V1LayerParameter::release_inner_product_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.inner_product_param)
  clear_has_inner_product_param();
  ::caffe::InnerProductParameter* temp = inner_product_param_;
  inner_product_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_inner_product_param(::caffe::InnerProductParameter* inner_product_param) {
  delete inner_product_param_;
  inner_product_param_ = inner_product_param;
  if (inner_product_param) {
    set_has_inner_product_param();
  } else {
    clear_has_inner_product_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.inner_product_param)
}

// optional .caffe.LRNParameter lrn_param = 18;
bool V1LayerParameter::has_lrn_param() const {
  return (_has_bits_[0] & 0x10000000u) != 0;
}
void V1LayerParameter::set_has_lrn_param() {
  _has_bits_[0] |= 0x10000000u;
}
void V1LayerParameter::clear_has_lrn_param() {
  _has_bits_[0] &= ~0x10000000u;
}
void V1LayerParameter::clear_lrn_param() {
  if (lrn_param_ != NULL) lrn_param_->::caffe::LRNParameter::Clear();
  clear_has_lrn_param();
}
const ::caffe::LRNParameter& V1LayerParameter::lrn_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.lrn_param)
  return lrn_param_ != NULL ? *lrn_param_
                         : *::caffe::LRNParameter::internal_default_instance();
}
::caffe::LRNParameter* V1LayerParameter::mutable_lrn_param() {
  set_has_lrn_param();
  if (lrn_param_ == NULL) {
    lrn_param_ = new ::caffe::LRNParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.lrn_param)
  return lrn_param_;
}
::caffe::LRNParameter* V1LayerParameter::release_lrn_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.lrn_param)
  clear_has_lrn_param();
  ::caffe::LRNParameter* temp = lrn_param_;
  lrn_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_lrn_param(::caffe::LRNParameter* lrn_param) {
  delete lrn_param_;
  lrn_param_ = lrn_param;
  if (lrn_param) {
    set_has_lrn_param();
  } else {
    clear_has_lrn_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.lrn_param)
}

// optional .caffe.MemoryDataParameter memory_data_param = 22;
bool V1LayerParameter::has_memory_data_param() const {
  return (_has_bits_[0] & 0x20000000u) != 0;
}
void V1LayerParameter::set_has_memory_data_param() {
  _has_bits_[0] |= 0x20000000u;
}
void V1LayerParameter::clear_has_memory_data_param() {
  _has_bits_[0] &= ~0x20000000u;
}
void V1LayerParameter::clear_memory_data_param() {
  if (memory_data_param_ != NULL) memory_data_param_->::caffe::MemoryDataParameter::Clear();
  clear_has_memory_data_param();
}
const ::caffe::MemoryDataParameter& V1LayerParameter::memory_data_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.memory_data_param)
  return memory_data_param_ != NULL ? *memory_data_param_
                         : *::caffe::MemoryDataParameter::internal_default_instance();
}
::caffe::MemoryDataParameter* V1LayerParameter::mutable_memory_data_param() {
  set_has_memory_data_param();
  if (memory_data_param_ == NULL) {
    memory_data_param_ = new ::caffe::MemoryDataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.memory_data_param)
  return memory_data_param_;
}
::caffe::MemoryDataParameter* V1LayerParameter::release_memory_data_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.memory_data_param)
  clear_has_memory_data_param();
  ::caffe::MemoryDataParameter* temp = memory_data_param_;
  memory_data_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_memory_data_param(::caffe::MemoryDataParameter* memory_data_param) {
  delete memory_data_param_;
  memory_data_param_ = memory_data_param;
  if (memory_data_param) {
    set_has_memory_data_param();
  } else {
    clear_has_memory_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.memory_data_param)
}

// optional .caffe.MVNParameter mvn_param = 34;
bool V1LayerParameter::has_mvn_param() const {
  return (_has_bits_[0] & 0x40000000u) != 0;
}
void V1LayerParameter::set_has_mvn_param() {
  _has_bits_[0] |= 0x40000000u;
}
void V1LayerParameter::clear_has_mvn_param() {
  _has_bits_[0] &= ~0x40000000u;
}
void V1LayerParameter::clear_mvn_param() {
  if (mvn_param_ != NULL) mvn_param_->::caffe::MVNParameter::Clear();
  clear_has_mvn_param();
}
const ::caffe::MVNParameter& V1LayerParameter::mvn_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.mvn_param)
  return mvn_param_ != NULL ? *mvn_param_
                         : *::caffe::MVNParameter::internal_default_instance();
}
::caffe::MVNParameter* V1LayerParameter::mutable_mvn_param() {
  set_has_mvn_param();
  if (mvn_param_ == NULL) {
    mvn_param_ = new ::caffe::MVNParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.mvn_param)
  return mvn_param_;
}
::caffe::MVNParameter* V1LayerParameter::release_mvn_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.mvn_param)
  clear_has_mvn_param();
  ::caffe::MVNParameter* temp = mvn_param_;
  mvn_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_mvn_param(::caffe::MVNParameter* mvn_param) {
  delete mvn_param_;
  mvn_param_ = mvn_param;
  if (mvn_param) {
    set_has_mvn_param();
  } else {
    clear_has_mvn_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.mvn_param)
}

// optional .caffe.PoolingParameter pooling_param = 19;
bool V1LayerParameter::has_pooling_param() const {
  return (_has_bits_[0] & 0x80000000u) != 0;
}
void V1LayerParameter::set_has_pooling_param() {
  _has_bits_[0] |= 0x80000000u;
}
void V1LayerParameter::clear_has_pooling_param() {
  _has_bits_[0] &= ~0x80000000u;
}
void V1LayerParameter::clear_pooling_param() {
  if (pooling_param_ != NULL) pooling_param_->::caffe::PoolingParameter::Clear();
  clear_has_pooling_param();
}
const ::caffe::PoolingParameter& V1LayerParameter::pooling_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.pooling_param)
  return pooling_param_ != NULL ? *pooling_param_
                         : *::caffe::PoolingParameter::internal_default_instance();
}
::caffe::PoolingParameter* V1LayerParameter::mutable_pooling_param() {
  set_has_pooling_param();
  if (pooling_param_ == NULL) {
    pooling_param_ = new ::caffe::PoolingParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.pooling_param)
  return pooling_param_;
}
::caffe::PoolingParameter* V1LayerParameter::release_pooling_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.pooling_param)
  clear_has_pooling_param();
  ::caffe::PoolingParameter* temp = pooling_param_;
  pooling_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_pooling_param(::caffe::PoolingParameter* pooling_param) {
  delete pooling_param_;
  pooling_param_ = pooling_param;
  if (pooling_param) {
    set_has_pooling_param();
  } else {
    clear_has_pooling_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.pooling_param)
}

// optional .caffe.PowerParameter power_param = 21;
bool V1LayerParameter::has_power_param() const {
  return (_has_bits_[1] & 0x00000001u) != 0;
}
void V1LayerParameter::set_has_power_param() {
  _has_bits_[1] |= 0x00000001u;
}
void V1LayerParameter::clear_has_power_param() {
  _has_bits_[1] &= ~0x00000001u;
}
void V1LayerParameter::clear_power_param() {
  if (power_param_ != NULL) power_param_->::caffe::PowerParameter::Clear();
  clear_has_power_param();
}
const ::caffe::PowerParameter& V1LayerParameter::power_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.power_param)
  return power_param_ != NULL ? *power_param_
                         : *::caffe::PowerParameter::internal_default_instance();
}
::caffe::PowerParameter* V1LayerParameter::mutable_power_param() {
  set_has_power_param();
  if (power_param_ == NULL) {
    power_param_ = new ::caffe::PowerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.power_param)
  return power_param_;
}
::caffe::PowerParameter* V1LayerParameter::release_power_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.power_param)
  clear_has_power_param();
  ::caffe::PowerParameter* temp = power_param_;
  power_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_power_param(::caffe::PowerParameter* power_param) {
  delete power_param_;
  power_param_ = power_param;
  if (power_param) {
    set_has_power_param();
  } else {
    clear_has_power_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.power_param)
}

// optional .caffe.ReLUParameter relu_param = 30;
bool V1LayerParameter::has_relu_param() const {
  return (_has_bits_[1] & 0x00000002u) != 0;
}
void V1LayerParameter::set_has_relu_param() {
  _has_bits_[1] |= 0x00000002u;
}
void V1LayerParameter::clear_has_relu_param() {
  _has_bits_[1] &= ~0x00000002u;
}
void V1LayerParameter::clear_relu_param() {
  if (relu_param_ != NULL) relu_param_->::caffe::ReLUParameter::Clear();
  clear_has_relu_param();
}
const ::caffe::ReLUParameter& V1LayerParameter::relu_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.relu_param)
  return relu_param_ != NULL ? *relu_param_
                         : *::caffe::ReLUParameter::internal_default_instance();
}
::caffe::ReLUParameter* V1LayerParameter::mutable_relu_param() {
  set_has_relu_param();
  if (relu_param_ == NULL) {
    relu_param_ = new ::caffe::ReLUParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.relu_param)
  return relu_param_;
}
::caffe::ReLUParameter* V1LayerParameter::release_relu_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.relu_param)
  clear_has_relu_param();
  ::caffe::ReLUParameter* temp = relu_param_;
  relu_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_relu_param(::caffe::ReLUParameter* relu_param) {
  delete relu_param_;
  relu_param_ = relu_param;
  if (relu_param) {
    set_has_relu_param();
  } else {
    clear_has_relu_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.relu_param)
}

// optional .caffe.SigmoidParameter sigmoid_param = 38;
bool V1LayerParameter::has_sigmoid_param() const {
  return (_has_bits_[1] & 0x00000004u) != 0;
}
void V1LayerParameter::set_has_sigmoid_param() {
  _has_bits_[1] |= 0x00000004u;
}
void V1LayerParameter::clear_has_sigmoid_param() {
  _has_bits_[1] &= ~0x00000004u;
}
void V1LayerParameter::clear_sigmoid_param() {
  if (sigmoid_param_ != NULL) sigmoid_param_->::caffe::SigmoidParameter::Clear();
  clear_has_sigmoid_param();
}
const ::caffe::SigmoidParameter& V1LayerParameter::sigmoid_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.sigmoid_param)
  return sigmoid_param_ != NULL ? *sigmoid_param_
                         : *::caffe::SigmoidParameter::internal_default_instance();
}
::caffe::SigmoidParameter* V1LayerParameter::mutable_sigmoid_param() {
  set_has_sigmoid_param();
  if (sigmoid_param_ == NULL) {
    sigmoid_param_ = new ::caffe::SigmoidParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.sigmoid_param)
  return sigmoid_param_;
}
::caffe::SigmoidParameter* V1LayerParameter::release_sigmoid_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.sigmoid_param)
  clear_has_sigmoid_param();
  ::caffe::SigmoidParameter* temp = sigmoid_param_;
  sigmoid_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_sigmoid_param(::caffe::SigmoidParameter* sigmoid_param) {
  delete sigmoid_param_;
  sigmoid_param_ = sigmoid_param;
  if (sigmoid_param) {
    set_has_sigmoid_param();
  } else {
    clear_has_sigmoid_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.sigmoid_param)
}

// optional .caffe.SoftmaxParameter softmax_param = 39;
bool V1LayerParameter::has_softmax_param() const {
  return (_has_bits_[1] & 0x00000008u) != 0;
}
void V1LayerParameter::set_has_softmax_param() {
  _has_bits_[1] |= 0x00000008u;
}
void V1LayerParameter::clear_has_softmax_param() {
  _has_bits_[1] &= ~0x00000008u;
}
void V1LayerParameter::clear_softmax_param() {
  if (softmax_param_ != NULL) softmax_param_->::caffe::SoftmaxParameter::Clear();
  clear_has_softmax_param();
}
const ::caffe::SoftmaxParameter& V1LayerParameter::softmax_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.softmax_param)
  return softmax_param_ != NULL ? *softmax_param_
                         : *::caffe::SoftmaxParameter::internal_default_instance();
}
::caffe::SoftmaxParameter* V1LayerParameter::mutable_softmax_param() {
  set_has_softmax_param();
  if (softmax_param_ == NULL) {
    softmax_param_ = new ::caffe::SoftmaxParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.softmax_param)
  return softmax_param_;
}
::caffe::SoftmaxParameter* V1LayerParameter::release_softmax_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.softmax_param)
  clear_has_softmax_param();
  ::caffe::SoftmaxParameter* temp = softmax_param_;
  softmax_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_softmax_param(::caffe::SoftmaxParameter* softmax_param) {
  delete softmax_param_;
  softmax_param_ = softmax_param;
  if (softmax_param) {
    set_has_softmax_param();
  } else {
    clear_has_softmax_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.softmax_param)
}

// optional .caffe.SliceParameter slice_param = 31;
bool V1LayerParameter::has_slice_param() const {
  return (_has_bits_[1] & 0x00000010u) != 0;
}
void V1LayerParameter::set_has_slice_param() {
  _has_bits_[1] |= 0x00000010u;
}
void V1LayerParameter::clear_has_slice_param() {
  _has_bits_[1] &= ~0x00000010u;
}
void V1LayerParameter::clear_slice_param() {
  if (slice_param_ != NULL) slice_param_->::caffe::SliceParameter::Clear();
  clear_has_slice_param();
}
const ::caffe::SliceParameter& V1LayerParameter::slice_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.slice_param)
  return slice_param_ != NULL ? *slice_param_
                         : *::caffe::SliceParameter::internal_default_instance();
}
::caffe::SliceParameter* V1LayerParameter::mutable_slice_param() {
  set_has_slice_param();
  if (slice_param_ == NULL) {
    slice_param_ = new ::caffe::SliceParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.slice_param)
  return slice_param_;
}
::caffe::SliceParameter* V1LayerParameter::release_slice_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.slice_param)
  clear_has_slice_param();
  ::caffe::SliceParameter* temp = slice_param_;
  slice_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_slice_param(::caffe::SliceParameter* slice_param) {
  delete slice_param_;
  slice_param_ = slice_param;
  if (slice_param) {
    set_has_slice_param();
  } else {
    clear_has_slice_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.slice_param)
}

// optional .caffe.TanHParameter tanh_param = 37;
bool V1LayerParameter::has_tanh_param() const {
  return (_has_bits_[1] & 0x00000020u) != 0;
}
void V1LayerParameter::set_has_tanh_param() {
  _has_bits_[1] |= 0x00000020u;
}
void V1LayerParameter::clear_has_tanh_param() {
  _has_bits_[1] &= ~0x00000020u;
}
void V1LayerParameter::clear_tanh_param() {
  if (tanh_param_ != NULL) tanh_param_->::caffe::TanHParameter::Clear();
  clear_has_tanh_param();
}
const ::caffe::TanHParameter& V1LayerParameter::tanh_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.tanh_param)
  return tanh_param_ != NULL ? *tanh_param_
                         : *::caffe::TanHParameter::internal_default_instance();
}
::caffe::TanHParameter* V1LayerParameter::mutable_tanh_param() {
  set_has_tanh_param();
  if (tanh_param_ == NULL) {
    tanh_param_ = new ::caffe::TanHParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.tanh_param)
  return tanh_param_;
}
::caffe::TanHParameter* V1LayerParameter::release_tanh_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.tanh_param)
  clear_has_tanh_param();
  ::caffe::TanHParameter* temp = tanh_param_;
  tanh_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_tanh_param(::caffe::TanHParameter* tanh_param) {
  delete tanh_param_;
  tanh_param_ = tanh_param;
  if (tanh_param) {
    set_has_tanh_param();
  } else {
    clear_has_tanh_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.tanh_param)
}

// optional .caffe.ThresholdParameter threshold_param = 25;
bool V1LayerParameter::has_threshold_param() const {
  return (_has_bits_[1] & 0x00000040u) != 0;
}
void V1LayerParameter::set_has_threshold_param() {
  _has_bits_[1] |= 0x00000040u;
}
void V1LayerParameter::clear_has_threshold_param() {
  _has_bits_[1] &= ~0x00000040u;
}
void V1LayerParameter::clear_threshold_param() {
  if (threshold_param_ != NULL) threshold_param_->::caffe::ThresholdParameter::Clear();
  clear_has_threshold_param();
}
const ::caffe::ThresholdParameter& V1LayerParameter::threshold_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.threshold_param)
  return threshold_param_ != NULL ? *threshold_param_
                         : *::caffe::ThresholdParameter::internal_default_instance();
}
::caffe::ThresholdParameter* V1LayerParameter::mutable_threshold_param() {
  set_has_threshold_param();
  if (threshold_param_ == NULL) {
    threshold_param_ = new ::caffe::ThresholdParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.threshold_param)
  return threshold_param_;
}
::caffe::ThresholdParameter* V1LayerParameter::release_threshold_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.threshold_param)
  clear_has_threshold_param();
  ::caffe::ThresholdParameter* temp = threshold_param_;
  threshold_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_threshold_param(::caffe::ThresholdParameter* threshold_param) {
  delete threshold_param_;
  threshold_param_ = threshold_param;
  if (threshold_param) {
    set_has_threshold_param();
  } else {
    clear_has_threshold_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.threshold_param)
}

// optional .caffe.WindowDataParameter window_data_param = 20;
bool V1LayerParameter::has_window_data_param() const {
  return (_has_bits_[1] & 0x00000080u) != 0;
}
void V1LayerParameter::set_has_window_data_param() {
  _has_bits_[1] |= 0x00000080u;
}
void V1LayerParameter::clear_has_window_data_param() {
  _has_bits_[1] &= ~0x00000080u;
}
void V1LayerParameter::clear_window_data_param() {
  if (window_data_param_ != NULL) window_data_param_->::caffe::WindowDataParameter::Clear();
  clear_has_window_data_param();
}
const ::caffe::WindowDataParameter& V1LayerParameter::window_data_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.window_data_param)
  return window_data_param_ != NULL ? *window_data_param_
                         : *::caffe::WindowDataParameter::internal_default_instance();
}
::caffe::WindowDataParameter* V1LayerParameter::mutable_window_data_param() {
  set_has_window_data_param();
  if (window_data_param_ == NULL) {
    window_data_param_ = new ::caffe::WindowDataParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.window_data_param)
  return window_data_param_;
}
::caffe::WindowDataParameter* V1LayerParameter::release_window_data_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.window_data_param)
  clear_has_window_data_param();
  ::caffe::WindowDataParameter* temp = window_data_param_;
  window_data_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_window_data_param(::caffe::WindowDataParameter* window_data_param) {
  delete window_data_param_;
  window_data_param_ = window_data_param;
  if (window_data_param) {
    set_has_window_data_param();
  } else {
    clear_has_window_data_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.window_data_param)
}

// optional .caffe.TransformationParameter transform_param = 36;
bool V1LayerParameter::has_transform_param() const {
  return (_has_bits_[1] & 0x00000100u) != 0;
}
void V1LayerParameter::set_has_transform_param() {
  _has_bits_[1] |= 0x00000100u;
}
void V1LayerParameter::clear_has_transform_param() {
  _has_bits_[1] &= ~0x00000100u;
}
void V1LayerParameter::clear_transform_param() {
  if (transform_param_ != NULL) transform_param_->::caffe::TransformationParameter::Clear();
  clear_has_transform_param();
}
const ::caffe::TransformationParameter& V1LayerParameter::transform_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.transform_param)
  return transform_param_ != NULL ? *transform_param_
                         : *::caffe::TransformationParameter::internal_default_instance();
}
::caffe::TransformationParameter* V1LayerParameter::mutable_transform_param() {
  set_has_transform_param();
  if (transform_param_ == NULL) {
    transform_param_ = new ::caffe::TransformationParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.transform_param)
  return transform_param_;
}
::caffe::TransformationParameter* V1LayerParameter::release_transform_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.transform_param)
  clear_has_transform_param();
  ::caffe::TransformationParameter* temp = transform_param_;
  transform_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_transform_param(::caffe::TransformationParameter* transform_param) {
  delete transform_param_;
  transform_param_ = transform_param;
  if (transform_param) {
    set_has_transform_param();
  } else {
    clear_has_transform_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.transform_param)
}

// optional .caffe.LossParameter loss_param = 42;
bool V1LayerParameter::has_loss_param() const {
  return (_has_bits_[1] & 0x00000200u) != 0;
}
void V1LayerParameter::set_has_loss_param() {
  _has_bits_[1] |= 0x00000200u;
}
void V1LayerParameter::clear_has_loss_param() {
  _has_bits_[1] &= ~0x00000200u;
}
void V1LayerParameter::clear_loss_param() {
  if (loss_param_ != NULL) loss_param_->::caffe::LossParameter::Clear();
  clear_has_loss_param();
}
const ::caffe::LossParameter& V1LayerParameter::loss_param() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.loss_param)
  return loss_param_ != NULL ? *loss_param_
                         : *::caffe::LossParameter::internal_default_instance();
}
::caffe::LossParameter* V1LayerParameter::mutable_loss_param() {
  set_has_loss_param();
  if (loss_param_ == NULL) {
    loss_param_ = new ::caffe::LossParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.loss_param)
  return loss_param_;
}
::caffe::LossParameter* V1LayerParameter::release_loss_param() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.loss_param)
  clear_has_loss_param();
  ::caffe::LossParameter* temp = loss_param_;
  loss_param_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_loss_param(::caffe::LossParameter* loss_param) {
  delete loss_param_;
  loss_param_ = loss_param;
  if (loss_param) {
    set_has_loss_param();
  } else {
    clear_has_loss_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.loss_param)
}

// optional .caffe.V0LayerParameter layer = 1;
bool V1LayerParameter::has_layer() const {
  return (_has_bits_[1] & 0x00000400u) != 0;
}
void V1LayerParameter::set_has_layer() {
  _has_bits_[1] |= 0x00000400u;
}
void V1LayerParameter::clear_has_layer() {
  _has_bits_[1] &= ~0x00000400u;
}
void V1LayerParameter::clear_layer() {
  if (layer_ != NULL) layer_->::caffe::V0LayerParameter::Clear();
  clear_has_layer();
}
const ::caffe::V0LayerParameter& V1LayerParameter::layer() const {
  // @@protoc_insertion_point(field_get:caffe.V1LayerParameter.layer)
  return layer_ != NULL ? *layer_
                         : *::caffe::V0LayerParameter::internal_default_instance();
}
::caffe::V0LayerParameter* V1LayerParameter::mutable_layer() {
  set_has_layer();
  if (layer_ == NULL) {
    layer_ = new ::caffe::V0LayerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V1LayerParameter.layer)
  return layer_;
}
::caffe::V0LayerParameter* V1LayerParameter::release_layer() {
  // @@protoc_insertion_point(field_release:caffe.V1LayerParameter.layer)
  clear_has_layer();
  ::caffe::V0LayerParameter* temp = layer_;
  layer_ = NULL;
  return temp;
}
void V1LayerParameter::set_allocated_layer(::caffe::V0LayerParameter* layer) {
  delete layer_;
  layer_ = layer;
  if (layer) {
    set_has_layer();
  } else {
    clear_has_layer();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V1LayerParameter.layer)
}

inline const V1LayerParameter* V1LayerParameter::internal_default_instance() {
  return &V1LayerParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

const ::google::protobuf::EnumDescriptor* V0LayerParameter_PoolMethod_descriptor() {
  protobuf_AssignDescriptorsOnce();
  return V0LayerParameter_PoolMethod_descriptor_;
}
bool V0LayerParameter_PoolMethod_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
    case 2:
      return true;
    default:
      return false;
  }
}

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const V0LayerParameter_PoolMethod V0LayerParameter::MAX;
const V0LayerParameter_PoolMethod V0LayerParameter::AVE;
const V0LayerParameter_PoolMethod V0LayerParameter::STOCHASTIC;
const V0LayerParameter_PoolMethod V0LayerParameter::PoolMethod_MIN;
const V0LayerParameter_PoolMethod V0LayerParameter::PoolMethod_MAX;
const int V0LayerParameter::PoolMethod_ARRAYSIZE;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
::std::string* V0LayerParameter::_default_det_crop_mode_ = NULL;
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int V0LayerParameter::kNameFieldNumber;
const int V0LayerParameter::kTypeFieldNumber;
const int V0LayerParameter::kNumOutputFieldNumber;
const int V0LayerParameter::kBiastermFieldNumber;
const int V0LayerParameter::kWeightFillerFieldNumber;
const int V0LayerParameter::kBiasFillerFieldNumber;
const int V0LayerParameter::kPadFieldNumber;
const int V0LayerParameter::kKernelsizeFieldNumber;
const int V0LayerParameter::kGroupFieldNumber;
const int V0LayerParameter::kStrideFieldNumber;
const int V0LayerParameter::kPoolFieldNumber;
const int V0LayerParameter::kDropoutRatioFieldNumber;
const int V0LayerParameter::kLocalSizeFieldNumber;
const int V0LayerParameter::kAlphaFieldNumber;
const int V0LayerParameter::kBetaFieldNumber;
const int V0LayerParameter::kKFieldNumber;
const int V0LayerParameter::kSourceFieldNumber;
const int V0LayerParameter::kScaleFieldNumber;
const int V0LayerParameter::kMeanfileFieldNumber;
const int V0LayerParameter::kBatchsizeFieldNumber;
const int V0LayerParameter::kCropsizeFieldNumber;
const int V0LayerParameter::kMirrorFieldNumber;
const int V0LayerParameter::kBlobsFieldNumber;
const int V0LayerParameter::kBlobsLrFieldNumber;
const int V0LayerParameter::kWeightDecayFieldNumber;
const int V0LayerParameter::kRandSkipFieldNumber;
const int V0LayerParameter::kDetFgThresholdFieldNumber;
const int V0LayerParameter::kDetBgThresholdFieldNumber;
const int V0LayerParameter::kDetFgFractionFieldNumber;
const int V0LayerParameter::kDetContextPadFieldNumber;
const int V0LayerParameter::kDetCropModeFieldNumber;
const int V0LayerParameter::kNewNumFieldNumber;
const int V0LayerParameter::kNewChannelsFieldNumber;
const int V0LayerParameter::kNewHeightFieldNumber;
const int V0LayerParameter::kNewWidthFieldNumber;
const int V0LayerParameter::kShuffleImagesFieldNumber;
const int V0LayerParameter::kConcatDimFieldNumber;
const int V0LayerParameter::kHdf5OutputParamFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

V0LayerParameter::V0LayerParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.V0LayerParameter)
}

void V0LayerParameter::InitAsDefaultInstance() {
  weight_filler_ = const_cast< ::caffe::FillerParameter*>(
      ::caffe::FillerParameter::internal_default_instance());
  bias_filler_ = const_cast< ::caffe::FillerParameter*>(
      ::caffe::FillerParameter::internal_default_instance());
  hdf5_output_param_ = const_cast< ::caffe::HDF5OutputParameter*>(
      ::caffe::HDF5OutputParameter::internal_default_instance());
}

V0LayerParameter::V0LayerParameter(const V0LayerParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.V0LayerParameter)
}

void V0LayerParameter::SharedCtor() {
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  source_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  meanfile_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  det_crop_mode_.UnsafeSetDefault(_default_det_crop_mode_);
  weight_filler_ = NULL;
  bias_filler_ = NULL;
  hdf5_output_param_ = NULL;
  ::memset(&num_output_, 0, reinterpret_cast<char*>(&new_width_) -
    reinterpret_cast<char*>(&num_output_) + sizeof(new_width_));
  concat_dim_ = 1u;
  biasterm_ = true;
  group_ = 1u;
  stride_ = 1u;
  dropout_ratio_ = 0.5f;
  local_size_ = 5u;
  alpha_ = 1;
  beta_ = 0.75f;
  k_ = 1;
  scale_ = 1;
  det_fg_threshold_ = 0.5f;
  det_bg_threshold_ = 0.5f;
  det_fg_fraction_ = 0.25f;
  _cached_size_ = 0;
}

V0LayerParameter::~V0LayerParameter() {
  // @@protoc_insertion_point(destructor:caffe.V0LayerParameter)
  SharedDtor();
}

void V0LayerParameter::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  source_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  meanfile_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  det_crop_mode_.DestroyNoArena(_default_det_crop_mode_);
  if (this != &V0LayerParameter_default_instance_.get()) {
    delete weight_filler_;
    delete bias_filler_;
    delete hdf5_output_param_;
  }
}

void V0LayerParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* V0LayerParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return V0LayerParameter_descriptor_;
}

const V0LayerParameter& V0LayerParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<V0LayerParameter> V0LayerParameter_default_instance_;

V0LayerParameter* V0LayerParameter::New(::google::protobuf::Arena* arena) const {
  V0LayerParameter* n = new V0LayerParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void V0LayerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.V0LayerParameter)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(V0LayerParameter, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<V0LayerParameter*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  if (_has_bits_[0 / 32] & 255u) {
    ZR_(num_output_, kernelsize_);
    if (has_name()) {
      name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    if (has_type()) {
      type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    biasterm_ = true;
    if (has_weight_filler()) {
      if (weight_filler_ != NULL) weight_filler_->::caffe::FillerParameter::Clear();
    }
    if (has_bias_filler()) {
      if (bias_filler_ != NULL) bias_filler_->::caffe::FillerParameter::Clear();
    }
  }
  if (_has_bits_[8 / 32] & 65280u) {
    group_ = 1u;
    stride_ = 1u;
    pool_ = 0;
    dropout_ratio_ = 0.5f;
    local_size_ = 5u;
    alpha_ = 1;
    beta_ = 0.75f;
    k_ = 1;
  }
  if (_has_bits_[16 / 32] & 4128768u) {
    ZR_(batchsize_, cropsize_);
    if (has_source()) {
      source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    scale_ = 1;
    if (has_meanfile()) {
      meanfile_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
    }
    mirror_ = false;
  }
  if (_has_bits_[24 / 32] & 4261412864u) {
    ZR_(det_context_pad_, new_num_);
    rand_skip_ = 0u;
    det_fg_threshold_ = 0.5f;
    det_bg_threshold_ = 0.5f;
    det_fg_fraction_ = 0.25f;
    if (has_det_crop_mode()) {
      det_crop_mode_.ClearToDefaultNoArena(_default_det_crop_mode_);
    }
  }
  if (_has_bits_[32 / 32] & 63u) {
    ZR_(new_channels_, new_width_);
    shuffle_images_ = false;
    concat_dim_ = 1u;
    if (has_hdf5_output_param()) {
      if (hdf5_output_param_ != NULL) hdf5_output_param_->::caffe::HDF5OutputParameter::Clear();
    }
  }

#undef ZR_HELPER_
#undef ZR_

  blobs_.Clear();
  blobs_lr_.Clear();
  weight_decay_.Clear();
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool V0LayerParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.V0LayerParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(16383);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->name().data(), this->name().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.V0LayerParameter.name");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(18)) goto parse_type;
        break;
      }

      // optional string type = 2;
      case 2: {
        if (tag == 18) {
         parse_type:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_type()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->type().data(), this->type().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.V0LayerParameter.type");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(24)) goto parse_num_output;
        break;
      }

      // optional uint32 num_output = 3;
      case 3: {
        if (tag == 24) {
         parse_num_output:
          set_has_num_output();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &num_output_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(32)) goto parse_biasterm;
        break;
      }

      // optional bool biasterm = 4 [default = true];
      case 4: {
        if (tag == 32) {
         parse_biasterm:
          set_has_biasterm();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &biasterm_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(42)) goto parse_weight_filler;
        break;
      }

      // optional .caffe.FillerParameter weight_filler = 5;
      case 5: {
        if (tag == 42) {
         parse_weight_filler:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_weight_filler()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(50)) goto parse_bias_filler;
        break;
      }

      // optional .caffe.FillerParameter bias_filler = 6;
      case 6: {
        if (tag == 50) {
         parse_bias_filler:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_bias_filler()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(56)) goto parse_pad;
        break;
      }

      // optional uint32 pad = 7 [default = 0];
      case 7: {
        if (tag == 56) {
         parse_pad:
          set_has_pad();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &pad_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(64)) goto parse_kernelsize;
        break;
      }

      // optional uint32 kernelsize = 8;
      case 8: {
        if (tag == 64) {
         parse_kernelsize:
          set_has_kernelsize();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &kernelsize_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(72)) goto parse_group;
        break;
      }

      // optional uint32 group = 9 [default = 1];
      case 9: {
        if (tag == 72) {
         parse_group:
          set_has_group();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &group_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(80)) goto parse_stride;
        break;
      }

      // optional uint32 stride = 10 [default = 1];
      case 10: {
        if (tag == 80) {
         parse_stride:
          set_has_stride();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &stride_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(88)) goto parse_pool;
        break;
      }

      // optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
      case 11: {
        if (tag == 88) {
         parse_pool:
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::caffe::V0LayerParameter_PoolMethod_IsValid(value)) {
            set_pool(static_cast< ::caffe::V0LayerParameter_PoolMethod >(value));
          } else {
            mutable_unknown_fields()->AddVarint(11, value);
          }
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(101)) goto parse_dropout_ratio;
        break;
      }

      // optional float dropout_ratio = 12 [default = 0.5];
      case 12: {
        if (tag == 101) {
         parse_dropout_ratio:
          set_has_dropout_ratio();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &dropout_ratio_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(104)) goto parse_local_size;
        break;
      }

      // optional uint32 local_size = 13 [default = 5];
      case 13: {
        if (tag == 104) {
         parse_local_size:
          set_has_local_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &local_size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(117)) goto parse_alpha;
        break;
      }

      // optional float alpha = 14 [default = 1];
      case 14: {
        if (tag == 117) {
         parse_alpha:
          set_has_alpha();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &alpha_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(125)) goto parse_beta;
        break;
      }

      // optional float beta = 15 [default = 0.75];
      case 15: {
        if (tag == 125) {
         parse_beta:
          set_has_beta();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &beta_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(130)) goto parse_source;
        break;
      }

      // optional string source = 16;
      case 16: {
        if (tag == 130) {
         parse_source:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_source()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->source().data(), this->source().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.V0LayerParameter.source");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(141)) goto parse_scale;
        break;
      }

      // optional float scale = 17 [default = 1];
      case 17: {
        if (tag == 141) {
         parse_scale:
          set_has_scale();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &scale_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(146)) goto parse_meanfile;
        break;
      }

      // optional string meanfile = 18;
      case 18: {
        if (tag == 146) {
         parse_meanfile:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_meanfile()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->meanfile().data(), this->meanfile().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.V0LayerParameter.meanfile");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(152)) goto parse_batchsize;
        break;
      }

      // optional uint32 batchsize = 19;
      case 19: {
        if (tag == 152) {
         parse_batchsize:
          set_has_batchsize();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &batchsize_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(160)) goto parse_cropsize;
        break;
      }

      // optional uint32 cropsize = 20 [default = 0];
      case 20: {
        if (tag == 160) {
         parse_cropsize:
          set_has_cropsize();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &cropsize_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(168)) goto parse_mirror;
        break;
      }

      // optional bool mirror = 21 [default = false];
      case 21: {
        if (tag == 168) {
         parse_mirror:
          set_has_mirror();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &mirror_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(181)) goto parse_k;
        break;
      }

      // optional float k = 22 [default = 1];
      case 22: {
        if (tag == 181) {
         parse_k:
          set_has_k();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &k_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(402)) goto parse_blobs;
        break;
      }

      // repeated .caffe.BlobProto blobs = 50;
      case 50: {
        if (tag == 402) {
         parse_blobs:
          DO_(input->IncrementRecursionDepth());
         parse_loop_blobs:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth(
                input, add_blobs()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(402)) goto parse_loop_blobs;
        input->UnsafeDecrementRecursionDepth();
        if (input->ExpectTag(413)) goto parse_blobs_lr;
        break;
      }

      // repeated float blobs_lr = 51;
      case 51: {
        if (tag == 413) {
         parse_blobs_lr:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 2, 413, input, this->mutable_blobs_lr())));
        } else if (tag == 410) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_blobs_lr())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(413)) goto parse_blobs_lr;
        if (input->ExpectTag(421)) goto parse_weight_decay;
        break;
      }

      // repeated float weight_decay = 52;
      case 52: {
        if (tag == 421) {
         parse_weight_decay:
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 2, 421, input, this->mutable_weight_decay())));
        } else if (tag == 418) {
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, this->mutable_weight_decay())));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(421)) goto parse_weight_decay;
        if (input->ExpectTag(424)) goto parse_rand_skip;
        break;
      }

      // optional uint32 rand_skip = 53 [default = 0];
      case 53: {
        if (tag == 424) {
         parse_rand_skip:
          set_has_rand_skip();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &rand_skip_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(437)) goto parse_det_fg_threshold;
        break;
      }

      // optional float det_fg_threshold = 54 [default = 0.5];
      case 54: {
        if (tag == 437) {
         parse_det_fg_threshold:
          set_has_det_fg_threshold();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &det_fg_threshold_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(445)) goto parse_det_bg_threshold;
        break;
      }

      // optional float det_bg_threshold = 55 [default = 0.5];
      case 55: {
        if (tag == 445) {
         parse_det_bg_threshold:
          set_has_det_bg_threshold();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &det_bg_threshold_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(453)) goto parse_det_fg_fraction;
        break;
      }

      // optional float det_fg_fraction = 56 [default = 0.25];
      case 56: {
        if (tag == 453) {
         parse_det_fg_fraction:
          set_has_det_fg_fraction();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &det_fg_fraction_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(464)) goto parse_det_context_pad;
        break;
      }

      // optional uint32 det_context_pad = 58 [default = 0];
      case 58: {
        if (tag == 464) {
         parse_det_context_pad:
          set_has_det_context_pad();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &det_context_pad_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(474)) goto parse_det_crop_mode;
        break;
      }

      // optional string det_crop_mode = 59 [default = "warp"];
      case 59: {
        if (tag == 474) {
         parse_det_crop_mode:
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_det_crop_mode()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->det_crop_mode().data(), this->det_crop_mode().length(),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe.V0LayerParameter.det_crop_mode");
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(480)) goto parse_new_num;
        break;
      }

      // optional int32 new_num = 60 [default = 0];
      case 60: {
        if (tag == 480) {
         parse_new_num:
          set_has_new_num();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &new_num_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(488)) goto parse_new_channels;
        break;
      }

      // optional int32 new_channels = 61 [default = 0];
      case 61: {
        if (tag == 488) {
         parse_new_channels:
          set_has_new_channels();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &new_channels_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(496)) goto parse_new_height;
        break;
      }

      // optional int32 new_height = 62 [default = 0];
      case 62: {
        if (tag == 496) {
         parse_new_height:
          set_has_new_height();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &new_height_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(504)) goto parse_new_width;
        break;
      }

      // optional int32 new_width = 63 [default = 0];
      case 63: {
        if (tag == 504) {
         parse_new_width:
          set_has_new_width();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &new_width_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(512)) goto parse_shuffle_images;
        break;
      }

      // optional bool shuffle_images = 64 [default = false];
      case 64: {
        if (tag == 512) {
         parse_shuffle_images:
          set_has_shuffle_images();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &shuffle_images_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(520)) goto parse_concat_dim;
        break;
      }

      // optional uint32 concat_dim = 65 [default = 1];
      case 65: {
        if (tag == 520) {
         parse_concat_dim:
          set_has_concat_dim();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
                 input, &concat_dim_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(8010)) goto parse_hdf5_output_param;
        break;
      }

      // optional .caffe.HDF5OutputParameter hdf5_output_param = 1001;
      case 1001: {
        if (tag == 8010) {
         parse_hdf5_output_param:
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_hdf5_output_param()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.V0LayerParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.V0LayerParameter)
  return false;
#undef DO_
}

void V0LayerParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.V0LayerParameter)
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V0LayerParameter.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // optional string type = 2;
  if (has_type()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->type().data(), this->type().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V0LayerParameter.type");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->type(), output);
  }

  // optional uint32 num_output = 3;
  if (has_num_output()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(3, this->num_output(), output);
  }

  // optional bool biasterm = 4 [default = true];
  if (has_biasterm()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->biasterm(), output);
  }

  // optional .caffe.FillerParameter weight_filler = 5;
  if (has_weight_filler()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5, *this->weight_filler_, output);
  }

  // optional .caffe.FillerParameter bias_filler = 6;
  if (has_bias_filler()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      6, *this->bias_filler_, output);
  }

  // optional uint32 pad = 7 [default = 0];
  if (has_pad()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(7, this->pad(), output);
  }

  // optional uint32 kernelsize = 8;
  if (has_kernelsize()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(8, this->kernelsize(), output);
  }

  // optional uint32 group = 9 [default = 1];
  if (has_group()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(9, this->group(), output);
  }

  // optional uint32 stride = 10 [default = 1];
  if (has_stride()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(10, this->stride(), output);
  }

  // optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
  if (has_pool()) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      11, this->pool(), output);
  }

  // optional float dropout_ratio = 12 [default = 0.5];
  if (has_dropout_ratio()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(12, this->dropout_ratio(), output);
  }

  // optional uint32 local_size = 13 [default = 5];
  if (has_local_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(13, this->local_size(), output);
  }

  // optional float alpha = 14 [default = 1];
  if (has_alpha()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(14, this->alpha(), output);
  }

  // optional float beta = 15 [default = 0.75];
  if (has_beta()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(15, this->beta(), output);
  }

  // optional string source = 16;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V0LayerParameter.source");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      16, this->source(), output);
  }

  // optional float scale = 17 [default = 1];
  if (has_scale()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(17, this->scale(), output);
  }

  // optional string meanfile = 18;
  if (has_meanfile()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->meanfile().data(), this->meanfile().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V0LayerParameter.meanfile");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      18, this->meanfile(), output);
  }

  // optional uint32 batchsize = 19;
  if (has_batchsize()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(19, this->batchsize(), output);
  }

  // optional uint32 cropsize = 20 [default = 0];
  if (has_cropsize()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(20, this->cropsize(), output);
  }

  // optional bool mirror = 21 [default = false];
  if (has_mirror()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(21, this->mirror(), output);
  }

  // optional float k = 22 [default = 1];
  if (has_k()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(22, this->k(), output);
  }

  // repeated .caffe.BlobProto blobs = 50;
  for (unsigned int i = 0, n = this->blobs_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      50, this->blobs(i), output);
  }

  // repeated float blobs_lr = 51;
  for (int i = 0; i < this->blobs_lr_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      51, this->blobs_lr(i), output);
  }

  // repeated float weight_decay = 52;
  for (int i = 0; i < this->weight_decay_size(); i++) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(
      52, this->weight_decay(i), output);
  }

  // optional uint32 rand_skip = 53 [default = 0];
  if (has_rand_skip()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(53, this->rand_skip(), output);
  }

  // optional float det_fg_threshold = 54 [default = 0.5];
  if (has_det_fg_threshold()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(54, this->det_fg_threshold(), output);
  }

  // optional float det_bg_threshold = 55 [default = 0.5];
  if (has_det_bg_threshold()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(55, this->det_bg_threshold(), output);
  }

  // optional float det_fg_fraction = 56 [default = 0.25];
  if (has_det_fg_fraction()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(56, this->det_fg_fraction(), output);
  }

  // optional uint32 det_context_pad = 58 [default = 0];
  if (has_det_context_pad()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(58, this->det_context_pad(), output);
  }

  // optional string det_crop_mode = 59 [default = "warp"];
  if (has_det_crop_mode()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->det_crop_mode().data(), this->det_crop_mode().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V0LayerParameter.det_crop_mode");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      59, this->det_crop_mode(), output);
  }

  // optional int32 new_num = 60 [default = 0];
  if (has_new_num()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(60, this->new_num(), output);
  }

  // optional int32 new_channels = 61 [default = 0];
  if (has_new_channels()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(61, this->new_channels(), output);
  }

  // optional int32 new_height = 62 [default = 0];
  if (has_new_height()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(62, this->new_height(), output);
  }

  // optional int32 new_width = 63 [default = 0];
  if (has_new_width()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(63, this->new_width(), output);
  }

  // optional bool shuffle_images = 64 [default = false];
  if (has_shuffle_images()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(64, this->shuffle_images(), output);
  }

  // optional uint32 concat_dim = 65 [default = 1];
  if (has_concat_dim()) {
    ::google::protobuf::internal::WireFormatLite::WriteUInt32(65, this->concat_dim(), output);
  }

  // optional .caffe.HDF5OutputParameter hdf5_output_param = 1001;
  if (has_hdf5_output_param()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1001, *this->hdf5_output_param_, output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.V0LayerParameter)
}

::google::protobuf::uint8* V0LayerParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.V0LayerParameter)
  // optional string name = 1;
  if (has_name()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), this->name().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V0LayerParameter.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional string type = 2;
  if (has_type()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->type().data(), this->type().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V0LayerParameter.type");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->type(), target);
  }

  // optional uint32 num_output = 3;
  if (has_num_output()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(3, this->num_output(), target);
  }

  // optional bool biasterm = 4 [default = true];
  if (has_biasterm()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->biasterm(), target);
  }

  // optional .caffe.FillerParameter weight_filler = 5;
  if (has_weight_filler()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        5, *this->weight_filler_, false, target);
  }

  // optional .caffe.FillerParameter bias_filler = 6;
  if (has_bias_filler()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        6, *this->bias_filler_, false, target);
  }

  // optional uint32 pad = 7 [default = 0];
  if (has_pad()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(7, this->pad(), target);
  }

  // optional uint32 kernelsize = 8;
  if (has_kernelsize()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(8, this->kernelsize(), target);
  }

  // optional uint32 group = 9 [default = 1];
  if (has_group()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(9, this->group(), target);
  }

  // optional uint32 stride = 10 [default = 1];
  if (has_stride()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(10, this->stride(), target);
  }

  // optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
  if (has_pool()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
      11, this->pool(), target);
  }

  // optional float dropout_ratio = 12 [default = 0.5];
  if (has_dropout_ratio()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(12, this->dropout_ratio(), target);
  }

  // optional uint32 local_size = 13 [default = 5];
  if (has_local_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(13, this->local_size(), target);
  }

  // optional float alpha = 14 [default = 1];
  if (has_alpha()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(14, this->alpha(), target);
  }

  // optional float beta = 15 [default = 0.75];
  if (has_beta()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(15, this->beta(), target);
  }

  // optional string source = 16;
  if (has_source()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->source().data(), this->source().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V0LayerParameter.source");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        16, this->source(), target);
  }

  // optional float scale = 17 [default = 1];
  if (has_scale()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(17, this->scale(), target);
  }

  // optional string meanfile = 18;
  if (has_meanfile()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->meanfile().data(), this->meanfile().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V0LayerParameter.meanfile");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        18, this->meanfile(), target);
  }

  // optional uint32 batchsize = 19;
  if (has_batchsize()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(19, this->batchsize(), target);
  }

  // optional uint32 cropsize = 20 [default = 0];
  if (has_cropsize()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(20, this->cropsize(), target);
  }

  // optional bool mirror = 21 [default = false];
  if (has_mirror()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(21, this->mirror(), target);
  }

  // optional float k = 22 [default = 1];
  if (has_k()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(22, this->k(), target);
  }

  // repeated .caffe.BlobProto blobs = 50;
  for (unsigned int i = 0, n = this->blobs_size(); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        50, this->blobs(i), false, target);
  }

  // repeated float blobs_lr = 51;
  for (int i = 0; i < this->blobs_lr_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(51, this->blobs_lr(i), target);
  }

  // repeated float weight_decay = 52;
  for (int i = 0; i < this->weight_decay_size(); i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      WriteFloatToArray(52, this->weight_decay(i), target);
  }

  // optional uint32 rand_skip = 53 [default = 0];
  if (has_rand_skip()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(53, this->rand_skip(), target);
  }

  // optional float det_fg_threshold = 54 [default = 0.5];
  if (has_det_fg_threshold()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(54, this->det_fg_threshold(), target);
  }

  // optional float det_bg_threshold = 55 [default = 0.5];
  if (has_det_bg_threshold()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(55, this->det_bg_threshold(), target);
  }

  // optional float det_fg_fraction = 56 [default = 0.25];
  if (has_det_fg_fraction()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(56, this->det_fg_fraction(), target);
  }

  // optional uint32 det_context_pad = 58 [default = 0];
  if (has_det_context_pad()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(58, this->det_context_pad(), target);
  }

  // optional string det_crop_mode = 59 [default = "warp"];
  if (has_det_crop_mode()) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->det_crop_mode().data(), this->det_crop_mode().length(),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe.V0LayerParameter.det_crop_mode");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        59, this->det_crop_mode(), target);
  }

  // optional int32 new_num = 60 [default = 0];
  if (has_new_num()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(60, this->new_num(), target);
  }

  // optional int32 new_channels = 61 [default = 0];
  if (has_new_channels()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(61, this->new_channels(), target);
  }

  // optional int32 new_height = 62 [default = 0];
  if (has_new_height()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(62, this->new_height(), target);
  }

  // optional int32 new_width = 63 [default = 0];
  if (has_new_width()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(63, this->new_width(), target);
  }

  // optional bool shuffle_images = 64 [default = false];
  if (has_shuffle_images()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(64, this->shuffle_images(), target);
  }

  // optional uint32 concat_dim = 65 [default = 1];
  if (has_concat_dim()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(65, this->concat_dim(), target);
  }

  // optional .caffe.HDF5OutputParameter hdf5_output_param = 1001;
  if (has_hdf5_output_param()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        1001, *this->hdf5_output_param_, false, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 255u) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional string type = 2;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->type());
    }

    // optional uint32 num_output = 3;
    if (has_num_output()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->num_output());
    }

    // optional bool biasterm = 4 [default = true];
    if (has_biasterm()) {
      total_size += 1 + 1;
    }

    // optional .caffe.FillerParameter weight_filler = 5;
    if (has_weight_filler()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->weight_filler_);
    }

    // optional .caffe.FillerParameter bias_filler = 6;
    if (has_bias_filler()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->bias_filler_);
    }

    // optional uint32 pad = 7 [default = 0];
    if (has_pad()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->pad());
    }

    // optional uint32 kernelsize = 8;
    if (has_kernelsize()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->kernelsize());
    }

  }
  if (_has_bits_[8 / 32] & 65280u) {
    // optional uint32 group = 9 [default = 1];
    if (has_group()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->group());
    }

    // optional uint32 stride = 10 [default = 1];
    if (has_stride()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->stride());
    }

    // optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
    if (has_pool()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->pool());
    }

    // optional float dropout_ratio = 12 [default = 0.5];
    if (has_dropout_ratio()) {
      total_size += 1 + 4;
    }

    // optional uint32 local_size = 13 [default = 5];
    if (has_local_size()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->local_size());
    }

    // optional float alpha = 14 [default = 1];
    if (has_alpha()) {
      total_size += 1 + 4;
    }

    // optional float beta = 15 [default = 0.75];
    if (has_beta()) {
      total_size += 1 + 4;
    }

    // optional float k = 22 [default = 1];
    if (has_k()) {
      total_size += 2 + 4;
    }

  }
  if (_has_bits_[16 / 32] & 4128768u) {
    // optional string source = 16;
    if (has_source()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->source());
    }

    // optional float scale = 17 [default = 1];
    if (has_scale()) {
      total_size += 2 + 4;
    }

    // optional string meanfile = 18;
    if (has_meanfile()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->meanfile());
    }

    // optional uint32 batchsize = 19;
    if (has_batchsize()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->batchsize());
    }

    // optional uint32 cropsize = 20 [default = 0];
    if (has_cropsize()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->cropsize());
    }

    // optional bool mirror = 21 [default = false];
    if (has_mirror()) {
      total_size += 2 + 1;
    }

  }
  if (_has_bits_[25 / 32] & 4261412864u) {
    // optional uint32 rand_skip = 53 [default = 0];
    if (has_rand_skip()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->rand_skip());
    }

    // optional float det_fg_threshold = 54 [default = 0.5];
    if (has_det_fg_threshold()) {
      total_size += 2 + 4;
    }

    // optional float det_bg_threshold = 55 [default = 0.5];
    if (has_det_bg_threshold()) {
      total_size += 2 + 4;
    }

    // optional float det_fg_fraction = 56 [default = 0.25];
    if (has_det_fg_fraction()) {
      total_size += 2 + 4;
    }

    // optional uint32 det_context_pad = 58 [default = 0];
    if (has_det_context_pad()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->det_context_pad());
    }

    // optional string det_crop_mode = 59 [default = "warp"];
    if (has_det_crop_mode()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->det_crop_mode());
    }

    // optional int32 new_num = 60 [default = 0];
    if (has_new_num()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->new_num());
    }

  }
  if (_has_bits_[32 / 32] & 63u) {
    // optional int32 new_channels = 61 [default = 0];
    if (has_new_channels()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->new_channels());
    }

    // optional int32 new_height = 62 [default = 0];
    if (has_new_height()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->new_height());
    }

    // optional int32 new_width = 63 [default = 0];
    if (has_new_width()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->new_width());
    }

    // optional bool shuffle_images = 64 [default = false];
    if (has_shuffle_images()) {
      total_size += 2 + 1;
    }

    // optional uint32 concat_dim = 65 [default = 1];
    if (has_concat_dim()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::UInt32Size(
          this->concat_dim());
    }

    // optional .caffe.HDF5OutputParameter hdf5_output_param = 1001;
    if (has_hdf5_output_param()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->hdf5_output_param_);
    }

  }
  // repeated .caffe.BlobProto blobs = 50;
  {
    unsigned int count = this->blobs_size();
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->blobs(i));
    }
  }

  // repeated float blobs_lr = 51;
  {
    size_t data_size = 0;
    unsigned int count = this->blobs_lr_size();
    data_size = 4UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->blobs_lr_size());
    total_size += data_size;
  }

  // repeated float weight_decay = 52;
  {
    size_t data_size = 0;
    unsigned int count = this->weight_decay_size();
    data_size = 4UL * count;
    total_size += 2 *
                  ::google::protobuf::internal::FromIntSize(this->weight_decay_size());
    total_size += data_size;
  }

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void V0LayerParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.V0LayerParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const V0LayerParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const V0LayerParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.V0LayerParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.V0LayerParameter)
    UnsafeMergeFrom(*source);
  }
}

void V0LayerParameter::MergeFrom(const V0LayerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.V0LayerParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void V0LayerParameter::UnsafeMergeFrom(const V0LayerParameter& from) {
  GOOGLE_DCHECK(&from != this);
  blobs_.MergeFrom(from.blobs_);
  blobs_lr_.UnsafeMergeFrom(from.blobs_lr_);
  weight_decay_.UnsafeMergeFrom(from.weight_decay_);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_name()) {
      set_has_name();
      name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
    }
    if (from.has_type()) {
      set_has_type();
      type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_);
    }
    if (from.has_num_output()) {
      set_num_output(from.num_output());
    }
    if (from.has_biasterm()) {
      set_biasterm(from.biasterm());
    }
    if (from.has_weight_filler()) {
      mutable_weight_filler()->::caffe::FillerParameter::MergeFrom(from.weight_filler());
    }
    if (from.has_bias_filler()) {
      mutable_bias_filler()->::caffe::FillerParameter::MergeFrom(from.bias_filler());
    }
    if (from.has_pad()) {
      set_pad(from.pad());
    }
    if (from.has_kernelsize()) {
      set_kernelsize(from.kernelsize());
    }
  }
  if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
    if (from.has_group()) {
      set_group(from.group());
    }
    if (from.has_stride()) {
      set_stride(from.stride());
    }
    if (from.has_pool()) {
      set_pool(from.pool());
    }
    if (from.has_dropout_ratio()) {
      set_dropout_ratio(from.dropout_ratio());
    }
    if (from.has_local_size()) {
      set_local_size(from.local_size());
    }
    if (from.has_alpha()) {
      set_alpha(from.alpha());
    }
    if (from.has_beta()) {
      set_beta(from.beta());
    }
    if (from.has_k()) {
      set_k(from.k());
    }
  }
  if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
    if (from.has_source()) {
      set_has_source();
      source_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.source_);
    }
    if (from.has_scale()) {
      set_scale(from.scale());
    }
    if (from.has_meanfile()) {
      set_has_meanfile();
      meanfile_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.meanfile_);
    }
    if (from.has_batchsize()) {
      set_batchsize(from.batchsize());
    }
    if (from.has_cropsize()) {
      set_cropsize(from.cropsize());
    }
    if (from.has_mirror()) {
      set_mirror(from.mirror());
    }
  }
  if (from._has_bits_[25 / 32] & (0xffu << (25 % 32))) {
    if (from.has_rand_skip()) {
      set_rand_skip(from.rand_skip());
    }
    if (from.has_det_fg_threshold()) {
      set_det_fg_threshold(from.det_fg_threshold());
    }
    if (from.has_det_bg_threshold()) {
      set_det_bg_threshold(from.det_bg_threshold());
    }
    if (from.has_det_fg_fraction()) {
      set_det_fg_fraction(from.det_fg_fraction());
    }
    if (from.has_det_context_pad()) {
      set_det_context_pad(from.det_context_pad());
    }
    if (from.has_det_crop_mode()) {
      set_has_det_crop_mode();
      det_crop_mode_.AssignWithDefault(_default_det_crop_mode_, from.det_crop_mode_);
    }
    if (from.has_new_num()) {
      set_new_num(from.new_num());
    }
  }
  if (from._has_bits_[32 / 32] & (0xffu << (32 % 32))) {
    if (from.has_new_channels()) {
      set_new_channels(from.new_channels());
    }
    if (from.has_new_height()) {
      set_new_height(from.new_height());
    }
    if (from.has_new_width()) {
      set_new_width(from.new_width());
    }
    if (from.has_shuffle_images()) {
      set_shuffle_images(from.shuffle_images());
    }
    if (from.has_concat_dim()) {
      set_concat_dim(from.concat_dim());
    }
    if (from.has_hdf5_output_param()) {
      mutable_hdf5_output_param()->::caffe::HDF5OutputParameter::MergeFrom(from.hdf5_output_param());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void V0LayerParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.V0LayerParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool V0LayerParameter::IsInitialized() const {

  return true;
}

void V0LayerParameter::Swap(V0LayerParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void V0LayerParameter::InternalSwap(V0LayerParameter* other) {
  name_.Swap(&other->name_);
  type_.Swap(&other->type_);
  std::swap(num_output_, other->num_output_);
  std::swap(biasterm_, other->biasterm_);
  std::swap(weight_filler_, other->weight_filler_);
  std::swap(bias_filler_, other->bias_filler_);
  std::swap(pad_, other->pad_);
  std::swap(kernelsize_, other->kernelsize_);
  std::swap(group_, other->group_);
  std::swap(stride_, other->stride_);
  std::swap(pool_, other->pool_);
  std::swap(dropout_ratio_, other->dropout_ratio_);
  std::swap(local_size_, other->local_size_);
  std::swap(alpha_, other->alpha_);
  std::swap(beta_, other->beta_);
  std::swap(k_, other->k_);
  source_.Swap(&other->source_);
  std::swap(scale_, other->scale_);
  meanfile_.Swap(&other->meanfile_);
  std::swap(batchsize_, other->batchsize_);
  std::swap(cropsize_, other->cropsize_);
  std::swap(mirror_, other->mirror_);
  blobs_.UnsafeArenaSwap(&other->blobs_);
  blobs_lr_.UnsafeArenaSwap(&other->blobs_lr_);
  weight_decay_.UnsafeArenaSwap(&other->weight_decay_);
  std::swap(rand_skip_, other->rand_skip_);
  std::swap(det_fg_threshold_, other->det_fg_threshold_);
  std::swap(det_bg_threshold_, other->det_bg_threshold_);
  std::swap(det_fg_fraction_, other->det_fg_fraction_);
  std::swap(det_context_pad_, other->det_context_pad_);
  det_crop_mode_.Swap(&other->det_crop_mode_);
  std::swap(new_num_, other->new_num_);
  std::swap(new_channels_, other->new_channels_);
  std::swap(new_height_, other->new_height_);
  std::swap(new_width_, other->new_width_);
  std::swap(shuffle_images_, other->shuffle_images_);
  std::swap(concat_dim_, other->concat_dim_);
  std::swap(hdf5_output_param_, other->hdf5_output_param_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  std::swap(_has_bits_[1], other->_has_bits_[1]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata V0LayerParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = V0LayerParameter_descriptor_;
  metadata.reflection = V0LayerParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// V0LayerParameter

// optional string name = 1;
bool V0LayerParameter::has_name() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void V0LayerParameter::set_has_name() {
  _has_bits_[0] |= 0x00000001u;
}
void V0LayerParameter::clear_has_name() {
  _has_bits_[0] &= ~0x00000001u;
}
void V0LayerParameter::clear_name() {
  name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_name();
}
const ::std::string& V0LayerParameter::name() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.name)
  return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void V0LayerParameter::set_name(const ::std::string& value) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.name)
}
void V0LayerParameter::set_name(const char* value) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.V0LayerParameter.name)
}
void V0LayerParameter::set_name(const char* value, size_t size) {
  set_has_name();
  name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.V0LayerParameter.name)
}
::std::string* V0LayerParameter::mutable_name() {
  set_has_name();
  // @@protoc_insertion_point(field_mutable:caffe.V0LayerParameter.name)
  return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* V0LayerParameter::release_name() {
  // @@protoc_insertion_point(field_release:caffe.V0LayerParameter.name)
  clear_has_name();
  return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void V0LayerParameter::set_allocated_name(::std::string* name) {
  if (name != NULL) {
    set_has_name();
  } else {
    clear_has_name();
  }
  name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name);
  // @@protoc_insertion_point(field_set_allocated:caffe.V0LayerParameter.name)
}

// optional string type = 2;
bool V0LayerParameter::has_type() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void V0LayerParameter::set_has_type() {
  _has_bits_[0] |= 0x00000002u;
}
void V0LayerParameter::clear_has_type() {
  _has_bits_[0] &= ~0x00000002u;
}
void V0LayerParameter::clear_type() {
  type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_type();
}
const ::std::string& V0LayerParameter::type() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.type)
  return type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void V0LayerParameter::set_type(const ::std::string& value) {
  set_has_type();
  type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.type)
}
void V0LayerParameter::set_type(const char* value) {
  set_has_type();
  type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.V0LayerParameter.type)
}
void V0LayerParameter::set_type(const char* value, size_t size) {
  set_has_type();
  type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.V0LayerParameter.type)
}
::std::string* V0LayerParameter::mutable_type() {
  set_has_type();
  // @@protoc_insertion_point(field_mutable:caffe.V0LayerParameter.type)
  return type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* V0LayerParameter::release_type() {
  // @@protoc_insertion_point(field_release:caffe.V0LayerParameter.type)
  clear_has_type();
  return type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void V0LayerParameter::set_allocated_type(::std::string* type) {
  if (type != NULL) {
    set_has_type();
  } else {
    clear_has_type();
  }
  type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type);
  // @@protoc_insertion_point(field_set_allocated:caffe.V0LayerParameter.type)
}

// optional uint32 num_output = 3;
bool V0LayerParameter::has_num_output() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void V0LayerParameter::set_has_num_output() {
  _has_bits_[0] |= 0x00000004u;
}
void V0LayerParameter::clear_has_num_output() {
  _has_bits_[0] &= ~0x00000004u;
}
void V0LayerParameter::clear_num_output() {
  num_output_ = 0u;
  clear_has_num_output();
}
::google::protobuf::uint32 V0LayerParameter::num_output() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.num_output)
  return num_output_;
}
void V0LayerParameter::set_num_output(::google::protobuf::uint32 value) {
  set_has_num_output();
  num_output_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.num_output)
}

// optional bool biasterm = 4 [default = true];
bool V0LayerParameter::has_biasterm() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void V0LayerParameter::set_has_biasterm() {
  _has_bits_[0] |= 0x00000008u;
}
void V0LayerParameter::clear_has_biasterm() {
  _has_bits_[0] &= ~0x00000008u;
}
void V0LayerParameter::clear_biasterm() {
  biasterm_ = true;
  clear_has_biasterm();
}
bool V0LayerParameter::biasterm() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.biasterm)
  return biasterm_;
}
void V0LayerParameter::set_biasterm(bool value) {
  set_has_biasterm();
  biasterm_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.biasterm)
}

// optional .caffe.FillerParameter weight_filler = 5;
bool V0LayerParameter::has_weight_filler() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void V0LayerParameter::set_has_weight_filler() {
  _has_bits_[0] |= 0x00000010u;
}
void V0LayerParameter::clear_has_weight_filler() {
  _has_bits_[0] &= ~0x00000010u;
}
void V0LayerParameter::clear_weight_filler() {
  if (weight_filler_ != NULL) weight_filler_->::caffe::FillerParameter::Clear();
  clear_has_weight_filler();
}
const ::caffe::FillerParameter& V0LayerParameter::weight_filler() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.weight_filler)
  return weight_filler_ != NULL ? *weight_filler_
                         : *::caffe::FillerParameter::internal_default_instance();
}
::caffe::FillerParameter* V0LayerParameter::mutable_weight_filler() {
  set_has_weight_filler();
  if (weight_filler_ == NULL) {
    weight_filler_ = new ::caffe::FillerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V0LayerParameter.weight_filler)
  return weight_filler_;
}
::caffe::FillerParameter* V0LayerParameter::release_weight_filler() {
  // @@protoc_insertion_point(field_release:caffe.V0LayerParameter.weight_filler)
  clear_has_weight_filler();
  ::caffe::FillerParameter* temp = weight_filler_;
  weight_filler_ = NULL;
  return temp;
}
void V0LayerParameter::set_allocated_weight_filler(::caffe::FillerParameter* weight_filler) {
  delete weight_filler_;
  weight_filler_ = weight_filler;
  if (weight_filler) {
    set_has_weight_filler();
  } else {
    clear_has_weight_filler();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V0LayerParameter.weight_filler)
}

// optional .caffe.FillerParameter bias_filler = 6;
bool V0LayerParameter::has_bias_filler() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void V0LayerParameter::set_has_bias_filler() {
  _has_bits_[0] |= 0x00000020u;
}
void V0LayerParameter::clear_has_bias_filler() {
  _has_bits_[0] &= ~0x00000020u;
}
void V0LayerParameter::clear_bias_filler() {
  if (bias_filler_ != NULL) bias_filler_->::caffe::FillerParameter::Clear();
  clear_has_bias_filler();
}
const ::caffe::FillerParameter& V0LayerParameter::bias_filler() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.bias_filler)
  return bias_filler_ != NULL ? *bias_filler_
                         : *::caffe::FillerParameter::internal_default_instance();
}
::caffe::FillerParameter* V0LayerParameter::mutable_bias_filler() {
  set_has_bias_filler();
  if (bias_filler_ == NULL) {
    bias_filler_ = new ::caffe::FillerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V0LayerParameter.bias_filler)
  return bias_filler_;
}
::caffe::FillerParameter* V0LayerParameter::release_bias_filler() {
  // @@protoc_insertion_point(field_release:caffe.V0LayerParameter.bias_filler)
  clear_has_bias_filler();
  ::caffe::FillerParameter* temp = bias_filler_;
  bias_filler_ = NULL;
  return temp;
}
void V0LayerParameter::set_allocated_bias_filler(::caffe::FillerParameter* bias_filler) {
  delete bias_filler_;
  bias_filler_ = bias_filler;
  if (bias_filler) {
    set_has_bias_filler();
  } else {
    clear_has_bias_filler();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V0LayerParameter.bias_filler)
}

// optional uint32 pad = 7 [default = 0];
bool V0LayerParameter::has_pad() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void V0LayerParameter::set_has_pad() {
  _has_bits_[0] |= 0x00000040u;
}
void V0LayerParameter::clear_has_pad() {
  _has_bits_[0] &= ~0x00000040u;
}
void V0LayerParameter::clear_pad() {
  pad_ = 0u;
  clear_has_pad();
}
::google::protobuf::uint32 V0LayerParameter::pad() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.pad)
  return pad_;
}
void V0LayerParameter::set_pad(::google::protobuf::uint32 value) {
  set_has_pad();
  pad_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.pad)
}

// optional uint32 kernelsize = 8;
bool V0LayerParameter::has_kernelsize() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
void V0LayerParameter::set_has_kernelsize() {
  _has_bits_[0] |= 0x00000080u;
}
void V0LayerParameter::clear_has_kernelsize() {
  _has_bits_[0] &= ~0x00000080u;
}
void V0LayerParameter::clear_kernelsize() {
  kernelsize_ = 0u;
  clear_has_kernelsize();
}
::google::protobuf::uint32 V0LayerParameter::kernelsize() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.kernelsize)
  return kernelsize_;
}
void V0LayerParameter::set_kernelsize(::google::protobuf::uint32 value) {
  set_has_kernelsize();
  kernelsize_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.kernelsize)
}

// optional uint32 group = 9 [default = 1];
bool V0LayerParameter::has_group() const {
  return (_has_bits_[0] & 0x00000100u) != 0;
}
void V0LayerParameter::set_has_group() {
  _has_bits_[0] |= 0x00000100u;
}
void V0LayerParameter::clear_has_group() {
  _has_bits_[0] &= ~0x00000100u;
}
void V0LayerParameter::clear_group() {
  group_ = 1u;
  clear_has_group();
}
::google::protobuf::uint32 V0LayerParameter::group() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.group)
  return group_;
}
void V0LayerParameter::set_group(::google::protobuf::uint32 value) {
  set_has_group();
  group_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.group)
}

// optional uint32 stride = 10 [default = 1];
bool V0LayerParameter::has_stride() const {
  return (_has_bits_[0] & 0x00000200u) != 0;
}
void V0LayerParameter::set_has_stride() {
  _has_bits_[0] |= 0x00000200u;
}
void V0LayerParameter::clear_has_stride() {
  _has_bits_[0] &= ~0x00000200u;
}
void V0LayerParameter::clear_stride() {
  stride_ = 1u;
  clear_has_stride();
}
::google::protobuf::uint32 V0LayerParameter::stride() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.stride)
  return stride_;
}
void V0LayerParameter::set_stride(::google::protobuf::uint32 value) {
  set_has_stride();
  stride_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.stride)
}

// optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
bool V0LayerParameter::has_pool() const {
  return (_has_bits_[0] & 0x00000400u) != 0;
}
void V0LayerParameter::set_has_pool() {
  _has_bits_[0] |= 0x00000400u;
}
void V0LayerParameter::clear_has_pool() {
  _has_bits_[0] &= ~0x00000400u;
}
void V0LayerParameter::clear_pool() {
  pool_ = 0;
  clear_has_pool();
}
::caffe::V0LayerParameter_PoolMethod V0LayerParameter::pool() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.pool)
  return static_cast< ::caffe::V0LayerParameter_PoolMethod >(pool_);
}
void V0LayerParameter::set_pool(::caffe::V0LayerParameter_PoolMethod value) {
  assert(::caffe::V0LayerParameter_PoolMethod_IsValid(value));
  set_has_pool();
  pool_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.pool)
}

// optional float dropout_ratio = 12 [default = 0.5];
bool V0LayerParameter::has_dropout_ratio() const {
  return (_has_bits_[0] & 0x00000800u) != 0;
}
void V0LayerParameter::set_has_dropout_ratio() {
  _has_bits_[0] |= 0x00000800u;
}
void V0LayerParameter::clear_has_dropout_ratio() {
  _has_bits_[0] &= ~0x00000800u;
}
void V0LayerParameter::clear_dropout_ratio() {
  dropout_ratio_ = 0.5f;
  clear_has_dropout_ratio();
}
float V0LayerParameter::dropout_ratio() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.dropout_ratio)
  return dropout_ratio_;
}
void V0LayerParameter::set_dropout_ratio(float value) {
  set_has_dropout_ratio();
  dropout_ratio_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.dropout_ratio)
}

// optional uint32 local_size = 13 [default = 5];
bool V0LayerParameter::has_local_size() const {
  return (_has_bits_[0] & 0x00001000u) != 0;
}
void V0LayerParameter::set_has_local_size() {
  _has_bits_[0] |= 0x00001000u;
}
void V0LayerParameter::clear_has_local_size() {
  _has_bits_[0] &= ~0x00001000u;
}
void V0LayerParameter::clear_local_size() {
  local_size_ = 5u;
  clear_has_local_size();
}
::google::protobuf::uint32 V0LayerParameter::local_size() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.local_size)
  return local_size_;
}
void V0LayerParameter::set_local_size(::google::protobuf::uint32 value) {
  set_has_local_size();
  local_size_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.local_size)
}

// optional float alpha = 14 [default = 1];
bool V0LayerParameter::has_alpha() const {
  return (_has_bits_[0] & 0x00002000u) != 0;
}
void V0LayerParameter::set_has_alpha() {
  _has_bits_[0] |= 0x00002000u;
}
void V0LayerParameter::clear_has_alpha() {
  _has_bits_[0] &= ~0x00002000u;
}
void V0LayerParameter::clear_alpha() {
  alpha_ = 1;
  clear_has_alpha();
}
float V0LayerParameter::alpha() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.alpha)
  return alpha_;
}
void V0LayerParameter::set_alpha(float value) {
  set_has_alpha();
  alpha_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.alpha)
}

// optional float beta = 15 [default = 0.75];
bool V0LayerParameter::has_beta() const {
  return (_has_bits_[0] & 0x00004000u) != 0;
}
void V0LayerParameter::set_has_beta() {
  _has_bits_[0] |= 0x00004000u;
}
void V0LayerParameter::clear_has_beta() {
  _has_bits_[0] &= ~0x00004000u;
}
void V0LayerParameter::clear_beta() {
  beta_ = 0.75f;
  clear_has_beta();
}
float V0LayerParameter::beta() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.beta)
  return beta_;
}
void V0LayerParameter::set_beta(float value) {
  set_has_beta();
  beta_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.beta)
}

// optional float k = 22 [default = 1];
bool V0LayerParameter::has_k() const {
  return (_has_bits_[0] & 0x00008000u) != 0;
}
void V0LayerParameter::set_has_k() {
  _has_bits_[0] |= 0x00008000u;
}
void V0LayerParameter::clear_has_k() {
  _has_bits_[0] &= ~0x00008000u;
}
void V0LayerParameter::clear_k() {
  k_ = 1;
  clear_has_k();
}
float V0LayerParameter::k() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.k)
  return k_;
}
void V0LayerParameter::set_k(float value) {
  set_has_k();
  k_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.k)
}

// optional string source = 16;
bool V0LayerParameter::has_source() const {
  return (_has_bits_[0] & 0x00010000u) != 0;
}
void V0LayerParameter::set_has_source() {
  _has_bits_[0] |= 0x00010000u;
}
void V0LayerParameter::clear_has_source() {
  _has_bits_[0] &= ~0x00010000u;
}
void V0LayerParameter::clear_source() {
  source_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_source();
}
const ::std::string& V0LayerParameter::source() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.source)
  return source_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void V0LayerParameter::set_source(const ::std::string& value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.source)
}
void V0LayerParameter::set_source(const char* value) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.V0LayerParameter.source)
}
void V0LayerParameter::set_source(const char* value, size_t size) {
  set_has_source();
  source_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.V0LayerParameter.source)
}
::std::string* V0LayerParameter::mutable_source() {
  set_has_source();
  // @@protoc_insertion_point(field_mutable:caffe.V0LayerParameter.source)
  return source_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* V0LayerParameter::release_source() {
  // @@protoc_insertion_point(field_release:caffe.V0LayerParameter.source)
  clear_has_source();
  return source_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void V0LayerParameter::set_allocated_source(::std::string* source) {
  if (source != NULL) {
    set_has_source();
  } else {
    clear_has_source();
  }
  source_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), source);
  // @@protoc_insertion_point(field_set_allocated:caffe.V0LayerParameter.source)
}

// optional float scale = 17 [default = 1];
bool V0LayerParameter::has_scale() const {
  return (_has_bits_[0] & 0x00020000u) != 0;
}
void V0LayerParameter::set_has_scale() {
  _has_bits_[0] |= 0x00020000u;
}
void V0LayerParameter::clear_has_scale() {
  _has_bits_[0] &= ~0x00020000u;
}
void V0LayerParameter::clear_scale() {
  scale_ = 1;
  clear_has_scale();
}
float V0LayerParameter::scale() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.scale)
  return scale_;
}
void V0LayerParameter::set_scale(float value) {
  set_has_scale();
  scale_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.scale)
}

// optional string meanfile = 18;
bool V0LayerParameter::has_meanfile() const {
  return (_has_bits_[0] & 0x00040000u) != 0;
}
void V0LayerParameter::set_has_meanfile() {
  _has_bits_[0] |= 0x00040000u;
}
void V0LayerParameter::clear_has_meanfile() {
  _has_bits_[0] &= ~0x00040000u;
}
void V0LayerParameter::clear_meanfile() {
  meanfile_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_meanfile();
}
const ::std::string& V0LayerParameter::meanfile() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.meanfile)
  return meanfile_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void V0LayerParameter::set_meanfile(const ::std::string& value) {
  set_has_meanfile();
  meanfile_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.meanfile)
}
void V0LayerParameter::set_meanfile(const char* value) {
  set_has_meanfile();
  meanfile_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.V0LayerParameter.meanfile)
}
void V0LayerParameter::set_meanfile(const char* value, size_t size) {
  set_has_meanfile();
  meanfile_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.V0LayerParameter.meanfile)
}
::std::string* V0LayerParameter::mutable_meanfile() {
  set_has_meanfile();
  // @@protoc_insertion_point(field_mutable:caffe.V0LayerParameter.meanfile)
  return meanfile_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* V0LayerParameter::release_meanfile() {
  // @@protoc_insertion_point(field_release:caffe.V0LayerParameter.meanfile)
  clear_has_meanfile();
  return meanfile_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void V0LayerParameter::set_allocated_meanfile(::std::string* meanfile) {
  if (meanfile != NULL) {
    set_has_meanfile();
  } else {
    clear_has_meanfile();
  }
  meanfile_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), meanfile);
  // @@protoc_insertion_point(field_set_allocated:caffe.V0LayerParameter.meanfile)
}

// optional uint32 batchsize = 19;
bool V0LayerParameter::has_batchsize() const {
  return (_has_bits_[0] & 0x00080000u) != 0;
}
void V0LayerParameter::set_has_batchsize() {
  _has_bits_[0] |= 0x00080000u;
}
void V0LayerParameter::clear_has_batchsize() {
  _has_bits_[0] &= ~0x00080000u;
}
void V0LayerParameter::clear_batchsize() {
  batchsize_ = 0u;
  clear_has_batchsize();
}
::google::protobuf::uint32 V0LayerParameter::batchsize() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.batchsize)
  return batchsize_;
}
void V0LayerParameter::set_batchsize(::google::protobuf::uint32 value) {
  set_has_batchsize();
  batchsize_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.batchsize)
}

// optional uint32 cropsize = 20 [default = 0];
bool V0LayerParameter::has_cropsize() const {
  return (_has_bits_[0] & 0x00100000u) != 0;
}
void V0LayerParameter::set_has_cropsize() {
  _has_bits_[0] |= 0x00100000u;
}
void V0LayerParameter::clear_has_cropsize() {
  _has_bits_[0] &= ~0x00100000u;
}
void V0LayerParameter::clear_cropsize() {
  cropsize_ = 0u;
  clear_has_cropsize();
}
::google::protobuf::uint32 V0LayerParameter::cropsize() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.cropsize)
  return cropsize_;
}
void V0LayerParameter::set_cropsize(::google::protobuf::uint32 value) {
  set_has_cropsize();
  cropsize_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.cropsize)
}

// optional bool mirror = 21 [default = false];
bool V0LayerParameter::has_mirror() const {
  return (_has_bits_[0] & 0x00200000u) != 0;
}
void V0LayerParameter::set_has_mirror() {
  _has_bits_[0] |= 0x00200000u;
}
void V0LayerParameter::clear_has_mirror() {
  _has_bits_[0] &= ~0x00200000u;
}
void V0LayerParameter::clear_mirror() {
  mirror_ = false;
  clear_has_mirror();
}
bool V0LayerParameter::mirror() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.mirror)
  return mirror_;
}
void V0LayerParameter::set_mirror(bool value) {
  set_has_mirror();
  mirror_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.mirror)
}

// repeated .caffe.BlobProto blobs = 50;
int V0LayerParameter::blobs_size() const {
  return blobs_.size();
}
void V0LayerParameter::clear_blobs() {
  blobs_.Clear();
}
const ::caffe::BlobProto& V0LayerParameter::blobs(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.blobs)
  return blobs_.Get(index);
}
::caffe::BlobProto* V0LayerParameter::mutable_blobs(int index) {
  // @@protoc_insertion_point(field_mutable:caffe.V0LayerParameter.blobs)
  return blobs_.Mutable(index);
}
::caffe::BlobProto* V0LayerParameter::add_blobs() {
  // @@protoc_insertion_point(field_add:caffe.V0LayerParameter.blobs)
  return blobs_.Add();
}
::google::protobuf::RepeatedPtrField< ::caffe::BlobProto >*
V0LayerParameter::mutable_blobs() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V0LayerParameter.blobs)
  return &blobs_;
}
const ::google::protobuf::RepeatedPtrField< ::caffe::BlobProto >&
V0LayerParameter::blobs() const {
  // @@protoc_insertion_point(field_list:caffe.V0LayerParameter.blobs)
  return blobs_;
}

// repeated float blobs_lr = 51;
int V0LayerParameter::blobs_lr_size() const {
  return blobs_lr_.size();
}
void V0LayerParameter::clear_blobs_lr() {
  blobs_lr_.Clear();
}
float V0LayerParameter::blobs_lr(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.blobs_lr)
  return blobs_lr_.Get(index);
}
void V0LayerParameter::set_blobs_lr(int index, float value) {
  blobs_lr_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.blobs_lr)
}
void V0LayerParameter::add_blobs_lr(float value) {
  blobs_lr_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.V0LayerParameter.blobs_lr)
}
const ::google::protobuf::RepeatedField< float >&
V0LayerParameter::blobs_lr() const {
  // @@protoc_insertion_point(field_list:caffe.V0LayerParameter.blobs_lr)
  return blobs_lr_;
}
::google::protobuf::RepeatedField< float >*
V0LayerParameter::mutable_blobs_lr() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V0LayerParameter.blobs_lr)
  return &blobs_lr_;
}

// repeated float weight_decay = 52;
int V0LayerParameter::weight_decay_size() const {
  return weight_decay_.size();
}
void V0LayerParameter::clear_weight_decay() {
  weight_decay_.Clear();
}
float V0LayerParameter::weight_decay(int index) const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.weight_decay)
  return weight_decay_.Get(index);
}
void V0LayerParameter::set_weight_decay(int index, float value) {
  weight_decay_.Set(index, value);
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.weight_decay)
}
void V0LayerParameter::add_weight_decay(float value) {
  weight_decay_.Add(value);
  // @@protoc_insertion_point(field_add:caffe.V0LayerParameter.weight_decay)
}
const ::google::protobuf::RepeatedField< float >&
V0LayerParameter::weight_decay() const {
  // @@protoc_insertion_point(field_list:caffe.V0LayerParameter.weight_decay)
  return weight_decay_;
}
::google::protobuf::RepeatedField< float >*
V0LayerParameter::mutable_weight_decay() {
  // @@protoc_insertion_point(field_mutable_list:caffe.V0LayerParameter.weight_decay)
  return &weight_decay_;
}

// optional uint32 rand_skip = 53 [default = 0];
bool V0LayerParameter::has_rand_skip() const {
  return (_has_bits_[0] & 0x02000000u) != 0;
}
void V0LayerParameter::set_has_rand_skip() {
  _has_bits_[0] |= 0x02000000u;
}
void V0LayerParameter::clear_has_rand_skip() {
  _has_bits_[0] &= ~0x02000000u;
}
void V0LayerParameter::clear_rand_skip() {
  rand_skip_ = 0u;
  clear_has_rand_skip();
}
::google::protobuf::uint32 V0LayerParameter::rand_skip() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.rand_skip)
  return rand_skip_;
}
void V0LayerParameter::set_rand_skip(::google::protobuf::uint32 value) {
  set_has_rand_skip();
  rand_skip_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.rand_skip)
}

// optional float det_fg_threshold = 54 [default = 0.5];
bool V0LayerParameter::has_det_fg_threshold() const {
  return (_has_bits_[0] & 0x04000000u) != 0;
}
void V0LayerParameter::set_has_det_fg_threshold() {
  _has_bits_[0] |= 0x04000000u;
}
void V0LayerParameter::clear_has_det_fg_threshold() {
  _has_bits_[0] &= ~0x04000000u;
}
void V0LayerParameter::clear_det_fg_threshold() {
  det_fg_threshold_ = 0.5f;
  clear_has_det_fg_threshold();
}
float V0LayerParameter::det_fg_threshold() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.det_fg_threshold)
  return det_fg_threshold_;
}
void V0LayerParameter::set_det_fg_threshold(float value) {
  set_has_det_fg_threshold();
  det_fg_threshold_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.det_fg_threshold)
}

// optional float det_bg_threshold = 55 [default = 0.5];
bool V0LayerParameter::has_det_bg_threshold() const {
  return (_has_bits_[0] & 0x08000000u) != 0;
}
void V0LayerParameter::set_has_det_bg_threshold() {
  _has_bits_[0] |= 0x08000000u;
}
void V0LayerParameter::clear_has_det_bg_threshold() {
  _has_bits_[0] &= ~0x08000000u;
}
void V0LayerParameter::clear_det_bg_threshold() {
  det_bg_threshold_ = 0.5f;
  clear_has_det_bg_threshold();
}
float V0LayerParameter::det_bg_threshold() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.det_bg_threshold)
  return det_bg_threshold_;
}
void V0LayerParameter::set_det_bg_threshold(float value) {
  set_has_det_bg_threshold();
  det_bg_threshold_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.det_bg_threshold)
}

// optional float det_fg_fraction = 56 [default = 0.25];
bool V0LayerParameter::has_det_fg_fraction() const {
  return (_has_bits_[0] & 0x10000000u) != 0;
}
void V0LayerParameter::set_has_det_fg_fraction() {
  _has_bits_[0] |= 0x10000000u;
}
void V0LayerParameter::clear_has_det_fg_fraction() {
  _has_bits_[0] &= ~0x10000000u;
}
void V0LayerParameter::clear_det_fg_fraction() {
  det_fg_fraction_ = 0.25f;
  clear_has_det_fg_fraction();
}
float V0LayerParameter::det_fg_fraction() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.det_fg_fraction)
  return det_fg_fraction_;
}
void V0LayerParameter::set_det_fg_fraction(float value) {
  set_has_det_fg_fraction();
  det_fg_fraction_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.det_fg_fraction)
}

// optional uint32 det_context_pad = 58 [default = 0];
bool V0LayerParameter::has_det_context_pad() const {
  return (_has_bits_[0] & 0x20000000u) != 0;
}
void V0LayerParameter::set_has_det_context_pad() {
  _has_bits_[0] |= 0x20000000u;
}
void V0LayerParameter::clear_has_det_context_pad() {
  _has_bits_[0] &= ~0x20000000u;
}
void V0LayerParameter::clear_det_context_pad() {
  det_context_pad_ = 0u;
  clear_has_det_context_pad();
}
::google::protobuf::uint32 V0LayerParameter::det_context_pad() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.det_context_pad)
  return det_context_pad_;
}
void V0LayerParameter::set_det_context_pad(::google::protobuf::uint32 value) {
  set_has_det_context_pad();
  det_context_pad_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.det_context_pad)
}

// optional string det_crop_mode = 59 [default = "warp"];
bool V0LayerParameter::has_det_crop_mode() const {
  return (_has_bits_[0] & 0x40000000u) != 0;
}
void V0LayerParameter::set_has_det_crop_mode() {
  _has_bits_[0] |= 0x40000000u;
}
void V0LayerParameter::clear_has_det_crop_mode() {
  _has_bits_[0] &= ~0x40000000u;
}
void V0LayerParameter::clear_det_crop_mode() {
  det_crop_mode_.ClearToDefaultNoArena(_default_det_crop_mode_);
  clear_has_det_crop_mode();
}
const ::std::string& V0LayerParameter::det_crop_mode() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.det_crop_mode)
  return det_crop_mode_.GetNoArena(_default_det_crop_mode_);
}
void V0LayerParameter::set_det_crop_mode(const ::std::string& value) {
  set_has_det_crop_mode();
  det_crop_mode_.SetNoArena(_default_det_crop_mode_, value);
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.det_crop_mode)
}
void V0LayerParameter::set_det_crop_mode(const char* value) {
  set_has_det_crop_mode();
  det_crop_mode_.SetNoArena(_default_det_crop_mode_, ::std::string(value));
  // @@protoc_insertion_point(field_set_char:caffe.V0LayerParameter.det_crop_mode)
}
void V0LayerParameter::set_det_crop_mode(const char* value, size_t size) {
  set_has_det_crop_mode();
  det_crop_mode_.SetNoArena(_default_det_crop_mode_,
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:caffe.V0LayerParameter.det_crop_mode)
}
::std::string* V0LayerParameter::mutable_det_crop_mode() {
  set_has_det_crop_mode();
  // @@protoc_insertion_point(field_mutable:caffe.V0LayerParameter.det_crop_mode)
  return det_crop_mode_.MutableNoArena(_default_det_crop_mode_);
}
::std::string* V0LayerParameter::release_det_crop_mode() {
  // @@protoc_insertion_point(field_release:caffe.V0LayerParameter.det_crop_mode)
  clear_has_det_crop_mode();
  return det_crop_mode_.ReleaseNoArena(_default_det_crop_mode_);
}
void V0LayerParameter::set_allocated_det_crop_mode(::std::string* det_crop_mode) {
  if (det_crop_mode != NULL) {
    set_has_det_crop_mode();
  } else {
    clear_has_det_crop_mode();
  }
  det_crop_mode_.SetAllocatedNoArena(_default_det_crop_mode_, det_crop_mode);
  // @@protoc_insertion_point(field_set_allocated:caffe.V0LayerParameter.det_crop_mode)
}

// optional int32 new_num = 60 [default = 0];
bool V0LayerParameter::has_new_num() const {
  return (_has_bits_[0] & 0x80000000u) != 0;
}
void V0LayerParameter::set_has_new_num() {
  _has_bits_[0] |= 0x80000000u;
}
void V0LayerParameter::clear_has_new_num() {
  _has_bits_[0] &= ~0x80000000u;
}
void V0LayerParameter::clear_new_num() {
  new_num_ = 0;
  clear_has_new_num();
}
::google::protobuf::int32 V0LayerParameter::new_num() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.new_num)
  return new_num_;
}
void V0LayerParameter::set_new_num(::google::protobuf::int32 value) {
  set_has_new_num();
  new_num_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.new_num)
}

// optional int32 new_channels = 61 [default = 0];
bool V0LayerParameter::has_new_channels() const {
  return (_has_bits_[1] & 0x00000001u) != 0;
}
void V0LayerParameter::set_has_new_channels() {
  _has_bits_[1] |= 0x00000001u;
}
void V0LayerParameter::clear_has_new_channels() {
  _has_bits_[1] &= ~0x00000001u;
}
void V0LayerParameter::clear_new_channels() {
  new_channels_ = 0;
  clear_has_new_channels();
}
::google::protobuf::int32 V0LayerParameter::new_channels() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.new_channels)
  return new_channels_;
}
void V0LayerParameter::set_new_channels(::google::protobuf::int32 value) {
  set_has_new_channels();
  new_channels_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.new_channels)
}

// optional int32 new_height = 62 [default = 0];
bool V0LayerParameter::has_new_height() const {
  return (_has_bits_[1] & 0x00000002u) != 0;
}
void V0LayerParameter::set_has_new_height() {
  _has_bits_[1] |= 0x00000002u;
}
void V0LayerParameter::clear_has_new_height() {
  _has_bits_[1] &= ~0x00000002u;
}
void V0LayerParameter::clear_new_height() {
  new_height_ = 0;
  clear_has_new_height();
}
::google::protobuf::int32 V0LayerParameter::new_height() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.new_height)
  return new_height_;
}
void V0LayerParameter::set_new_height(::google::protobuf::int32 value) {
  set_has_new_height();
  new_height_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.new_height)
}

// optional int32 new_width = 63 [default = 0];
bool V0LayerParameter::has_new_width() const {
  return (_has_bits_[1] & 0x00000004u) != 0;
}
void V0LayerParameter::set_has_new_width() {
  _has_bits_[1] |= 0x00000004u;
}
void V0LayerParameter::clear_has_new_width() {
  _has_bits_[1] &= ~0x00000004u;
}
void V0LayerParameter::clear_new_width() {
  new_width_ = 0;
  clear_has_new_width();
}
::google::protobuf::int32 V0LayerParameter::new_width() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.new_width)
  return new_width_;
}
void V0LayerParameter::set_new_width(::google::protobuf::int32 value) {
  set_has_new_width();
  new_width_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.new_width)
}

// optional bool shuffle_images = 64 [default = false];
bool V0LayerParameter::has_shuffle_images() const {
  return (_has_bits_[1] & 0x00000008u) != 0;
}
void V0LayerParameter::set_has_shuffle_images() {
  _has_bits_[1] |= 0x00000008u;
}
void V0LayerParameter::clear_has_shuffle_images() {
  _has_bits_[1] &= ~0x00000008u;
}
void V0LayerParameter::clear_shuffle_images() {
  shuffle_images_ = false;
  clear_has_shuffle_images();
}
bool V0LayerParameter::shuffle_images() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.shuffle_images)
  return shuffle_images_;
}
void V0LayerParameter::set_shuffle_images(bool value) {
  set_has_shuffle_images();
  shuffle_images_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.shuffle_images)
}

// optional uint32 concat_dim = 65 [default = 1];
bool V0LayerParameter::has_concat_dim() const {
  return (_has_bits_[1] & 0x00000010u) != 0;
}
void V0LayerParameter::set_has_concat_dim() {
  _has_bits_[1] |= 0x00000010u;
}
void V0LayerParameter::clear_has_concat_dim() {
  _has_bits_[1] &= ~0x00000010u;
}
void V0LayerParameter::clear_concat_dim() {
  concat_dim_ = 1u;
  clear_has_concat_dim();
}
::google::protobuf::uint32 V0LayerParameter::concat_dim() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.concat_dim)
  return concat_dim_;
}
void V0LayerParameter::set_concat_dim(::google::protobuf::uint32 value) {
  set_has_concat_dim();
  concat_dim_ = value;
  // @@protoc_insertion_point(field_set:caffe.V0LayerParameter.concat_dim)
}

// optional .caffe.HDF5OutputParameter hdf5_output_param = 1001;
bool V0LayerParameter::has_hdf5_output_param() const {
  return (_has_bits_[1] & 0x00000020u) != 0;
}
void V0LayerParameter::set_has_hdf5_output_param() {
  _has_bits_[1] |= 0x00000020u;
}
void V0LayerParameter::clear_has_hdf5_output_param() {
  _has_bits_[1] &= ~0x00000020u;
}
void V0LayerParameter::clear_hdf5_output_param() {
  if (hdf5_output_param_ != NULL) hdf5_output_param_->::caffe::HDF5OutputParameter::Clear();
  clear_has_hdf5_output_param();
}
const ::caffe::HDF5OutputParameter& V0LayerParameter::hdf5_output_param() const {
  // @@protoc_insertion_point(field_get:caffe.V0LayerParameter.hdf5_output_param)
  return hdf5_output_param_ != NULL ? *hdf5_output_param_
                         : *::caffe::HDF5OutputParameter::internal_default_instance();
}
::caffe::HDF5OutputParameter* V0LayerParameter::mutable_hdf5_output_param() {
  set_has_hdf5_output_param();
  if (hdf5_output_param_ == NULL) {
    hdf5_output_param_ = new ::caffe::HDF5OutputParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.V0LayerParameter.hdf5_output_param)
  return hdf5_output_param_;
}
::caffe::HDF5OutputParameter* V0LayerParameter::release_hdf5_output_param() {
  // @@protoc_insertion_point(field_release:caffe.V0LayerParameter.hdf5_output_param)
  clear_has_hdf5_output_param();
  ::caffe::HDF5OutputParameter* temp = hdf5_output_param_;
  hdf5_output_param_ = NULL;
  return temp;
}
void V0LayerParameter::set_allocated_hdf5_output_param(::caffe::HDF5OutputParameter* hdf5_output_param) {
  delete hdf5_output_param_;
  hdf5_output_param_ = hdf5_output_param;
  if (hdf5_output_param) {
    set_has_hdf5_output_param();
  } else {
    clear_has_hdf5_output_param();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.V0LayerParameter.hdf5_output_param)
}

inline const V0LayerParameter* V0LayerParameter::internal_default_instance() {
  return &V0LayerParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int PReLUParameter::kFillerFieldNumber;
const int PReLUParameter::kChannelSharedFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

PReLUParameter::PReLUParameter()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.PReLUParameter)
}

void PReLUParameter::InitAsDefaultInstance() {
  filler_ = const_cast< ::caffe::FillerParameter*>(
      ::caffe::FillerParameter::internal_default_instance());
}

PReLUParameter::PReLUParameter(const PReLUParameter& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.PReLUParameter)
}

void PReLUParameter::SharedCtor() {
  _cached_size_ = 0;
  filler_ = NULL;
  channel_shared_ = false;
}

PReLUParameter::~PReLUParameter() {
  // @@protoc_insertion_point(destructor:caffe.PReLUParameter)
  SharedDtor();
}

void PReLUParameter::SharedDtor() {
  if (this != &PReLUParameter_default_instance_.get()) {
    delete filler_;
  }
}

void PReLUParameter::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* PReLUParameter::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return PReLUParameter_descriptor_;
}

const PReLUParameter& PReLUParameter::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<PReLUParameter> PReLUParameter_default_instance_;

PReLUParameter* PReLUParameter::New(::google::protobuf::Arena* arena) const {
  PReLUParameter* n = new PReLUParameter;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void PReLUParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.PReLUParameter)
  if (_has_bits_[0 / 32] & 3u) {
    if (has_filler()) {
      if (filler_ != NULL) filler_->::caffe::FillerParameter::Clear();
    }
    channel_shared_ = false;
  }
  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool PReLUParameter::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.PReLUParameter)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .caffe.FillerParameter filler = 1;
      case 1: {
        if (tag == 10) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_filler()));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(16)) goto parse_channel_shared;
        break;
      }

      // optional bool channel_shared = 2 [default = false];
      case 2: {
        if (tag == 16) {
         parse_channel_shared:
          set_has_channel_shared();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &channel_shared_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.PReLUParameter)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.PReLUParameter)
  return false;
#undef DO_
}

void PReLUParameter::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.PReLUParameter)
  // optional .caffe.FillerParameter filler = 1;
  if (has_filler()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1, *this->filler_, output);
  }

  // optional bool channel_shared = 2 [default = false];
  if (has_channel_shared()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->channel_shared(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.PReLUParameter)
}

::google::protobuf::uint8* PReLUParameter::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.PReLUParameter)
  // optional .caffe.FillerParameter filler = 1;
  if (has_filler()) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageNoVirtualToArray(
        1, *this->filler_, false, target);
  }

  // optional bool channel_shared = 2 [default = false];
  if (has_channel_shared()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(2, this->channel_shared(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 3u) {
    // optional .caffe.FillerParameter filler = 1;
    if (has_filler()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->filler_);
    }

    // optional bool channel_shared = 2 [default = false];
    if (has_channel_shared()) {
      total_size += 1 + 1;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void PReLUParameter::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.PReLUParameter)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const PReLUParameter* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const PReLUParameter>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.PReLUParameter)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.PReLUParameter)
    UnsafeMergeFrom(*source);
  }
}

void PReLUParameter::MergeFrom(const PReLUParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.PReLUParameter)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void PReLUParameter::UnsafeMergeFrom(const PReLUParameter& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_filler()) {
      mutable_filler()->::caffe::FillerParameter::MergeFrom(from.filler());
    }
    if (from.has_channel_shared()) {
      set_channel_shared(from.channel_shared());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void PReLUParameter::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.PReLUParameter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool PReLUParameter::IsInitialized() const {

  return true;
}

void PReLUParameter::Swap(PReLUParameter* other) {
  if (other == this) return;
  InternalSwap(other);
}
void PReLUParameter::InternalSwap(PReLUParameter* other) {
  std::swap(filler_, other->filler_);
  std::swap(channel_shared_, other->channel_shared_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata PReLUParameter::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = PReLUParameter_descriptor_;
  metadata.reflection = PReLUParameter_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// PReLUParameter

// optional .caffe.FillerParameter filler = 1;
bool PReLUParameter::has_filler() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void PReLUParameter::set_has_filler() {
  _has_bits_[0] |= 0x00000001u;
}
void PReLUParameter::clear_has_filler() {
  _has_bits_[0] &= ~0x00000001u;
}
void PReLUParameter::clear_filler() {
  if (filler_ != NULL) filler_->::caffe::FillerParameter::Clear();
  clear_has_filler();
}
const ::caffe::FillerParameter& PReLUParameter::filler() const {
  // @@protoc_insertion_point(field_get:caffe.PReLUParameter.filler)
  return filler_ != NULL ? *filler_
                         : *::caffe::FillerParameter::internal_default_instance();
}
::caffe::FillerParameter* PReLUParameter::mutable_filler() {
  set_has_filler();
  if (filler_ == NULL) {
    filler_ = new ::caffe::FillerParameter;
  }
  // @@protoc_insertion_point(field_mutable:caffe.PReLUParameter.filler)
  return filler_;
}
::caffe::FillerParameter* PReLUParameter::release_filler() {
  // @@protoc_insertion_point(field_release:caffe.PReLUParameter.filler)
  clear_has_filler();
  ::caffe::FillerParameter* temp = filler_;
  filler_ = NULL;
  return temp;
}
void PReLUParameter::set_allocated_filler(::caffe::FillerParameter* filler) {
  delete filler_;
  filler_ = filler;
  if (filler) {
    set_has_filler();
  } else {
    clear_has_filler();
  }
  // @@protoc_insertion_point(field_set_allocated:caffe.PReLUParameter.filler)
}

// optional bool channel_shared = 2 [default = false];
bool PReLUParameter::has_channel_shared() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void PReLUParameter::set_has_channel_shared() {
  _has_bits_[0] |= 0x00000002u;
}
void PReLUParameter::clear_has_channel_shared() {
  _has_bits_[0] &= ~0x00000002u;
}
void PReLUParameter::clear_channel_shared() {
  channel_shared_ = false;
  clear_has_channel_shared();
}
bool PReLUParameter::channel_shared() const {
  // @@protoc_insertion_point(field_get:caffe.PReLUParameter.channel_shared)
  return channel_shared_;
}
void PReLUParameter::set_channel_shared(bool value) {
  set_has_channel_shared();
  channel_shared_ = value;
  // @@protoc_insertion_point(field_set:caffe.PReLUParameter.channel_shared)
}

inline const PReLUParameter* PReLUParameter::internal_default_instance() {
  return &PReLUParameter_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

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

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int NormalizedBBox::kXminFieldNumber;
const int NormalizedBBox::kYminFieldNumber;
const int NormalizedBBox::kXmaxFieldNumber;
const int NormalizedBBox::kYmaxFieldNumber;
const int NormalizedBBox::kLabelFieldNumber;
const int NormalizedBBox::kDifficultFieldNumber;
const int NormalizedBBox::kScoreFieldNumber;
const int NormalizedBBox::kSizeFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

NormalizedBBox::NormalizedBBox()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  if (this != internal_default_instance()) protobuf_InitDefaults_caffe_2eproto();
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe.NormalizedBBox)
}

void NormalizedBBox::InitAsDefaultInstance() {
}

NormalizedBBox::NormalizedBBox(const NormalizedBBox& from)
  : ::google::protobuf::Message(),
    _internal_metadata_(NULL) {
  SharedCtor();
  UnsafeMergeFrom(from);
  // @@protoc_insertion_point(copy_constructor:caffe.NormalizedBBox)
}

void NormalizedBBox::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&xmin_, 0, reinterpret_cast<char*>(&size_) -
    reinterpret_cast<char*>(&xmin_) + sizeof(size_));
}

NormalizedBBox::~NormalizedBBox() {
  // @@protoc_insertion_point(destructor:caffe.NormalizedBBox)
  SharedDtor();
}

void NormalizedBBox::SharedDtor() {
}

void NormalizedBBox::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* NormalizedBBox::descriptor() {
  protobuf_AssignDescriptorsOnce();
  return NormalizedBBox_descriptor_;
}

const NormalizedBBox& NormalizedBBox::default_instance() {
  protobuf_InitDefaults_caffe_2eproto();
  return *internal_default_instance();
}

::google::protobuf::internal::ExplicitlyConstructed<NormalizedBBox> NormalizedBBox_default_instance_;

NormalizedBBox* NormalizedBBox::New(::google::protobuf::Arena* arena) const {
  NormalizedBBox* n = new NormalizedBBox;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void NormalizedBBox::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe.NormalizedBBox)
#if defined(__clang__)
#define ZR_HELPER_(f) \
  _Pragma("clang diagnostic push") \
  _Pragma("clang diagnostic ignored \"-Winvalid-offsetof\"") \
  __builtin_offsetof(NormalizedBBox, f) \
  _Pragma("clang diagnostic pop")
#else
#define ZR_HELPER_(f) reinterpret_cast<char*>(\
  &reinterpret_cast<NormalizedBBox*>(16)->f)
#endif

#define ZR_(first, last) do {\
  ::memset(&(first), 0,\
           ZR_HELPER_(last) - ZR_HELPER_(first) + sizeof(last));\
} while (0)

  ZR_(xmin_, size_);

#undef ZR_HELPER_
#undef ZR_

  _has_bits_.Clear();
  if (_internal_metadata_.have_unknown_fields()) {
    mutable_unknown_fields()->Clear();
  }
}

bool NormalizedBBox::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe.NormalizedBBox)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float xmin = 1;
      case 1: {
        if (tag == 13) {
          set_has_xmin();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &xmin_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(21)) goto parse_ymin;
        break;
      }

      // optional float ymin = 2;
      case 2: {
        if (tag == 21) {
         parse_ymin:
          set_has_ymin();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &ymin_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(29)) goto parse_xmax;
        break;
      }

      // optional float xmax = 3;
      case 3: {
        if (tag == 29) {
         parse_xmax:
          set_has_xmax();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &xmax_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(37)) goto parse_ymax;
        break;
      }

      // optional float ymax = 4;
      case 4: {
        if (tag == 37) {
         parse_ymax:
          set_has_ymax();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &ymax_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(40)) goto parse_label;
        break;
      }

      // optional int32 label = 5;
      case 5: {
        if (tag == 40) {
         parse_label:
          set_has_label();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &label_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(48)) goto parse_difficult;
        break;
      }

      // optional bool difficult = 6;
      case 6: {
        if (tag == 48) {
         parse_difficult:
          set_has_difficult();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &difficult_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(61)) goto parse_score;
        break;
      }

      // optional float score = 7;
      case 7: {
        if (tag == 61) {
         parse_score:
          set_has_score();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &score_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectTag(69)) goto parse_size;
        break;
      }

      // optional float size = 8;
      case 8: {
        if (tag == 69) {
         parse_size:
          set_has_size();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &size_)));
        } else {
          goto handle_unusual;
        }
        if (input->ExpectAtEnd()) goto success;
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe.NormalizedBBox)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe.NormalizedBBox)
  return false;
#undef DO_
}

void NormalizedBBox::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe.NormalizedBBox)
  // optional float xmin = 1;
  if (has_xmin()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->xmin(), output);
  }

  // optional float ymin = 2;
  if (has_ymin()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->ymin(), output);
  }

  // optional float xmax = 3;
  if (has_xmax()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->xmax(), output);
  }

  // optional float ymax = 4;
  if (has_ymax()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->ymax(), output);
  }

  // optional int32 label = 5;
  if (has_label()) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->label(), output);
  }

  // optional bool difficult = 6;
  if (has_difficult()) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->difficult(), output);
  }

  // optional float score = 7;
  if (has_score()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->score(), output);
  }

  // optional float size = 8;
  if (has_size()) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(8, this->size(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe.NormalizedBBox)
}

::google::protobuf::uint8* NormalizedBBox::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe.NormalizedBBox)
  // optional float xmin = 1;
  if (has_xmin()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->xmin(), target);
  }

  // optional float ymin = 2;
  if (has_ymin()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->ymin(), target);
  }

  // optional float xmax = 3;
  if (has_xmax()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->xmax(), target);
  }

  // optional float ymax = 4;
  if (has_ymax()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->ymax(), target);
  }

  // optional int32 label = 5;
  if (has_label()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(5, this->label(), target);
  }

  // optional bool difficult = 6;
  if (has_difficult()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->difficult(), target);
  }

  // optional float score = 7;
  if (has_score()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->score(), target);
  }

  // optional float size = 8;
  if (has_size()) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(8, this->size(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        unknown_fields(), target);
  }
  // @@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;

  if (_has_bits_[0 / 32] & 255u) {
    // optional float xmin = 1;
    if (has_xmin()) {
      total_size += 1 + 4;
    }

    // optional float ymin = 2;
    if (has_ymin()) {
      total_size += 1 + 4;
    }

    // optional float xmax = 3;
    if (has_xmax()) {
      total_size += 1 + 4;
    }

    // optional float ymax = 4;
    if (has_ymax()) {
      total_size += 1 + 4;
    }

    // optional int32 label = 5;
    if (has_label()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->label());
    }

    // optional bool difficult = 6;
    if (has_difficult()) {
      total_size += 1 + 1;
    }

    // optional float score = 7;
    if (has_score()) {
      total_size += 1 + 4;
    }

    // optional float size = 8;
    if (has_size()) {
      total_size += 1 + 4;
    }

  }
  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        unknown_fields());
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void NormalizedBBox::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe.NormalizedBBox)
  if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
  const NormalizedBBox* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const NormalizedBBox>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe.NormalizedBBox)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe.NormalizedBBox)
    UnsafeMergeFrom(*source);
  }
}

void NormalizedBBox::MergeFrom(const NormalizedBBox& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe.NormalizedBBox)
  if (GOOGLE_PREDICT_TRUE(&from != this)) {
    UnsafeMergeFrom(from);
  } else {
    MergeFromFail(__LINE__);
  }
}

void NormalizedBBox::UnsafeMergeFrom(const NormalizedBBox& from) {
  GOOGLE_DCHECK(&from != this);
  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
    if (from.has_xmin()) {
      set_xmin(from.xmin());
    }
    if (from.has_ymin()) {
      set_ymin(from.ymin());
    }
    if (from.has_xmax()) {
      set_xmax(from.xmax());
    }
    if (from.has_ymax()) {
      set_ymax(from.ymax());
    }
    if (from.has_label()) {
      set_label(from.label());
    }
    if (from.has_difficult()) {
      set_difficult(from.difficult());
    }
    if (from.has_score()) {
      set_score(from.score());
    }
    if (from.has_size()) {
      set_size(from.size());
    }
  }
  if (from._internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::UnknownFieldSet::MergeToInternalMetdata(
      from.unknown_fields(), &_internal_metadata_);
  }
}

void NormalizedBBox::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe.NormalizedBBox)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool NormalizedBBox::IsInitialized() const {

  return true;
}

void NormalizedBBox::Swap(NormalizedBBox* other) {
  if (other == this) return;
  InternalSwap(other);
}
void NormalizedBBox::InternalSwap(NormalizedBBox* other) {
  std::swap(xmin_, other->xmin_);
  std::swap(ymin_, other->ymin_);
  std::swap(xmax_, other->xmax_);
  std::swap(ymax_, other->ymax_);
  std::swap(label_, other->label_);
  std::swap(difficult_, other->difficult_);
  std::swap(score_, other->score_);
  std::swap(size_, other->size_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::google::protobuf::Metadata NormalizedBBox::GetMetadata() const {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::Metadata metadata;
  metadata.descriptor = NormalizedBBox_descriptor_;
  metadata.reflection = NormalizedBBox_reflection_;
  return metadata;
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// NormalizedBBox

// optional float xmin = 1;
bool NormalizedBBox::has_xmin() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void NormalizedBBox::set_has_xmin() {
  _has_bits_[0] |= 0x00000001u;
}
void NormalizedBBox::clear_has_xmin() {
  _has_bits_[0] &= ~0x00000001u;
}
void NormalizedBBox::clear_xmin() {
  xmin_ = 0;
  clear_has_xmin();
}
float NormalizedBBox::xmin() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizedBBox.xmin)
  return xmin_;
}
void NormalizedBBox::set_xmin(float value) {
  set_has_xmin();
  xmin_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizedBBox.xmin)
}

// optional float ymin = 2;
bool NormalizedBBox::has_ymin() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void NormalizedBBox::set_has_ymin() {
  _has_bits_[0] |= 0x00000002u;
}
void NormalizedBBox::clear_has_ymin() {
  _has_bits_[0] &= ~0x00000002u;
}
void NormalizedBBox::clear_ymin() {
  ymin_ = 0;
  clear_has_ymin();
}
float NormalizedBBox::ymin() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizedBBox.ymin)
  return ymin_;
}
void NormalizedBBox::set_ymin(float value) {
  set_has_ymin();
  ymin_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizedBBox.ymin)
}

// optional float xmax = 3;
bool NormalizedBBox::has_xmax() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void NormalizedBBox::set_has_xmax() {
  _has_bits_[0] |= 0x00000004u;
}
void NormalizedBBox::clear_has_xmax() {
  _has_bits_[0] &= ~0x00000004u;
}
void NormalizedBBox::clear_xmax() {
  xmax_ = 0;
  clear_has_xmax();
}
float NormalizedBBox::xmax() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizedBBox.xmax)
  return xmax_;
}
void NormalizedBBox::set_xmax(float value) {
  set_has_xmax();
  xmax_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizedBBox.xmax)
}

// optional float ymax = 4;
bool NormalizedBBox::has_ymax() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void NormalizedBBox::set_has_ymax() {
  _has_bits_[0] |= 0x00000008u;
}
void NormalizedBBox::clear_has_ymax() {
  _has_bits_[0] &= ~0x00000008u;
}
void NormalizedBBox::clear_ymax() {
  ymax_ = 0;
  clear_has_ymax();
}
float NormalizedBBox::ymax() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizedBBox.ymax)
  return ymax_;
}
void NormalizedBBox::set_ymax(float value) {
  set_has_ymax();
  ymax_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizedBBox.ymax)
}

// optional int32 label = 5;
bool NormalizedBBox::has_label() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void NormalizedBBox::set_has_label() {
  _has_bits_[0] |= 0x00000010u;
}
void NormalizedBBox::clear_has_label() {
  _has_bits_[0] &= ~0x00000010u;
}
void NormalizedBBox::clear_label() {
  label_ = 0;
  clear_has_label();
}
::google::protobuf::int32 NormalizedBBox::label() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizedBBox.label)
  return label_;
}
void NormalizedBBox::set_label(::google::protobuf::int32 value) {
  set_has_label();
  label_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizedBBox.label)
}

// optional bool difficult = 6;
bool NormalizedBBox::has_difficult() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void NormalizedBBox::set_has_difficult() {
  _has_bits_[0] |= 0x00000020u;
}
void NormalizedBBox::clear_has_difficult() {
  _has_bits_[0] &= ~0x00000020u;
}
void NormalizedBBox::clear_difficult() {
  difficult_ = false;
  clear_has_difficult();
}
bool NormalizedBBox::difficult() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizedBBox.difficult)
  return difficult_;
}
void NormalizedBBox::set_difficult(bool value) {
  set_has_difficult();
  difficult_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizedBBox.difficult)
}

// optional float score = 7;
bool NormalizedBBox::has_score() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void NormalizedBBox::set_has_score() {
  _has_bits_[0] |= 0x00000040u;
}
void NormalizedBBox::clear_has_score() {
  _has_bits_[0] &= ~0x00000040u;
}
void NormalizedBBox::clear_score() {
  score_ = 0;
  clear_has_score();
}
float NormalizedBBox::score() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizedBBox.score)
  return score_;
}
void NormalizedBBox::set_score(float value) {
  set_has_score();
  score_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizedBBox.score)
}

// optional float size = 8;
bool NormalizedBBox::has_size() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
void NormalizedBBox::set_has_size() {
  _has_bits_[0] |= 0x00000080u;
}
void NormalizedBBox::clear_has_size() {
  _has_bits_[0] &= ~0x00000080u;
}
void NormalizedBBox::clear_size() {
  size_ = 0;
  clear_has_size();
}
float NormalizedBBox::size() const {
  // @@protoc_insertion_point(field_get:caffe.NormalizedBBox.size)
  return size_;
}
void NormalizedBBox::set_size(float value) {
  set_has_size();
  size_ = value;
  // @@protoc_insertion_point(field_set:caffe.NormalizedBBox.size)
}

inline const NormalizedBBox* NormalizedBBox::internal_default_instance() {
  return &NormalizedBBox_default_instance_.get();
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// @@protoc_insertion_point(namespace_scope)

}  // namespace caffe

// @@protoc_insertion_point(global_scope)
