Repository URL to install this package:
|
Version:
1.0.0-4 ▾
|
// 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/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* 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* 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::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* LayerParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
LayerParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* LayerParameter_LayerType_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* LayerParameter_DimCheckMode_descriptor_ = 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* MultiStageMeanfieldParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
MultiStageMeanfieldParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* MultiStageMeanfieldParameter_Mode_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* 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* 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* ReLUParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
ReLUParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* ReLUParameter_Engine_descriptor_ = 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* V0LayerParameter_descriptor_ = NULL;
const ::google::protobuf::internal::GeneratedMessageReflection*
V0LayerParameter_reflection_ = NULL;
const ::google::protobuf::EnumDescriptor* V0LayerParameter_PoolMethod_descriptor_ = NULL;
const ::google::protobuf::EnumDescriptor* Phase_descriptor_ = NULL;
} // namespace
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);
BlobProto_descriptor_ = file->message_type(0);
static const int BlobProto_offsets_[6] = {
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_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, data_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, diff_),
};
BlobProto_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
BlobProto_descriptor_,
BlobProto::default_instance_,
BlobProto_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProto, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(BlobProto));
BlobProtoVector_descriptor_ = file->message_type(1);
static const int BlobProtoVector_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProtoVector, blobs_),
};
BlobProtoVector_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
BlobProtoVector_descriptor_,
BlobProtoVector::default_instance_,
BlobProtoVector_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProtoVector, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(BlobProtoVector, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(BlobProtoVector));
Datum_descriptor_ = file->message_type(2);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
Datum_descriptor_,
Datum::default_instance_,
Datum_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(Datum, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(Datum));
FillerParameter_descriptor_ = file->message_type(3);
static const int FillerParameter_offsets_[7] = {
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_),
};
FillerParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
FillerParameter_descriptor_,
FillerParameter::default_instance_,
FillerParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FillerParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(FillerParameter));
NetParameter_descriptor_ = file->message_type(4);
static const int NetParameter_offsets_[6] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, layers_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, input_),
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_),
};
NetParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
NetParameter_descriptor_,
NetParameter::default_instance_,
NetParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(NetParameter));
SolverParameter_descriptor_ = file->message_type(5);
static const int SolverParameter_offsets_[35] = {
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, 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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
SolverParameter_descriptor_,
SolverParameter::default_instance_,
SolverParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(SolverParameter));
SolverParameter_SolverMode_descriptor_ = SolverParameter_descriptor_->enum_type(0);
SolverParameter_SolverType_descriptor_ = SolverParameter_descriptor_->enum_type(1);
SolverState_descriptor_ = file->message_type(6);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
SolverState_descriptor_,
SolverState::default_instance_,
SolverState_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverState, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SolverState, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(SolverState));
NetState_descriptor_ = file->message_type(7);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
NetState_descriptor_,
NetState::default_instance_,
NetState_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetState, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetState, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(NetState));
NetStateRule_descriptor_ = file->message_type(8);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
NetStateRule_descriptor_,
NetStateRule::default_instance_,
NetStateRule_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetStateRule, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(NetStateRule, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(NetStateRule));
LayerParameter_descriptor_ = file->message_type(9);
static const int LayerParameter_offsets_[44] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, bottom_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, top_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, name_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, include_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, exclude_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, type_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, blobs_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, param_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, blob_share_mode_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, blobs_lr_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, weight_decay_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, loss_weight_),
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, data_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, 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, lrn_param_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, multi_stage_meanfield_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, pooling_param_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, power_param_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, relu_param_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, sigmoid_param_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, softmax_param_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, slice_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_),
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, layer_),
};
LayerParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
LayerParameter_descriptor_,
LayerParameter::default_instance_,
LayerParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LayerParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(LayerParameter));
LayerParameter_LayerType_descriptor_ = LayerParameter_descriptor_->enum_type(0);
LayerParameter_DimCheckMode_descriptor_ = LayerParameter_descriptor_->enum_type(1);
TransformationParameter_descriptor_ = file->message_type(10);
static const int TransformationParameter_offsets_[5] = {
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_),
};
TransformationParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
TransformationParameter_descriptor_,
TransformationParameter::default_instance_,
TransformationParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TransformationParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(TransformationParameter));
LossParameter_descriptor_ = file->message_type(11);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
LossParameter_descriptor_,
LossParameter::default_instance_,
LossParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LossParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LossParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(LossParameter));
AccuracyParameter_descriptor_ = file->message_type(12);
static const int AccuracyParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AccuracyParameter, top_k_),
};
AccuracyParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
AccuracyParameter_descriptor_,
AccuracyParameter::default_instance_,
AccuracyParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AccuracyParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(AccuracyParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(AccuracyParameter));
ArgMaxParameter_descriptor_ = file->message_type(13);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ArgMaxParameter_descriptor_,
ArgMaxParameter::default_instance_,
ArgMaxParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArgMaxParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ArgMaxParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ArgMaxParameter));
ConcatParameter_descriptor_ = file->message_type(14);
static const int ConcatParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConcatParameter, concat_dim_),
};
ConcatParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ConcatParameter_descriptor_,
ConcatParameter::default_instance_,
ConcatParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConcatParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConcatParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ConcatParameter));
ContrastiveLossParameter_descriptor_ = file->message_type(15);
static const int ContrastiveLossParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContrastiveLossParameter, margin_),
};
ContrastiveLossParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ContrastiveLossParameter_descriptor_,
ContrastiveLossParameter::default_instance_,
ContrastiveLossParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContrastiveLossParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ContrastiveLossParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ContrastiveLossParameter));
ConvolutionParameter_descriptor_ = file->message_type(16);
static const int ConvolutionParameter_offsets_[15] = {
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_),
};
ConvolutionParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ConvolutionParameter_descriptor_,
ConvolutionParameter::default_instance_,
ConvolutionParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ConvolutionParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ConvolutionParameter));
ConvolutionParameter_Engine_descriptor_ = ConvolutionParameter_descriptor_->enum_type(0);
MultiStageMeanfieldParameter_descriptor_ = file->message_type(17);
static const int MultiStageMeanfieldParameter_offsets_[10] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, compatibility_mode_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, threshold_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, theta_alpha_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, theta_beta_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, theta_gamma_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, num_iterations_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, spatial_filter_weight_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, bilateral_filter_weight_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, forced_spatial_filter_weight_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, forced_bilateral_filter_weight_),
};
MultiStageMeanfieldParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
MultiStageMeanfieldParameter_descriptor_,
MultiStageMeanfieldParameter::default_instance_,
MultiStageMeanfieldParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MultiStageMeanfieldParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(MultiStageMeanfieldParameter));
MultiStageMeanfieldParameter_Mode_descriptor_ = MultiStageMeanfieldParameter_descriptor_->enum_type(0);
DataParameter_descriptor_ = file->message_type(18);
static const int DataParameter_offsets_[8] = {
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_),
};
DataParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
DataParameter_descriptor_,
DataParameter::default_instance_,
DataParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DataParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(DataParameter));
DataParameter_DB_descriptor_ = DataParameter_descriptor_->enum_type(0);
DropoutParameter_descriptor_ = file->message_type(19);
static const int DropoutParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DropoutParameter, dropout_ratio_),
};
DropoutParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
DropoutParameter_descriptor_,
DropoutParameter::default_instance_,
DropoutParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DropoutParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DropoutParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(DropoutParameter));
DummyDataParameter_descriptor_ = file->message_type(20);
static const int DummyDataParameter_offsets_[5] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, data_filler_),
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
DummyDataParameter_descriptor_,
DummyDataParameter::default_instance_,
DummyDataParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DummyDataParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(DummyDataParameter));
EltwiseParameter_descriptor_ = file->message_type(21);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
EltwiseParameter_descriptor_,
EltwiseParameter::default_instance_,
EltwiseParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EltwiseParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EltwiseParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(EltwiseParameter));
EltwiseParameter_EltwiseOp_descriptor_ = EltwiseParameter_descriptor_->enum_type(0);
ExpParameter_descriptor_ = file->message_type(22);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ExpParameter_descriptor_,
ExpParameter::default_instance_,
ExpParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExpParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExpParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ExpParameter));
HDF5DataParameter_descriptor_ = file->message_type(23);
static const int HDF5DataParameter_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5DataParameter, source_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5DataParameter, batch_size_),
};
HDF5DataParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
HDF5DataParameter_descriptor_,
HDF5DataParameter::default_instance_,
HDF5DataParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5DataParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5DataParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(HDF5DataParameter));
HDF5OutputParameter_descriptor_ = file->message_type(24);
static const int HDF5OutputParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5OutputParameter, file_name_),
};
HDF5OutputParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
HDF5OutputParameter_descriptor_,
HDF5OutputParameter::default_instance_,
HDF5OutputParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5OutputParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HDF5OutputParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(HDF5OutputParameter));
HingeLossParameter_descriptor_ = file->message_type(25);
static const int HingeLossParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HingeLossParameter, norm_),
};
HingeLossParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
HingeLossParameter_descriptor_,
HingeLossParameter::default_instance_,
HingeLossParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HingeLossParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(HingeLossParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(HingeLossParameter));
HingeLossParameter_Norm_descriptor_ = HingeLossParameter_descriptor_->enum_type(0);
ImageDataParameter_descriptor_ = file->message_type(26);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ImageDataParameter_descriptor_,
ImageDataParameter::default_instance_,
ImageDataParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ImageDataParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ImageDataParameter));
InfogainLossParameter_descriptor_ = file->message_type(27);
static const int InfogainLossParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InfogainLossParameter, source_),
};
InfogainLossParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
InfogainLossParameter_descriptor_,
InfogainLossParameter::default_instance_,
InfogainLossParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InfogainLossParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InfogainLossParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(InfogainLossParameter));
InnerProductParameter_descriptor_ = file->message_type(28);
static const int InnerProductParameter_offsets_[4] = {
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_),
};
InnerProductParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
InnerProductParameter_descriptor_,
InnerProductParameter::default_instance_,
InnerProductParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InnerProductParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(InnerProductParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(InnerProductParameter));
LRNParameter_descriptor_ = file->message_type(29);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
LRNParameter_descriptor_,
LRNParameter::default_instance_,
LRNParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LRNParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(LRNParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(LRNParameter));
LRNParameter_NormRegion_descriptor_ = LRNParameter_descriptor_->enum_type(0);
MemoryDataParameter_descriptor_ = file->message_type(30);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
MemoryDataParameter_descriptor_,
MemoryDataParameter::default_instance_,
MemoryDataParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MemoryDataParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MemoryDataParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(MemoryDataParameter));
MVNParameter_descriptor_ = file->message_type(31);
static const int MVNParameter_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MVNParameter, normalize_variance_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MVNParameter, across_channels_),
};
MVNParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
MVNParameter_descriptor_,
MVNParameter::default_instance_,
MVNParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MVNParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(MVNParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(MVNParameter));
PoolingParameter_descriptor_ = file->message_type(32);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
PoolingParameter_descriptor_,
PoolingParameter::default_instance_,
PoolingParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PoolingParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(PoolingParameter));
PoolingParameter_PoolMethod_descriptor_ = PoolingParameter_descriptor_->enum_type(0);
PoolingParameter_Engine_descriptor_ = PoolingParameter_descriptor_->enum_type(1);
PowerParameter_descriptor_ = file->message_type(33);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
PowerParameter_descriptor_,
PowerParameter::default_instance_,
PowerParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PowerParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(PowerParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(PowerParameter));
ReLUParameter_descriptor_ = file->message_type(34);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ReLUParameter_descriptor_,
ReLUParameter::default_instance_,
ReLUParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReLUParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ReLUParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ReLUParameter));
ReLUParameter_Engine_descriptor_ = ReLUParameter_descriptor_->enum_type(0);
SigmoidParameter_descriptor_ = file->message_type(35);
static const int SigmoidParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SigmoidParameter, engine_),
};
SigmoidParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
SigmoidParameter_descriptor_,
SigmoidParameter::default_instance_,
SigmoidParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SigmoidParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SigmoidParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(SigmoidParameter));
SigmoidParameter_Engine_descriptor_ = SigmoidParameter_descriptor_->enum_type(0);
SliceParameter_descriptor_ = file->message_type(36);
static const int SliceParameter_offsets_[2] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SliceParameter, slice_dim_),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SliceParameter, slice_point_),
};
SliceParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
SliceParameter_descriptor_,
SliceParameter::default_instance_,
SliceParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SliceParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SliceParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(SliceParameter));
SoftmaxParameter_descriptor_ = file->message_type(37);
static const int SoftmaxParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SoftmaxParameter, engine_),
};
SoftmaxParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
SoftmaxParameter_descriptor_,
SoftmaxParameter::default_instance_,
SoftmaxParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SoftmaxParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SoftmaxParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(SoftmaxParameter));
SoftmaxParameter_Engine_descriptor_ = SoftmaxParameter_descriptor_->enum_type(0);
TanHParameter_descriptor_ = file->message_type(38);
static const int TanHParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TanHParameter, engine_),
};
TanHParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
TanHParameter_descriptor_,
TanHParameter::default_instance_,
TanHParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TanHParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TanHParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(TanHParameter));
TanHParameter_Engine_descriptor_ = TanHParameter_descriptor_->enum_type(0);
ThresholdParameter_descriptor_ = file->message_type(39);
static const int ThresholdParameter_offsets_[1] = {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThresholdParameter, threshold_),
};
ThresholdParameter_reflection_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
ThresholdParameter_descriptor_,
ThresholdParameter::default_instance_,
ThresholdParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThresholdParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ThresholdParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(ThresholdParameter));
WindowDataParameter_descriptor_ = file->message_type(40);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
WindowDataParameter_descriptor_,
WindowDataParameter::default_instance_,
WindowDataParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(WindowDataParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(WindowDataParameter));
V0LayerParameter_descriptor_ = file->message_type(41);
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_ =
new ::google::protobuf::internal::GeneratedMessageReflection(
V0LayerParameter_descriptor_,
V0LayerParameter::default_instance_,
V0LayerParameter_offsets_,
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, _has_bits_[0]),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(V0LayerParameter, _unknown_fields_),
-1,
::google::protobuf::DescriptorPool::generated_pool(),
::google::protobuf::MessageFactory::generated_factory(),
sizeof(V0LayerParameter));
V0LayerParameter_PoolMethod_descriptor_ = V0LayerParameter_descriptor_->enum_type(0);
Phase_descriptor_ = file->enum_type(0);
}
namespace {
GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
inline void protobuf_AssignDescriptorsOnce() {
::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
&protobuf_AssignDesc_caffe_2eproto);
}
void protobuf_RegisterTypes(const ::std::string&) {
protobuf_AssignDescriptorsOnce();
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
BlobProto_descriptor_, &BlobProto::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
BlobProtoVector_descriptor_, &BlobProtoVector::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
Datum_descriptor_, &Datum::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
FillerParameter_descriptor_, &FillerParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
NetParameter_descriptor_, &NetParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
SolverParameter_descriptor_, &SolverParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
SolverState_descriptor_, &SolverState::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
NetState_descriptor_, &NetState::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
NetStateRule_descriptor_, &NetStateRule::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
LayerParameter_descriptor_, &LayerParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
TransformationParameter_descriptor_, &TransformationParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
LossParameter_descriptor_, &LossParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
AccuracyParameter_descriptor_, &AccuracyParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ArgMaxParameter_descriptor_, &ArgMaxParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ConcatParameter_descriptor_, &ConcatParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ContrastiveLossParameter_descriptor_, &ContrastiveLossParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ConvolutionParameter_descriptor_, &ConvolutionParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
MultiStageMeanfieldParameter_descriptor_, &MultiStageMeanfieldParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
DataParameter_descriptor_, &DataParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
DropoutParameter_descriptor_, &DropoutParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
DummyDataParameter_descriptor_, &DummyDataParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
EltwiseParameter_descriptor_, &EltwiseParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ExpParameter_descriptor_, &ExpParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
HDF5DataParameter_descriptor_, &HDF5DataParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
HDF5OutputParameter_descriptor_, &HDF5OutputParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
HingeLossParameter_descriptor_, &HingeLossParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ImageDataParameter_descriptor_, &ImageDataParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
InfogainLossParameter_descriptor_, &InfogainLossParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
InnerProductParameter_descriptor_, &InnerProductParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
LRNParameter_descriptor_, &LRNParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
MemoryDataParameter_descriptor_, &MemoryDataParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
MVNParameter_descriptor_, &MVNParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
PoolingParameter_descriptor_, &PoolingParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
PowerParameter_descriptor_, &PowerParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ReLUParameter_descriptor_, &ReLUParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
SigmoidParameter_descriptor_, &SigmoidParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
SliceParameter_descriptor_, &SliceParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
SoftmaxParameter_descriptor_, &SoftmaxParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
TanHParameter_descriptor_, &TanHParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
ThresholdParameter_descriptor_, &ThresholdParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
WindowDataParameter_descriptor_, &WindowDataParameter::default_instance());
::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
V0LayerParameter_descriptor_, &V0LayerParameter::default_instance());
}
} // namespace
void protobuf_ShutdownFile_caffe_2eproto() {
delete BlobProto::default_instance_;
delete BlobProto_reflection_;
delete BlobProtoVector::default_instance_;
delete BlobProtoVector_reflection_;
delete Datum::default_instance_;
delete Datum_reflection_;
delete FillerParameter::default_instance_;
delete FillerParameter_reflection_;
delete FillerParameter::_default_type_;
delete NetParameter::default_instance_;
delete NetParameter_reflection_;
delete SolverParameter::default_instance_;
delete SolverParameter_reflection_;
delete SolverParameter::_default_regularization_type_;
delete SolverState::default_instance_;
delete SolverState_reflection_;
delete NetState::default_instance_;
delete NetState_reflection_;
delete NetStateRule::default_instance_;
delete NetStateRule_reflection_;
delete LayerParameter::default_instance_;
delete LayerParameter_reflection_;
delete TransformationParameter::default_instance_;
delete TransformationParameter_reflection_;
delete LossParameter::default_instance_;
delete LossParameter_reflection_;
delete AccuracyParameter::default_instance_;
delete AccuracyParameter_reflection_;
delete ArgMaxParameter::default_instance_;
delete ArgMaxParameter_reflection_;
delete ConcatParameter::default_instance_;
delete ConcatParameter_reflection_;
delete ContrastiveLossParameter::default_instance_;
delete ContrastiveLossParameter_reflection_;
delete ConvolutionParameter::default_instance_;
delete ConvolutionParameter_reflection_;
delete MultiStageMeanfieldParameter::default_instance_;
delete MultiStageMeanfieldParameter_reflection_;
delete DataParameter::default_instance_;
delete DataParameter_reflection_;
delete DropoutParameter::default_instance_;
delete DropoutParameter_reflection_;
delete DummyDataParameter::default_instance_;
delete DummyDataParameter_reflection_;
delete EltwiseParameter::default_instance_;
delete EltwiseParameter_reflection_;
delete ExpParameter::default_instance_;
delete ExpParameter_reflection_;
delete HDF5DataParameter::default_instance_;
delete HDF5DataParameter_reflection_;
delete HDF5OutputParameter::default_instance_;
delete HDF5OutputParameter_reflection_;
delete HingeLossParameter::default_instance_;
delete HingeLossParameter_reflection_;
delete ImageDataParameter::default_instance_;
delete ImageDataParameter_reflection_;
delete InfogainLossParameter::default_instance_;
delete InfogainLossParameter_reflection_;
delete InnerProductParameter::default_instance_;
delete InnerProductParameter_reflection_;
delete LRNParameter::default_instance_;
delete LRNParameter_reflection_;
delete MemoryDataParameter::default_instance_;
delete MemoryDataParameter_reflection_;
delete MVNParameter::default_instance_;
delete MVNParameter_reflection_;
delete PoolingParameter::default_instance_;
delete PoolingParameter_reflection_;
delete PowerParameter::default_instance_;
delete PowerParameter_reflection_;
delete ReLUParameter::default_instance_;
delete ReLUParameter_reflection_;
delete SigmoidParameter::default_instance_;
delete SigmoidParameter_reflection_;
delete SliceParameter::default_instance_;
delete SliceParameter_reflection_;
delete SoftmaxParameter::default_instance_;
delete SoftmaxParameter_reflection_;
delete TanHParameter::default_instance_;
delete TanHParameter_reflection_;
delete ThresholdParameter::default_instance_;
delete ThresholdParameter_reflection_;
delete WindowDataParameter::default_instance_;
delete WindowDataParameter_reflection_;
delete WindowDataParameter::_default_crop_mode_;
delete V0LayerParameter::default_instance_;
delete V0LayerParameter_reflection_;
delete V0LayerParameter::_default_det_crop_mode_;
}
void protobuf_AddDesc_caffe_2eproto() {
static bool already_here = false;
if (already_here) return;
already_here = true;
GOOGLE_PROTOBUF_VERIFY_VERSION;
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
"\n\013caffe.proto\022\005caffe\"y\n\tBlobProto\022\016\n\003num"
"\030\001 \001(\005:\0010\022\023\n\010channels\030\002 \001(\005:\0010\022\021\n\006height"
"\030\003 \001(\005:\0010\022\020\n\005width\030\004 \001(\005:\0010\022\020\n\004data\030\005 \003("
"\002B\002\020\001\022\020\n\004diff\030\006 \003(\002B\002\020\001\"2\n\017BlobProtoVect"
"or\022\037\n\005blobs\030\001 \003(\0132\020.caffe.BlobProto\"\201\001\n\005"
"Datum\022\020\n\010channels\030\001 \001(\005\022\016\n\006height\030\002 \001(\005\022"
"\r\n\005width\030\003 \001(\005\022\014\n\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"
":\005false\"\220\001\n\017FillerParameter\022\026\n\004type\030\001 \001("
"\t:\010constant\022\020\n\005value\030\002 \001(\002:\0010\022\016\n\003min\030\003 \001"
"(\002:\0010\022\016\n\003max\030\004 \001(\002:\0011\022\017\n\004mean\030\005 \001(\002:\0010\022\016"
"\n\003std\030\006 \001(\002:\0011\022\022\n\006sparse\030\007 \001(\005:\002-1\"\244\001\n\014N"
"etParameter\022\014\n\004name\030\001 \001(\t\022%\n\006layers\030\002 \003("
"\0132\025.caffe.LayerParameter\022\r\n\005input\030\003 \003(\t\022"
"\021\n\tinput_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.NetStat"
"e\"\241\010\n\017SolverParameter\022\013\n\003net\030\030 \001(\t\022&\n\tne"
"t_param\030\031 \001(\0132\023.caffe.NetParameter\022\021\n\ttr"
"ain_net\030\001 \001(\t\022\020\n\010test_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.NetParamet"
"er\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_compute_loss\030\023 \001(\010:\005false\022!\n\023"
"test_initialization\030 \001(\010:\004true\022\017\n\007base_"
"lr\030\005 \001(\002\022\017\n\007display\030\006 \001(\005\022\027\n\014average_los"
"s\030! \001(\005:\0011\022\020\n\010max_iter\030\007 \001(\005\022\024\n\titer_siz"
"e\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_ty"
"pe\030\035 \001(\t:\002L2\022\020\n\010stepsize\030\r \001(\005\022\021\n\tstepva"
"lue\030\" \003(\005\022\023\n\010snapshot\030\016 \001(\005:\0010\022\027\n\017snapsh"
"ot_prefix\030\017 \001(\t\022\034\n\rsnapshot_diff\030\020 \001(\010:\005"
"false\022;\n\013solver_mode\030\021 \001(\0162!.caffe.Solve"
"rParameter.SolverMode:\003GPU\022\024\n\tdevice_id\030"
"\022 \001(\005:\0010\022\027\n\013random_seed\030\024 \001(\003:\002-1\022;\n\013sol"
"ver_type\030\036 \001(\0162!.caffe.SolverParameter.S"
"olverType:\003SGD\022\024\n\005delta\030\037 \001(\002:\0051e-08\022\031\n\n"
"debug_info\030\027 \001(\010:\005false\022\"\n\024snapshot_afte"
"r_train\030\034 \001(\010:\004true\"\036\n\nSolverMode\022\007\n\003CPU"
"\020\000\022\007\n\003GPU\020\001\"0\n\nSolverType\022\007\n\003SGD\020\000\022\014\n\010NE"
"STEROV\020\001\022\013\n\007ADAGRAD\020\002\"l\n\013SolverState\022\014\n\004"
"iter\030\001 \001(\005\022\023\n\013learned_net\030\002 \001(\t\022!\n\007histo"
"ry\030\003 \003(\0132\020.caffe.BlobProto\022\027\n\014current_st"
"ep\030\004 \001(\005:\0010\"N\n\010NetState\022!\n\005phase\030\001 \001(\0162\014"
".caffe.Phase:\004TEST\022\020\n\005level\030\002 \001(\005:\0010\022\r\n\005"
"stage\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\tm"
"ax_level\030\003 \001(\005\022\r\n\005stage\030\004 \003(\t\022\021\n\tnot_sta"
"ge\030\005 \003(\t\"\344\024\n\016LayerParameter\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\007includ"
"e\030 \003(\0132\023.caffe.NetStateRule\022$\n\007exclude\030"
"! \003(\0132\023.caffe.NetStateRule\022-\n\004type\030\005 \001(\016"
"2\037.caffe.LayerParameter.LayerType\022\037\n\005blo"
"bs\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.Lay"
"erParameter.DimCheckMode\022\020\n\010blobs_lr\030\007 \003"
"(\002\022\024\n\014weight_decay\030\010 \003(\002\022\023\n\013loss_weight\030"
"# \003(\002\0220\n\016accuracy_param\030\033 \001(\0132\030.caffe.Ac"
"curacyParameter\022,\n\014argmax_param\030\027 \001(\0132\026."
"caffe.ArgMaxParameter\022,\n\014concat_param\030\t "
"\001(\0132\026.caffe.ConcatParameter\022\?\n\026contrasti"
"ve_loss_param\030( \001(\0132\037.caffe.ContrastiveL"
"ossParameter\0226\n\021convolution_param\030\n \001(\0132"
"\033.caffe.ConvolutionParameter\022(\n\ndata_par"
"am\030\013 \001(\0132\024.caffe.DataParameter\022.\n\rdropou"
"t_param\030\014 \001(\0132\027.caffe.DropoutParameter\0223"
"\n\020dummy_data_param\030\032 \001(\0132\031.caffe.DummyDa"
"taParameter\022.\n\reltwise_param\030\030 \001(\0132\027.caf"
"fe.EltwiseParameter\022&\n\texp_param\030) \001(\0132\023"
".caffe.ExpParameter\0221\n\017hdf5_data_param\030\r"
" \001(\0132\030.caffe.HDF5DataParameter\0225\n\021hdf5_o"
"utput_param\030\016 \001(\0132\032.caffe.HDF5OutputPara"
"meter\0223\n\020hinge_loss_param\030\035 \001(\0132\031.caffe."
"HingeLossParameter\0223\n\020image_data_param\030\017"
" \001(\0132\031.caffe.ImageDataParameter\0229\n\023infog"
"ain_loss_param\030\020 \001(\0132\034.caffe.InfogainLos"
"sParameter\0229\n\023inner_product_param\030\021 \001(\0132"
"\034.caffe.InnerProductParameter\022&\n\tlrn_par"
"am\030\022 \001(\0132\023.caffe.LRNParameter\022H\n\033multi_s"
"tage_meanfield_param\030, \001(\0132#.caffe.Multi"
"StageMeanfieldParameter\0225\n\021memory_data_p"
"aram\030\026 \001(\0132\032.caffe.MemoryDataParameter\022&"
"\n\tmvn_param\030\" \001(\0132\023.caffe.MVNParameter\022."
"\n\rpooling_param\030\023 \001(\0132\027.caffe.PoolingPar"
"ameter\022*\n\013power_param\030\025 \001(\0132\025.caffe.Powe"
"rParameter\022(\n\nrelu_param\030\036 \001(\0132\024.caffe.R"
"eLUParameter\022.\n\rsigmoid_param\030& \001(\0132\027.ca"
"ffe.SigmoidParameter\022.\n\rsoftmax_param\030\' "
"\001(\0132\027.caffe.SoftmaxParameter\022*\n\013slice_pa"
"ram\030\037 \001(\0132\025.caffe.SliceParameter\022(\n\ntanh"
"_param\030% \001(\0132\024.caffe.TanHParameter\0222\n\017th"
"reshold_param\030\031 \001(\0132\031.caffe.ThresholdPar"
"ameter\0225\n\021window_data_param\030\024 \001(\0132\032.caff"
"e.WindowDataParameter\0227\n\017transform_param"
"\030$ \001(\0132\036.caffe.TransformationParameter\022("
"\n\nloss_param\030* \001(\0132\024.caffe.LossParameter"
"\022&\n\005layer\030\001 \001(\0132\027.caffe.V0LayerParameter"
"\"\230\005\n\tLayerType\022\010\n\004NONE\020\000\022\n\n\006ABSVAL\020#\022\014\n\010"
"ACCURACY\020\001\022\n\n\006ARGMAX\020\036\022\010\n\004BNLL\020\002\022\n\n\006CONC"
"AT\020\003\022\024\n\020CONTRASTIVE_LOSS\020%\022\017\n\013CONVOLUTIO"
"N\020\004\022\010\n\004CROP\020(\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\016EUCLI"
"DEAN_LOSS\020\007\022\013\n\007ELTWISE\020\031\022\007\n\003EXP\020&\022\013\n\007FLA"
"TTEN\020\010\022\r\n\tHDF5_DATA\020\t\022\017\n\013HDF5_OUTPUT\020\n\022\016"
"\n\nHINGE_LOSS\020\034\022\n\n\006IM2COL\020\013\022\016\n\nIMAGE_DATA"
"\020\014\022\021\n\rINFOGAIN_LOSS\020\r\022\021\n\rINNER_PRODUCT\020\016"
"\022\007\n\003LRN\020\017\022\017\n\013MEMORY_DATA\020\035\022\031\n\025MULTI_STAG"
"E_MEANFIELD\020*\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\031\n\025SIMPLE_FAST"
"_MEANFIELD\020)\022\013\n\007SOFTMAX\020\024\022\020\n\014SOFTMAX_LOS"
"S\020\025\022\t\n\005SPLIT\020\026\022\t\n\005SLICE\020!\022\010\n\004TANH\020\027\022\017\n\013W"
"INDOW_DATA\020\030\022\r\n\tTHRESHOLD\020\037\"*\n\014DimCheckM"
"ode\022\n\n\006STRICT\020\000\022\016\n\nPERMISSIVE\020\001\"\177\n\027Trans"
"formationParameter\022\020\n\005scale\030\001 \001(\002:\0011\022\025\n\006"
"mirror\030\002 \001(\010:\005false\022\024\n\tcrop_size\030\003 \001(\r:\001"
"0\022\021\n\tmean_file\030\004 \001(\t\022\022\n\nmean_value\030\005 \003(\002"
"\">\n\rLossParameter\022\024\n\014ignore_label\030\001 \001(\005\022"
"\027\n\tnormalize\030\002 \001(\010:\004true\"%\n\021AccuracyPara"
"meter\022\020\n\005top_k\030\001 \001(\r:\0011\"\?\n\017ArgMaxParamet"
"er\022\032\n\013out_max_val\030\001 \001(\010:\005false\022\020\n\005top_k\030"
"\002 \001(\r:\0011\"(\n\017ConcatParameter\022\025\n\nconcat_di"
"m\030\001 \001(\r:\0011\"-\n\030ContrastiveLossParameter\022\021"
"\n\006margin\030\001 \001(\002:\0011\"\277\003\n\024ConvolutionParamet"
"er\022\022\n\nnum_output\030\001 \001(\r\022\027\n\tbias_term\030\002 \001("
"\010:\004true\022\016\n\003pad\030\003 \001(\r:\0010\022\020\n\005pad_h\030\t \001(\r:\001"
"0\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\005"
"group\030\005 \001(\r:\0011\022\021\n\006stride\030\006 \001(\r:\0011\022\020\n\010str"
"ide_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\013"
"bias_filler\030\010 \001(\0132\026.caffe.FillerParamete"
"r\022;\n\006engine\030\017 \001(\0162\".caffe.ConvolutionPar"
"ameter.Engine:\007DEFAULT\"+\n\006Engine\022\013\n\007DEFA"
"ULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"\212\003\n\034MultiSta"
"geMeanfieldParameter\022K\n\022compatibility_mo"
"de\030\001 \001(\0162(.caffe.MultiStageMeanfieldPara"
"meter.Mode:\005POTTS\022\021\n\tthreshold\030\002 \001(\002\022\027\n\013"
"theta_alpha\030\003 \002(\002:\00210\022\026\n\ntheta_beta\030\004 \002("
"\002:\00210\022\027\n\013theta_gamma\030\005 \002(\002:\00210\022\031\n\016num_it"
"erations\030\006 \002(\r:\0011\022 \n\025spatial_filter_weig"
"ht\030\007 \001(\002:\0011\022\"\n\027bilateral_filter_weight\030\010"
" \001(\002:\0011\022$\n\034forced_spatial_filter_weight\030"
"\t \001(\002\022&\n\036forced_bilateral_filter_weight\030"
"\n \001(\002\"\021\n\004Mode\022\t\n\005POTTS\020\000\"\353\001\n\rDataParamet"
"er\022\016\n\006source\030\001 \001(\t\022\022\n\nbatch_size\030\004 \001(\r\022\024"
"\n\trand_skip\030\007 \001(\r:\0010\0221\n\007backend\030\010 \001(\0162\027."
"caffe.DataParameter.DB:\007LEVELDB\022\020\n\005scale"
"\030\002 \001(\002:\0011\022\021\n\tmean_file\030\003 \001(\t\022\024\n\tcrop_siz"
"e\030\005 \001(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005false\"\033\n\002DB\022"
"\013\n\007LEVELDB\020\000\022\010\n\004LMDB\020\001\".\n\020DropoutParamet"
"er\022\032\n\rdropout_ratio\030\001 \001(\002:\0030.5\"\177\n\022DummyD"
"ataParameter\022+\n\013data_filler\030\001 \003(\0132\026.caff"
"e.FillerParameter\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\"7\n"
"\021HDF5DataParameter\022\016\n\006source\030\001 \001(\t\022\022\n\nba"
"tch_size\030\002 \001(\r\"(\n\023HDF5OutputParameter\022\021\n"
"\tfile_name\030\001 \001(\t\"^\n\022HingeLossParameter\0220"
"\n\004norm\030\001 \001(\0162\036.caffe.HingeLossParameter."
"Norm:\002L1\"\026\n\004Norm\022\006\n\002L1\020\001\022\006\n\002L2\020\002\"\224\002\n\022Ima"
"geDataParameter\022\016\n\006source\030\001 \001(\t\022\022\n\nbatch"
"_size\030\004 \001(\r\022\024\n\trand_skip\030\007 \001(\r:\0010\022\026\n\007shu"
"ffle\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\025Infog"
"ainLossParameter\022\016\n\006source\030\001 \001(\t\"\240\001\n\025Inn"
"erProductParameter\022\022\n\nnum_output\030\001 \001(\r\022\027"
"\n\tbias_term\030\002 \001(\010:\004true\022-\n\rweight_filler"
"\030\003 \001(\0132\026.caffe.FillerParameter\022+\n\013bias_f"
"iller\030\004 \001(\0132\026.caffe.FillerParameter\"\326\001\n\014"
"LRNParameter\022\025\n\nlocal_size\030\001 \001(\r:\0015\022\020\n\005a"
"lpha\030\002 \001(\002:\0011\022\022\n\004beta\030\003 \001(\002:\0040.75\022D\n\013nor"
"m_region\030\004 \001(\0162\036.caffe.LRNParameter.Norm"
"Region:\017ACROSS_CHANNELS\022\014\n\001k\030\005 \001(\002:\0011\"5\n"
"\nNormRegion\022\023\n\017ACROSS_CHANNELS\020\000\022\022\n\016WITH"
"IN_CHANNEL\020\001\"Z\n\023MemoryDataParameter\022\022\n\nb"
"atch_size\030\001 \001(\r\022\020\n\010channels\030\002 \001(\r\022\016\n\006hei"
"ght\030\003 \001(\r\022\r\n\005width\030\004 \001(\r\"P\n\014MVNParameter"
"\022 \n\022normalize_variance\030\001 \001(\010:\004true\022\036\n\017ac"
"ross_channels\030\002 \001(\010:\005false\"\242\003\n\020PoolingPa"
"rameter\0225\n\004pool\030\001 \001(\0162\".caffe.PoolingPar"
"ameter.PoolMethod:\003MAX\022\016\n\003pad\030\004 \001(\r:\0010\022\020"
"\n\005pad_h\030\t \001(\r:\0010\022\020\n\005pad_w\030\n \001(\r:\0010\022\023\n\013ke"
"rnel_size\030\002 \001(\r\022\020\n\010kernel_h\030\005 \001(\r\022\020\n\010ker"
"nel_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:\007DEFA"
"ULT\022\035\n\016global_pooling\030\014 \001(\010:\005false\".\n\nPo"
"olMethod\022\007\n\003MAX\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\005"
"CUDNN\020\002\"F\n\016PowerParameter\022\020\n\005power\030\001 \001(\002"
":\0011\022\020\n\005scale\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\""
"\215\001\n\rReLUParameter\022\031\n\016negative_slope\030\001 \001("
"\002:\0010\0224\n\006engine\030\002 \001(\0162\033.caffe.ReLUParamet"
"er.Engine:\007DEFAULT\"+\n\006Engine\022\013\n\007DEFAULT\020"
"\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"x\n\020SigmoidParame"
"ter\0227\n\006engine\030\001 \001(\0162\036.caffe.SigmoidParam"
"eter.Engine:\007DEFAULT\"+\n\006Engine\022\013\n\007DEFAUL"
"T\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\";\n\016SliceParame"
"ter\022\024\n\tslice_dim\030\001 \001(\r:\0011\022\023\n\013slice_point"
"\030\002 \003(\r\"x\n\020SoftmaxParameter\0227\n\006engine\030\001 \001"
"(\0162\036.caffe.SoftmaxParameter.Engine:\007DEFA"
"ULT\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n"
"\005CUDNN\020\002\"r\n\rTanHParameter\0224\n\006engine\030\001 \001("
"\0162\033.caffe.TanHParameter.Engine:\007DEFAULT\""
"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUD"
"NN\020\002\"*\n\022ThresholdParameter\022\024\n\tthreshold\030"
"\001 \001(\002:\0010\"\301\002\n\023WindowDataParameter\022\016\n\006sour"
"ce\030\001 \001(\t\022\020\n\005scale\030\002 \001(\002:\0011\022\021\n\tmean_file\030"
"\003 \001(\t\022\022\n\nbatch_size\030\004 \001(\r\022\024\n\tcrop_size\030\005"
" \001(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005false\022\031\n\014fg_thr"
"eshold\030\007 \001(\002:\0030.5\022\031\n\014bg_threshold\030\010 \001(\002:"
"\0030.5\022\031\n\013fg_fraction\030\t \001(\002:\0040.25\022\026\n\013conte"
"xt_pad\030\n \001(\r:\0010\022\027\n\tcrop_mode\030\013 \001(\t:\004warp"
"\022\033\n\014cache_images\030\014 \001(\010:\005false\022\025\n\013root_fo"
"lder\030\r \001(\t:\000\"\375\007\n\020V0LayerParameter\022\014\n\004nam"
"e\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\022\n\nnum_output\030\003 \001("
"\r\022\026\n\010biasterm\030\004 \001(\010:\004true\022-\n\rweight_fill"
"er\030\005 \001(\0132\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\005gro"
"up\030\t \001(\r:\0011\022\021\n\006stride\030\n \001(\r:\0011\0225\n\004pool\030\013"
" \001(\0162\".caffe.V0LayerParameter.PoolMethod"
":\003MAX\022\032\n\rdropout_ratio\030\014 \001(\002:\0030.5\022\025\n\nloc"
"al_size\030\r \001(\r:\0015\022\020\n\005alpha\030\016 \001(\002:\0011\022\022\n\004be"
"ta\030\017 \001(\002:\0040.75\022\014\n\001k\030\026 \001(\002:\0011\022\016\n\006source\030\020"
" \001(\t\022\020\n\005scale\030\021 \001(\002:\0011\022\020\n\010meanfile\030\022 \001(\t"
"\022\021\n\tbatchsize\030\023 \001(\r\022\023\n\010cropsize\030\024 \001(\r:\0010"
"\022\025\n\006mirror\030\025 \001(\010:\005false\022\037\n\005blobs\0302 \003(\0132\020"
".caffe.BlobProto\022\020\n\010blobs_lr\0303 \003(\002\022\024\n\014we"
"ight_decay\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_"
"threshold\0307 \001(\002:\0030.5\022\035\n\017det_fg_fraction\030"
"8 \001(\002:\0040.25\022\032\n\017det_context_pad\030: \001(\r:\0010\022"
"\033\n\rdet_crop_mode\030; \001(\t:\004warp\022\022\n\007new_num\030"
"< \001(\005:\0010\022\027\n\014new_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\016shuffle_images\030@ \001(\010:\005false\022\025\n\nconcat_"
"dim\030A \001(\r:\0011\0226\n\021hdf5_output_param\030\351\007 \001(\013"
"2\032.caffe.HDF5OutputParameter\".\n\nPoolMeth"
"od\022\007\n\003MAX\020\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002*\034\n\005"
"Phase\022\t\n\005TRAIN\020\000\022\010\n\004TEST\020\001", 10106);
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
"caffe.proto", &protobuf_RegisterTypes);
BlobProto::default_instance_ = new BlobProto();
BlobProtoVector::default_instance_ = new BlobProtoVector();
Datum::default_instance_ = new Datum();
FillerParameter::_default_type_ =
new ::std::string("constant", 8);
FillerParameter::default_instance_ = new FillerParameter();
NetParameter::default_instance_ = new NetParameter();
SolverParameter::_default_regularization_type_ =
new ::std::string("L2", 2);
SolverParameter::default_instance_ = new SolverParameter();
SolverState::default_instance_ = new SolverState();
NetState::default_instance_ = new NetState();
NetStateRule::default_instance_ = new NetStateRule();
LayerParameter::default_instance_ = new LayerParameter();
TransformationParameter::default_instance_ = new TransformationParameter();
LossParameter::default_instance_ = new LossParameter();
AccuracyParameter::default_instance_ = new AccuracyParameter();
ArgMaxParameter::default_instance_ = new ArgMaxParameter();
ConcatParameter::default_instance_ = new ConcatParameter();
ContrastiveLossParameter::default_instance_ = new ContrastiveLossParameter();
ConvolutionParameter::default_instance_ = new ConvolutionParameter();
MultiStageMeanfieldParameter::default_instance_ = new MultiStageMeanfieldParameter();
DataParameter::default_instance_ = new DataParameter();
DropoutParameter::default_instance_ = new DropoutParameter();
DummyDataParameter::default_instance_ = new DummyDataParameter();
EltwiseParameter::default_instance_ = new EltwiseParameter();
ExpParameter::default_instance_ = new ExpParameter();
HDF5DataParameter::default_instance_ = new HDF5DataParameter();
HDF5OutputParameter::default_instance_ = new HDF5OutputParameter();
HingeLossParameter::default_instance_ = new HingeLossParameter();
ImageDataParameter::default_instance_ = new ImageDataParameter();
InfogainLossParameter::default_instance_ = new InfogainLossParameter();
InnerProductParameter::default_instance_ = new InnerProductParameter();
LRNParameter::default_instance_ = new LRNParameter();
MemoryDataParameter::default_instance_ = new MemoryDataParameter();
MVNParameter::default_instance_ = new MVNParameter();
PoolingParameter::default_instance_ = new PoolingParameter();
PowerParameter::default_instance_ = new PowerParameter();
ReLUParameter::default_instance_ = new ReLUParameter();
SigmoidParameter::default_instance_ = new SigmoidParameter();
SliceParameter::default_instance_ = new SliceParameter();
SoftmaxParameter::default_instance_ = new SoftmaxParameter();
TanHParameter::default_instance_ = new TanHParameter();
ThresholdParameter::default_instance_ = new ThresholdParameter();
WindowDataParameter::_default_crop_mode_ =
new ::std::string("warp", 4);
WindowDataParameter::default_instance_ = new WindowDataParameter();
V0LayerParameter::_default_det_crop_mode_ =
new ::std::string("warp", 4);
V0LayerParameter::default_instance_ = new V0LayerParameter();
BlobProto::default_instance_->InitAsDefaultInstance();
BlobProtoVector::default_instance_->InitAsDefaultInstance();
Datum::default_instance_->InitAsDefaultInstance();
FillerParameter::default_instance_->InitAsDefaultInstance();
NetParameter::default_instance_->InitAsDefaultInstance();
SolverParameter::default_instance_->InitAsDefaultInstance();
SolverState::default_instance_->InitAsDefaultInstance();
NetState::default_instance_->InitAsDefaultInstance();
NetStateRule::default_instance_->InitAsDefaultInstance();
LayerParameter::default_instance_->InitAsDefaultInstance();
TransformationParameter::default_instance_->InitAsDefaultInstance();
LossParameter::default_instance_->InitAsDefaultInstance();
AccuracyParameter::default_instance_->InitAsDefaultInstance();
ArgMaxParameter::default_instance_->InitAsDefaultInstance();
ConcatParameter::default_instance_->InitAsDefaultInstance();
ContrastiveLossParameter::default_instance_->InitAsDefaultInstance();
ConvolutionParameter::default_instance_->InitAsDefaultInstance();
MultiStageMeanfieldParameter::default_instance_->InitAsDefaultInstance();
DataParameter::default_instance_->InitAsDefaultInstance();
DropoutParameter::default_instance_->InitAsDefaultInstance();
DummyDataParameter::default_instance_->InitAsDefaultInstance();
EltwiseParameter::default_instance_->InitAsDefaultInstance();
ExpParameter::default_instance_->InitAsDefaultInstance();
HDF5DataParameter::default_instance_->InitAsDefaultInstance();
HDF5OutputParameter::default_instance_->InitAsDefaultInstance();
HingeLossParameter::default_instance_->InitAsDefaultInstance();
ImageDataParameter::default_instance_->InitAsDefaultInstance();
InfogainLossParameter::default_instance_->InitAsDefaultInstance();
InnerProductParameter::default_instance_->InitAsDefaultInstance();
LRNParameter::default_instance_->InitAsDefaultInstance();
MemoryDataParameter::default_instance_->InitAsDefaultInstance();
MVNParameter::default_instance_->InitAsDefaultInstance();
PoolingParameter::default_instance_->InitAsDefaultInstance();
PowerParameter::default_instance_->InitAsDefaultInstance();
ReLUParameter::default_instance_->InitAsDefaultInstance();
SigmoidParameter::default_instance_->InitAsDefaultInstance();
SliceParameter::default_instance_->InitAsDefaultInstance();
SoftmaxParameter::default_instance_->InitAsDefaultInstance();
TanHParameter::default_instance_->InitAsDefaultInstance();
ThresholdParameter::default_instance_->InitAsDefaultInstance();
WindowDataParameter::default_instance_->InitAsDefaultInstance();
V0LayerParameter::default_instance_->InitAsDefaultInstance();
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_caffe_2eproto);
}
// 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;
}
}
// ===================================================================
#ifndef _MSC_VER
const int BlobProto::kNumFieldNumber;
const int BlobProto::kChannelsFieldNumber;
const int BlobProto::kHeightFieldNumber;
const int BlobProto::kWidthFieldNumber;
const int BlobProto::kDataFieldNumber;
const int BlobProto::kDiffFieldNumber;
#endif // !_MSC_VER
BlobProto::BlobProto()
: ::google::protobuf::Message() {
SharedCtor();
}
void BlobProto::InitAsDefaultInstance() {
}
BlobProto::BlobProto(const BlobProto& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void BlobProto::SharedCtor() {
_cached_size_ = 0;
num_ = 0;
channels_ = 0;
height_ = 0;
width_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
BlobProto::~BlobProto() {
SharedDtor();
}
void BlobProto::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
BlobProto* BlobProto::default_instance_ = NULL;
BlobProto* BlobProto::New() const {
return new BlobProto;
}
void BlobProto::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
num_ = 0;
channels_ = 0;
height_ = 0;
width_ = 0;
}
data_.Clear();
diff_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool BlobProto::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 num = 1 [default = 0];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &num_)));
set_has_num();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_channels;
break;
}
// optional int32 channels = 2 [default = 0];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_channels:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &channels_)));
set_has_channels();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_height;
break;
}
// optional int32 height = 3 [default = 0];
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_height:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &height_)));
set_has_height();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_width;
break;
}
// optional int32 width = 4 [default = 0];
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_width:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &width_)));
set_has_width();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(42)) goto parse_data;
break;
}
// repeated float data = 5 [packed = true];
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_data:
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_data())));
} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_FIXED32) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1, 42, input, this->mutable_data())));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(50)) goto parse_diff;
break;
}
// repeated float diff = 6 [packed = true];
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_diff:
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_diff())));
} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_FIXED32) {
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1, 50, input, this->mutable_diff())));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void BlobProto::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* BlobProto::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int BlobProto::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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];
{
int data_size = 0;
data_size = 4 * this->data_size();
if (data_size > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_data_cached_byte_size_ = data_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
total_size += data_size;
}
// repeated float diff = 6 [packed = true];
{
int data_size = 0;
data_size = 4 * this->diff_size();
if (data_size > 0) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::Int32Size(data_size);
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_diff_cached_byte_size_ = data_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
total_size += data_size;
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void BlobProto::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const BlobProto* source =
::google::protobuf::internal::dynamic_cast_if_available<const BlobProto*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void BlobProto::MergeFrom(const BlobProto& from) {
GOOGLE_CHECK_NE(&from, this);
data_.MergeFrom(from.data_);
diff_.MergeFrom(from.diff_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void BlobProto::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void BlobProto::CopyFrom(const BlobProto& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool BlobProto::IsInitialized() const {
return true;
}
void BlobProto::Swap(BlobProto* other) {
if (other != this) {
std::swap(num_, other->num_);
std::swap(channels_, other->channels_);
std::swap(height_, other->height_);
std::swap(width_, other->width_);
data_.Swap(&other->data_);
diff_.Swap(&other->diff_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int BlobProtoVector::kBlobsFieldNumber;
#endif // !_MSC_VER
BlobProtoVector::BlobProtoVector()
: ::google::protobuf::Message() {
SharedCtor();
}
void BlobProtoVector::InitAsDefaultInstance() {
}
BlobProtoVector::BlobProtoVector(const BlobProtoVector& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void BlobProtoVector::SharedCtor() {
_cached_size_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
BlobProtoVector::~BlobProtoVector() {
SharedDtor();
}
void BlobProtoVector::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
BlobProtoVector* BlobProtoVector::default_instance_ = NULL;
BlobProtoVector* BlobProtoVector::New() const {
return new BlobProtoVector;
}
void BlobProtoVector::Clear() {
blobs_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool BlobProtoVector::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .caffe.BlobProto blobs = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_blobs:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_blobs()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(10)) goto parse_blobs;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void BlobProtoVector::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// repeated .caffe.BlobProto blobs = 1;
for (int i = 0; i < this->blobs_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
1, this->blobs(i), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* BlobProtoVector::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// repeated .caffe.BlobProto blobs = 1;
for (int i = 0; i < this->blobs_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->blobs(i), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int BlobProtoVector::ByteSize() const {
int total_size = 0;
// repeated .caffe.BlobProto blobs = 1;
total_size += 1 * this->blobs_size();
for (int i = 0; i < this->blobs_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->blobs(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void BlobProtoVector::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const BlobProtoVector* source =
::google::protobuf::internal::dynamic_cast_if_available<const BlobProtoVector*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void BlobProtoVector::MergeFrom(const BlobProtoVector& from) {
GOOGLE_CHECK_NE(&from, this);
blobs_.MergeFrom(from.blobs_);
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void BlobProtoVector::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void BlobProtoVector::CopyFrom(const BlobProtoVector& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool BlobProtoVector::IsInitialized() const {
return true;
}
void BlobProtoVector::Swap(BlobProtoVector* other) {
if (other != this) {
blobs_.Swap(&other->blobs_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
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 // !_MSC_VER
Datum::Datum()
: ::google::protobuf::Message() {
SharedCtor();
}
void Datum::InitAsDefaultInstance() {
}
Datum::Datum(const Datum& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void Datum::SharedCtor() {
_cached_size_ = 0;
channels_ = 0;
height_ = 0;
width_ = 0;
data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
label_ = 0;
encoded_ = false;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
Datum::~Datum() {
SharedDtor();
}
void Datum::SharedDtor() {
if (data_ != &::google::protobuf::internal::kEmptyString) {
delete data_;
}
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
Datum* Datum::default_instance_ = NULL;
Datum* Datum::New() const {
return new Datum;
}
void Datum::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
channels_ = 0;
height_ = 0;
width_ = 0;
if (has_data()) {
if (data_ != &::google::protobuf::internal::kEmptyString) {
data_->clear();
}
}
label_ = 0;
encoded_ = false;
}
float_data_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool Datum::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 channels = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &channels_)));
set_has_channels();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_height;
break;
}
// optional int32 height = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_height:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &height_)));
set_has_height();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_width;
break;
}
// optional int32 width = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_width:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &width_)));
set_has_width();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(34)) goto parse_data;
break;
}
// optional bytes data = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_data:
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
input, this->mutable_data()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_label;
break;
}
// optional int32 label = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_label:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &label_)));
set_has_label();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(53)) goto parse_float_data;
break;
}
// repeated float float_data = 6;
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_float_data())));
} else {
goto handle_uninterpreted;
}
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_encoded:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &encoded_)));
set_has_encoded();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void Datum::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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::WriteBytes(
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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* Datum::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int Datum::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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;
{
int data_size = 0;
data_size = 4 * this->float_data_size();
total_size += 1 * this->float_data_size() + data_size;
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void Datum::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const Datum* source =
::google::protobuf::internal::dynamic_cast_if_available<const Datum*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void Datum::MergeFrom(const Datum& from) {
GOOGLE_CHECK_NE(&from, this);
float_data_.MergeFrom(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_data(from.data());
}
if (from.has_label()) {
set_label(from.label());
}
if (from.has_encoded()) {
set_encoded(from.encoded());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void Datum::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Datum::CopyFrom(const Datum& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Datum::IsInitialized() const {
return true;
}
void Datum::Swap(Datum* other) {
if (other != this) {
std::swap(channels_, other->channels_);
std::swap(height_, other->height_);
std::swap(width_, other->width_);
std::swap(data_, other->data_);
std::swap(label_, other->label_);
float_data_.Swap(&other->float_data_);
std::swap(encoded_, other->encoded_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
::std::string* FillerParameter::_default_type_ = NULL;
#ifndef _MSC_VER
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;
#endif // !_MSC_VER
FillerParameter::FillerParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void FillerParameter::InitAsDefaultInstance() {
}
FillerParameter::FillerParameter(const FillerParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void FillerParameter::SharedCtor() {
_cached_size_ = 0;
type_ = const_cast< ::std::string*>(_default_type_);
value_ = 0;
min_ = 0;
max_ = 1;
mean_ = 0;
std_ = 1;
sparse_ = -1;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
FillerParameter::~FillerParameter() {
SharedDtor();
}
void FillerParameter::SharedDtor() {
if (type_ != _default_type_) {
delete type_;
}
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
FillerParameter* FillerParameter::default_instance_ = NULL;
FillerParameter* FillerParameter::New() const {
return new FillerParameter;
}
void FillerParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_type()) {
if (type_ != _default_type_) {
type_->assign(*_default_type_);
}
}
value_ = 0;
min_ = 0;
max_ = 1;
mean_ = 0;
std_ = 1;
sparse_ = -1;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool FillerParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string type = 1 [default = "constant"];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_type()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->type().data(), this->type().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(21)) goto parse_value;
break;
}
// optional float value = 2 [default = 0];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_value:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &value_)));
set_has_value();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(29)) goto parse_min;
break;
}
// optional float min = 3 [default = 0];
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_min:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &min_)));
set_has_min();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(37)) goto parse_max;
break;
}
// optional float max = 4 [default = 1];
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_max:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &max_)));
set_has_max();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(45)) goto parse_mean;
break;
}
// optional float mean = 5 [default = 0];
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_mean:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &mean_)));
set_has_mean();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(53)) goto parse_std;
break;
}
// optional float std = 6 [default = 1];
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_std:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &std_)));
set_has_std();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(56)) goto parse_sparse;
break;
}
// optional int32 sparse = 7 [default = -1];
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_sparse:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &sparse_)));
set_has_sparse();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void FillerParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string type = 1 [default = "constant"];
if (has_type()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->type().data(), this->type().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* FillerParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string type = 1 [default = "constant"];
if (has_type()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->type().data(), this->type().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int FillerParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void FillerParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const FillerParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const FillerParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void FillerParameter::MergeFrom(const FillerParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_type()) {
set_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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void FillerParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void FillerParameter::CopyFrom(const FillerParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool FillerParameter::IsInitialized() const {
return true;
}
void FillerParameter::Swap(FillerParameter* other) {
if (other != this) {
std::swap(type_, 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(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int NetParameter::kNameFieldNumber;
const int NetParameter::kLayersFieldNumber;
const int NetParameter::kInputFieldNumber;
const int NetParameter::kInputDimFieldNumber;
const int NetParameter::kForceBackwardFieldNumber;
const int NetParameter::kStateFieldNumber;
#endif // !_MSC_VER
NetParameter::NetParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void NetParameter::InitAsDefaultInstance() {
state_ = const_cast< ::caffe::NetState*>(&::caffe::NetState::default_instance());
}
NetParameter::NetParameter(const NetParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void NetParameter::SharedCtor() {
_cached_size_ = 0;
name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
force_backward_ = false;
state_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
NetParameter::~NetParameter() {
SharedDtor();
}
void NetParameter::SharedDtor() {
if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (this != default_instance_) {
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
NetParameter* NetParameter::default_instance_ = NULL;
NetParameter* NetParameter::New() const {
return new NetParameter;
}
void NetParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_name()) {
if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
}
force_backward_ = false;
if (has_state()) {
if (state_ != NULL) state_->::caffe::NetState::Clear();
}
}
layers_.Clear();
input_.Clear();
input_dim_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool NetParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string name = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_layers;
break;
}
// repeated .caffe.LayerParameter layers = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_layers:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_layers()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_layers;
if (input->ExpectTag(26)) goto parse_input;
break;
}
// repeated string input = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_input:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_input()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->input(this->input_size() - 1).data(),
this->input(this->input_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_input;
if (input->ExpectTag(32)) goto parse_input_dim;
break;
}
// repeated int32 input_dim = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, this->mutable_input_dim())));
} else {
goto handle_uninterpreted;
}
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_force_backward:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &force_backward_)));
set_has_force_backward();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(50)) goto parse_state;
break;
}
// optional .caffe.NetState state = 6;
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_state:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_state()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void NetParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->name(), output);
}
// repeated .caffe.LayerParameter layers = 2;
for (int i = 0; i < this->layers_size(); 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::VerifyUTF8String(
this->input(i).data(), this->input(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::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);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* NetParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
}
// repeated .caffe.LayerParameter layers = 2;
for (int i = 0; i < this->layers_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
2, this->layers(i), target);
}
// repeated string input = 3;
for (int i = 0; i < this->input_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->input(i).data(), this->input(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::
WriteMessageNoVirtualToArray(
6, this->state(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int NetParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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());
}
}
// repeated .caffe.LayerParameter layers = 2;
total_size += 1 * this->layers_size();
for (int i = 0; i < this->layers_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->layers(i));
}
// repeated string input = 3;
total_size += 1 * this->input_size();
for (int i = 0; i < this->input_size(); i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->input(i));
}
// repeated int32 input_dim = 4;
{
int data_size = 0;
for (int i = 0; i < this->input_dim_size(); i++) {
data_size += ::google::protobuf::internal::WireFormatLite::
Int32Size(this->input_dim(i));
}
total_size += 1 * this->input_dim_size() + data_size;
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void NetParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const NetParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const NetParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void NetParameter::MergeFrom(const NetParameter& from) {
GOOGLE_CHECK_NE(&from, this);
layers_.MergeFrom(from.layers_);
input_.MergeFrom(from.input_);
input_dim_.MergeFrom(from.input_dim_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_name()) {
set_name(from.name());
}
if (from.has_force_backward()) {
set_force_backward(from.force_backward());
}
if (from.has_state()) {
mutable_state()->::caffe::NetState::MergeFrom(from.state());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void NetParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void NetParameter::CopyFrom(const NetParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NetParameter::IsInitialized() const {
for (int i = 0; i < layers_size(); i++) {
if (!this->layers(i).IsInitialized()) return false;
}
return true;
}
void NetParameter::Swap(NetParameter* other) {
if (other != this) {
std::swap(name_, other->name_);
layers_.Swap(&other->layers_);
input_.Swap(&other->input_);
input_dim_.Swap(&other->input_dim_);
std::swap(force_backward_, other->force_backward_);
std::swap(state_, other->state_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
::std::string* SolverParameter::_default_regularization_type_ = NULL;
#ifndef _MSC_VER
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::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 // !_MSC_VER
SolverParameter::SolverParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void SolverParameter::InitAsDefaultInstance() {
net_param_ = const_cast< ::caffe::NetParameter*>(&::caffe::NetParameter::default_instance());
train_net_param_ = const_cast< ::caffe::NetParameter*>(&::caffe::NetParameter::default_instance());
train_state_ = const_cast< ::caffe::NetState*>(&::caffe::NetState::default_instance());
}
SolverParameter::SolverParameter(const SolverParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void SolverParameter::SharedCtor() {
_cached_size_ = 0;
net_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
net_param_ = NULL;
train_net_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
train_net_param_ = NULL;
train_state_ = NULL;
test_interval_ = 0;
test_compute_loss_ = false;
test_initialization_ = true;
base_lr_ = 0;
display_ = 0;
average_loss_ = 1;
max_iter_ = 0;
iter_size_ = 1;
lr_policy_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
gamma_ = 0;
power_ = 0;
momentum_ = 0;
weight_decay_ = 0;
regularization_type_ = const_cast< ::std::string*>(_default_regularization_type_);
stepsize_ = 0;
snapshot_ = 0;
snapshot_prefix_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
snapshot_diff_ = false;
solver_mode_ = 1;
device_id_ = 0;
random_seed_ = GOOGLE_LONGLONG(-1);
solver_type_ = 0;
delta_ = 1e-08f;
debug_info_ = false;
snapshot_after_train_ = true;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
SolverParameter::~SolverParameter() {
SharedDtor();
}
void SolverParameter::SharedDtor() {
if (net_ != &::google::protobuf::internal::kEmptyString) {
delete net_;
}
if (train_net_ != &::google::protobuf::internal::kEmptyString) {
delete train_net_;
}
if (lr_policy_ != &::google::protobuf::internal::kEmptyString) {
delete lr_policy_;
}
if (regularization_type_ != _default_regularization_type_) {
delete regularization_type_;
}
if (snapshot_prefix_ != &::google::protobuf::internal::kEmptyString) {
delete snapshot_prefix_;
}
if (this != default_instance_) {
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
SolverParameter* SolverParameter::default_instance_ = NULL;
SolverParameter* SolverParameter::New() const {
return new SolverParameter;
}
void SolverParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_net()) {
if (net_ != &::google::protobuf::internal::kEmptyString) {
net_->clear();
}
}
if (has_net_param()) {
if (net_param_ != NULL) net_param_->::caffe::NetParameter::Clear();
}
if (has_train_net()) {
if (train_net_ != &::google::protobuf::internal::kEmptyString) {
train_net_->clear();
}
}
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_[9 / 32] & (0xffu << (9 % 32))) {
test_interval_ = 0;
test_compute_loss_ = false;
test_initialization_ = true;
base_lr_ = 0;
display_ = 0;
average_loss_ = 1;
max_iter_ = 0;
}
if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
iter_size_ = 1;
if (has_lr_policy()) {
if (lr_policy_ != &::google::protobuf::internal::kEmptyString) {
lr_policy_->clear();
}
}
gamma_ = 0;
power_ = 0;
momentum_ = 0;
weight_decay_ = 0;
if (has_regularization_type()) {
if (regularization_type_ != _default_regularization_type_) {
regularization_type_->assign(*_default_regularization_type_);
}
}
stepsize_ = 0;
}
if (_has_bits_[25 / 32] & (0xffu << (25 % 32))) {
snapshot_ = 0;
if (has_snapshot_prefix()) {
if (snapshot_prefix_ != &::google::protobuf::internal::kEmptyString) {
snapshot_prefix_->clear();
}
}
snapshot_diff_ = false;
solver_mode_ = 1;
device_id_ = 0;
random_seed_ = GOOGLE_LONGLONG(-1);
solver_type_ = 0;
}
if (_has_bits_[32 / 32] & (0xffu << (32 % 32))) {
delta_ = 1e-08f;
debug_info_ = false;
snapshot_after_train_ = true;
}
test_net_.Clear();
test_net_param_.Clear();
test_state_.Clear();
test_iter_.Clear();
stepvalue_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool SolverParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string train_net = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_train_net()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->train_net().data(), this->train_net().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_test_net;
break;
}
// repeated string test_net = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_test_net:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_test_net()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->test_net(this->test_net_size() - 1).data(),
this->test_net(this->test_net_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, this->mutable_test_iter())));
} else {
goto handle_uninterpreted;
}
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_test_interval:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &test_interval_)));
set_has_test_interval();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(45)) goto parse_base_lr;
break;
}
// optional float base_lr = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_base_lr:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &base_lr_)));
set_has_base_lr();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(48)) goto parse_display;
break;
}
// optional int32 display = 6;
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_display:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &display_)));
set_has_display();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(56)) goto parse_max_iter;
break;
}
// optional int32 max_iter = 7;
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_max_iter:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &max_iter_)));
set_has_max_iter();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(66)) goto parse_lr_policy;
break;
}
// optional string lr_policy = 8;
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_lr_policy:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_lr_policy()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->lr_policy().data(), this->lr_policy().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(77)) goto parse_gamma;
break;
}
// optional float gamma = 9;
case 9: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_gamma:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &gamma_)));
set_has_gamma();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(85)) goto parse_power;
break;
}
// optional float power = 10;
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_power:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &power_)));
set_has_power();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(93)) goto parse_momentum;
break;
}
// optional float momentum = 11;
case 11: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_momentum:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &momentum_)));
set_has_momentum();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(101)) goto parse_weight_decay;
break;
}
// optional float weight_decay = 12;
case 12: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_weight_decay:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &weight_decay_)));
set_has_weight_decay();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(104)) goto parse_stepsize;
break;
}
// optional int32 stepsize = 13;
case 13: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_stepsize:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &stepsize_)));
set_has_stepsize();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(112)) goto parse_snapshot;
break;
}
// optional int32 snapshot = 14 [default = 0];
case 14: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_snapshot:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &snapshot_)));
set_has_snapshot();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(122)) goto parse_snapshot_prefix;
break;
}
// optional string snapshot_prefix = 15;
case 15: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_snapshot_prefix:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_snapshot_prefix()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->snapshot_prefix().data(), this->snapshot_prefix().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(128)) goto parse_snapshot_diff;
break;
}
// optional bool snapshot_diff = 16 [default = false];
case 16: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_snapshot_diff:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &snapshot_diff_)));
set_has_snapshot_diff();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(136)) goto parse_solver_mode;
break;
}
// optional .caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
case 17: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectTag(144)) goto parse_device_id;
break;
}
// optional int32 device_id = 18 [default = 0];
case 18: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_device_id:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &device_id_)));
set_has_device_id();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(152)) goto parse_test_compute_loss;
break;
}
// optional bool test_compute_loss = 19 [default = false];
case 19: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_test_compute_loss:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &test_compute_loss_)));
set_has_test_compute_loss();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(160)) goto parse_random_seed;
break;
}
// optional int64 random_seed = 20 [default = -1];
case 20: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_random_seed:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
input, &random_seed_)));
set_has_random_seed();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(170)) goto parse_train_net_param;
break;
}
// optional .caffe.NetParameter train_net_param = 21;
case 21: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_train_net_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_train_net_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(178)) goto parse_test_net_param;
break;
}
// repeated .caffe.NetParameter test_net_param = 22;
case 22: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_test_net_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_test_net_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(178)) goto parse_test_net_param;
if (input->ExpectTag(184)) goto parse_debug_info;
break;
}
// optional bool debug_info = 23 [default = false];
case 23: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_debug_info:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &debug_info_)));
set_has_debug_info();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(194)) goto parse_net;
break;
}
// optional string net = 24;
case 24: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_net:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_net()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->net().data(), this->net().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(202)) goto parse_net_param;
break;
}
// optional .caffe.NetParameter net_param = 25;
case 25: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_net_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_net_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(210)) goto parse_train_state;
break;
}
// optional .caffe.NetState train_state = 26;
case 26: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_train_state:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_train_state()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(218)) goto parse_test_state;
break;
}
// repeated .caffe.NetState test_state = 27;
case 27: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_test_state:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_test_state()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(218)) goto parse_test_state;
if (input->ExpectTag(224)) goto parse_snapshot_after_train;
break;
}
// optional bool snapshot_after_train = 28 [default = true];
case 28: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_snapshot_after_train:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &snapshot_after_train_)));
set_has_snapshot_after_train();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(234)) goto parse_regularization_type;
break;
}
// optional string regularization_type = 29 [default = "L2"];
case 29: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_regularization_type:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_regularization_type()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->regularization_type().data(), this->regularization_type().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(240)) goto parse_solver_type;
break;
}
// optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
case 30: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectTag(253)) goto parse_delta;
break;
}
// optional float delta = 31 [default = 1e-08];
case 31: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_delta:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &delta_)));
set_has_delta();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(256)) goto parse_test_initialization;
break;
}
// optional bool test_initialization = 32 [default = true];
case 32: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_test_initialization:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &test_initialization_)));
set_has_test_initialization();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(264)) goto parse_average_loss;
break;
}
// optional int32 average_loss = 33 [default = 1];
case 33: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_average_loss:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &average_loss_)));
set_has_average_loss();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(272)) goto parse_stepvalue;
break;
}
// repeated int32 stepvalue = 34;
case 34: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, this->mutable_stepvalue())));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(272)) goto parse_stepvalue;
if (input->ExpectTag(280)) goto parse_iter_size;
break;
}
// optional int32 iter_size = 35 [default = 1];
case 35: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_iter_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &iter_size_)));
set_has_iter_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void SolverParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string train_net = 1;
if (has_train_net()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->train_net().data(), this->train_net().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->train_net(), output);
}
// repeated string test_net = 2;
for (int i = 0; i < this->test_net_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->test_net(i).data(), this->test_net(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::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::VerifyUTF8String(
this->lr_policy().data(), this->lr_policy().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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::VerifyUTF8String(
this->snapshot_prefix().data(), this->snapshot_prefix().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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 (int i = 0; i < this->test_net_param_size(); 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::VerifyUTF8String(
this->net().data(), this->net().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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 (int i = 0; i < this->test_state_size(); 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::VerifyUTF8String(
this->regularization_type().data(), this->regularization_type().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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 int32 iter_size = 35 [default = 1];
if (has_iter_size()) {
::google::protobuf::internal::WireFormatLite::WriteInt32(35, this->iter_size(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* SolverParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string train_net = 1;
if (has_train_net()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->train_net().data(), this->train_net().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->test_net(i).data(), this->test_net(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->lr_policy().data(), this->lr_policy().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->snapshot_prefix().data(), this->snapshot_prefix().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::
WriteMessageNoVirtualToArray(
21, this->train_net_param(), target);
}
// repeated .caffe.NetParameter test_net_param = 22;
for (int i = 0; i < this->test_net_param_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
22, this->test_net_param(i), 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::VerifyUTF8String(
this->net().data(), this->net().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::
WriteMessageNoVirtualToArray(
25, this->net_param(), target);
}
// optional .caffe.NetState train_state = 26;
if (has_train_state()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
26, this->train_state(), target);
}
// repeated .caffe.NetState test_state = 27;
for (int i = 0; i < this->test_state_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
27, this->test_state(i), 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::VerifyUTF8String(
this->regularization_type().data(), this->regularization_type().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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 int32 iter_size = 35 [default = 1];
if (has_iter_size()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(35, this->iter_size(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int SolverParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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] & (0xffu << (9 % 32))) {
// 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] & (0xffu << (16 % 32))) {
// optional int32 iter_size = 35 [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] & (0xffu << (25 % 32))) {
// 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());
}
// optional .caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
if (has_solver_type()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->solver_type());
}
}
if (_has_bits_[32 / 32] & (0xffu << (32 % 32))) {
// 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 * 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;
total_size += 2 * this->test_net_param_size();
for (int i = 0; i < this->test_net_param_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->test_net_param(i));
}
// repeated .caffe.NetState test_state = 27;
total_size += 2 * this->test_state_size();
for (int i = 0; i < this->test_state_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->test_state(i));
}
// repeated int32 test_iter = 3;
{
int data_size = 0;
for (int i = 0; i < this->test_iter_size(); i++) {
data_size += ::google::protobuf::internal::WireFormatLite::
Int32Size(this->test_iter(i));
}
total_size += 1 * this->test_iter_size() + data_size;
}
// repeated int32 stepvalue = 34;
{
int data_size = 0;
for (int i = 0; i < this->stepvalue_size(); i++) {
data_size += ::google::protobuf::internal::WireFormatLite::
Int32Size(this->stepvalue(i));
}
total_size += 2 * this->stepvalue_size() + data_size;
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void SolverParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const SolverParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const SolverParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void SolverParameter::MergeFrom(const SolverParameter& from) {
GOOGLE_CHECK_NE(&from, this);
test_net_.MergeFrom(from.test_net_);
test_net_param_.MergeFrom(from.test_net_param_);
test_state_.MergeFrom(from.test_state_);
test_iter_.MergeFrom(from.test_iter_);
stepvalue_.MergeFrom(from.stepvalue_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_net()) {
set_net(from.net());
}
if (from.has_net_param()) {
mutable_net_param()->::caffe::NetParameter::MergeFrom(from.net_param());
}
if (from.has_train_net()) {
set_train_net(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_lr_policy(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_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_snapshot()) {
set_snapshot(from.snapshot());
}
if (from.has_snapshot_prefix()) {
set_snapshot_prefix(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_solver_type()) {
set_solver_type(from.solver_type());
}
}
if (from._has_bits_[32 / 32] & (0xffu << (32 % 32))) {
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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void SolverParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void SolverParameter::CopyFrom(const SolverParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SolverParameter::IsInitialized() const {
if (has_net_param()) {
if (!this->net_param().IsInitialized()) return false;
}
if (has_train_net_param()) {
if (!this->train_net_param().IsInitialized()) return false;
}
for (int i = 0; i < test_net_param_size(); i++) {
if (!this->test_net_param(i).IsInitialized()) return false;
}
return true;
}
void SolverParameter::Swap(SolverParameter* other) {
if (other != this) {
std::swap(net_, other->net_);
std::swap(net_param_, other->net_param_);
std::swap(train_net_, other->train_net_);
test_net_.Swap(&other->test_net_);
std::swap(train_net_param_, other->train_net_param_);
test_net_param_.Swap(&other->test_net_param_);
std::swap(train_state_, other->train_state_);
test_state_.Swap(&other->test_state_);
test_iter_.Swap(&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_);
std::swap(lr_policy_, 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_);
std::swap(regularization_type_, other->regularization_type_);
std::swap(stepsize_, other->stepsize_);
stepvalue_.Swap(&other->stepvalue_);
std::swap(snapshot_, other->snapshot_);
std::swap(snapshot_prefix_, 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]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int SolverState::kIterFieldNumber;
const int SolverState::kLearnedNetFieldNumber;
const int SolverState::kHistoryFieldNumber;
const int SolverState::kCurrentStepFieldNumber;
#endif // !_MSC_VER
SolverState::SolverState()
: ::google::protobuf::Message() {
SharedCtor();
}
void SolverState::InitAsDefaultInstance() {
}
SolverState::SolverState(const SolverState& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void SolverState::SharedCtor() {
_cached_size_ = 0;
iter_ = 0;
learned_net_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
current_step_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
SolverState::~SolverState() {
SharedDtor();
}
void SolverState::SharedDtor() {
if (learned_net_ != &::google::protobuf::internal::kEmptyString) {
delete learned_net_;
}
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
SolverState* SolverState::default_instance_ = NULL;
SolverState* SolverState::New() const {
return new SolverState;
}
void SolverState::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
iter_ = 0;
if (has_learned_net()) {
if (learned_net_ != &::google::protobuf::internal::kEmptyString) {
learned_net_->clear();
}
}
current_step_ = 0;
}
history_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool SolverState::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 iter = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &iter_)));
set_has_iter();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_learned_net;
break;
}
// optional string learned_net = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_learned_net:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_learned_net()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->learned_net().data(), this->learned_net().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_history;
break;
}
// repeated .caffe.BlobProto history = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_history:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_history()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_history;
if (input->ExpectTag(32)) goto parse_current_step;
break;
}
// optional int32 current_step = 4 [default = 0];
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_current_step:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, ¤t_step_)));
set_has_current_step();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void SolverState::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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::VerifyUTF8String(
this->learned_net().data(), this->learned_net().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
2, this->learned_net(), output);
}
// repeated .caffe.BlobProto history = 3;
for (int i = 0; i < this->history_size(); 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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* SolverState::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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::VerifyUTF8String(
this->learned_net().data(), this->learned_net().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
2, this->learned_net(), target);
}
// repeated .caffe.BlobProto history = 3;
for (int i = 0; i < this->history_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
3, this->history(i), target);
}
// optional int32 current_step = 4 [default = 0];
if (has_current_step()) {
target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(4, this->current_step(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int SolverState::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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;
total_size += 1 * this->history_size();
for (int i = 0; i < this->history_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->history(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void SolverState::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const SolverState* source =
::google::protobuf::internal::dynamic_cast_if_available<const SolverState*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void SolverState::MergeFrom(const SolverState& from) {
GOOGLE_CHECK_NE(&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_learned_net(from.learned_net());
}
if (from.has_current_step()) {
set_current_step(from.current_step());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void SolverState::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void SolverState::CopyFrom(const SolverState& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SolverState::IsInitialized() const {
return true;
}
void SolverState::Swap(SolverState* other) {
if (other != this) {
std::swap(iter_, other->iter_);
std::swap(learned_net_, other->learned_net_);
history_.Swap(&other->history_);
std::swap(current_step_, other->current_step_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int NetState::kPhaseFieldNumber;
const int NetState::kLevelFieldNumber;
const int NetState::kStageFieldNumber;
#endif // !_MSC_VER
NetState::NetState()
: ::google::protobuf::Message() {
SharedCtor();
}
void NetState::InitAsDefaultInstance() {
}
NetState::NetState(const NetState& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void NetState::SharedCtor() {
_cached_size_ = 0;
phase_ = 1;
level_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
NetState::~NetState() {
SharedDtor();
}
void NetState::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
NetState* NetState::default_instance_ = NULL;
NetState* NetState::New() const {
return new NetState;
}
void NetState::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
phase_ = 1;
level_ = 0;
}
stage_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool NetState::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .caffe.Phase phase = 1 [default = TEST];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_level;
break;
}
// optional int32 level = 2 [default = 0];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_level:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &level_)));
set_has_level();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_stage;
break;
}
// repeated string stage = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_stage:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_stage()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->stage(this->stage_size() - 1).data(),
this->stage(this->stage_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_stage;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void NetState::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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::VerifyUTF8String(
this->stage(i).data(), this->stage(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
3, this->stage(i), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* NetState::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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::VerifyUTF8String(
this->stage(i).data(), this->stage(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(3, this->stage(i), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int NetState::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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 * this->stage_size();
for (int i = 0; i < this->stage_size(); i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->stage(i));
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void NetState::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const NetState* source =
::google::protobuf::internal::dynamic_cast_if_available<const NetState*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void NetState::MergeFrom(const NetState& from) {
GOOGLE_CHECK_NE(&from, this);
stage_.MergeFrom(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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void NetState::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void NetState::CopyFrom(const NetState& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NetState::IsInitialized() const {
return true;
}
void NetState::Swap(NetState* other) {
if (other != this) {
std::swap(phase_, other->phase_);
std::swap(level_, other->level_);
stage_.Swap(&other->stage_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int NetStateRule::kPhaseFieldNumber;
const int NetStateRule::kMinLevelFieldNumber;
const int NetStateRule::kMaxLevelFieldNumber;
const int NetStateRule::kStageFieldNumber;
const int NetStateRule::kNotStageFieldNumber;
#endif // !_MSC_VER
NetStateRule::NetStateRule()
: ::google::protobuf::Message() {
SharedCtor();
}
void NetStateRule::InitAsDefaultInstance() {
}
NetStateRule::NetStateRule(const NetStateRule& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void NetStateRule::SharedCtor() {
_cached_size_ = 0;
phase_ = 0;
min_level_ = 0;
max_level_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
NetStateRule::~NetStateRule() {
SharedDtor();
}
void NetStateRule::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
NetStateRule* NetStateRule::default_instance_ = NULL;
NetStateRule* NetStateRule::New() const {
return new NetStateRule;
}
void NetStateRule::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
phase_ = 0;
min_level_ = 0;
max_level_ = 0;
}
stage_.Clear();
not_stage_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool NetStateRule::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .caffe.Phase phase = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_min_level;
break;
}
// optional int32 min_level = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_min_level:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &min_level_)));
set_has_min_level();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_max_level;
break;
}
// optional int32 max_level = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_max_level:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &max_level_)));
set_has_max_level();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(34)) goto parse_stage;
break;
}
// repeated string stage = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_stage:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_stage()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->stage(this->stage_size() - 1).data(),
this->stage(this->stage_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(34)) goto parse_stage;
if (input->ExpectTag(42)) goto parse_not_stage;
break;
}
// repeated string not_stage = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_not_stage:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_not_stage()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->not_stage(this->not_stage_size() - 1).data(),
this->not_stage(this->not_stage_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(42)) goto parse_not_stage;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void NetStateRule::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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::VerifyUTF8String(
this->stage(i).data(), this->stage(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::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::VerifyUTF8String(
this->not_stage(i).data(), this->not_stage(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
5, this->not_stage(i), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* NetStateRule::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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::VerifyUTF8String(
this->stage(i).data(), this->stage(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->not_stage(i).data(), this->not_stage(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(5, this->not_stage(i), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int NetStateRule::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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 * 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 * 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void NetStateRule::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const NetStateRule* source =
::google::protobuf::internal::dynamic_cast_if_available<const NetStateRule*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void NetStateRule::MergeFrom(const NetStateRule& from) {
GOOGLE_CHECK_NE(&from, this);
stage_.MergeFrom(from.stage_);
not_stage_.MergeFrom(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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void NetStateRule::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void NetStateRule::CopyFrom(const NetStateRule& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NetStateRule::IsInitialized() const {
return true;
}
void NetStateRule::Swap(NetStateRule* other) {
if (other != this) {
std::swap(phase_, other->phase_);
std::swap(min_level_, other->min_level_);
std::swap(max_level_, other->max_level_);
stage_.Swap(&other->stage_);
not_stage_.Swap(&other->not_stage_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
const ::google::protobuf::EnumDescriptor* LayerParameter_LayerType_descriptor() {
protobuf_AssignDescriptorsOnce();
return LayerParameter_LayerType_descriptor_;
}
bool LayerParameter_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:
case 40:
case 41:
case 42:
return true;
default:
return false;
}
}
#ifndef _MSC_VER
const LayerParameter_LayerType LayerParameter::NONE;
const LayerParameter_LayerType LayerParameter::ABSVAL;
const LayerParameter_LayerType LayerParameter::ACCURACY;
const LayerParameter_LayerType LayerParameter::ARGMAX;
const LayerParameter_LayerType LayerParameter::BNLL;
const LayerParameter_LayerType LayerParameter::CONCAT;
const LayerParameter_LayerType LayerParameter::CONTRASTIVE_LOSS;
const LayerParameter_LayerType LayerParameter::CONVOLUTION;
const LayerParameter_LayerType LayerParameter::CROP;
const LayerParameter_LayerType LayerParameter::DATA;
const LayerParameter_LayerType LayerParameter::DECONVOLUTION;
const LayerParameter_LayerType LayerParameter::DROPOUT;
const LayerParameter_LayerType LayerParameter::DUMMY_DATA;
const LayerParameter_LayerType LayerParameter::EUCLIDEAN_LOSS;
const LayerParameter_LayerType LayerParameter::ELTWISE;
const LayerParameter_LayerType LayerParameter::EXP;
const LayerParameter_LayerType LayerParameter::FLATTEN;
const LayerParameter_LayerType LayerParameter::HDF5_DATA;
const LayerParameter_LayerType LayerParameter::HDF5_OUTPUT;
const LayerParameter_LayerType LayerParameter::HINGE_LOSS;
const LayerParameter_LayerType LayerParameter::IM2COL;
const LayerParameter_LayerType LayerParameter::IMAGE_DATA;
const LayerParameter_LayerType LayerParameter::INFOGAIN_LOSS;
const LayerParameter_LayerType LayerParameter::INNER_PRODUCT;
const LayerParameter_LayerType LayerParameter::LRN;
const LayerParameter_LayerType LayerParameter::MEMORY_DATA;
const LayerParameter_LayerType LayerParameter::MULTI_STAGE_MEANFIELD;
const LayerParameter_LayerType LayerParameter::MULTINOMIAL_LOGISTIC_LOSS;
const LayerParameter_LayerType LayerParameter::MVN;
const LayerParameter_LayerType LayerParameter::POOLING;
const LayerParameter_LayerType LayerParameter::POWER;
const LayerParameter_LayerType LayerParameter::RELU;
const LayerParameter_LayerType LayerParameter::SIGMOID;
const LayerParameter_LayerType LayerParameter::SIGMOID_CROSS_ENTROPY_LOSS;
const LayerParameter_LayerType LayerParameter::SILENCE;
const LayerParameter_LayerType LayerParameter::SIMPLE_FAST_MEANFIELD;
const LayerParameter_LayerType LayerParameter::SOFTMAX;
const LayerParameter_LayerType LayerParameter::SOFTMAX_LOSS;
const LayerParameter_LayerType LayerParameter::SPLIT;
const LayerParameter_LayerType LayerParameter::SLICE;
const LayerParameter_LayerType LayerParameter::TANH;
const LayerParameter_LayerType LayerParameter::WINDOW_DATA;
const LayerParameter_LayerType LayerParameter::THRESHOLD;
const LayerParameter_LayerType LayerParameter::LayerType_MIN;
const LayerParameter_LayerType LayerParameter::LayerType_MAX;
const int LayerParameter::LayerType_ARRAYSIZE;
#endif // _MSC_VER
const ::google::protobuf::EnumDescriptor* LayerParameter_DimCheckMode_descriptor() {
protobuf_AssignDescriptorsOnce();
return LayerParameter_DimCheckMode_descriptor_;
}
bool LayerParameter_DimCheckMode_IsValid(int value) {
switch(value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#ifndef _MSC_VER
const LayerParameter_DimCheckMode LayerParameter::STRICT;
const LayerParameter_DimCheckMode LayerParameter::PERMISSIVE;
const LayerParameter_DimCheckMode LayerParameter::DimCheckMode_MIN;
const LayerParameter_DimCheckMode LayerParameter::DimCheckMode_MAX;
const int LayerParameter::DimCheckMode_ARRAYSIZE;
#endif // _MSC_VER
#ifndef _MSC_VER
const int LayerParameter::kBottomFieldNumber;
const int LayerParameter::kTopFieldNumber;
const int LayerParameter::kNameFieldNumber;
const int LayerParameter::kIncludeFieldNumber;
const int LayerParameter::kExcludeFieldNumber;
const int LayerParameter::kTypeFieldNumber;
const int LayerParameter::kBlobsFieldNumber;
const int LayerParameter::kParamFieldNumber;
const int LayerParameter::kBlobShareModeFieldNumber;
const int LayerParameter::kBlobsLrFieldNumber;
const int LayerParameter::kWeightDecayFieldNumber;
const int LayerParameter::kLossWeightFieldNumber;
const int LayerParameter::kAccuracyParamFieldNumber;
const int LayerParameter::kArgmaxParamFieldNumber;
const int LayerParameter::kConcatParamFieldNumber;
const int LayerParameter::kContrastiveLossParamFieldNumber;
const int LayerParameter::kConvolutionParamFieldNumber;
const int LayerParameter::kDataParamFieldNumber;
const int LayerParameter::kDropoutParamFieldNumber;
const int LayerParameter::kDummyDataParamFieldNumber;
const int LayerParameter::kEltwiseParamFieldNumber;
const int LayerParameter::kExpParamFieldNumber;
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::kLrnParamFieldNumber;
const int LayerParameter::kMultiStageMeanfieldParamFieldNumber;
const int LayerParameter::kMemoryDataParamFieldNumber;
const int LayerParameter::kMvnParamFieldNumber;
const int LayerParameter::kPoolingParamFieldNumber;
const int LayerParameter::kPowerParamFieldNumber;
const int LayerParameter::kReluParamFieldNumber;
const int LayerParameter::kSigmoidParamFieldNumber;
const int LayerParameter::kSoftmaxParamFieldNumber;
const int LayerParameter::kSliceParamFieldNumber;
const int LayerParameter::kTanhParamFieldNumber;
const int LayerParameter::kThresholdParamFieldNumber;
const int LayerParameter::kWindowDataParamFieldNumber;
const int LayerParameter::kTransformParamFieldNumber;
const int LayerParameter::kLossParamFieldNumber;
const int LayerParameter::kLayerFieldNumber;
#endif // !_MSC_VER
LayerParameter::LayerParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void LayerParameter::InitAsDefaultInstance() {
accuracy_param_ = const_cast< ::caffe::AccuracyParameter*>(&::caffe::AccuracyParameter::default_instance());
argmax_param_ = const_cast< ::caffe::ArgMaxParameter*>(&::caffe::ArgMaxParameter::default_instance());
concat_param_ = const_cast< ::caffe::ConcatParameter*>(&::caffe::ConcatParameter::default_instance());
contrastive_loss_param_ = const_cast< ::caffe::ContrastiveLossParameter*>(&::caffe::ContrastiveLossParameter::default_instance());
convolution_param_ = const_cast< ::caffe::ConvolutionParameter*>(&::caffe::ConvolutionParameter::default_instance());
data_param_ = const_cast< ::caffe::DataParameter*>(&::caffe::DataParameter::default_instance());
dropout_param_ = const_cast< ::caffe::DropoutParameter*>(&::caffe::DropoutParameter::default_instance());
dummy_data_param_ = const_cast< ::caffe::DummyDataParameter*>(&::caffe::DummyDataParameter::default_instance());
eltwise_param_ = const_cast< ::caffe::EltwiseParameter*>(&::caffe::EltwiseParameter::default_instance());
exp_param_ = const_cast< ::caffe::ExpParameter*>(&::caffe::ExpParameter::default_instance());
hdf5_data_param_ = const_cast< ::caffe::HDF5DataParameter*>(&::caffe::HDF5DataParameter::default_instance());
hdf5_output_param_ = const_cast< ::caffe::HDF5OutputParameter*>(&::caffe::HDF5OutputParameter::default_instance());
hinge_loss_param_ = const_cast< ::caffe::HingeLossParameter*>(&::caffe::HingeLossParameter::default_instance());
image_data_param_ = const_cast< ::caffe::ImageDataParameter*>(&::caffe::ImageDataParameter::default_instance());
infogain_loss_param_ = const_cast< ::caffe::InfogainLossParameter*>(&::caffe::InfogainLossParameter::default_instance());
inner_product_param_ = const_cast< ::caffe::InnerProductParameter*>(&::caffe::InnerProductParameter::default_instance());
lrn_param_ = const_cast< ::caffe::LRNParameter*>(&::caffe::LRNParameter::default_instance());
multi_stage_meanfield_param_ = const_cast< ::caffe::MultiStageMeanfieldParameter*>(&::caffe::MultiStageMeanfieldParameter::default_instance());
memory_data_param_ = const_cast< ::caffe::MemoryDataParameter*>(&::caffe::MemoryDataParameter::default_instance());
mvn_param_ = const_cast< ::caffe::MVNParameter*>(&::caffe::MVNParameter::default_instance());
pooling_param_ = const_cast< ::caffe::PoolingParameter*>(&::caffe::PoolingParameter::default_instance());
power_param_ = const_cast< ::caffe::PowerParameter*>(&::caffe::PowerParameter::default_instance());
relu_param_ = const_cast< ::caffe::ReLUParameter*>(&::caffe::ReLUParameter::default_instance());
sigmoid_param_ = const_cast< ::caffe::SigmoidParameter*>(&::caffe::SigmoidParameter::default_instance());
softmax_param_ = const_cast< ::caffe::SoftmaxParameter*>(&::caffe::SoftmaxParameter::default_instance());
slice_param_ = const_cast< ::caffe::SliceParameter*>(&::caffe::SliceParameter::default_instance());
tanh_param_ = const_cast< ::caffe::TanHParameter*>(&::caffe::TanHParameter::default_instance());
threshold_param_ = const_cast< ::caffe::ThresholdParameter*>(&::caffe::ThresholdParameter::default_instance());
window_data_param_ = const_cast< ::caffe::WindowDataParameter*>(&::caffe::WindowDataParameter::default_instance());
transform_param_ = const_cast< ::caffe::TransformationParameter*>(&::caffe::TransformationParameter::default_instance());
loss_param_ = const_cast< ::caffe::LossParameter*>(&::caffe::LossParameter::default_instance());
layer_ = const_cast< ::caffe::V0LayerParameter*>(&::caffe::V0LayerParameter::default_instance());
}
LayerParameter::LayerParameter(const LayerParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void LayerParameter::SharedCtor() {
_cached_size_ = 0;
name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
type_ = 0;
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;
multi_stage_meanfield_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;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
LayerParameter::~LayerParameter() {
SharedDtor();
}
void LayerParameter::SharedDtor() {
if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (this != default_instance_) {
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 multi_stage_meanfield_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 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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
LayerParameter* LayerParameter::default_instance_ = NULL;
LayerParameter* LayerParameter::New() const {
return new LayerParameter;
}
void LayerParameter::Clear() {
if (_has_bits_[2 / 32] & (0xffu << (2 % 32))) {
if (has_name()) {
if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
}
type_ = 0;
}
if (_has_bits_[12 / 32] & (0xffu << (12 % 32))) {
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] & (0xffu << (16 % 32))) {
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] & (0xffu << (24 % 32))) {
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_multi_stage_meanfield_param()) {
if (multi_stage_meanfield_param_ != NULL) multi_stage_meanfield_param_->::caffe::MultiStageMeanfieldParameter::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_bits_[32 / 32] & (0xffu << (32 % 32))) {
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_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_bits_[40 / 32] & (0xffu << (40 % 32))) {
if (has_window_data_param()) {
if (window_data_param_ != NULL) window_data_param_->::caffe::WindowDataParameter::Clear();
}
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();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool LayerParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .caffe.V0LayerParameter layer = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_layer()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_bottom;
break;
}
// repeated string bottom = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_bottom:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_bottom()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->bottom(this->bottom_size() - 1).data(),
this->bottom(this->bottom_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_bottom;
if (input->ExpectTag(26)) goto parse_top;
break;
}
// repeated string top = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_top:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_top()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->top(this->top_size() - 1).data(),
this->top(this->top_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_top;
if (input->ExpectTag(34)) goto parse_name;
break;
}
// optional string name = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_name:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_type;
break;
}
// optional .caffe.LayerParameter.LayerType type = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_type:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::caffe::LayerParameter_LayerType_IsValid(value)) {
set_type(static_cast< ::caffe::LayerParameter_LayerType >(value));
} else {
mutable_unknown_fields()->AddVarint(5, value);
}
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(50)) goto parse_blobs;
break;
}
// repeated .caffe.BlobProto blobs = 6;
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_blobs:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_blobs()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(50)) goto parse_blobs;
if (input->ExpectTag(61)) goto parse_blobs_lr;
break;
}
// repeated float blobs_lr = 7;
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_blobs_lr())));
} else {
goto handle_uninterpreted;
}
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_weight_decay())));
} else {
goto handle_uninterpreted;
}
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_concat_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_concat_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(82)) goto parse_convolution_param;
break;
}
// optional .caffe.ConvolutionParameter convolution_param = 10;
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_convolution_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_convolution_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(90)) goto parse_data_param;
break;
}
// optional .caffe.DataParameter data_param = 11;
case 11: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_data_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_data_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(98)) goto parse_dropout_param;
break;
}
// optional .caffe.DropoutParameter dropout_param = 12;
case 12: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_dropout_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_dropout_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(106)) goto parse_hdf5_data_param;
break;
}
// optional .caffe.HDF5DataParameter hdf5_data_param = 13;
case 13: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_hdf5_data_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_hdf5_data_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(114)) goto parse_hdf5_output_param;
break;
}
// optional .caffe.HDF5OutputParameter hdf5_output_param = 14;
case 14: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_hdf5_output_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_hdf5_output_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(122)) goto parse_image_data_param;
break;
}
// optional .caffe.ImageDataParameter image_data_param = 15;
case 15: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_image_data_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_image_data_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(130)) goto parse_infogain_loss_param;
break;
}
// optional .caffe.InfogainLossParameter infogain_loss_param = 16;
case 16: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_infogain_loss_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_infogain_loss_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(138)) goto parse_inner_product_param;
break;
}
// optional .caffe.InnerProductParameter inner_product_param = 17;
case 17: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_inner_product_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_inner_product_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(146)) goto parse_lrn_param;
break;
}
// optional .caffe.LRNParameter lrn_param = 18;
case 18: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_lrn_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_lrn_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(154)) goto parse_pooling_param;
break;
}
// optional .caffe.PoolingParameter pooling_param = 19;
case 19: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_pooling_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_pooling_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(162)) goto parse_window_data_param;
break;
}
// optional .caffe.WindowDataParameter window_data_param = 20;
case 20: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_window_data_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_window_data_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(170)) goto parse_power_param;
break;
}
// optional .caffe.PowerParameter power_param = 21;
case 21: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_power_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_power_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(178)) goto parse_memory_data_param;
break;
}
// optional .caffe.MemoryDataParameter memory_data_param = 22;
case 22: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_memory_data_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_memory_data_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(186)) goto parse_argmax_param;
break;
}
// optional .caffe.ArgMaxParameter argmax_param = 23;
case 23: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_argmax_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_argmax_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(194)) goto parse_eltwise_param;
break;
}
// optional .caffe.EltwiseParameter eltwise_param = 24;
case 24: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_eltwise_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_eltwise_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(202)) goto parse_threshold_param;
break;
}
// optional .caffe.ThresholdParameter threshold_param = 25;
case 25: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_threshold_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_threshold_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(210)) goto parse_dummy_data_param;
break;
}
// optional .caffe.DummyDataParameter dummy_data_param = 26;
case 26: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_dummy_data_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_dummy_data_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(218)) goto parse_accuracy_param;
break;
}
// optional .caffe.AccuracyParameter accuracy_param = 27;
case 27: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_accuracy_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_accuracy_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(234)) goto parse_hinge_loss_param;
break;
}
// optional .caffe.HingeLossParameter hinge_loss_param = 29;
case 29: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_hinge_loss_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_hinge_loss_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(242)) goto parse_relu_param;
break;
}
// optional .caffe.ReLUParameter relu_param = 30;
case 30: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_relu_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_relu_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(250)) goto parse_slice_param;
break;
}
// optional .caffe.SliceParameter slice_param = 31;
case 31: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_slice_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_slice_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(258)) goto parse_include;
break;
}
// repeated .caffe.NetStateRule include = 32;
case 32: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_include:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_include()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(258)) goto parse_include;
if (input->ExpectTag(266)) goto parse_exclude;
break;
}
// repeated .caffe.NetStateRule exclude = 33;
case 33: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_exclude:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_exclude()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(266)) goto parse_exclude;
if (input->ExpectTag(274)) goto parse_mvn_param;
break;
}
// optional .caffe.MVNParameter mvn_param = 34;
case 34: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_mvn_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_mvn_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(285)) goto parse_loss_weight;
break;
}
// repeated float loss_weight = 35;
case 35: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_loss_weight())));
} else {
goto handle_uninterpreted;
}
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_transform_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_transform_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(298)) goto parse_tanh_param;
break;
}
// optional .caffe.TanHParameter tanh_param = 37;
case 37: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_tanh_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_tanh_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(306)) goto parse_sigmoid_param;
break;
}
// optional .caffe.SigmoidParameter sigmoid_param = 38;
case 38: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_sigmoid_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_sigmoid_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(314)) goto parse_softmax_param;
break;
}
// optional .caffe.SoftmaxParameter softmax_param = 39;
case 39: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_softmax_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_softmax_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(322)) goto parse_contrastive_loss_param;
break;
}
// optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40;
case 40: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_contrastive_loss_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_contrastive_loss_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(330)) goto parse_exp_param;
break;
}
// optional .caffe.ExpParameter exp_param = 41;
case 41: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_exp_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_exp_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(338)) goto parse_loss_param;
break;
}
// optional .caffe.LossParameter loss_param = 42;
case 42: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_loss_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_loss_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(354)) goto parse_multi_stage_meanfield_param;
break;
}
// optional .caffe.MultiStageMeanfieldParameter multi_stage_meanfield_param = 44;
case 44: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_multi_stage_meanfield_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_multi_stage_meanfield_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(8010)) goto parse_param;
break;
}
// repeated string param = 1001;
case 1001: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->add_param()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->param(this->param_size() - 1).data(),
this->param(this->param_size() - 1).length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(8010)) goto parse_param;
if (input->ExpectTag(8016)) goto parse_blob_share_mode;
break;
}
// repeated .caffe.LayerParameter.DimCheckMode blob_share_mode = 1002;
case 1002: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_blob_share_mode:
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::caffe::LayerParameter_DimCheckMode_IsValid(value)) {
add_blob_share_mode(static_cast< ::caffe::LayerParameter_DimCheckMode >(value));
} else {
mutable_unknown_fields()->AddVarint(1002, value);
}
} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedEnumNoInline(
input,
&::caffe::LayerParameter_DimCheckMode_IsValid,
this->mutable_blob_share_mode())));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(8016)) goto parse_blob_share_mode;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void LayerParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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::VerifyUTF8String(
this->bottom(i).data(), this->bottom(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::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::VerifyUTF8String(
this->top(i).data(), this->top(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
3, this->top(i), output);
}
// optional string name = 4;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
4, this->name(), output);
}
// optional .caffe.LayerParameter.LayerType type = 5;
if (has_type()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
5, this->type(), output);
}
// repeated .caffe.BlobProto blobs = 6;
for (int i = 0; i < this->blobs_size(); 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 (int i = 0; i < this->include_size(); i++) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
32, this->include(i), output);
}
// repeated .caffe.NetStateRule exclude = 33;
for (int i = 0; i < this->exclude_size(); 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);
}
// optional .caffe.MultiStageMeanfieldParameter multi_stage_meanfield_param = 44;
if (has_multi_stage_meanfield_param()) {
::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
44, this->multi_stage_meanfield_param(), output);
}
// repeated string param = 1001;
for (int i = 0; i < this->param_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->param(i).data(), this->param(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1001, this->param(i), output);
}
// repeated .caffe.LayerParameter.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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* LayerParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional .caffe.V0LayerParameter layer = 1;
if (has_layer()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->layer(), target);
}
// repeated string bottom = 2;
for (int i = 0; i < this->bottom_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->bottom(i).data(), this->bottom(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->top(i).data(), this->top(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(3, this->top(i), target);
}
// optional string name = 4;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
4, this->name(), target);
}
// optional .caffe.LayerParameter.LayerType type = 5;
if (has_type()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
5, this->type(), target);
}
// repeated .caffe.BlobProto blobs = 6;
for (int i = 0; i < this->blobs_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
6, this->blobs(i), 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::
WriteMessageNoVirtualToArray(
9, this->concat_param(), target);
}
// optional .caffe.ConvolutionParameter convolution_param = 10;
if (has_convolution_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
10, this->convolution_param(), target);
}
// optional .caffe.DataParameter data_param = 11;
if (has_data_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
11, this->data_param(), target);
}
// optional .caffe.DropoutParameter dropout_param = 12;
if (has_dropout_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
12, this->dropout_param(), target);
}
// optional .caffe.HDF5DataParameter hdf5_data_param = 13;
if (has_hdf5_data_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
13, this->hdf5_data_param(), target);
}
// optional .caffe.HDF5OutputParameter hdf5_output_param = 14;
if (has_hdf5_output_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
14, this->hdf5_output_param(), target);
}
// optional .caffe.ImageDataParameter image_data_param = 15;
if (has_image_data_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
15, this->image_data_param(), target);
}
// optional .caffe.InfogainLossParameter infogain_loss_param = 16;
if (has_infogain_loss_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
16, this->infogain_loss_param(), target);
}
// optional .caffe.InnerProductParameter inner_product_param = 17;
if (has_inner_product_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
17, this->inner_product_param(), target);
}
// optional .caffe.LRNParameter lrn_param = 18;
if (has_lrn_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
18, this->lrn_param(), target);
}
// optional .caffe.PoolingParameter pooling_param = 19;
if (has_pooling_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
19, this->pooling_param(), target);
}
// optional .caffe.WindowDataParameter window_data_param = 20;
if (has_window_data_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
20, this->window_data_param(), target);
}
// optional .caffe.PowerParameter power_param = 21;
if (has_power_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
21, this->power_param(), target);
}
// optional .caffe.MemoryDataParameter memory_data_param = 22;
if (has_memory_data_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
22, this->memory_data_param(), target);
}
// optional .caffe.ArgMaxParameter argmax_param = 23;
if (has_argmax_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
23, this->argmax_param(), target);
}
// optional .caffe.EltwiseParameter eltwise_param = 24;
if (has_eltwise_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
24, this->eltwise_param(), target);
}
// optional .caffe.ThresholdParameter threshold_param = 25;
if (has_threshold_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
25, this->threshold_param(), target);
}
// optional .caffe.DummyDataParameter dummy_data_param = 26;
if (has_dummy_data_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
26, this->dummy_data_param(), target);
}
// optional .caffe.AccuracyParameter accuracy_param = 27;
if (has_accuracy_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
27, this->accuracy_param(), target);
}
// optional .caffe.HingeLossParameter hinge_loss_param = 29;
if (has_hinge_loss_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
29, this->hinge_loss_param(), target);
}
// optional .caffe.ReLUParameter relu_param = 30;
if (has_relu_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
30, this->relu_param(), target);
}
// optional .caffe.SliceParameter slice_param = 31;
if (has_slice_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
31, this->slice_param(), target);
}
// repeated .caffe.NetStateRule include = 32;
for (int i = 0; i < this->include_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
32, this->include(i), target);
}
// repeated .caffe.NetStateRule exclude = 33;
for (int i = 0; i < this->exclude_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
33, this->exclude(i), target);
}
// optional .caffe.MVNParameter mvn_param = 34;
if (has_mvn_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
34, this->mvn_param(), 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::
WriteMessageNoVirtualToArray(
36, this->transform_param(), target);
}
// optional .caffe.TanHParameter tanh_param = 37;
if (has_tanh_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
37, this->tanh_param(), target);
}
// optional .caffe.SigmoidParameter sigmoid_param = 38;
if (has_sigmoid_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
38, this->sigmoid_param(), target);
}
// optional .caffe.SoftmaxParameter softmax_param = 39;
if (has_softmax_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
39, this->softmax_param(), target);
}
// optional .caffe.ContrastiveLossParameter contrastive_loss_param = 40;
if (has_contrastive_loss_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
40, this->contrastive_loss_param(), target);
}
// optional .caffe.ExpParameter exp_param = 41;
if (has_exp_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
41, this->exp_param(), target);
}
// optional .caffe.LossParameter loss_param = 42;
if (has_loss_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
42, this->loss_param(), target);
}
// optional .caffe.MultiStageMeanfieldParameter multi_stage_meanfield_param = 44;
if (has_multi_stage_meanfield_param()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
44, this->multi_stage_meanfield_param(), target);
}
// repeated string param = 1001;
for (int i = 0; i < this->param_size(); i++) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->param(i).data(), this->param(i).length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target = ::google::protobuf::internal::WireFormatLite::
WriteStringToArray(1001, this->param(i), target);
}
// repeated .caffe.LayerParameter.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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int LayerParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[2 / 32] & (0xffu << (2 % 32))) {
// optional string name = 4;
if (has_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->name());
}
// optional .caffe.LayerParameter.LayerType type = 5;
if (has_type()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
}
}
if (_has_bits_[12 / 32] & (0xffu << (12 % 32))) {
// 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] & (0xffu << (16 % 32))) {
// 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] & (0xffu << (24 % 32))) {
// 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.MultiStageMeanfieldParameter multi_stage_meanfield_param = 44;
if (has_multi_stage_meanfield_param()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->multi_stage_meanfield_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());
}
}
if (_has_bits_[32 / 32] & (0xffu << (32 % 32))) {
// optional .caffe.PoolingParameter pooling_param = 19;
if (has_pooling_param()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->pooling_param());
}
// 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());
}
}
if (_has_bits_[40 / 32] & (0xffu << (40 % 32))) {
// optional .caffe.WindowDataParameter window_data_param = 20;
if (has_window_data_param()) {
total_size += 2 +
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->window_data_param());
}
// 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 * 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 * 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;
total_size += 2 * this->include_size();
for (int i = 0; i < this->include_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->include(i));
}
// repeated .caffe.NetStateRule exclude = 33;
total_size += 2 * this->exclude_size();
for (int i = 0; i < this->exclude_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->exclude(i));
}
// repeated .caffe.BlobProto blobs = 6;
total_size += 1 * this->blobs_size();
for (int i = 0; i < this->blobs_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->blobs(i));
}
// repeated string param = 1001;
total_size += 2 * this->param_size();
for (int i = 0; i < this->param_size(); i++) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this->param(i));
}
// repeated .caffe.LayerParameter.DimCheckMode blob_share_mode = 1002;
{
int data_size = 0;
for (int i = 0; i < this->blob_share_mode_size(); i++) {
data_size += ::google::protobuf::internal::WireFormatLite::EnumSize(
this->blob_share_mode(i));
}
total_size += 2 * this->blob_share_mode_size() + data_size;
}
// repeated float blobs_lr = 7;
{
int data_size = 0;
data_size = 4 * this->blobs_lr_size();
total_size += 1 * this->blobs_lr_size() + data_size;
}
// repeated float weight_decay = 8;
{
int data_size = 0;
data_size = 4 * this->weight_decay_size();
total_size += 1 * this->weight_decay_size() + data_size;
}
// repeated float loss_weight = 35;
{
int data_size = 0;
data_size = 4 * this->loss_weight_size();
total_size += 2 * this->loss_weight_size() + data_size;
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void LayerParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const LayerParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const LayerParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void LayerParameter::MergeFrom(const LayerParameter& from) {
GOOGLE_CHECK_NE(&from, this);
bottom_.MergeFrom(from.bottom_);
top_.MergeFrom(from.top_);
include_.MergeFrom(from.include_);
exclude_.MergeFrom(from.exclude_);
blobs_.MergeFrom(from.blobs_);
param_.MergeFrom(from.param_);
blob_share_mode_.MergeFrom(from.blob_share_mode_);
blobs_lr_.MergeFrom(from.blobs_lr_);
weight_decay_.MergeFrom(from.weight_decay_);
loss_weight_.MergeFrom(from.loss_weight_);
if (from._has_bits_[2 / 32] & (0xffu << (2 % 32))) {
if (from.has_name()) {
set_name(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_multi_stage_meanfield_param()) {
mutable_multi_stage_meanfield_param()->::caffe::MultiStageMeanfieldParameter::MergeFrom(from.multi_stage_meanfield_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_bits_[32 / 32] & (0xffu << (32 % 32))) {
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_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_bits_[40 / 32] & (0xffu << (40 % 32))) {
if (from.has_window_data_param()) {
mutable_window_data_param()->::caffe::WindowDataParameter::MergeFrom(from.window_data_param());
}
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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void LayerParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void LayerParameter::CopyFrom(const LayerParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool LayerParameter::IsInitialized() const {
if (has_multi_stage_meanfield_param()) {
if (!this->multi_stage_meanfield_param().IsInitialized()) return false;
}
return true;
}
void LayerParameter::Swap(LayerParameter* other) {
if (other != this) {
bottom_.Swap(&other->bottom_);
top_.Swap(&other->top_);
std::swap(name_, other->name_);
include_.Swap(&other->include_);
exclude_.Swap(&other->exclude_);
std::swap(type_, other->type_);
blobs_.Swap(&other->blobs_);
param_.Swap(&other->param_);
blob_share_mode_.Swap(&other->blob_share_mode_);
blobs_lr_.Swap(&other->blobs_lr_);
weight_decay_.Swap(&other->weight_decay_);
loss_weight_.Swap(&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(multi_stage_meanfield_param_, other->multi_stage_meanfield_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]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int TransformationParameter::kScaleFieldNumber;
const int TransformationParameter::kMirrorFieldNumber;
const int TransformationParameter::kCropSizeFieldNumber;
const int TransformationParameter::kMeanFileFieldNumber;
const int TransformationParameter::kMeanValueFieldNumber;
#endif // !_MSC_VER
TransformationParameter::TransformationParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void TransformationParameter::InitAsDefaultInstance() {
}
TransformationParameter::TransformationParameter(const TransformationParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void TransformationParameter::SharedCtor() {
_cached_size_ = 0;
scale_ = 1;
mirror_ = false;
crop_size_ = 0u;
mean_file_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
TransformationParameter::~TransformationParameter() {
SharedDtor();
}
void TransformationParameter::SharedDtor() {
if (mean_file_ != &::google::protobuf::internal::kEmptyString) {
delete mean_file_;
}
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
TransformationParameter* TransformationParameter::default_instance_ = NULL;
TransformationParameter* TransformationParameter::New() const {
return new TransformationParameter;
}
void TransformationParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
scale_ = 1;
mirror_ = false;
crop_size_ = 0u;
if (has_mean_file()) {
if (mean_file_ != &::google::protobuf::internal::kEmptyString) {
mean_file_->clear();
}
}
}
mean_value_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool TransformationParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional float scale = 1 [default = 1];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &scale_)));
set_has_scale();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_mirror;
break;
}
// optional bool mirror = 2 [default = false];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_mirror:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &mirror_)));
set_has_mirror();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_crop_size;
break;
}
// optional uint32 crop_size = 3 [default = 0];
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_crop_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &crop_size_)));
set_has_crop_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(34)) goto parse_mean_file;
break;
}
// optional string mean_file = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_mean_file:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_mean_file()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(45)) goto parse_mean_value;
break;
}
// repeated float mean_value = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_mean_value())));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(45)) goto parse_mean_value;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void TransformationParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* TransformationParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int TransformationParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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());
}
}
// repeated float mean_value = 5;
{
int data_size = 0;
data_size = 4 * this->mean_value_size();
total_size += 1 * this->mean_value_size() + data_size;
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void TransformationParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const TransformationParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const TransformationParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void TransformationParameter::MergeFrom(const TransformationParameter& from) {
GOOGLE_CHECK_NE(&from, this);
mean_value_.MergeFrom(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_mean_file(from.mean_file());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void TransformationParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void TransformationParameter::CopyFrom(const TransformationParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TransformationParameter::IsInitialized() const {
return true;
}
void TransformationParameter::Swap(TransformationParameter* other) {
if (other != this) {
std::swap(scale_, other->scale_);
std::swap(mirror_, other->mirror_);
std::swap(crop_size_, other->crop_size_);
std::swap(mean_file_, other->mean_file_);
mean_value_.Swap(&other->mean_value_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int LossParameter::kIgnoreLabelFieldNumber;
const int LossParameter::kNormalizeFieldNumber;
#endif // !_MSC_VER
LossParameter::LossParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void LossParameter::InitAsDefaultInstance() {
}
LossParameter::LossParameter(const LossParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void LossParameter::SharedCtor() {
_cached_size_ = 0;
ignore_label_ = 0;
normalize_ = true;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
LossParameter::~LossParameter() {
SharedDtor();
}
void LossParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
LossParameter* LossParameter::default_instance_ = NULL;
LossParameter* LossParameter::New() const {
return new LossParameter;
}
void LossParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
ignore_label_ = 0;
normalize_ = true;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool LossParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional int32 ignore_label = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &ignore_label_)));
set_has_ignore_label();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_normalize;
break;
}
// optional bool normalize = 2 [default = true];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_normalize:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &normalize_)));
set_has_normalize();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void LossParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* LossParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int LossParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void LossParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const LossParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const LossParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void LossParameter::MergeFrom(const LossParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void LossParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void LossParameter::CopyFrom(const LossParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool LossParameter::IsInitialized() const {
return true;
}
void LossParameter::Swap(LossParameter* other) {
if (other != this) {
std::swap(ignore_label_, other->ignore_label_);
std::swap(normalize_, other->normalize_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int AccuracyParameter::kTopKFieldNumber;
#endif // !_MSC_VER
AccuracyParameter::AccuracyParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void AccuracyParameter::InitAsDefaultInstance() {
}
AccuracyParameter::AccuracyParameter(const AccuracyParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void AccuracyParameter::SharedCtor() {
_cached_size_ = 0;
top_k_ = 1u;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
AccuracyParameter::~AccuracyParameter() {
SharedDtor();
}
void AccuracyParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
AccuracyParameter* AccuracyParameter::default_instance_ = NULL;
AccuracyParameter* AccuracyParameter::New() const {
return new AccuracyParameter;
}
void AccuracyParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
top_k_ = 1u;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool AccuracyParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional uint32 top_k = 1 [default = 1];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &top_k_)));
set_has_top_k();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void AccuracyParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional uint32 top_k = 1 [default = 1];
if (has_top_k()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->top_k(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* AccuracyParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional uint32 top_k = 1 [default = 1];
if (has_top_k()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->top_k(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int AccuracyParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional uint32 top_k = 1 [default = 1];
if (has_top_k()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->top_k());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void AccuracyParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const AccuracyParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const AccuracyParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void AccuracyParameter::MergeFrom(const AccuracyParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_top_k()) {
set_top_k(from.top_k());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void AccuracyParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void AccuracyParameter::CopyFrom(const AccuracyParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool AccuracyParameter::IsInitialized() const {
return true;
}
void AccuracyParameter::Swap(AccuracyParameter* other) {
if (other != this) {
std::swap(top_k_, other->top_k_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int ArgMaxParameter::kOutMaxValFieldNumber;
const int ArgMaxParameter::kTopKFieldNumber;
#endif // !_MSC_VER
ArgMaxParameter::ArgMaxParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void ArgMaxParameter::InitAsDefaultInstance() {
}
ArgMaxParameter::ArgMaxParameter(const ArgMaxParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ArgMaxParameter::SharedCtor() {
_cached_size_ = 0;
out_max_val_ = false;
top_k_ = 1u;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ArgMaxParameter::~ArgMaxParameter() {
SharedDtor();
}
void ArgMaxParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
ArgMaxParameter* ArgMaxParameter::default_instance_ = NULL;
ArgMaxParameter* ArgMaxParameter::New() const {
return new ArgMaxParameter;
}
void ArgMaxParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
out_max_val_ = false;
top_k_ = 1u;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ArgMaxParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional bool out_max_val = 1 [default = false];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &out_max_val_)));
set_has_out_max_val();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_top_k;
break;
}
// optional uint32 top_k = 2 [default = 1];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_top_k:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &top_k_)));
set_has_top_k();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ArgMaxParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ArgMaxParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ArgMaxParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ArgMaxParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ArgMaxParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const ArgMaxParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ArgMaxParameter::MergeFrom(const ArgMaxParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ArgMaxParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ArgMaxParameter::CopyFrom(const ArgMaxParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ArgMaxParameter::IsInitialized() const {
return true;
}
void ArgMaxParameter::Swap(ArgMaxParameter* other) {
if (other != this) {
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]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int ConcatParameter::kConcatDimFieldNumber;
#endif // !_MSC_VER
ConcatParameter::ConcatParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void ConcatParameter::InitAsDefaultInstance() {
}
ConcatParameter::ConcatParameter(const ConcatParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ConcatParameter::SharedCtor() {
_cached_size_ = 0;
concat_dim_ = 1u;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ConcatParameter::~ConcatParameter() {
SharedDtor();
}
void ConcatParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
ConcatParameter* ConcatParameter::default_instance_ = NULL;
ConcatParameter* ConcatParameter::New() const {
return new ConcatParameter;
}
void ConcatParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
concat_dim_ = 1u;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ConcatParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional uint32 concat_dim = 1 [default = 1];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &concat_dim_)));
set_has_concat_dim();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ConcatParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional uint32 concat_dim = 1 [default = 1];
if (has_concat_dim()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->concat_dim(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ConcatParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional uint32 concat_dim = 1 [default = 1];
if (has_concat_dim()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->concat_dim(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ConcatParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional uint32 concat_dim = 1 [default = 1];
if (has_concat_dim()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->concat_dim());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ConcatParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ConcatParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const ConcatParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ConcatParameter::MergeFrom(const ConcatParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_concat_dim()) {
set_concat_dim(from.concat_dim());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ConcatParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ConcatParameter::CopyFrom(const ConcatParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ConcatParameter::IsInitialized() const {
return true;
}
void ConcatParameter::Swap(ConcatParameter* other) {
if (other != this) {
std::swap(concat_dim_, other->concat_dim_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int ContrastiveLossParameter::kMarginFieldNumber;
#endif // !_MSC_VER
ContrastiveLossParameter::ContrastiveLossParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void ContrastiveLossParameter::InitAsDefaultInstance() {
}
ContrastiveLossParameter::ContrastiveLossParameter(const ContrastiveLossParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ContrastiveLossParameter::SharedCtor() {
_cached_size_ = 0;
margin_ = 1;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ContrastiveLossParameter::~ContrastiveLossParameter() {
SharedDtor();
}
void ContrastiveLossParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
ContrastiveLossParameter* ContrastiveLossParameter::default_instance_ = NULL;
ContrastiveLossParameter* ContrastiveLossParameter::New() const {
return new ContrastiveLossParameter;
}
void ContrastiveLossParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
margin_ = 1;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ContrastiveLossParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional float margin = 1 [default = 1];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &margin_)));
set_has_margin();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ContrastiveLossParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional float margin = 1 [default = 1];
if (has_margin()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->margin(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ContrastiveLossParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional float margin = 1 [default = 1];
if (has_margin()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->margin(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ContrastiveLossParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional float margin = 1 [default = 1];
if (has_margin()) {
total_size += 1 + 4;
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ContrastiveLossParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ContrastiveLossParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const ContrastiveLossParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ContrastiveLossParameter::MergeFrom(const ContrastiveLossParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_margin()) {
set_margin(from.margin());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ContrastiveLossParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ContrastiveLossParameter::CopyFrom(const ContrastiveLossParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContrastiveLossParameter::IsInitialized() const {
return true;
}
void ContrastiveLossParameter::Swap(ContrastiveLossParameter* other) {
if (other != this) {
std::swap(margin_, other->margin_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
#ifndef _MSC_VER
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;
#endif // !_MSC_VER
ConvolutionParameter::ConvolutionParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void ConvolutionParameter::InitAsDefaultInstance() {
weight_filler_ = const_cast< ::caffe::FillerParameter*>(&::caffe::FillerParameter::default_instance());
bias_filler_ = const_cast< ::caffe::FillerParameter*>(&::caffe::FillerParameter::default_instance());
}
ConvolutionParameter::ConvolutionParameter(const ConvolutionParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ConvolutionParameter::SharedCtor() {
_cached_size_ = 0;
num_output_ = 0u;
bias_term_ = true;
pad_ = 0u;
pad_h_ = 0u;
pad_w_ = 0u;
kernel_size_ = 0u;
kernel_h_ = 0u;
kernel_w_ = 0u;
group_ = 1u;
stride_ = 1u;
stride_h_ = 0u;
stride_w_ = 0u;
weight_filler_ = NULL;
bias_filler_ = NULL;
engine_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ConvolutionParameter::~ConvolutionParameter() {
SharedDtor();
}
void ConvolutionParameter::SharedDtor() {
if (this != default_instance_) {
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
ConvolutionParameter* ConvolutionParameter::default_instance_ = NULL;
ConvolutionParameter* ConvolutionParameter::New() const {
return new ConvolutionParameter;
}
void ConvolutionParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
num_output_ = 0u;
bias_term_ = true;
pad_ = 0u;
pad_h_ = 0u;
pad_w_ = 0u;
kernel_size_ = 0u;
kernel_h_ = 0u;
kernel_w_ = 0u;
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
group_ = 1u;
stride_ = 1u;
stride_h_ = 0u;
stride_w_ = 0u;
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();
}
engine_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ConvolutionParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional uint32 num_output = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &num_output_)));
set_has_num_output();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_bias_term;
break;
}
// optional bool bias_term = 2 [default = true];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_bias_term:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &bias_term_)));
set_has_bias_term();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_pad;
break;
}
// optional uint32 pad = 3 [default = 0];
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_pad:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &pad_)));
set_has_pad();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_kernel_size;
break;
}
// optional uint32 kernel_size = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_kernel_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &kernel_size_)));
set_has_kernel_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_group;
break;
}
// optional uint32 group = 5 [default = 1];
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_group:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &group_)));
set_has_group();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(48)) goto parse_stride;
break;
}
// optional uint32 stride = 6 [default = 1];
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_stride:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &stride_)));
set_has_stride();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(58)) goto parse_weight_filler;
break;
}
// optional .caffe.FillerParameter weight_filler = 7;
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_weight_filler:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_weight_filler()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(66)) goto parse_bias_filler;
break;
}
// optional .caffe.FillerParameter bias_filler = 8;
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_bias_filler:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_bias_filler()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(72)) goto parse_pad_h;
break;
}
// optional uint32 pad_h = 9 [default = 0];
case 9: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_pad_h:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &pad_h_)));
set_has_pad_h();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(80)) goto parse_pad_w;
break;
}
// optional uint32 pad_w = 10 [default = 0];
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_pad_w:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &pad_w_)));
set_has_pad_w();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(88)) goto parse_kernel_h;
break;
}
// optional uint32 kernel_h = 11;
case 11: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_kernel_h:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &kernel_h_)));
set_has_kernel_h();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(96)) goto parse_kernel_w;
break;
}
// optional uint32 kernel_w = 12;
case 12: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_kernel_w:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &kernel_w_)));
set_has_kernel_w();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(104)) goto parse_stride_h;
break;
}
// optional uint32 stride_h = 13;
case 13: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_stride_h:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &stride_h_)));
set_has_stride_h();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(112)) goto parse_stride_w;
break;
}
// optional uint32 stride_w = 14;
case 14: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_stride_w:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &stride_w_)));
set_has_stride_w();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(120)) goto parse_engine;
break;
}
// optional .caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
case 15: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ConvolutionParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ConvolutionParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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::
WriteMessageNoVirtualToArray(
7, this->weight_filler(), target);
}
// optional .caffe.FillerParameter bias_filler = 8;
if (has_bias_filler()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
8, this->bias_filler(), 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);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ConvolutionParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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] & (0xffu << (8 % 32))) {
// 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());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ConvolutionParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ConvolutionParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const ConvolutionParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ConvolutionParameter::MergeFrom(const ConvolutionParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ConvolutionParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ConvolutionParameter::CopyFrom(const ConvolutionParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ConvolutionParameter::IsInitialized() const {
return true;
}
void ConvolutionParameter::Swap(ConvolutionParameter* other) {
if (other != this) {
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(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
const ::google::protobuf::EnumDescriptor* MultiStageMeanfieldParameter_Mode_descriptor() {
protobuf_AssignDescriptorsOnce();
return MultiStageMeanfieldParameter_Mode_descriptor_;
}
bool MultiStageMeanfieldParameter_Mode_IsValid(int value) {
switch(value) {
case 0:
return true;
default:
return false;
}
}
#ifndef _MSC_VER
const MultiStageMeanfieldParameter_Mode MultiStageMeanfieldParameter::POTTS;
const MultiStageMeanfieldParameter_Mode MultiStageMeanfieldParameter::Mode_MIN;
const MultiStageMeanfieldParameter_Mode MultiStageMeanfieldParameter::Mode_MAX;
const int MultiStageMeanfieldParameter::Mode_ARRAYSIZE;
#endif // _MSC_VER
#ifndef _MSC_VER
const int MultiStageMeanfieldParameter::kCompatibilityModeFieldNumber;
const int MultiStageMeanfieldParameter::kThresholdFieldNumber;
const int MultiStageMeanfieldParameter::kThetaAlphaFieldNumber;
const int MultiStageMeanfieldParameter::kThetaBetaFieldNumber;
const int MultiStageMeanfieldParameter::kThetaGammaFieldNumber;
const int MultiStageMeanfieldParameter::kNumIterationsFieldNumber;
const int MultiStageMeanfieldParameter::kSpatialFilterWeightFieldNumber;
const int MultiStageMeanfieldParameter::kBilateralFilterWeightFieldNumber;
const int MultiStageMeanfieldParameter::kForcedSpatialFilterWeightFieldNumber;
const int MultiStageMeanfieldParameter::kForcedBilateralFilterWeightFieldNumber;
#endif // !_MSC_VER
MultiStageMeanfieldParameter::MultiStageMeanfieldParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void MultiStageMeanfieldParameter::InitAsDefaultInstance() {
}
MultiStageMeanfieldParameter::MultiStageMeanfieldParameter(const MultiStageMeanfieldParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void MultiStageMeanfieldParameter::SharedCtor() {
_cached_size_ = 0;
compatibility_mode_ = 0;
threshold_ = 0;
theta_alpha_ = 10;
theta_beta_ = 10;
theta_gamma_ = 10;
num_iterations_ = 1u;
spatial_filter_weight_ = 1;
bilateral_filter_weight_ = 1;
forced_spatial_filter_weight_ = 0;
forced_bilateral_filter_weight_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
MultiStageMeanfieldParameter::~MultiStageMeanfieldParameter() {
SharedDtor();
}
void MultiStageMeanfieldParameter::SharedDtor() {
if (this != default_instance_) {
}
}
void MultiStageMeanfieldParameter::SetCachedSize(int size) const {
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ::google::protobuf::Descriptor* MultiStageMeanfieldParameter::descriptor() {
protobuf_AssignDescriptorsOnce();
return MultiStageMeanfieldParameter_descriptor_;
}
const MultiStageMeanfieldParameter& MultiStageMeanfieldParameter::default_instance() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
MultiStageMeanfieldParameter* MultiStageMeanfieldParameter::default_instance_ = NULL;
MultiStageMeanfieldParameter* MultiStageMeanfieldParameter::New() const {
return new MultiStageMeanfieldParameter;
}
void MultiStageMeanfieldParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
compatibility_mode_ = 0;
threshold_ = 0;
theta_alpha_ = 10;
theta_beta_ = 10;
theta_gamma_ = 10;
num_iterations_ = 1u;
spatial_filter_weight_ = 1;
bilateral_filter_weight_ = 1;
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
forced_spatial_filter_weight_ = 0;
forced_bilateral_filter_weight_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool MultiStageMeanfieldParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .caffe.MultiStageMeanfieldParameter.Mode compatibility_mode = 1 [default = POTTS];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
int value;
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
input, &value)));
if (::caffe::MultiStageMeanfieldParameter_Mode_IsValid(value)) {
set_compatibility_mode(static_cast< ::caffe::MultiStageMeanfieldParameter_Mode >(value));
} else {
mutable_unknown_fields()->AddVarint(1, value);
}
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(21)) goto parse_threshold;
break;
}
// optional float threshold = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_threshold:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &threshold_)));
set_has_threshold();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(29)) goto parse_theta_alpha;
break;
}
// required float theta_alpha = 3 [default = 10];
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_theta_alpha:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &theta_alpha_)));
set_has_theta_alpha();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(37)) goto parse_theta_beta;
break;
}
// required float theta_beta = 4 [default = 10];
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_theta_beta:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &theta_beta_)));
set_has_theta_beta();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(45)) goto parse_theta_gamma;
break;
}
// required float theta_gamma = 5 [default = 10];
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_theta_gamma:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &theta_gamma_)));
set_has_theta_gamma();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(48)) goto parse_num_iterations;
break;
}
// required uint32 num_iterations = 6 [default = 1];
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_num_iterations:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &num_iterations_)));
set_has_num_iterations();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(61)) goto parse_spatial_filter_weight;
break;
}
// optional float spatial_filter_weight = 7 [default = 1];
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_spatial_filter_weight:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &spatial_filter_weight_)));
set_has_spatial_filter_weight();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(69)) goto parse_bilateral_filter_weight;
break;
}
// optional float bilateral_filter_weight = 8 [default = 1];
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_bilateral_filter_weight:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &bilateral_filter_weight_)));
set_has_bilateral_filter_weight();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(77)) goto parse_forced_spatial_filter_weight;
break;
}
// optional float forced_spatial_filter_weight = 9;
case 9: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_forced_spatial_filter_weight:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &forced_spatial_filter_weight_)));
set_has_forced_spatial_filter_weight();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(85)) goto parse_forced_bilateral_filter_weight;
break;
}
// optional float forced_bilateral_filter_weight = 10;
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_forced_bilateral_filter_weight:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &forced_bilateral_filter_weight_)));
set_has_forced_bilateral_filter_weight();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void MultiStageMeanfieldParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional .caffe.MultiStageMeanfieldParameter.Mode compatibility_mode = 1 [default = POTTS];
if (has_compatibility_mode()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->compatibility_mode(), output);
}
// optional float threshold = 2;
if (has_threshold()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->threshold(), output);
}
// required float theta_alpha = 3 [default = 10];
if (has_theta_alpha()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->theta_alpha(), output);
}
// required float theta_beta = 4 [default = 10];
if (has_theta_beta()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->theta_beta(), output);
}
// required float theta_gamma = 5 [default = 10];
if (has_theta_gamma()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(5, this->theta_gamma(), output);
}
// required uint32 num_iterations = 6 [default = 1];
if (has_num_iterations()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(6, this->num_iterations(), output);
}
// optional float spatial_filter_weight = 7 [default = 1];
if (has_spatial_filter_weight()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(7, this->spatial_filter_weight(), output);
}
// optional float bilateral_filter_weight = 8 [default = 1];
if (has_bilateral_filter_weight()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(8, this->bilateral_filter_weight(), output);
}
// optional float forced_spatial_filter_weight = 9;
if (has_forced_spatial_filter_weight()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(9, this->forced_spatial_filter_weight(), output);
}
// optional float forced_bilateral_filter_weight = 10;
if (has_forced_bilateral_filter_weight()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(10, this->forced_bilateral_filter_weight(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* MultiStageMeanfieldParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional .caffe.MultiStageMeanfieldParameter.Mode compatibility_mode = 1 [default = POTTS];
if (has_compatibility_mode()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->compatibility_mode(), target);
}
// optional float threshold = 2;
if (has_threshold()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->threshold(), target);
}
// required float theta_alpha = 3 [default = 10];
if (has_theta_alpha()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->theta_alpha(), target);
}
// required float theta_beta = 4 [default = 10];
if (has_theta_beta()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->theta_beta(), target);
}
// required float theta_gamma = 5 [default = 10];
if (has_theta_gamma()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(5, this->theta_gamma(), target);
}
// required uint32 num_iterations = 6 [default = 1];
if (has_num_iterations()) {
target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(6, this->num_iterations(), target);
}
// optional float spatial_filter_weight = 7 [default = 1];
if (has_spatial_filter_weight()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(7, this->spatial_filter_weight(), target);
}
// optional float bilateral_filter_weight = 8 [default = 1];
if (has_bilateral_filter_weight()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(8, this->bilateral_filter_weight(), target);
}
// optional float forced_spatial_filter_weight = 9;
if (has_forced_spatial_filter_weight()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(9, this->forced_spatial_filter_weight(), target);
}
// optional float forced_bilateral_filter_weight = 10;
if (has_forced_bilateral_filter_weight()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(10, this->forced_bilateral_filter_weight(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int MultiStageMeanfieldParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional .caffe.MultiStageMeanfieldParameter.Mode compatibility_mode = 1 [default = POTTS];
if (has_compatibility_mode()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->compatibility_mode());
}
// optional float threshold = 2;
if (has_threshold()) {
total_size += 1 + 4;
}
// required float theta_alpha = 3 [default = 10];
if (has_theta_alpha()) {
total_size += 1 + 4;
}
// required float theta_beta = 4 [default = 10];
if (has_theta_beta()) {
total_size += 1 + 4;
}
// required float theta_gamma = 5 [default = 10];
if (has_theta_gamma()) {
total_size += 1 + 4;
}
// required uint32 num_iterations = 6 [default = 1];
if (has_num_iterations()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::UInt32Size(
this->num_iterations());
}
// optional float spatial_filter_weight = 7 [default = 1];
if (has_spatial_filter_weight()) {
total_size += 1 + 4;
}
// optional float bilateral_filter_weight = 8 [default = 1];
if (has_bilateral_filter_weight()) {
total_size += 1 + 4;
}
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
// optional float forced_spatial_filter_weight = 9;
if (has_forced_spatial_filter_weight()) {
total_size += 1 + 4;
}
// optional float forced_bilateral_filter_weight = 10;
if (has_forced_bilateral_filter_weight()) {
total_size += 1 + 4;
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void MultiStageMeanfieldParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const MultiStageMeanfieldParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const MultiStageMeanfieldParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void MultiStageMeanfieldParameter::MergeFrom(const MultiStageMeanfieldParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_compatibility_mode()) {
set_compatibility_mode(from.compatibility_mode());
}
if (from.has_threshold()) {
set_threshold(from.threshold());
}
if (from.has_theta_alpha()) {
set_theta_alpha(from.theta_alpha());
}
if (from.has_theta_beta()) {
set_theta_beta(from.theta_beta());
}
if (from.has_theta_gamma()) {
set_theta_gamma(from.theta_gamma());
}
if (from.has_num_iterations()) {
set_num_iterations(from.num_iterations());
}
if (from.has_spatial_filter_weight()) {
set_spatial_filter_weight(from.spatial_filter_weight());
}
if (from.has_bilateral_filter_weight()) {
set_bilateral_filter_weight(from.bilateral_filter_weight());
}
}
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (from.has_forced_spatial_filter_weight()) {
set_forced_spatial_filter_weight(from.forced_spatial_filter_weight());
}
if (from.has_forced_bilateral_filter_weight()) {
set_forced_bilateral_filter_weight(from.forced_bilateral_filter_weight());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void MultiStageMeanfieldParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void MultiStageMeanfieldParameter::CopyFrom(const MultiStageMeanfieldParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool MultiStageMeanfieldParameter::IsInitialized() const {
if ((_has_bits_[0] & 0x0000003c) != 0x0000003c) return false;
return true;
}
void MultiStageMeanfieldParameter::Swap(MultiStageMeanfieldParameter* other) {
if (other != this) {
std::swap(compatibility_mode_, other->compatibility_mode_);
std::swap(threshold_, other->threshold_);
std::swap(theta_alpha_, other->theta_alpha_);
std::swap(theta_beta_, other->theta_beta_);
std::swap(theta_gamma_, other->theta_gamma_);
std::swap(num_iterations_, other->num_iterations_);
std::swap(spatial_filter_weight_, other->spatial_filter_weight_);
std::swap(bilateral_filter_weight_, other->bilateral_filter_weight_);
std::swap(forced_spatial_filter_weight_, other->forced_spatial_filter_weight_);
std::swap(forced_bilateral_filter_weight_, other->forced_bilateral_filter_weight_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
std::swap(_cached_size_, other->_cached_size_);
}
}
::google::protobuf::Metadata MultiStageMeanfieldParameter::GetMetadata() const {
protobuf_AssignDescriptorsOnce();
::google::protobuf::Metadata metadata;
metadata.descriptor = MultiStageMeanfieldParameter_descriptor_;
metadata.reflection = MultiStageMeanfieldParameter_reflection_;
return metadata;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
#ifndef _MSC_VER
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;
#endif // !_MSC_VER
DataParameter::DataParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void DataParameter::InitAsDefaultInstance() {
}
DataParameter::DataParameter(const DataParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void DataParameter::SharedCtor() {
_cached_size_ = 0;
source_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
batch_size_ = 0u;
rand_skip_ = 0u;
backend_ = 0;
scale_ = 1;
mean_file_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
crop_size_ = 0u;
mirror_ = false;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
DataParameter::~DataParameter() {
SharedDtor();
}
void DataParameter::SharedDtor() {
if (source_ != &::google::protobuf::internal::kEmptyString) {
delete source_;
}
if (mean_file_ != &::google::protobuf::internal::kEmptyString) {
delete mean_file_;
}
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
DataParameter* DataParameter::default_instance_ = NULL;
DataParameter* DataParameter::New() const {
return new DataParameter;
}
void DataParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_source()) {
if (source_ != &::google::protobuf::internal::kEmptyString) {
source_->clear();
}
}
batch_size_ = 0u;
rand_skip_ = 0u;
backend_ = 0;
scale_ = 1;
if (has_mean_file()) {
if (mean_file_ != &::google::protobuf::internal::kEmptyString) {
mean_file_->clear();
}
}
crop_size_ = 0u;
mirror_ = false;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool DataParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string source = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_source()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(21)) goto parse_scale;
break;
}
// optional float scale = 2 [default = 1];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_scale:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &scale_)));
set_has_scale();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_mean_file;
break;
}
// optional string mean_file = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_mean_file:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_mean_file()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_batch_size;
break;
}
// optional uint32 batch_size = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_batch_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &batch_size_)));
set_has_batch_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_crop_size;
break;
}
// optional uint32 crop_size = 5 [default = 0];
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_crop_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &crop_size_)));
set_has_crop_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(48)) goto parse_mirror;
break;
}
// optional bool mirror = 6 [default = false];
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_mirror:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &mirror_)));
set_has_mirror();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(56)) goto parse_rand_skip;
break;
}
// optional uint32 rand_skip = 7 [default = 0];
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_rand_skip:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &rand_skip_)));
set_has_rand_skip();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(64)) goto parse_backend;
break;
}
// optional .caffe.DataParameter.DB backend = 8 [default = LEVELDB];
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void DataParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string source = 1;
if (has_source()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* DataParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string source = 1;
if (has_source()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int DataParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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;
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void DataParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const DataParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const DataParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void DataParameter::MergeFrom(const DataParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_source()) {
set_source(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_mean_file(from.mean_file());
}
if (from.has_crop_size()) {
set_crop_size(from.crop_size());
}
if (from.has_mirror()) {
set_mirror(from.mirror());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void DataParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void DataParameter::CopyFrom(const DataParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DataParameter::IsInitialized() const {
return true;
}
void DataParameter::Swap(DataParameter* other) {
if (other != this) {
std::swap(source_, 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_);
std::swap(mean_file_, other->mean_file_);
std::swap(crop_size_, other->crop_size_);
std::swap(mirror_, other->mirror_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int DropoutParameter::kDropoutRatioFieldNumber;
#endif // !_MSC_VER
DropoutParameter::DropoutParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void DropoutParameter::InitAsDefaultInstance() {
}
DropoutParameter::DropoutParameter(const DropoutParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void DropoutParameter::SharedCtor() {
_cached_size_ = 0;
dropout_ratio_ = 0.5f;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
DropoutParameter::~DropoutParameter() {
SharedDtor();
}
void DropoutParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
DropoutParameter* DropoutParameter::default_instance_ = NULL;
DropoutParameter* DropoutParameter::New() const {
return new DropoutParameter;
}
void DropoutParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
dropout_ratio_ = 0.5f;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool DropoutParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional float dropout_ratio = 1 [default = 0.5];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &dropout_ratio_)));
set_has_dropout_ratio();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void DropoutParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional float dropout_ratio = 1 [default = 0.5];
if (has_dropout_ratio()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->dropout_ratio(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* DropoutParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional float dropout_ratio = 1 [default = 0.5];
if (has_dropout_ratio()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->dropout_ratio(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int DropoutParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional float dropout_ratio = 1 [default = 0.5];
if (has_dropout_ratio()) {
total_size += 1 + 4;
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void DropoutParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const DropoutParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const DropoutParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void DropoutParameter::MergeFrom(const DropoutParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_dropout_ratio()) {
set_dropout_ratio(from.dropout_ratio());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void DropoutParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void DropoutParameter::CopyFrom(const DropoutParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DropoutParameter::IsInitialized() const {
return true;
}
void DropoutParameter::Swap(DropoutParameter* other) {
if (other != this) {
std::swap(dropout_ratio_, other->dropout_ratio_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int DummyDataParameter::kDataFillerFieldNumber;
const int DummyDataParameter::kNumFieldNumber;
const int DummyDataParameter::kChannelsFieldNumber;
const int DummyDataParameter::kHeightFieldNumber;
const int DummyDataParameter::kWidthFieldNumber;
#endif // !_MSC_VER
DummyDataParameter::DummyDataParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void DummyDataParameter::InitAsDefaultInstance() {
}
DummyDataParameter::DummyDataParameter(const DummyDataParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void DummyDataParameter::SharedCtor() {
_cached_size_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
DummyDataParameter::~DummyDataParameter() {
SharedDtor();
}
void DummyDataParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
DummyDataParameter* DummyDataParameter::default_instance_ = NULL;
DummyDataParameter* DummyDataParameter::New() const {
return new DummyDataParameter;
}
void DummyDataParameter::Clear() {
data_filler_.Clear();
num_.Clear();
channels_.Clear();
height_.Clear();
width_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool DummyDataParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// repeated .caffe.FillerParameter data_filler = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_data_filler:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_data_filler()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(10)) goto parse_data_filler;
if (input->ExpectTag(16)) goto parse_num;
break;
}
// repeated uint32 num = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, this->mutable_num())));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_num;
if (input->ExpectTag(24)) goto parse_channels;
break;
}
// repeated uint32 channels = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, this->mutable_channels())));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_channels;
if (input->ExpectTag(32)) goto parse_height;
break;
}
// repeated uint32 height = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, this->mutable_height())));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_height;
if (input->ExpectTag(40)) goto parse_width;
break;
}
// repeated uint32 width = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, this->mutable_width())));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_width;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void DummyDataParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// repeated .caffe.FillerParameter data_filler = 1;
for (int i = 0; i < this->data_filler_size(); 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);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* DummyDataParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// repeated .caffe.FillerParameter data_filler = 1;
for (int i = 0; i < this->data_filler_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
1, this->data_filler(i), 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);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int DummyDataParameter::ByteSize() const {
int total_size = 0;
// repeated .caffe.FillerParameter data_filler = 1;
total_size += 1 * this->data_filler_size();
for (int i = 0; i < this->data_filler_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->data_filler(i));
}
// repeated uint32 num = 2;
{
int data_size = 0;
for (int i = 0; i < this->num_size(); i++) {
data_size += ::google::protobuf::internal::WireFormatLite::
UInt32Size(this->num(i));
}
total_size += 1 * this->num_size() + data_size;
}
// repeated uint32 channels = 3;
{
int data_size = 0;
for (int i = 0; i < this->channels_size(); i++) {
data_size += ::google::protobuf::internal::WireFormatLite::
UInt32Size(this->channels(i));
}
total_size += 1 * this->channels_size() + data_size;
}
// repeated uint32 height = 4;
{
int data_size = 0;
for (int i = 0; i < this->height_size(); i++) {
data_size += ::google::protobuf::internal::WireFormatLite::
UInt32Size(this->height(i));
}
total_size += 1 * this->height_size() + data_size;
}
// repeated uint32 width = 5;
{
int data_size = 0;
for (int i = 0; i < this->width_size(); i++) {
data_size += ::google::protobuf::internal::WireFormatLite::
UInt32Size(this->width(i));
}
total_size += 1 * this->width_size() + data_size;
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void DummyDataParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const DummyDataParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const DummyDataParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void DummyDataParameter::MergeFrom(const DummyDataParameter& from) {
GOOGLE_CHECK_NE(&from, this);
data_filler_.MergeFrom(from.data_filler_);
num_.MergeFrom(from.num_);
channels_.MergeFrom(from.channels_);
height_.MergeFrom(from.height_);
width_.MergeFrom(from.width_);
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void DummyDataParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void DummyDataParameter::CopyFrom(const DummyDataParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DummyDataParameter::IsInitialized() const {
return true;
}
void DummyDataParameter::Swap(DummyDataParameter* other) {
if (other != this) {
data_filler_.Swap(&other->data_filler_);
num_.Swap(&other->num_);
channels_.Swap(&other->channels_);
height_.Swap(&other->height_);
width_.Swap(&other->width_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
#ifndef _MSC_VER
const int EltwiseParameter::kOperationFieldNumber;
const int EltwiseParameter::kCoeffFieldNumber;
const int EltwiseParameter::kStableProdGradFieldNumber;
#endif // !_MSC_VER
EltwiseParameter::EltwiseParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void EltwiseParameter::InitAsDefaultInstance() {
}
EltwiseParameter::EltwiseParameter(const EltwiseParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void EltwiseParameter::SharedCtor() {
_cached_size_ = 0;
operation_ = 1;
stable_prod_grad_ = true;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
EltwiseParameter::~EltwiseParameter() {
SharedDtor();
}
void EltwiseParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
EltwiseParameter* EltwiseParameter::default_instance_ = NULL;
EltwiseParameter* EltwiseParameter::New() const {
return new EltwiseParameter;
}
void EltwiseParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
operation_ = 1;
stable_prod_grad_ = true;
}
coeff_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool EltwiseParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectTag(21)) goto parse_coeff;
break;
}
// repeated float coeff = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_coeff:
DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
1, 21, input, this->mutable_coeff())));
} else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_coeff())));
} else {
goto handle_uninterpreted;
}
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_stable_prod_grad:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &stable_prod_grad_)));
set_has_stable_prod_grad();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void EltwiseParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* EltwiseParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int EltwiseParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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;
{
int data_size = 0;
data_size = 4 * this->coeff_size();
total_size += 1 * this->coeff_size() + data_size;
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void EltwiseParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const EltwiseParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const EltwiseParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void EltwiseParameter::MergeFrom(const EltwiseParameter& from) {
GOOGLE_CHECK_NE(&from, this);
coeff_.MergeFrom(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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void EltwiseParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void EltwiseParameter::CopyFrom(const EltwiseParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool EltwiseParameter::IsInitialized() const {
return true;
}
void EltwiseParameter::Swap(EltwiseParameter* other) {
if (other != this) {
std::swap(operation_, other->operation_);
coeff_.Swap(&other->coeff_);
std::swap(stable_prod_grad_, other->stable_prod_grad_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int ExpParameter::kBaseFieldNumber;
const int ExpParameter::kScaleFieldNumber;
const int ExpParameter::kShiftFieldNumber;
#endif // !_MSC_VER
ExpParameter::ExpParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void ExpParameter::InitAsDefaultInstance() {
}
ExpParameter::ExpParameter(const ExpParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ExpParameter::SharedCtor() {
_cached_size_ = 0;
base_ = -1;
scale_ = 1;
shift_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ExpParameter::~ExpParameter() {
SharedDtor();
}
void ExpParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
ExpParameter* ExpParameter::default_instance_ = NULL;
ExpParameter* ExpParameter::New() const {
return new ExpParameter;
}
void ExpParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
base_ = -1;
scale_ = 1;
shift_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ExpParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional float base = 1 [default = -1];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &base_)));
set_has_base();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(21)) goto parse_scale;
break;
}
// optional float scale = 2 [default = 1];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_scale:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &scale_)));
set_has_scale();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(29)) goto parse_shift;
break;
}
// optional float shift = 3 [default = 0];
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_shift:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &shift_)));
set_has_shift();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ExpParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ExpParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ExpParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ExpParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ExpParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const ExpParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ExpParameter::MergeFrom(const ExpParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ExpParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ExpParameter::CopyFrom(const ExpParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ExpParameter::IsInitialized() const {
return true;
}
void ExpParameter::Swap(ExpParameter* other) {
if (other != this) {
std::swap(base_, other->base_);
std::swap(scale_, other->scale_);
std::swap(shift_, other->shift_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int HDF5DataParameter::kSourceFieldNumber;
const int HDF5DataParameter::kBatchSizeFieldNumber;
#endif // !_MSC_VER
HDF5DataParameter::HDF5DataParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void HDF5DataParameter::InitAsDefaultInstance() {
}
HDF5DataParameter::HDF5DataParameter(const HDF5DataParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void HDF5DataParameter::SharedCtor() {
_cached_size_ = 0;
source_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
batch_size_ = 0u;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
HDF5DataParameter::~HDF5DataParameter() {
SharedDtor();
}
void HDF5DataParameter::SharedDtor() {
if (source_ != &::google::protobuf::internal::kEmptyString) {
delete source_;
}
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
HDF5DataParameter* HDF5DataParameter::default_instance_ = NULL;
HDF5DataParameter* HDF5DataParameter::New() const {
return new HDF5DataParameter;
}
void HDF5DataParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_source()) {
if (source_ != &::google::protobuf::internal::kEmptyString) {
source_->clear();
}
}
batch_size_ = 0u;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool HDF5DataParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string source = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_source()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_batch_size;
break;
}
// optional uint32 batch_size = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_batch_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &batch_size_)));
set_has_batch_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void HDF5DataParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string source = 1;
if (has_source()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->source(), output);
}
// optional uint32 batch_size = 2;
if (has_batch_size()) {
::google::protobuf::internal::WireFormatLite::WriteUInt32(2, this->batch_size(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* HDF5DataParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string source = 1;
if (has_source()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int HDF5DataParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void HDF5DataParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const HDF5DataParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const HDF5DataParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void HDF5DataParameter::MergeFrom(const HDF5DataParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_source()) {
set_source(from.source());
}
if (from.has_batch_size()) {
set_batch_size(from.batch_size());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void HDF5DataParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void HDF5DataParameter::CopyFrom(const HDF5DataParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool HDF5DataParameter::IsInitialized() const {
return true;
}
void HDF5DataParameter::Swap(HDF5DataParameter* other) {
if (other != this) {
std::swap(source_, other->source_);
std::swap(batch_size_, other->batch_size_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int HDF5OutputParameter::kFileNameFieldNumber;
#endif // !_MSC_VER
HDF5OutputParameter::HDF5OutputParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void HDF5OutputParameter::InitAsDefaultInstance() {
}
HDF5OutputParameter::HDF5OutputParameter(const HDF5OutputParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void HDF5OutputParameter::SharedCtor() {
_cached_size_ = 0;
file_name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
HDF5OutputParameter::~HDF5OutputParameter() {
SharedDtor();
}
void HDF5OutputParameter::SharedDtor() {
if (file_name_ != &::google::protobuf::internal::kEmptyString) {
delete file_name_;
}
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
HDF5OutputParameter* HDF5OutputParameter::default_instance_ = NULL;
HDF5OutputParameter* HDF5OutputParameter::New() const {
return new HDF5OutputParameter;
}
void HDF5OutputParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_file_name()) {
if (file_name_ != &::google::protobuf::internal::kEmptyString) {
file_name_->clear();
}
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool HDF5OutputParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string file_name = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_file_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->file_name().data(), this->file_name().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void HDF5OutputParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string file_name = 1;
if (has_file_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->file_name().data(), this->file_name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->file_name(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* HDF5OutputParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string file_name = 1;
if (has_file_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->file_name().data(), this->file_name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->file_name(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int HDF5OutputParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional string file_name = 1;
if (has_file_name()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->file_name());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void HDF5OutputParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const HDF5OutputParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const HDF5OutputParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void HDF5OutputParameter::MergeFrom(const HDF5OutputParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_file_name()) {
set_file_name(from.file_name());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void HDF5OutputParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void HDF5OutputParameter::CopyFrom(const HDF5OutputParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool HDF5OutputParameter::IsInitialized() const {
return true;
}
void HDF5OutputParameter::Swap(HDF5OutputParameter* other) {
if (other != this) {
std::swap(file_name_, other->file_name_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
#ifndef _MSC_VER
const int HingeLossParameter::kNormFieldNumber;
#endif // !_MSC_VER
HingeLossParameter::HingeLossParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void HingeLossParameter::InitAsDefaultInstance() {
}
HingeLossParameter::HingeLossParameter(const HingeLossParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void HingeLossParameter::SharedCtor() {
_cached_size_ = 0;
norm_ = 1;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
HingeLossParameter::~HingeLossParameter() {
SharedDtor();
}
void HingeLossParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
HingeLossParameter* HingeLossParameter::default_instance_ = NULL;
HingeLossParameter* HingeLossParameter::New() const {
return new HingeLossParameter;
}
void HingeLossParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
norm_ = 1;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool HingeLossParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void HingeLossParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
if (has_norm()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->norm(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* HingeLossParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
if (has_norm()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->norm(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int HingeLossParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional .caffe.HingeLossParameter.Norm norm = 1 [default = L1];
if (has_norm()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->norm());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void HingeLossParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const HingeLossParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const HingeLossParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void HingeLossParameter::MergeFrom(const HingeLossParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_norm()) {
set_norm(from.norm());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void HingeLossParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void HingeLossParameter::CopyFrom(const HingeLossParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool HingeLossParameter::IsInitialized() const {
return true;
}
void HingeLossParameter::Swap(HingeLossParameter* other) {
if (other != this) {
std::swap(norm_, other->norm_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
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 // !_MSC_VER
ImageDataParameter::ImageDataParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void ImageDataParameter::InitAsDefaultInstance() {
}
ImageDataParameter::ImageDataParameter(const ImageDataParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ImageDataParameter::SharedCtor() {
_cached_size_ = 0;
source_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
batch_size_ = 0u;
rand_skip_ = 0u;
shuffle_ = false;
new_height_ = 0u;
new_width_ = 0u;
is_color_ = true;
scale_ = 1;
mean_file_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
crop_size_ = 0u;
mirror_ = false;
root_folder_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ImageDataParameter::~ImageDataParameter() {
SharedDtor();
}
void ImageDataParameter::SharedDtor() {
if (source_ != &::google::protobuf::internal::kEmptyString) {
delete source_;
}
if (mean_file_ != &::google::protobuf::internal::kEmptyString) {
delete mean_file_;
}
if (root_folder_ != &::google::protobuf::internal::kEmptyString) {
delete root_folder_;
}
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
ImageDataParameter* ImageDataParameter::default_instance_ = NULL;
ImageDataParameter* ImageDataParameter::New() const {
return new ImageDataParameter;
}
void ImageDataParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_source()) {
if (source_ != &::google::protobuf::internal::kEmptyString) {
source_->clear();
}
}
batch_size_ = 0u;
rand_skip_ = 0u;
shuffle_ = false;
new_height_ = 0u;
new_width_ = 0u;
is_color_ = true;
scale_ = 1;
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
if (has_mean_file()) {
if (mean_file_ != &::google::protobuf::internal::kEmptyString) {
mean_file_->clear();
}
}
crop_size_ = 0u;
mirror_ = false;
if (has_root_folder()) {
if (root_folder_ != &::google::protobuf::internal::kEmptyString) {
root_folder_->clear();
}
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ImageDataParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string source = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_source()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(21)) goto parse_scale;
break;
}
// optional float scale = 2 [default = 1];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_scale:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &scale_)));
set_has_scale();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_mean_file;
break;
}
// optional string mean_file = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_mean_file:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_mean_file()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_batch_size;
break;
}
// optional uint32 batch_size = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_batch_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &batch_size_)));
set_has_batch_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_crop_size;
break;
}
// optional uint32 crop_size = 5 [default = 0];
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_crop_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &crop_size_)));
set_has_crop_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(48)) goto parse_mirror;
break;
}
// optional bool mirror = 6 [default = false];
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_mirror:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &mirror_)));
set_has_mirror();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(56)) goto parse_rand_skip;
break;
}
// optional uint32 rand_skip = 7 [default = 0];
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_rand_skip:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &rand_skip_)));
set_has_rand_skip();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(64)) goto parse_shuffle;
break;
}
// optional bool shuffle = 8 [default = false];
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_shuffle:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &shuffle_)));
set_has_shuffle();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(72)) goto parse_new_height;
break;
}
// optional uint32 new_height = 9 [default = 0];
case 9: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_new_height:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &new_height_)));
set_has_new_height();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(80)) goto parse_new_width;
break;
}
// optional uint32 new_width = 10 [default = 0];
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_new_width:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &new_width_)));
set_has_new_width();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(88)) goto parse_is_color;
break;
}
// optional bool is_color = 11 [default = true];
case 11: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_is_color:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &is_color_)));
set_has_is_color();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(98)) goto parse_root_folder;
break;
}
// optional string root_folder = 12 [default = ""];
case 12: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_root_folder:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_root_folder()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->root_folder().data(), this->root_folder().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ImageDataParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string source = 1;
if (has_source()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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::VerifyUTF8String(
this->root_folder().data(), this->root_folder().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
12, this->root_folder(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ImageDataParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string source = 1;
if (has_source()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->root_folder().data(), this->root_folder().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
12, this->root_folder(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ImageDataParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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] & (0xffu << (8 % 32))) {
// 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ImageDataParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ImageDataParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const ImageDataParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ImageDataParameter::MergeFrom(const ImageDataParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_source()) {
set_source(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_mean_file(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_root_folder(from.root_folder());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ImageDataParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ImageDataParameter::CopyFrom(const ImageDataParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ImageDataParameter::IsInitialized() const {
return true;
}
void ImageDataParameter::Swap(ImageDataParameter* other) {
if (other != this) {
std::swap(source_, 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_);
std::swap(mean_file_, other->mean_file_);
std::swap(crop_size_, other->crop_size_);
std::swap(mirror_, other->mirror_);
std::swap(root_folder_, other->root_folder_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int InfogainLossParameter::kSourceFieldNumber;
#endif // !_MSC_VER
InfogainLossParameter::InfogainLossParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void InfogainLossParameter::InitAsDefaultInstance() {
}
InfogainLossParameter::InfogainLossParameter(const InfogainLossParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void InfogainLossParameter::SharedCtor() {
_cached_size_ = 0;
source_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
InfogainLossParameter::~InfogainLossParameter() {
SharedDtor();
}
void InfogainLossParameter::SharedDtor() {
if (source_ != &::google::protobuf::internal::kEmptyString) {
delete source_;
}
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
InfogainLossParameter* InfogainLossParameter::default_instance_ = NULL;
InfogainLossParameter* InfogainLossParameter::New() const {
return new InfogainLossParameter;
}
void InfogainLossParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_source()) {
if (source_ != &::google::protobuf::internal::kEmptyString) {
source_->clear();
}
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool InfogainLossParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string source = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_source()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void InfogainLossParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string source = 1;
if (has_source()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->source(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* InfogainLossParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string source = 1;
if (has_source()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->source(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int InfogainLossParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional string source = 1;
if (has_source()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::StringSize(
this->source());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void InfogainLossParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const InfogainLossParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const InfogainLossParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void InfogainLossParameter::MergeFrom(const InfogainLossParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_source()) {
set_source(from.source());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void InfogainLossParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void InfogainLossParameter::CopyFrom(const InfogainLossParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool InfogainLossParameter::IsInitialized() const {
return true;
}
void InfogainLossParameter::Swap(InfogainLossParameter* other) {
if (other != this) {
std::swap(source_, other->source_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int InnerProductParameter::kNumOutputFieldNumber;
const int InnerProductParameter::kBiasTermFieldNumber;
const int InnerProductParameter::kWeightFillerFieldNumber;
const int InnerProductParameter::kBiasFillerFieldNumber;
#endif // !_MSC_VER
InnerProductParameter::InnerProductParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void InnerProductParameter::InitAsDefaultInstance() {
weight_filler_ = const_cast< ::caffe::FillerParameter*>(&::caffe::FillerParameter::default_instance());
bias_filler_ = const_cast< ::caffe::FillerParameter*>(&::caffe::FillerParameter::default_instance());
}
InnerProductParameter::InnerProductParameter(const InnerProductParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void InnerProductParameter::SharedCtor() {
_cached_size_ = 0;
num_output_ = 0u;
bias_term_ = true;
weight_filler_ = NULL;
bias_filler_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
InnerProductParameter::~InnerProductParameter() {
SharedDtor();
}
void InnerProductParameter::SharedDtor() {
if (this != default_instance_) {
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
InnerProductParameter* InnerProductParameter::default_instance_ = NULL;
InnerProductParameter* InnerProductParameter::New() const {
return new InnerProductParameter;
}
void InnerProductParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
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();
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool InnerProductParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional uint32 num_output = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &num_output_)));
set_has_num_output();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_bias_term;
break;
}
// optional bool bias_term = 2 [default = true];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_bias_term:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &bias_term_)));
set_has_bias_term();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_weight_filler;
break;
}
// optional .caffe.FillerParameter weight_filler = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_weight_filler:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_weight_filler()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(34)) goto parse_bias_filler;
break;
}
// optional .caffe.FillerParameter bias_filler = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_bias_filler:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_bias_filler()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void InnerProductParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* InnerProductParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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::
WriteMessageNoVirtualToArray(
3, this->weight_filler(), target);
}
// optional .caffe.FillerParameter bias_filler = 4;
if (has_bias_filler()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
4, this->bias_filler(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int InnerProductParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void InnerProductParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const InnerProductParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const InnerProductParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void InnerProductParameter::MergeFrom(const InnerProductParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void InnerProductParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void InnerProductParameter::CopyFrom(const InnerProductParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool InnerProductParameter::IsInitialized() const {
return true;
}
void InnerProductParameter::Swap(InnerProductParameter* other) {
if (other != this) {
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(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
#ifndef _MSC_VER
const int LRNParameter::kLocalSizeFieldNumber;
const int LRNParameter::kAlphaFieldNumber;
const int LRNParameter::kBetaFieldNumber;
const int LRNParameter::kNormRegionFieldNumber;
const int LRNParameter::kKFieldNumber;
#endif // !_MSC_VER
LRNParameter::LRNParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void LRNParameter::InitAsDefaultInstance() {
}
LRNParameter::LRNParameter(const LRNParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void LRNParameter::SharedCtor() {
_cached_size_ = 0;
local_size_ = 5u;
alpha_ = 1;
beta_ = 0.75f;
norm_region_ = 0;
k_ = 1;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
LRNParameter::~LRNParameter() {
SharedDtor();
}
void LRNParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
LRNParameter* LRNParameter::default_instance_ = NULL;
LRNParameter* LRNParameter::New() const {
return new LRNParameter;
}
void LRNParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
local_size_ = 5u;
alpha_ = 1;
beta_ = 0.75f;
norm_region_ = 0;
k_ = 1;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool LRNParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional uint32 local_size = 1 [default = 5];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &local_size_)));
set_has_local_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(21)) goto parse_alpha;
break;
}
// optional float alpha = 2 [default = 1];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_alpha:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &alpha_)));
set_has_alpha();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(29)) goto parse_beta;
break;
}
// optional float beta = 3 [default = 0.75];
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_beta:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &beta_)));
set_has_beta();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_norm_region;
break;
}
// optional .caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectTag(45)) goto parse_k;
break;
}
// optional float k = 5 [default = 1];
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_k:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &k_)));
set_has_k();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void LRNParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* LRNParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int LRNParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void LRNParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const LRNParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const LRNParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void LRNParameter::MergeFrom(const LRNParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void LRNParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void LRNParameter::CopyFrom(const LRNParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool LRNParameter::IsInitialized() const {
return true;
}
void LRNParameter::Swap(LRNParameter* other) {
if (other != this) {
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]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int MemoryDataParameter::kBatchSizeFieldNumber;
const int MemoryDataParameter::kChannelsFieldNumber;
const int MemoryDataParameter::kHeightFieldNumber;
const int MemoryDataParameter::kWidthFieldNumber;
#endif // !_MSC_VER
MemoryDataParameter::MemoryDataParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void MemoryDataParameter::InitAsDefaultInstance() {
}
MemoryDataParameter::MemoryDataParameter(const MemoryDataParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void MemoryDataParameter::SharedCtor() {
_cached_size_ = 0;
batch_size_ = 0u;
channels_ = 0u;
height_ = 0u;
width_ = 0u;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
MemoryDataParameter::~MemoryDataParameter() {
SharedDtor();
}
void MemoryDataParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
MemoryDataParameter* MemoryDataParameter::default_instance_ = NULL;
MemoryDataParameter* MemoryDataParameter::New() const {
return new MemoryDataParameter;
}
void MemoryDataParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
batch_size_ = 0u;
channels_ = 0u;
height_ = 0u;
width_ = 0u;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool MemoryDataParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional uint32 batch_size = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &batch_size_)));
set_has_batch_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_channels;
break;
}
// optional uint32 channels = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_channels:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &channels_)));
set_has_channels();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_height;
break;
}
// optional uint32 height = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_height:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &height_)));
set_has_height();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_width;
break;
}
// optional uint32 width = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_width:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &width_)));
set_has_width();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void MemoryDataParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* MemoryDataParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int MemoryDataParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void MemoryDataParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const MemoryDataParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const MemoryDataParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void MemoryDataParameter::MergeFrom(const MemoryDataParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void MemoryDataParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void MemoryDataParameter::CopyFrom(const MemoryDataParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool MemoryDataParameter::IsInitialized() const {
return true;
}
void MemoryDataParameter::Swap(MemoryDataParameter* other) {
if (other != this) {
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]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int MVNParameter::kNormalizeVarianceFieldNumber;
const int MVNParameter::kAcrossChannelsFieldNumber;
#endif // !_MSC_VER
MVNParameter::MVNParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void MVNParameter::InitAsDefaultInstance() {
}
MVNParameter::MVNParameter(const MVNParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void MVNParameter::SharedCtor() {
_cached_size_ = 0;
normalize_variance_ = true;
across_channels_ = false;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
MVNParameter::~MVNParameter() {
SharedDtor();
}
void MVNParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
MVNParameter* MVNParameter::default_instance_ = NULL;
MVNParameter* MVNParameter::New() const {
return new MVNParameter;
}
void MVNParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
normalize_variance_ = true;
across_channels_ = false;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool MVNParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional bool normalize_variance = 1 [default = true];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &normalize_variance_)));
set_has_normalize_variance();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_across_channels;
break;
}
// optional bool across_channels = 2 [default = false];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_across_channels:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &across_channels_)));
set_has_across_channels();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void MVNParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* MVNParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int MVNParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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;
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void MVNParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const MVNParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const MVNParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void MVNParameter::MergeFrom(const MVNParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void MVNParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void MVNParameter::CopyFrom(const MVNParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool MVNParameter::IsInitialized() const {
return true;
}
void MVNParameter::Swap(MVNParameter* other) {
if (other != this) {
std::swap(normalize_variance_, other->normalize_variance_);
std::swap(across_channels_, other->across_channels_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
#ifndef _MSC_VER
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 // !_MSC_VER
PoolingParameter::PoolingParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void PoolingParameter::InitAsDefaultInstance() {
}
PoolingParameter::PoolingParameter(const PoolingParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void PoolingParameter::SharedCtor() {
_cached_size_ = 0;
pool_ = 0;
pad_ = 0u;
pad_h_ = 0u;
pad_w_ = 0u;
kernel_size_ = 0u;
kernel_h_ = 0u;
kernel_w_ = 0u;
stride_ = 1u;
stride_h_ = 0u;
stride_w_ = 0u;
engine_ = 0;
global_pooling_ = false;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
PoolingParameter::~PoolingParameter() {
SharedDtor();
}
void PoolingParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
PoolingParameter* PoolingParameter::default_instance_ = NULL;
PoolingParameter* PoolingParameter::New() const {
return new PoolingParameter;
}
void PoolingParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
pool_ = 0;
pad_ = 0u;
pad_h_ = 0u;
pad_w_ = 0u;
kernel_size_ = 0u;
kernel_h_ = 0u;
kernel_w_ = 0u;
stride_ = 1u;
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
stride_h_ = 0u;
stride_w_ = 0u;
engine_ = 0;
global_pooling_ = false;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool PoolingParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_kernel_size;
break;
}
// optional uint32 kernel_size = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_kernel_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &kernel_size_)));
set_has_kernel_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_stride;
break;
}
// optional uint32 stride = 3 [default = 1];
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_stride:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &stride_)));
set_has_stride();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_pad;
break;
}
// optional uint32 pad = 4 [default = 0];
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_pad:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &pad_)));
set_has_pad();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_kernel_h;
break;
}
// optional uint32 kernel_h = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_kernel_h:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &kernel_h_)));
set_has_kernel_h();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(48)) goto parse_kernel_w;
break;
}
// optional uint32 kernel_w = 6;
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_kernel_w:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &kernel_w_)));
set_has_kernel_w();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(56)) goto parse_stride_h;
break;
}
// optional uint32 stride_h = 7;
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_stride_h:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &stride_h_)));
set_has_stride_h();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(64)) goto parse_stride_w;
break;
}
// optional uint32 stride_w = 8;
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_stride_w:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &stride_w_)));
set_has_stride_w();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(72)) goto parse_pad_h;
break;
}
// optional uint32 pad_h = 9 [default = 0];
case 9: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_pad_h:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &pad_h_)));
set_has_pad_h();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(80)) goto parse_pad_w;
break;
}
// optional uint32 pad_w = 10 [default = 0];
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_pad_w:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &pad_w_)));
set_has_pad_w();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(88)) goto parse_engine;
break;
}
// optional .caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
case 11: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectTag(96)) goto parse_global_pooling;
break;
}
// optional bool global_pooling = 12 [default = false];
case 12: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_global_pooling:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &global_pooling_)));
set_has_global_pooling();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void PoolingParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* PoolingParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int PoolingParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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] & (0xffu << (8 % 32))) {
// 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void PoolingParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const PoolingParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const PoolingParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void PoolingParameter::MergeFrom(const PoolingParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void PoolingParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void PoolingParameter::CopyFrom(const PoolingParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool PoolingParameter::IsInitialized() const {
return true;
}
void PoolingParameter::Swap(PoolingParameter* other) {
if (other != this) {
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]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int PowerParameter::kPowerFieldNumber;
const int PowerParameter::kScaleFieldNumber;
const int PowerParameter::kShiftFieldNumber;
#endif // !_MSC_VER
PowerParameter::PowerParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void PowerParameter::InitAsDefaultInstance() {
}
PowerParameter::PowerParameter(const PowerParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void PowerParameter::SharedCtor() {
_cached_size_ = 0;
power_ = 1;
scale_ = 1;
shift_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
PowerParameter::~PowerParameter() {
SharedDtor();
}
void PowerParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
PowerParameter* PowerParameter::default_instance_ = NULL;
PowerParameter* PowerParameter::New() const {
return new PowerParameter;
}
void PowerParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
power_ = 1;
scale_ = 1;
shift_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool PowerParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional float power = 1 [default = 1];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &power_)));
set_has_power();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(21)) goto parse_scale;
break;
}
// optional float scale = 2 [default = 1];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_scale:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &scale_)));
set_has_scale();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(29)) goto parse_shift;
break;
}
// optional float shift = 3 [default = 0];
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_shift:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &shift_)));
set_has_shift();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void PowerParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* PowerParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int PowerParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void PowerParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const PowerParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const PowerParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void PowerParameter::MergeFrom(const PowerParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void PowerParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void PowerParameter::CopyFrom(const PowerParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool PowerParameter::IsInitialized() const {
return true;
}
void PowerParameter::Swap(PowerParameter* other) {
if (other != this) {
std::swap(power_, other->power_);
std::swap(scale_, other->scale_);
std::swap(shift_, other->shift_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
#ifndef _MSC_VER
const int ReLUParameter::kNegativeSlopeFieldNumber;
const int ReLUParameter::kEngineFieldNumber;
#endif // !_MSC_VER
ReLUParameter::ReLUParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void ReLUParameter::InitAsDefaultInstance() {
}
ReLUParameter::ReLUParameter(const ReLUParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ReLUParameter::SharedCtor() {
_cached_size_ = 0;
negative_slope_ = 0;
engine_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ReLUParameter::~ReLUParameter() {
SharedDtor();
}
void ReLUParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
ReLUParameter* ReLUParameter::default_instance_ = NULL;
ReLUParameter* ReLUParameter::New() const {
return new ReLUParameter;
}
void ReLUParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
negative_slope_ = 0;
engine_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ReLUParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional float negative_slope = 1 [default = 0];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &negative_slope_)));
set_has_negative_slope();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_engine;
break;
}
// optional .caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ReLUParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ReLUParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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 (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ReLUParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ReLUParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ReLUParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const ReLUParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ReLUParameter::MergeFrom(const ReLUParameter& from) {
GOOGLE_CHECK_NE(&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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ReLUParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ReLUParameter::CopyFrom(const ReLUParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ReLUParameter::IsInitialized() const {
return true;
}
void ReLUParameter::Swap(ReLUParameter* other) {
if (other != this) {
std::swap(negative_slope_, other->negative_slope_);
std::swap(engine_, other->engine_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
#ifndef _MSC_VER
const int SigmoidParameter::kEngineFieldNumber;
#endif // !_MSC_VER
SigmoidParameter::SigmoidParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void SigmoidParameter::InitAsDefaultInstance() {
}
SigmoidParameter::SigmoidParameter(const SigmoidParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void SigmoidParameter::SharedCtor() {
_cached_size_ = 0;
engine_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
SigmoidParameter::~SigmoidParameter() {
SharedDtor();
}
void SigmoidParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
SigmoidParameter* SigmoidParameter::default_instance_ = NULL;
SigmoidParameter* SigmoidParameter::New() const {
return new SigmoidParameter;
}
void SigmoidParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
engine_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool SigmoidParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void SigmoidParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
if (has_engine()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->engine(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* SigmoidParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
if (has_engine()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->engine(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int SigmoidParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional .caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
if (has_engine()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->engine());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void SigmoidParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const SigmoidParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const SigmoidParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void SigmoidParameter::MergeFrom(const SigmoidParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_engine()) {
set_engine(from.engine());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void SigmoidParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void SigmoidParameter::CopyFrom(const SigmoidParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SigmoidParameter::IsInitialized() const {
return true;
}
void SigmoidParameter::Swap(SigmoidParameter* other) {
if (other != this) {
std::swap(engine_, other->engine_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int SliceParameter::kSliceDimFieldNumber;
const int SliceParameter::kSlicePointFieldNumber;
#endif // !_MSC_VER
SliceParameter::SliceParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void SliceParameter::InitAsDefaultInstance() {
}
SliceParameter::SliceParameter(const SliceParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void SliceParameter::SharedCtor() {
_cached_size_ = 0;
slice_dim_ = 1u;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
SliceParameter::~SliceParameter() {
SharedDtor();
}
void SliceParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
SliceParameter* SliceParameter::default_instance_ = NULL;
SliceParameter* SliceParameter::New() const {
return new SliceParameter;
}
void SliceParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
slice_dim_ = 1u;
}
slice_point_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool SliceParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional uint32 slice_dim = 1 [default = 1];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &slice_dim_)));
set_has_slice_dim();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_slice_point;
break;
}
// repeated uint32 slice_point = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, this->mutable_slice_point())));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(16)) goto parse_slice_point;
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void SliceParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// 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);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* SliceParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// 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);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int SliceParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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;
{
int data_size = 0;
for (int i = 0; i < this->slice_point_size(); i++) {
data_size += ::google::protobuf::internal::WireFormatLite::
UInt32Size(this->slice_point(i));
}
total_size += 1 * this->slice_point_size() + data_size;
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void SliceParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const SliceParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const SliceParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void SliceParameter::MergeFrom(const SliceParameter& from) {
GOOGLE_CHECK_NE(&from, this);
slice_point_.MergeFrom(from.slice_point_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_slice_dim()) {
set_slice_dim(from.slice_dim());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void SliceParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void SliceParameter::CopyFrom(const SliceParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SliceParameter::IsInitialized() const {
return true;
}
void SliceParameter::Swap(SliceParameter* other) {
if (other != this) {
std::swap(slice_dim_, other->slice_dim_);
slice_point_.Swap(&other->slice_point_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
#ifndef _MSC_VER
const int SoftmaxParameter::kEngineFieldNumber;
#endif // !_MSC_VER
SoftmaxParameter::SoftmaxParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void SoftmaxParameter::InitAsDefaultInstance() {
}
SoftmaxParameter::SoftmaxParameter(const SoftmaxParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void SoftmaxParameter::SharedCtor() {
_cached_size_ = 0;
engine_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
SoftmaxParameter::~SoftmaxParameter() {
SharedDtor();
}
void SoftmaxParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
SoftmaxParameter* SoftmaxParameter::default_instance_ = NULL;
SoftmaxParameter* SoftmaxParameter::New() const {
return new SoftmaxParameter;
}
void SoftmaxParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
engine_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool SoftmaxParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void SoftmaxParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
if (has_engine()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->engine(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* SoftmaxParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
if (has_engine()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->engine(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int SoftmaxParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional .caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
if (has_engine()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->engine());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void SoftmaxParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const SoftmaxParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const SoftmaxParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void SoftmaxParameter::MergeFrom(const SoftmaxParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_engine()) {
set_engine(from.engine());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void SoftmaxParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void SoftmaxParameter::CopyFrom(const SoftmaxParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SoftmaxParameter::IsInitialized() const {
return true;
}
void SoftmaxParameter::Swap(SoftmaxParameter* other) {
if (other != this) {
std::swap(engine_, other->engine_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
#ifndef _MSC_VER
const int TanHParameter::kEngineFieldNumber;
#endif // !_MSC_VER
TanHParameter::TanHParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void TanHParameter::InitAsDefaultInstance() {
}
TanHParameter::TanHParameter(const TanHParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void TanHParameter::SharedCtor() {
_cached_size_ = 0;
engine_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
TanHParameter::~TanHParameter() {
SharedDtor();
}
void TanHParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
TanHParameter* TanHParameter::default_instance_ = NULL;
TanHParameter* TanHParameter::New() const {
return new TanHParameter;
}
void TanHParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
engine_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool TanHParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void TanHParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
if (has_engine()) {
::google::protobuf::internal::WireFormatLite::WriteEnum(
1, this->engine(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* TanHParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
if (has_engine()) {
target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
1, this->engine(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int TanHParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional .caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
if (has_engine()) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::EnumSize(this->engine());
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void TanHParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const TanHParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const TanHParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void TanHParameter::MergeFrom(const TanHParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_engine()) {
set_engine(from.engine());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void TanHParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void TanHParameter::CopyFrom(const TanHParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TanHParameter::IsInitialized() const {
return true;
}
void TanHParameter::Swap(TanHParameter* other) {
if (other != this) {
std::swap(engine_, other->engine_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
#ifndef _MSC_VER
const int ThresholdParameter::kThresholdFieldNumber;
#endif // !_MSC_VER
ThresholdParameter::ThresholdParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void ThresholdParameter::InitAsDefaultInstance() {
}
ThresholdParameter::ThresholdParameter(const ThresholdParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void ThresholdParameter::SharedCtor() {
_cached_size_ = 0;
threshold_ = 0;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
ThresholdParameter::~ThresholdParameter() {
SharedDtor();
}
void ThresholdParameter::SharedDtor() {
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
ThresholdParameter* ThresholdParameter::default_instance_ = NULL;
ThresholdParameter* ThresholdParameter::New() const {
return new ThresholdParameter;
}
void ThresholdParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
threshold_ = 0;
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool ThresholdParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional float threshold = 1 [default = 0];
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &threshold_)));
set_has_threshold();
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void ThresholdParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional float threshold = 1 [default = 0];
if (has_threshold()) {
::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->threshold(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* ThresholdParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional float threshold = 1 [default = 0];
if (has_threshold()) {
target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->threshold(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int ThresholdParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// optional float threshold = 1 [default = 0];
if (has_threshold()) {
total_size += 1 + 4;
}
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void ThresholdParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const ThresholdParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const ThresholdParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void ThresholdParameter::MergeFrom(const ThresholdParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_threshold()) {
set_threshold(from.threshold());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void ThresholdParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void ThresholdParameter::CopyFrom(const ThresholdParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ThresholdParameter::IsInitialized() const {
return true;
}
void ThresholdParameter::Swap(ThresholdParameter* other) {
if (other != this) {
std::swap(threshold_, other->threshold_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
::std::string* WindowDataParameter::_default_crop_mode_ = NULL;
#ifndef _MSC_VER
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 // !_MSC_VER
WindowDataParameter::WindowDataParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void WindowDataParameter::InitAsDefaultInstance() {
}
WindowDataParameter::WindowDataParameter(const WindowDataParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void WindowDataParameter::SharedCtor() {
_cached_size_ = 0;
source_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
scale_ = 1;
mean_file_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
batch_size_ = 0u;
crop_size_ = 0u;
mirror_ = false;
fg_threshold_ = 0.5f;
bg_threshold_ = 0.5f;
fg_fraction_ = 0.25f;
context_pad_ = 0u;
crop_mode_ = const_cast< ::std::string*>(_default_crop_mode_);
cache_images_ = false;
root_folder_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
WindowDataParameter::~WindowDataParameter() {
SharedDtor();
}
void WindowDataParameter::SharedDtor() {
if (source_ != &::google::protobuf::internal::kEmptyString) {
delete source_;
}
if (mean_file_ != &::google::protobuf::internal::kEmptyString) {
delete mean_file_;
}
if (crop_mode_ != _default_crop_mode_) {
delete crop_mode_;
}
if (root_folder_ != &::google::protobuf::internal::kEmptyString) {
delete root_folder_;
}
if (this != default_instance_) {
}
}
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
WindowDataParameter* WindowDataParameter::default_instance_ = NULL;
WindowDataParameter* WindowDataParameter::New() const {
return new WindowDataParameter;
}
void WindowDataParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_source()) {
if (source_ != &::google::protobuf::internal::kEmptyString) {
source_->clear();
}
}
scale_ = 1;
if (has_mean_file()) {
if (mean_file_ != &::google::protobuf::internal::kEmptyString) {
mean_file_->clear();
}
}
batch_size_ = 0u;
crop_size_ = 0u;
mirror_ = false;
fg_threshold_ = 0.5f;
bg_threshold_ = 0.5f;
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
fg_fraction_ = 0.25f;
context_pad_ = 0u;
if (has_crop_mode()) {
if (crop_mode_ != _default_crop_mode_) {
crop_mode_->assign(*_default_crop_mode_);
}
}
cache_images_ = false;
if (has_root_folder()) {
if (root_folder_ != &::google::protobuf::internal::kEmptyString) {
root_folder_->clear();
}
}
}
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool WindowDataParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string source = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_source()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(21)) goto parse_scale;
break;
}
// optional float scale = 2 [default = 1];
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_scale:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &scale_)));
set_has_scale();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(26)) goto parse_mean_file;
break;
}
// optional string mean_file = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_mean_file:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_mean_file()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_batch_size;
break;
}
// optional uint32 batch_size = 4;
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_batch_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &batch_size_)));
set_has_batch_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(40)) goto parse_crop_size;
break;
}
// optional uint32 crop_size = 5 [default = 0];
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_crop_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &crop_size_)));
set_has_crop_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(48)) goto parse_mirror;
break;
}
// optional bool mirror = 6 [default = false];
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_mirror:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &mirror_)));
set_has_mirror();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(61)) goto parse_fg_threshold;
break;
}
// optional float fg_threshold = 7 [default = 0.5];
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_fg_threshold:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &fg_threshold_)));
set_has_fg_threshold();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(69)) goto parse_bg_threshold;
break;
}
// optional float bg_threshold = 8 [default = 0.5];
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_bg_threshold:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &bg_threshold_)));
set_has_bg_threshold();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(77)) goto parse_fg_fraction;
break;
}
// optional float fg_fraction = 9 [default = 0.25];
case 9: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_fg_fraction:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &fg_fraction_)));
set_has_fg_fraction();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(80)) goto parse_context_pad;
break;
}
// optional uint32 context_pad = 10 [default = 0];
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_context_pad:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &context_pad_)));
set_has_context_pad();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(90)) goto parse_crop_mode;
break;
}
// optional string crop_mode = 11 [default = "warp"];
case 11: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_crop_mode:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_crop_mode()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->crop_mode().data(), this->crop_mode().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(96)) goto parse_cache_images;
break;
}
// optional bool cache_images = 12 [default = false];
case 12: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_cache_images:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &cache_images_)));
set_has_cache_images();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(106)) goto parse_root_folder;
break;
}
// optional string root_folder = 13 [default = ""];
case 13: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_root_folder:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_root_folder()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->root_folder().data(), this->root_folder().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void WindowDataParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string source = 1;
if (has_source()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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::VerifyUTF8String(
this->crop_mode().data(), this->crop_mode().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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::VerifyUTF8String(
this->root_folder().data(), this->root_folder().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
13, this->root_folder(), output);
}
if (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* WindowDataParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string source = 1;
if (has_source()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->mean_file().data(), this->mean_file().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->crop_mode().data(), this->crop_mode().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->root_folder().data(), this->root_folder().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
13, this->root_folder(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int WindowDataParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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] & (0xffu << (8 % 32))) {
// 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 (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void WindowDataParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const WindowDataParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const WindowDataParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void WindowDataParameter::MergeFrom(const WindowDataParameter& from) {
GOOGLE_CHECK_NE(&from, this);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_source()) {
set_source(from.source());
}
if (from.has_scale()) {
set_scale(from.scale());
}
if (from.has_mean_file()) {
set_mean_file(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_crop_mode(from.crop_mode());
}
if (from.has_cache_images()) {
set_cache_images(from.cache_images());
}
if (from.has_root_folder()) {
set_root_folder(from.root_folder());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void WindowDataParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void WindowDataParameter::CopyFrom(const WindowDataParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WindowDataParameter::IsInitialized() const {
return true;
}
void WindowDataParameter::Swap(WindowDataParameter* other) {
if (other != this) {
std::swap(source_, other->source_);
std::swap(scale_, other->scale_);
std::swap(mean_file_, 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_);
std::swap(crop_mode_, other->crop_mode_);
std::swap(cache_images_, other->cache_images_);
std::swap(root_folder_, other->root_folder_);
std::swap(_has_bits_[0], other->_has_bits_[0]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// ===================================================================
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;
}
}
#ifndef _MSC_VER
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 // _MSC_VER
::std::string* V0LayerParameter::_default_det_crop_mode_ = NULL;
#ifndef _MSC_VER
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 // !_MSC_VER
V0LayerParameter::V0LayerParameter()
: ::google::protobuf::Message() {
SharedCtor();
}
void V0LayerParameter::InitAsDefaultInstance() {
weight_filler_ = const_cast< ::caffe::FillerParameter*>(&::caffe::FillerParameter::default_instance());
bias_filler_ = const_cast< ::caffe::FillerParameter*>(&::caffe::FillerParameter::default_instance());
hdf5_output_param_ = const_cast< ::caffe::HDF5OutputParameter*>(&::caffe::HDF5OutputParameter::default_instance());
}
V0LayerParameter::V0LayerParameter(const V0LayerParameter& from)
: ::google::protobuf::Message() {
SharedCtor();
MergeFrom(from);
}
void V0LayerParameter::SharedCtor() {
_cached_size_ = 0;
name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
type_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
num_output_ = 0u;
biasterm_ = true;
weight_filler_ = NULL;
bias_filler_ = NULL;
pad_ = 0u;
kernelsize_ = 0u;
group_ = 1u;
stride_ = 1u;
pool_ = 0;
dropout_ratio_ = 0.5f;
local_size_ = 5u;
alpha_ = 1;
beta_ = 0.75f;
k_ = 1;
source_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
scale_ = 1;
meanfile_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
batchsize_ = 0u;
cropsize_ = 0u;
mirror_ = false;
rand_skip_ = 0u;
det_fg_threshold_ = 0.5f;
det_bg_threshold_ = 0.5f;
det_fg_fraction_ = 0.25f;
det_context_pad_ = 0u;
det_crop_mode_ = const_cast< ::std::string*>(_default_det_crop_mode_);
new_num_ = 0;
new_channels_ = 0;
new_height_ = 0;
new_width_ = 0;
shuffle_images_ = false;
concat_dim_ = 1u;
hdf5_output_param_ = NULL;
::memset(_has_bits_, 0, sizeof(_has_bits_));
}
V0LayerParameter::~V0LayerParameter() {
SharedDtor();
}
void V0LayerParameter::SharedDtor() {
if (name_ != &::google::protobuf::internal::kEmptyString) {
delete name_;
}
if (type_ != &::google::protobuf::internal::kEmptyString) {
delete type_;
}
if (source_ != &::google::protobuf::internal::kEmptyString) {
delete source_;
}
if (meanfile_ != &::google::protobuf::internal::kEmptyString) {
delete meanfile_;
}
if (det_crop_mode_ != _default_det_crop_mode_) {
delete det_crop_mode_;
}
if (this != default_instance_) {
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() {
if (default_instance_ == NULL) protobuf_AddDesc_caffe_2eproto();
return *default_instance_;
}
V0LayerParameter* V0LayerParameter::default_instance_ = NULL;
V0LayerParameter* V0LayerParameter::New() const {
return new V0LayerParameter;
}
void V0LayerParameter::Clear() {
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (has_name()) {
if (name_ != &::google::protobuf::internal::kEmptyString) {
name_->clear();
}
}
if (has_type()) {
if (type_ != &::google::protobuf::internal::kEmptyString) {
type_->clear();
}
}
num_output_ = 0u;
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();
}
pad_ = 0u;
kernelsize_ = 0u;
}
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
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] & (0xffu << (16 % 32))) {
if (has_source()) {
if (source_ != &::google::protobuf::internal::kEmptyString) {
source_->clear();
}
}
scale_ = 1;
if (has_meanfile()) {
if (meanfile_ != &::google::protobuf::internal::kEmptyString) {
meanfile_->clear();
}
}
batchsize_ = 0u;
cropsize_ = 0u;
mirror_ = false;
}
if (_has_bits_[25 / 32] & (0xffu << (25 % 32))) {
rand_skip_ = 0u;
det_fg_threshold_ = 0.5f;
det_bg_threshold_ = 0.5f;
det_fg_fraction_ = 0.25f;
det_context_pad_ = 0u;
if (has_det_crop_mode()) {
if (det_crop_mode_ != _default_det_crop_mode_) {
det_crop_mode_->assign(*_default_det_crop_mode_);
}
}
new_num_ = 0;
}
if (_has_bits_[32 / 32] & (0xffu << (32 % 32))) {
new_channels_ = 0;
new_height_ = 0;
new_width_ = 0;
shuffle_images_ = false;
concat_dim_ = 1u;
if (has_hdf5_output_param()) {
if (hdf5_output_param_ != NULL) hdf5_output_param_->::caffe::HDF5OutputParameter::Clear();
}
}
blobs_.Clear();
blobs_lr_.Clear();
weight_decay_.Clear();
::memset(_has_bits_, 0, sizeof(_has_bits_));
mutable_unknown_fields()->Clear();
}
bool V0LayerParameter::MergePartialFromCodedStream(
::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
::google::protobuf::uint32 tag;
while ((tag = input->ReadTag()) != 0) {
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
// optional string name = 1;
case 1: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_name()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(18)) goto parse_type;
break;
}
// optional string type = 2;
case 2: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_type:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_type()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->type().data(), this->type().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(24)) goto parse_num_output;
break;
}
// optional uint32 num_output = 3;
case 3: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_num_output:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &num_output_)));
set_has_num_output();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(32)) goto parse_biasterm;
break;
}
// optional bool biasterm = 4 [default = true];
case 4: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_biasterm:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &biasterm_)));
set_has_biasterm();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(42)) goto parse_weight_filler;
break;
}
// optional .caffe.FillerParameter weight_filler = 5;
case 5: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_weight_filler:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_weight_filler()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(50)) goto parse_bias_filler;
break;
}
// optional .caffe.FillerParameter bias_filler = 6;
case 6: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_bias_filler:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_bias_filler()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(56)) goto parse_pad;
break;
}
// optional uint32 pad = 7 [default = 0];
case 7: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_pad:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &pad_)));
set_has_pad();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(64)) goto parse_kernelsize;
break;
}
// optional uint32 kernelsize = 8;
case 8: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_kernelsize:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &kernelsize_)));
set_has_kernelsize();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(72)) goto parse_group;
break;
}
// optional uint32 group = 9 [default = 1];
case 9: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_group:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &group_)));
set_has_group();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(80)) goto parse_stride;
break;
}
// optional uint32 stride = 10 [default = 1];
case 10: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_stride:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &stride_)));
set_has_stride();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(88)) goto parse_pool;
break;
}
// optional .caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
case 11: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
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_uninterpreted;
}
if (input->ExpectTag(101)) goto parse_dropout_ratio;
break;
}
// optional float dropout_ratio = 12 [default = 0.5];
case 12: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_dropout_ratio:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &dropout_ratio_)));
set_has_dropout_ratio();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(104)) goto parse_local_size;
break;
}
// optional uint32 local_size = 13 [default = 5];
case 13: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_local_size:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &local_size_)));
set_has_local_size();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(117)) goto parse_alpha;
break;
}
// optional float alpha = 14 [default = 1];
case 14: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_alpha:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &alpha_)));
set_has_alpha();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(125)) goto parse_beta;
break;
}
// optional float beta = 15 [default = 0.75];
case 15: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_beta:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &beta_)));
set_has_beta();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(130)) goto parse_source;
break;
}
// optional string source = 16;
case 16: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_source:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_source()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(141)) goto parse_scale;
break;
}
// optional float scale = 17 [default = 1];
case 17: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_scale:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &scale_)));
set_has_scale();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(146)) goto parse_meanfile;
break;
}
// optional string meanfile = 18;
case 18: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_meanfile:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_meanfile()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->meanfile().data(), this->meanfile().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(152)) goto parse_batchsize;
break;
}
// optional uint32 batchsize = 19;
case 19: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_batchsize:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &batchsize_)));
set_has_batchsize();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(160)) goto parse_cropsize;
break;
}
// optional uint32 cropsize = 20 [default = 0];
case 20: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_cropsize:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &cropsize_)));
set_has_cropsize();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(168)) goto parse_mirror;
break;
}
// optional bool mirror = 21 [default = false];
case 21: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_mirror:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &mirror_)));
set_has_mirror();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(181)) goto parse_k;
break;
}
// optional float k = 22 [default = 1];
case 22: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_k:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &k_)));
set_has_k();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(402)) goto parse_blobs;
break;
}
// repeated .caffe.BlobProto blobs = 50;
case 50: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_blobs:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, add_blobs()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(402)) goto parse_blobs;
if (input->ExpectTag(413)) goto parse_blobs_lr;
break;
}
// repeated float blobs_lr = 51;
case 51: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_blobs_lr())));
} else {
goto handle_uninterpreted;
}
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag)
== ::google::protobuf::internal::WireFormatLite::
WIRETYPE_LENGTH_DELIMITED) {
DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, this->mutable_weight_decay())));
} else {
goto handle_uninterpreted;
}
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 (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_rand_skip:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &rand_skip_)));
set_has_rand_skip();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(437)) goto parse_det_fg_threshold;
break;
}
// optional float det_fg_threshold = 54 [default = 0.5];
case 54: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_det_fg_threshold:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &det_fg_threshold_)));
set_has_det_fg_threshold();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(445)) goto parse_det_bg_threshold;
break;
}
// optional float det_bg_threshold = 55 [default = 0.5];
case 55: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_det_bg_threshold:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &det_bg_threshold_)));
set_has_det_bg_threshold();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(453)) goto parse_det_fg_fraction;
break;
}
// optional float det_fg_fraction = 56 [default = 0.25];
case 56: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
parse_det_fg_fraction:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
input, &det_fg_fraction_)));
set_has_det_fg_fraction();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(464)) goto parse_det_context_pad;
break;
}
// optional uint32 det_context_pad = 58 [default = 0];
case 58: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_det_context_pad:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &det_context_pad_)));
set_has_det_context_pad();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(474)) goto parse_det_crop_mode;
break;
}
// optional string det_crop_mode = 59 [default = "warp"];
case 59: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_det_crop_mode:
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
input, this->mutable_det_crop_mode()));
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->det_crop_mode().data(), this->det_crop_mode().length(),
::google::protobuf::internal::WireFormat::PARSE);
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(480)) goto parse_new_num;
break;
}
// optional int32 new_num = 60 [default = 0];
case 60: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_new_num:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &new_num_)));
set_has_new_num();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(488)) goto parse_new_channels;
break;
}
// optional int32 new_channels = 61 [default = 0];
case 61: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_new_channels:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &new_channels_)));
set_has_new_channels();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(496)) goto parse_new_height;
break;
}
// optional int32 new_height = 62 [default = 0];
case 62: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_new_height:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &new_height_)));
set_has_new_height();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(504)) goto parse_new_width;
break;
}
// optional int32 new_width = 63 [default = 0];
case 63: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_new_width:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
input, &new_width_)));
set_has_new_width();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(512)) goto parse_shuffle_images;
break;
}
// optional bool shuffle_images = 64 [default = false];
case 64: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_shuffle_images:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
input, &shuffle_images_)));
set_has_shuffle_images();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(520)) goto parse_concat_dim;
break;
}
// optional uint32 concat_dim = 65 [default = 1];
case 65: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
parse_concat_dim:
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
input, &concat_dim_)));
set_has_concat_dim();
} else {
goto handle_uninterpreted;
}
if (input->ExpectTag(8010)) goto parse_hdf5_output_param;
break;
}
// optional .caffe.HDF5OutputParameter hdf5_output_param = 1001;
case 1001: {
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
parse_hdf5_output_param:
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
input, mutable_hdf5_output_param()));
} else {
goto handle_uninterpreted;
}
if (input->ExpectAtEnd()) return true;
break;
}
default: {
handle_uninterpreted:
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
return true;
}
DO_(::google::protobuf::internal::WireFormat::SkipField(
input, tag, mutable_unknown_fields()));
break;
}
}
}
return true;
#undef DO_
}
void V0LayerParameter::SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const {
// optional string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
1, this->name(), output);
}
// optional string type = 2;
if (has_type()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->type().data(), this->type().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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::VerifyUTF8String(
this->meanfile().data(), this->meanfile().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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 (int i = 0; i < this->blobs_size(); 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::VerifyUTF8String(
this->det_crop_mode().data(), this->det_crop_mode().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
::google::protobuf::internal::WireFormatLite::WriteString(
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 (!unknown_fields().empty()) {
::google::protobuf::internal::WireFormat::SerializeUnknownFields(
unknown_fields(), output);
}
}
::google::protobuf::uint8* V0LayerParameter::SerializeWithCachedSizesToArray(
::google::protobuf::uint8* target) const {
// optional string name = 1;
if (has_name()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->name().data(), this->name().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
target =
::google::protobuf::internal::WireFormatLite::WriteStringToArray(
1, this->name(), target);
}
// optional string type = 2;
if (has_type()) {
::google::protobuf::internal::WireFormat::VerifyUTF8String(
this->type().data(), this->type().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::
WriteMessageNoVirtualToArray(
5, this->weight_filler(), target);
}
// optional .caffe.FillerParameter bias_filler = 6;
if (has_bias_filler()) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
6, this->bias_filler(), 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::VerifyUTF8String(
this->source().data(), this->source().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::VerifyUTF8String(
this->meanfile().data(), this->meanfile().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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 (int i = 0; i < this->blobs_size(); i++) {
target = ::google::protobuf::internal::WireFormatLite::
WriteMessageNoVirtualToArray(
50, this->blobs(i), 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::VerifyUTF8String(
this->det_crop_mode().data(), this->det_crop_mode().length(),
::google::protobuf::internal::WireFormat::SERIALIZE);
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::
WriteMessageNoVirtualToArray(
1001, this->hdf5_output_param(), target);
}
if (!unknown_fields().empty()) {
target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
unknown_fields(), target);
}
return target;
}
int V0LayerParameter::ByteSize() const {
int total_size = 0;
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
// 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] & (0xffu << (8 % 32))) {
// 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] & (0xffu << (16 % 32))) {
// 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] & (0xffu << (25 % 32))) {
// 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] & (0xffu << (32 % 32))) {
// 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;
total_size += 2 * this->blobs_size();
for (int i = 0; i < this->blobs_size(); i++) {
total_size +=
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
this->blobs(i));
}
// repeated float blobs_lr = 51;
{
int data_size = 0;
data_size = 4 * this->blobs_lr_size();
total_size += 2 * this->blobs_lr_size() + data_size;
}
// repeated float weight_decay = 52;
{
int data_size = 0;
data_size = 4 * this->weight_decay_size();
total_size += 2 * this->weight_decay_size() + data_size;
}
if (!unknown_fields().empty()) {
total_size +=
::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
unknown_fields());
}
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
_cached_size_ = total_size;
GOOGLE_SAFE_CONCURRENT_WRITES_END();
return total_size;
}
void V0LayerParameter::MergeFrom(const ::google::protobuf::Message& from) {
GOOGLE_CHECK_NE(&from, this);
const V0LayerParameter* source =
::google::protobuf::internal::dynamic_cast_if_available<const V0LayerParameter*>(
&from);
if (source == NULL) {
::google::protobuf::internal::ReflectionOps::Merge(from, this);
} else {
MergeFrom(*source);
}
}
void V0LayerParameter::MergeFrom(const V0LayerParameter& from) {
GOOGLE_CHECK_NE(&from, this);
blobs_.MergeFrom(from.blobs_);
blobs_lr_.MergeFrom(from.blobs_lr_);
weight_decay_.MergeFrom(from.weight_decay_);
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
if (from.has_name()) {
set_name(from.name());
}
if (from.has_type()) {
set_type(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_source(from.source());
}
if (from.has_scale()) {
set_scale(from.scale());
}
if (from.has_meanfile()) {
set_meanfile(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_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());
}
}
mutable_unknown_fields()->MergeFrom(from.unknown_fields());
}
void V0LayerParameter::CopyFrom(const ::google::protobuf::Message& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
void V0LayerParameter::CopyFrom(const V0LayerParameter& from) {
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool V0LayerParameter::IsInitialized() const {
return true;
}
void V0LayerParameter::Swap(V0LayerParameter* other) {
if (other != this) {
std::swap(name_, other->name_);
std::swap(type_, 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_);
std::swap(source_, other->source_);
std::swap(scale_, other->scale_);
std::swap(meanfile_, other->meanfile_);
std::swap(batchsize_, other->batchsize_);
std::swap(cropsize_, other->cropsize_);
std::swap(mirror_, other->mirror_);
blobs_.Swap(&other->blobs_);
blobs_lr_.Swap(&other->blobs_lr_);
weight_decay_.Swap(&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_);
std::swap(det_crop_mode_, 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]);
_unknown_fields_.Swap(&other->_unknown_fields_);
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;
}
// @@protoc_insertion_point(namespace_scope)
} // namespace caffe
// @@protoc_insertion_point(global_scope)