opencv/modules/dnn/misc/caffe/opencv-caffe.pb.cc
Alexander Alekhin d934bb15b0
Merge pull request #20998 from alalek:update_protobuf_3.19.1
3rdparty(protobuf): upgrade 3.5.2 => 3.19.1

* 3rdparty(protobuf): upgrade 3.5.2 => 3.19.1

* dnn: update protobuf files (3.19.1)

* 3rdparty(protobuf): re-apply OpenCV patch for custom fields (3.19.1)

* protobuf: suppress new build warnings

* protobuf: remove unused files
2021-11-10 12:03:45 +00:00

34121 lines
1.2 MiB

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: opencv-caffe.proto
#include "opencv-caffe.pb.h"
#include <algorithm>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace opencv_caffe {
constexpr BlobShape::BlobShape(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: dim_()
, _dim_cached_byte_size_(0){}
struct BlobShapeDefaultTypeInternal {
constexpr BlobShapeDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~BlobShapeDefaultTypeInternal() {}
union {
BlobShape _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BlobShapeDefaultTypeInternal _BlobShape_default_instance_;
constexpr BlobProto::BlobProto(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: data_()
, diff_()
, double_data_()
, double_diff_()
, raw_data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, shape_(nullptr)
, num_(0)
, channels_(0)
, height_(0)
, width_(0)
, raw_data_type_(0)
{}
struct BlobProtoDefaultTypeInternal {
constexpr BlobProtoDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~BlobProtoDefaultTypeInternal() {}
union {
BlobProto _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BlobProtoDefaultTypeInternal _BlobProto_default_instance_;
constexpr BlobProtoVector::BlobProtoVector(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: blobs_(){}
struct BlobProtoVectorDefaultTypeInternal {
constexpr BlobProtoVectorDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~BlobProtoVectorDefaultTypeInternal() {}
union {
BlobProtoVector _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BlobProtoVectorDefaultTypeInternal _BlobProtoVector_default_instance_;
constexpr PermuteParameter::PermuteParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: order_(){}
struct PermuteParameterDefaultTypeInternal {
constexpr PermuteParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~PermuteParameterDefaultTypeInternal() {}
union {
PermuteParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PermuteParameterDefaultTypeInternal _PermuteParameter_default_instance_;
constexpr NormalizeBBoxParameter::NormalizeBBoxParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: scale_filler_(nullptr)
, across_spatial_(true)
, channel_shared_(true)
, eps_(1e-10f){}
struct NormalizeBBoxParameterDefaultTypeInternal {
constexpr NormalizeBBoxParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~NormalizeBBoxParameterDefaultTypeInternal() {}
union {
NormalizeBBoxParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NormalizeBBoxParameterDefaultTypeInternal _NormalizeBBoxParameter_default_instance_;
constexpr PriorBoxParameter::PriorBoxParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: min_size_()
, max_size_()
, aspect_ratio_()
, variance_()
, offset_h_()
, offset_w_()
, width_()
, height_()
, img_size_(0u)
, img_h_(0u)
, img_w_(0u)
, step_(0)
, step_h_(0)
, step_w_(0)
, flip_(true)
, clip_(true)
, offset_(0.5f){}
struct PriorBoxParameterDefaultTypeInternal {
constexpr PriorBoxParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~PriorBoxParameterDefaultTypeInternal() {}
union {
PriorBoxParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PriorBoxParameterDefaultTypeInternal _PriorBoxParameter_default_instance_;
constexpr DetectionOutputParameter::DetectionOutputParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: nms_param_(nullptr)
, save_output_param_(nullptr)
, num_classes_(0u)
, background_label_id_(0)
, confidence_threshold_(0)
, variance_encoded_in_target_(false)
, clip_(false)
, keep_top_k_(-1)
, code_type_(1)
, share_location_(true)
, normalized_bbox_(true){}
struct DetectionOutputParameterDefaultTypeInternal {
constexpr DetectionOutputParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~DetectionOutputParameterDefaultTypeInternal() {}
union {
DetectionOutputParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DetectionOutputParameterDefaultTypeInternal _DetectionOutputParameter_default_instance_;
constexpr Datum::Datum(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: float_data_()
, data_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, channels_(0)
, height_(0)
, width_(0)
, label_(0)
, encoded_(false){}
struct DatumDefaultTypeInternal {
constexpr DatumDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~DatumDefaultTypeInternal() {}
union {
Datum _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DatumDefaultTypeInternal _Datum_default_instance_;
constexpr FillerParameter::FillerParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: type_(nullptr)
, value_(0)
, min_(0)
, mean_(0)
, variance_norm_(0)
, sparse_(-1)
, max_(1)
, std_(1){}
struct FillerParameterDefaultTypeInternal {
constexpr FillerParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~FillerParameterDefaultTypeInternal() {}
union {
FillerParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FillerParameterDefaultTypeInternal _FillerParameter_default_instance_;
constexpr NetParameter::NetParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: layers_()
, input_()
, input_dim_()
, input_shape_()
, layer_()
, name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, state_(nullptr)
, force_backward_(false)
, debug_info_(false){}
struct NetParameterDefaultTypeInternal {
constexpr NetParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~NetParameterDefaultTypeInternal() {}
union {
NetParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NetParameterDefaultTypeInternal _NetParameter_default_instance_;
constexpr SolverParameter::SolverParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: test_net_()
, test_iter_()
, test_net_param_()
, test_state_()
, stepvalue_()
, train_net_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, lr_policy_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, snapshot_prefix_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, net_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, regularization_type_(nullptr)
, type_(nullptr)
, train_net_param_(nullptr)
, net_param_(nullptr)
, train_state_(nullptr)
, test_interval_(0)
, base_lr_(0)
, display_(0)
, max_iter_(0)
, gamma_(0)
, power_(0)
, momentum_(0)
, weight_decay_(0)
, stepsize_(0)
, snapshot_(0)
, device_id_(0)
, test_compute_loss_(false)
, snapshot_diff_(false)
, debug_info_(false)
, solver_type_(0)
, momentum2_(0.999f)
, random_seed_(int64_t{-1})
, solver_mode_(1)
, test_initialization_(true)
, snapshot_after_train_(true)
, delta_(1e-08f)
, average_loss_(1)
, clip_gradients_(-1)
, iter_size_(1)
, snapshot_format_(1)
, rms_decay_(0.99f){}
struct SolverParameterDefaultTypeInternal {
constexpr SolverParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~SolverParameterDefaultTypeInternal() {}
union {
SolverParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SolverParameterDefaultTypeInternal _SolverParameter_default_instance_;
constexpr SolverState::SolverState(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: history_()
, learned_net_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, iter_(0)
, current_step_(0){}
struct SolverStateDefaultTypeInternal {
constexpr SolverStateDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~SolverStateDefaultTypeInternal() {}
union {
SolverState _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SolverStateDefaultTypeInternal _SolverState_default_instance_;
constexpr NetState::NetState(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: stage_()
, level_(0)
, phase_(1)
{}
struct NetStateDefaultTypeInternal {
constexpr NetStateDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~NetStateDefaultTypeInternal() {}
union {
NetState _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NetStateDefaultTypeInternal _NetState_default_instance_;
constexpr NetStateRule::NetStateRule(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: stage_()
, not_stage_()
, phase_(0)
, min_level_(0)
, max_level_(0){}
struct NetStateRuleDefaultTypeInternal {
constexpr NetStateRuleDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~NetStateRuleDefaultTypeInternal() {}
union {
NetStateRule _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NetStateRuleDefaultTypeInternal _NetStateRule_default_instance_;
constexpr ParamSpec::ParamSpec(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, share_mode_(0)
, lr_mult_(1)
, decay_mult_(1){}
struct ParamSpecDefaultTypeInternal {
constexpr ParamSpecDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ParamSpecDefaultTypeInternal() {}
union {
ParamSpec _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ParamSpecDefaultTypeInternal _ParamSpec_default_instance_;
constexpr LayerParameter::LayerParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: bottom_()
, top_()
, loss_weight_()
, param_()
, blobs_()
, include_()
, exclude_()
, propagate_down_()
, name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, type_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, transform_param_(nullptr)
, loss_param_(nullptr)
, accuracy_param_(nullptr)
, argmax_param_(nullptr)
, concat_param_(nullptr)
, contrastive_loss_param_(nullptr)
, convolution_param_(nullptr)
, data_param_(nullptr)
, dropout_param_(nullptr)
, dummy_data_param_(nullptr)
, eltwise_param_(nullptr)
, exp_param_(nullptr)
, hdf5_data_param_(nullptr)
, hdf5_output_param_(nullptr)
, hinge_loss_param_(nullptr)
, image_data_param_(nullptr)
, infogain_loss_param_(nullptr)
, inner_product_param_(nullptr)
, lrn_param_(nullptr)
, memory_data_param_(nullptr)
, mvn_param_(nullptr)
, pooling_param_(nullptr)
, power_param_(nullptr)
, relu_param_(nullptr)
, sigmoid_param_(nullptr)
, softmax_param_(nullptr)
, slice_param_(nullptr)
, tanh_param_(nullptr)
, threshold_param_(nullptr)
, window_data_param_(nullptr)
, python_param_(nullptr)
, prelu_param_(nullptr)
, spp_param_(nullptr)
, reshape_param_(nullptr)
, log_param_(nullptr)
, flatten_param_(nullptr)
, reduction_param_(nullptr)
, embed_param_(nullptr)
, tile_param_(nullptr)
, batch_norm_param_(nullptr)
, elu_param_(nullptr)
, bias_param_(nullptr)
, scale_param_(nullptr)
, input_param_(nullptr)
, crop_param_(nullptr)
, parameter_param_(nullptr)
, recurrent_param_(nullptr)
, detection_output_param_(nullptr)
, permute_param_(nullptr)
, norm_param_(nullptr)
, prior_box_param_(nullptr)
, proposal_param_(nullptr)
, psroi_pooling_param_(nullptr)
, roi_pooling_param_(nullptr)
, phase_(0)
{}
struct LayerParameterDefaultTypeInternal {
constexpr LayerParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~LayerParameterDefaultTypeInternal() {}
union {
LayerParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LayerParameterDefaultTypeInternal _LayerParameter_default_instance_;
constexpr TransformationParameter::TransformationParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: mean_value_()
, mean_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, crop_size_(0u)
, mirror_(false)
, force_color_(false)
, force_gray_(false)
, scale_(1){}
struct TransformationParameterDefaultTypeInternal {
constexpr TransformationParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~TransformationParameterDefaultTypeInternal() {}
union {
TransformationParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TransformationParameterDefaultTypeInternal _TransformationParameter_default_instance_;
constexpr LossParameter::LossParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: ignore_label_(0)
, normalize_(false)
, normalization_(1)
{}
struct LossParameterDefaultTypeInternal {
constexpr LossParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~LossParameterDefaultTypeInternal() {}
union {
LossParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LossParameterDefaultTypeInternal _LossParameter_default_instance_;
constexpr AccuracyParameter::AccuracyParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: ignore_label_(0)
, top_k_(1u)
, axis_(1){}
struct AccuracyParameterDefaultTypeInternal {
constexpr AccuracyParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~AccuracyParameterDefaultTypeInternal() {}
union {
AccuracyParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AccuracyParameterDefaultTypeInternal _AccuracyParameter_default_instance_;
constexpr ArgMaxParameter::ArgMaxParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: out_max_val_(false)
, axis_(0)
, top_k_(1u){}
struct ArgMaxParameterDefaultTypeInternal {
constexpr ArgMaxParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ArgMaxParameterDefaultTypeInternal() {}
union {
ArgMaxParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ArgMaxParameterDefaultTypeInternal _ArgMaxParameter_default_instance_;
constexpr ConcatParameter::ConcatParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: concat_dim_(1u)
, axis_(1){}
struct ConcatParameterDefaultTypeInternal {
constexpr ConcatParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ConcatParameterDefaultTypeInternal() {}
union {
ConcatParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConcatParameterDefaultTypeInternal _ConcatParameter_default_instance_;
constexpr BatchNormParameter::BatchNormParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: use_global_stats_(false)
, scale_bias_(false)
, moving_average_fraction_(0.999f)
, eps_(1e-05f){}
struct BatchNormParameterDefaultTypeInternal {
constexpr BatchNormParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~BatchNormParameterDefaultTypeInternal() {}
union {
BatchNormParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BatchNormParameterDefaultTypeInternal _BatchNormParameter_default_instance_;
constexpr BiasParameter::BiasParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: filler_(nullptr)
, axis_(1)
, num_axes_(1){}
struct BiasParameterDefaultTypeInternal {
constexpr BiasParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~BiasParameterDefaultTypeInternal() {}
union {
BiasParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT BiasParameterDefaultTypeInternal _BiasParameter_default_instance_;
constexpr ContrastiveLossParameter::ContrastiveLossParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: legacy_version_(false)
, margin_(1){}
struct ContrastiveLossParameterDefaultTypeInternal {
constexpr ContrastiveLossParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ContrastiveLossParameterDefaultTypeInternal() {}
union {
ContrastiveLossParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ContrastiveLossParameterDefaultTypeInternal _ContrastiveLossParameter_default_instance_;
constexpr ConvolutionParameter::ConvolutionParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: pad_()
, kernel_size_()
, stride_()
, dilation_()
, weight_filler_(nullptr)
, bias_filler_(nullptr)
, num_output_(0u)
, pad_h_(0u)
, pad_w_(0u)
, kernel_h_(0u)
, kernel_w_(0u)
, stride_h_(0u)
, stride_w_(0u)
, engine_(0)
, force_nd_im2col_(false)
, axis_(1)
, bias_term_(true)
, group_(1u){}
struct ConvolutionParameterDefaultTypeInternal {
constexpr ConvolutionParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ConvolutionParameterDefaultTypeInternal() {}
union {
ConvolutionParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ConvolutionParameterDefaultTypeInternal _ConvolutionParameter_default_instance_;
constexpr CropParameter::CropParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: offset_()
, axis_(2){}
struct CropParameterDefaultTypeInternal {
constexpr CropParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~CropParameterDefaultTypeInternal() {}
union {
CropParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT CropParameterDefaultTypeInternal _CropParameter_default_instance_;
constexpr DataParameter::DataParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, mean_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, batch_size_(0u)
, crop_size_(0u)
, rand_skip_(0u)
, mirror_(false)
, force_encoded_color_(false)
, backend_(0)
, scale_(1)
, prefetch_(4u){}
struct DataParameterDefaultTypeInternal {
constexpr DataParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~DataParameterDefaultTypeInternal() {}
union {
DataParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DataParameterDefaultTypeInternal _DataParameter_default_instance_;
constexpr NonMaximumSuppressionParameter::NonMaximumSuppressionParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: top_k_(0)
, nms_threshold_(0.3f)
, eta_(1){}
struct NonMaximumSuppressionParameterDefaultTypeInternal {
constexpr NonMaximumSuppressionParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~NonMaximumSuppressionParameterDefaultTypeInternal() {}
union {
NonMaximumSuppressionParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NonMaximumSuppressionParameterDefaultTypeInternal _NonMaximumSuppressionParameter_default_instance_;
constexpr SaveOutputParameter::SaveOutputParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: output_directory_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, output_name_prefix_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, output_format_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, label_map_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, name_size_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, num_test_image_(0u){}
struct SaveOutputParameterDefaultTypeInternal {
constexpr SaveOutputParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~SaveOutputParameterDefaultTypeInternal() {}
union {
SaveOutputParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SaveOutputParameterDefaultTypeInternal _SaveOutputParameter_default_instance_;
constexpr DropoutParameter::DropoutParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: dropout_ratio_(0.5f)
, scale_train_(true){}
struct DropoutParameterDefaultTypeInternal {
constexpr DropoutParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~DropoutParameterDefaultTypeInternal() {}
union {
DropoutParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DropoutParameterDefaultTypeInternal _DropoutParameter_default_instance_;
constexpr DummyDataParameter::DummyDataParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: data_filler_()
, num_()
, channels_()
, height_()
, width_()
, shape_(){}
struct DummyDataParameterDefaultTypeInternal {
constexpr DummyDataParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~DummyDataParameterDefaultTypeInternal() {}
union {
DummyDataParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT DummyDataParameterDefaultTypeInternal _DummyDataParameter_default_instance_;
constexpr EltwiseParameter::EltwiseParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: coeff_()
, operation_(1)
, stable_prod_grad_(true){}
struct EltwiseParameterDefaultTypeInternal {
constexpr EltwiseParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~EltwiseParameterDefaultTypeInternal() {}
union {
EltwiseParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EltwiseParameterDefaultTypeInternal _EltwiseParameter_default_instance_;
constexpr ELUParameter::ELUParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: alpha_(1){}
struct ELUParameterDefaultTypeInternal {
constexpr ELUParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ELUParameterDefaultTypeInternal() {}
union {
ELUParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ELUParameterDefaultTypeInternal _ELUParameter_default_instance_;
constexpr EmbedParameter::EmbedParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: weight_filler_(nullptr)
, bias_filler_(nullptr)
, num_output_(0u)
, input_dim_(0u)
, bias_term_(true){}
struct EmbedParameterDefaultTypeInternal {
constexpr EmbedParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~EmbedParameterDefaultTypeInternal() {}
union {
EmbedParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT EmbedParameterDefaultTypeInternal _EmbedParameter_default_instance_;
constexpr ExpParameter::ExpParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: shift_(0)
, base_(-1)
, scale_(1){}
struct ExpParameterDefaultTypeInternal {
constexpr ExpParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ExpParameterDefaultTypeInternal() {}
union {
ExpParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ExpParameterDefaultTypeInternal _ExpParameter_default_instance_;
constexpr FlattenParameter::FlattenParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: axis_(1)
, end_axis_(-1){}
struct FlattenParameterDefaultTypeInternal {
constexpr FlattenParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~FlattenParameterDefaultTypeInternal() {}
union {
FlattenParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT FlattenParameterDefaultTypeInternal _FlattenParameter_default_instance_;
constexpr HDF5DataParameter::HDF5DataParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, batch_size_(0u)
, shuffle_(false){}
struct HDF5DataParameterDefaultTypeInternal {
constexpr HDF5DataParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~HDF5DataParameterDefaultTypeInternal() {}
union {
HDF5DataParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HDF5DataParameterDefaultTypeInternal _HDF5DataParameter_default_instance_;
constexpr HDF5OutputParameter::HDF5OutputParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: file_name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct HDF5OutputParameterDefaultTypeInternal {
constexpr HDF5OutputParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~HDF5OutputParameterDefaultTypeInternal() {}
union {
HDF5OutputParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HDF5OutputParameterDefaultTypeInternal _HDF5OutputParameter_default_instance_;
constexpr HingeLossParameter::HingeLossParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: norm_(1)
{}
struct HingeLossParameterDefaultTypeInternal {
constexpr HingeLossParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~HingeLossParameterDefaultTypeInternal() {}
union {
HingeLossParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT HingeLossParameterDefaultTypeInternal _HingeLossParameter_default_instance_;
constexpr ImageDataParameter::ImageDataParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, mean_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, root_folder_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, crop_size_(0u)
, rand_skip_(0u)
, shuffle_(false)
, mirror_(false)
, new_height_(0u)
, new_width_(0u)
, is_color_(true)
, scale_(1)
, batch_size_(1u){}
struct ImageDataParameterDefaultTypeInternal {
constexpr ImageDataParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ImageDataParameterDefaultTypeInternal() {}
union {
ImageDataParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ImageDataParameterDefaultTypeInternal _ImageDataParameter_default_instance_;
constexpr InfogainLossParameter::InfogainLossParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string){}
struct InfogainLossParameterDefaultTypeInternal {
constexpr InfogainLossParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~InfogainLossParameterDefaultTypeInternal() {}
union {
InfogainLossParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT InfogainLossParameterDefaultTypeInternal _InfogainLossParameter_default_instance_;
constexpr InnerProductParameter::InnerProductParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: weight_filler_(nullptr)
, bias_filler_(nullptr)
, num_output_(0u)
, transpose_(false)
, bias_term_(true)
, axis_(1){}
struct InnerProductParameterDefaultTypeInternal {
constexpr InnerProductParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~InnerProductParameterDefaultTypeInternal() {}
union {
InnerProductParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT InnerProductParameterDefaultTypeInternal _InnerProductParameter_default_instance_;
constexpr InputParameter::InputParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: shape_(){}
struct InputParameterDefaultTypeInternal {
constexpr InputParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~InputParameterDefaultTypeInternal() {}
union {
InputParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT InputParameterDefaultTypeInternal _InputParameter_default_instance_;
constexpr LogParameter::LogParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: shift_(0)
, base_(-1)
, scale_(1){}
struct LogParameterDefaultTypeInternal {
constexpr LogParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~LogParameterDefaultTypeInternal() {}
union {
LogParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LogParameterDefaultTypeInternal _LogParameter_default_instance_;
constexpr LRNParameter::LRNParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: norm_region_(0)
, engine_(0)
, local_size_(5u)
, alpha_(1)
, beta_(0.75f)
, k_(1){}
struct LRNParameterDefaultTypeInternal {
constexpr LRNParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~LRNParameterDefaultTypeInternal() {}
union {
LRNParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT LRNParameterDefaultTypeInternal _LRNParameter_default_instance_;
constexpr MemoryDataParameter::MemoryDataParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: batch_size_(0u)
, channels_(0u)
, height_(0u)
, width_(0u){}
struct MemoryDataParameterDefaultTypeInternal {
constexpr MemoryDataParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~MemoryDataParameterDefaultTypeInternal() {}
union {
MemoryDataParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MemoryDataParameterDefaultTypeInternal _MemoryDataParameter_default_instance_;
constexpr MVNParameter::MVNParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: across_channels_(false)
, normalize_variance_(true)
, eps_(1e-09f){}
struct MVNParameterDefaultTypeInternal {
constexpr MVNParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~MVNParameterDefaultTypeInternal() {}
union {
MVNParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT MVNParameterDefaultTypeInternal _MVNParameter_default_instance_;
constexpr ParameterParameter::ParameterParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: shape_(nullptr){}
struct ParameterParameterDefaultTypeInternal {
constexpr ParameterParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ParameterParameterDefaultTypeInternal() {}
union {
ParameterParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ParameterParameterDefaultTypeInternal _ParameterParameter_default_instance_;
constexpr PoolingParameter::PoolingParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: pool_(0)
, kernel_size_(0u)
, pad_(0u)
, kernel_h_(0u)
, kernel_w_(0u)
, stride_h_(0u)
, stride_w_(0u)
, pad_h_(0u)
, pad_w_(0u)
, engine_(0)
, global_pooling_(false)
, stride_(1u)
, ceil_mode_(true){}
struct PoolingParameterDefaultTypeInternal {
constexpr PoolingParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~PoolingParameterDefaultTypeInternal() {}
union {
PoolingParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PoolingParameterDefaultTypeInternal _PoolingParameter_default_instance_;
constexpr PowerParameter::PowerParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: shift_(0)
, power_(1)
, scale_(1){}
struct PowerParameterDefaultTypeInternal {
constexpr PowerParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~PowerParameterDefaultTypeInternal() {}
union {
PowerParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PowerParameterDefaultTypeInternal _PowerParameter_default_instance_;
constexpr PythonParameter::PythonParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: module_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, layer_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, param_str_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, share_in_parallel_(false){}
struct PythonParameterDefaultTypeInternal {
constexpr PythonParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~PythonParameterDefaultTypeInternal() {}
union {
PythonParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PythonParameterDefaultTypeInternal _PythonParameter_default_instance_;
constexpr RecurrentParameter::RecurrentParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: weight_filler_(nullptr)
, bias_filler_(nullptr)
, num_output_(0u)
, debug_info_(false)
, expose_hidden_(false){}
struct RecurrentParameterDefaultTypeInternal {
constexpr RecurrentParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~RecurrentParameterDefaultTypeInternal() {}
union {
RecurrentParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RecurrentParameterDefaultTypeInternal _RecurrentParameter_default_instance_;
constexpr ReductionParameter::ReductionParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: axis_(0)
, operation_(1)
, coeff_(1){}
struct ReductionParameterDefaultTypeInternal {
constexpr ReductionParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ReductionParameterDefaultTypeInternal() {}
union {
ReductionParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ReductionParameterDefaultTypeInternal _ReductionParameter_default_instance_;
constexpr ReLUParameter::ReLUParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: negative_slope_(0)
, engine_(0)
{}
struct ReLUParameterDefaultTypeInternal {
constexpr ReLUParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ReLUParameterDefaultTypeInternal() {}
union {
ReLUParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ReLUParameterDefaultTypeInternal _ReLUParameter_default_instance_;
constexpr ReshapeParameter::ReshapeParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: shape_(nullptr)
, axis_(0)
, num_axes_(-1){}
struct ReshapeParameterDefaultTypeInternal {
constexpr ReshapeParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ReshapeParameterDefaultTypeInternal() {}
union {
ReshapeParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ReshapeParameterDefaultTypeInternal _ReshapeParameter_default_instance_;
constexpr ScaleParameter::ScaleParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: filler_(nullptr)
, bias_filler_(nullptr)
, bias_term_(false)
, axis_(1)
, num_axes_(1){}
struct ScaleParameterDefaultTypeInternal {
constexpr ScaleParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ScaleParameterDefaultTypeInternal() {}
union {
ScaleParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ScaleParameterDefaultTypeInternal _ScaleParameter_default_instance_;
constexpr SigmoidParameter::SigmoidParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: engine_(0)
{}
struct SigmoidParameterDefaultTypeInternal {
constexpr SigmoidParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~SigmoidParameterDefaultTypeInternal() {}
union {
SigmoidParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SigmoidParameterDefaultTypeInternal _SigmoidParameter_default_instance_;
constexpr SliceParameter::SliceParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: slice_point_()
, slice_dim_(1u)
, axis_(1){}
struct SliceParameterDefaultTypeInternal {
constexpr SliceParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~SliceParameterDefaultTypeInternal() {}
union {
SliceParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SliceParameterDefaultTypeInternal _SliceParameter_default_instance_;
constexpr SoftmaxParameter::SoftmaxParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: engine_(0)
, axis_(1){}
struct SoftmaxParameterDefaultTypeInternal {
constexpr SoftmaxParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~SoftmaxParameterDefaultTypeInternal() {}
union {
SoftmaxParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SoftmaxParameterDefaultTypeInternal _SoftmaxParameter_default_instance_;
constexpr TanHParameter::TanHParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: engine_(0)
{}
struct TanHParameterDefaultTypeInternal {
constexpr TanHParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~TanHParameterDefaultTypeInternal() {}
union {
TanHParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TanHParameterDefaultTypeInternal _TanHParameter_default_instance_;
constexpr TileParameter::TileParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: tiles_(0)
, axis_(1){}
struct TileParameterDefaultTypeInternal {
constexpr TileParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~TileParameterDefaultTypeInternal() {}
union {
TileParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT TileParameterDefaultTypeInternal _TileParameter_default_instance_;
constexpr ThresholdParameter::ThresholdParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: threshold_(0){}
struct ThresholdParameterDefaultTypeInternal {
constexpr ThresholdParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ThresholdParameterDefaultTypeInternal() {}
union {
ThresholdParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ThresholdParameterDefaultTypeInternal _ThresholdParameter_default_instance_;
constexpr WindowDataParameter::WindowDataParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, mean_file_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, crop_mode_(nullptr)
, root_folder_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, batch_size_(0u)
, crop_size_(0u)
, mirror_(false)
, cache_images_(false)
, context_pad_(0u)
, scale_(1)
, fg_threshold_(0.5f)
, bg_threshold_(0.5f)
, fg_fraction_(0.25f){}
struct WindowDataParameterDefaultTypeInternal {
constexpr WindowDataParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~WindowDataParameterDefaultTypeInternal() {}
union {
WindowDataParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT WindowDataParameterDefaultTypeInternal _WindowDataParameter_default_instance_;
constexpr SPPParameter::SPPParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: pyramid_height_(0u)
, pool_(0)
, engine_(0)
{}
struct SPPParameterDefaultTypeInternal {
constexpr SPPParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~SPPParameterDefaultTypeInternal() {}
union {
SPPParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT SPPParameterDefaultTypeInternal _SPPParameter_default_instance_;
constexpr V1LayerParameter::V1LayerParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: bottom_()
, top_()
, blobs_()
, blobs_lr_()
, weight_decay_()
, include_()
, exclude_()
, loss_weight_()
, param_()
, blob_share_mode_()
, name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, layer_(nullptr)
, concat_param_(nullptr)
, convolution_param_(nullptr)
, data_param_(nullptr)
, dropout_param_(nullptr)
, hdf5_data_param_(nullptr)
, hdf5_output_param_(nullptr)
, image_data_param_(nullptr)
, infogain_loss_param_(nullptr)
, inner_product_param_(nullptr)
, lrn_param_(nullptr)
, pooling_param_(nullptr)
, window_data_param_(nullptr)
, power_param_(nullptr)
, memory_data_param_(nullptr)
, argmax_param_(nullptr)
, eltwise_param_(nullptr)
, threshold_param_(nullptr)
, dummy_data_param_(nullptr)
, accuracy_param_(nullptr)
, hinge_loss_param_(nullptr)
, relu_param_(nullptr)
, slice_param_(nullptr)
, mvn_param_(nullptr)
, transform_param_(nullptr)
, tanh_param_(nullptr)
, sigmoid_param_(nullptr)
, softmax_param_(nullptr)
, contrastive_loss_param_(nullptr)
, exp_param_(nullptr)
, loss_param_(nullptr)
, type_(0)
{}
struct V1LayerParameterDefaultTypeInternal {
constexpr V1LayerParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~V1LayerParameterDefaultTypeInternal() {}
union {
V1LayerParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT V1LayerParameterDefaultTypeInternal _V1LayerParameter_default_instance_;
constexpr V0LayerParameter::V0LayerParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: blobs_()
, blobs_lr_()
, weight_decay_()
, name_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, type_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, source_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, meanfile_(&::PROTOBUF_NAMESPACE_ID::internal::fixed_address_empty_string)
, det_crop_mode_(nullptr)
, weight_filler_(nullptr)
, bias_filler_(nullptr)
, hdf5_output_param_(nullptr)
, num_output_(0u)
, pad_(0u)
, kernelsize_(0u)
, pool_(0)
, batchsize_(0u)
, cropsize_(0u)
, new_width_(0)
, mirror_(false)
, shuffle_images_(false)
, rand_skip_(0u)
, det_context_pad_(0u)
, new_num_(0)
, new_channels_(0)
, new_height_(0)
, concat_dim_(1u)
, biasterm_(true)
, group_(1u)
, stride_(1u)
, dropout_ratio_(0.5f)
, local_size_(5u)
, alpha_(1)
, beta_(0.75f)
, scale_(1)
, k_(1)
, det_fg_threshold_(0.5f)
, det_bg_threshold_(0.5f)
, det_fg_fraction_(0.25f){}
struct V0LayerParameterDefaultTypeInternal {
constexpr V0LayerParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~V0LayerParameterDefaultTypeInternal() {}
union {
V0LayerParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT V0LayerParameterDefaultTypeInternal _V0LayerParameter_default_instance_;
constexpr PReLUParameter::PReLUParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: filler_(nullptr)
, channel_shared_(false){}
struct PReLUParameterDefaultTypeInternal {
constexpr PReLUParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~PReLUParameterDefaultTypeInternal() {}
union {
PReLUParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PReLUParameterDefaultTypeInternal _PReLUParameter_default_instance_;
constexpr NormalizedBBox::NormalizedBBox(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: xmin_(0)
, ymin_(0)
, xmax_(0)
, ymax_(0)
, label_(0)
, difficult_(false)
, score_(0)
, size_(0){}
struct NormalizedBBoxDefaultTypeInternal {
constexpr NormalizedBBoxDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~NormalizedBBoxDefaultTypeInternal() {}
union {
NormalizedBBox _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT NormalizedBBoxDefaultTypeInternal _NormalizedBBox_default_instance_;
constexpr ROIPoolingParameter::ROIPoolingParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: pooled_h_(0u)
, pooled_w_(0u)
, spatial_scale_(1){}
struct ROIPoolingParameterDefaultTypeInternal {
constexpr ROIPoolingParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ROIPoolingParameterDefaultTypeInternal() {}
union {
ROIPoolingParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ROIPoolingParameterDefaultTypeInternal _ROIPoolingParameter_default_instance_;
constexpr ProposalParameter::ProposalParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: ratio_()
, scale_()
, feat_stride_(16u)
, base_size_(16u)
, min_size_(16u)
, pre_nms_topn_(6000u)
, post_nms_topn_(300u)
, nms_thresh_(0.7f){}
struct ProposalParameterDefaultTypeInternal {
constexpr ProposalParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~ProposalParameterDefaultTypeInternal() {}
union {
ProposalParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT ProposalParameterDefaultTypeInternal _ProposalParameter_default_instance_;
constexpr PSROIPoolingParameter::PSROIPoolingParameter(
::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
: spatial_scale_(0)
, output_dim_(0)
, group_size_(0){}
struct PSROIPoolingParameterDefaultTypeInternal {
constexpr PSROIPoolingParameterDefaultTypeInternal()
: _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
~PSROIPoolingParameterDefaultTypeInternal() {}
union {
PSROIPoolingParameter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PSROIPoolingParameterDefaultTypeInternal _PSROIPoolingParameter_default_instance_;
} // namespace opencv_caffe
static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_opencv_2dcaffe_2eproto[71];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_opencv_2dcaffe_2eproto[27];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_opencv_2dcaffe_2eproto = nullptr;
const uint32_t TableStruct_opencv_2dcaffe_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobShape, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobShape, dim_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, shape_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, data_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, diff_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, double_data_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, double_diff_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, raw_data_type_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, raw_data_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, num_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, channels_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, height_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProto, width_),
1,
~0u,
~0u,
~0u,
~0u,
6,
0,
2,
3,
4,
5,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProtoVector, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BlobProtoVector, blobs_),
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PermuteParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PermuteParameter, order_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, across_spatial_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, scale_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, channel_shared_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizeBBoxParameter, eps_),
1,
0,
2,
3,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, min_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, max_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, aspect_ratio_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, flip_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, clip_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, variance_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, img_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, img_h_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, img_w_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, step_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, step_h_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, step_w_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, offset_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, offset_h_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, offset_w_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, width_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PriorBoxParameter, height_),
~0u,
~0u,
~0u,
6,
7,
~0u,
0,
1,
2,
3,
4,
5,
8,
~0u,
~0u,
~0u,
~0u,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, num_classes_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, share_location_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, background_label_id_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, nms_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, save_output_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, code_type_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, variance_encoded_in_target_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, keep_top_k_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, confidence_threshold_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, normalized_bbox_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DetectionOutputParameter, clip_),
2,
9,
3,
0,
1,
8,
5,
7,
4,
10,
6,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, channels_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, height_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, width_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, data_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, label_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, float_data_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::Datum, encoded_),
1,
2,
3,
0,
4,
~0u,
5,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, type_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, value_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, min_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, max_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, mean_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, std_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, sparse_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FillerParameter, variance_norm_),
0,
1,
2,
6,
3,
7,
5,
4,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, name_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, input_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, input_shape_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, input_dim_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, force_backward_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, state_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, debug_info_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, layer_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetParameter, layers_),
0,
~0u,
~0u,
~0u,
2,
1,
3,
~0u,
~0u,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, net_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, net_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, train_net_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, test_net_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, train_net_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, test_net_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, train_state_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, test_state_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, test_iter_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, test_interval_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, test_compute_loss_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, test_initialization_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, base_lr_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, display_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, average_loss_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, max_iter_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, iter_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, lr_policy_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, gamma_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, power_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, momentum_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, weight_decay_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, regularization_type_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, stepsize_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, stepvalue_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, clip_gradients_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, snapshot_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, snapshot_prefix_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, snapshot_diff_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, snapshot_format_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, solver_mode_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, device_id_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, random_seed_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, type_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, delta_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, momentum2_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, rms_decay_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, debug_info_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, snapshot_after_train_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverParameter, solver_type_),
3,
7,
0,
~0u,
6,
~0u,
8,
~0u,
~0u,
9,
20,
27,
10,
11,
30,
12,
32,
1,
13,
14,
15,
16,
4,
17,
~0u,
31,
18,
2,
21,
33,
26,
19,
25,
5,
29,
24,
34,
22,
28,
23,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, iter_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, learned_net_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, history_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SolverState, current_step_),
1,
0,
~0u,
2,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetState, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetState, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetState, phase_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetState, level_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetState, stage_),
1,
0,
~0u,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, phase_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, min_level_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, max_level_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, stage_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NetStateRule, not_stage_),
0,
1,
2,
~0u,
~0u,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, name_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, share_mode_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, lr_mult_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParamSpec, decay_mult_),
0,
1,
2,
3,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, name_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, type_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, bottom_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, top_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, phase_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, loss_weight_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, blobs_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, propagate_down_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, include_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, exclude_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, transform_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, loss_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, accuracy_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, argmax_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, batch_norm_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, bias_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, concat_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, contrastive_loss_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, convolution_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, crop_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, detection_output_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, dropout_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, dummy_data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, eltwise_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, elu_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, embed_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, exp_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, flatten_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, hdf5_data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, hdf5_output_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, hinge_loss_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, image_data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, infogain_loss_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, inner_product_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, input_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, log_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, lrn_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, memory_data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, mvn_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, norm_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, permute_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, parameter_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, pooling_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, power_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, prelu_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, prior_box_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, proposal_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, psroi_pooling_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, python_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, recurrent_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, reduction_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, relu_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, reshape_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, roi_pooling_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, scale_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, sigmoid_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, softmax_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, spp_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, slice_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, tanh_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, threshold_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, tile_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LayerParameter, window_data_param_),
0,
1,
~0u,
~0u,
56,
~0u,
~0u,
~0u,
~0u,
~0u,
~0u,
2,
3,
4,
5,
41,
43,
6,
7,
8,
46,
9,
49,
10,
11,
12,
42,
39,
13,
37,
14,
15,
16,
17,
18,
19,
45,
36,
20,
21,
22,
51,
50,
47,
23,
24,
33,
52,
53,
54,
32,
48,
38,
25,
35,
55,
44,
26,
27,
34,
28,
29,
30,
40,
31,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, scale_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, mirror_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, crop_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, mean_file_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, mean_value_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, force_color_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TransformationParameter, force_gray_),
5,
2,
1,
0,
~0u,
3,
4,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LossParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LossParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LossParameter, ignore_label_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LossParameter, normalization_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LossParameter, normalize_),
0,
2,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::AccuracyParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::AccuracyParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::AccuracyParameter, top_k_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::AccuracyParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::AccuracyParameter, ignore_label_),
1,
2,
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ArgMaxParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ArgMaxParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ArgMaxParameter, out_max_val_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ArgMaxParameter, top_k_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ArgMaxParameter, axis_),
0,
2,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConcatParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConcatParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConcatParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConcatParameter, concat_dim_),
1,
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, use_global_stats_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, moving_average_fraction_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, eps_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BatchNormParameter, scale_bias_),
0,
2,
3,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BiasParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BiasParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BiasParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BiasParameter, num_axes_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::BiasParameter, filler_),
1,
2,
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ContrastiveLossParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ContrastiveLossParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ContrastiveLossParameter, margin_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ContrastiveLossParameter, legacy_version_),
1,
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, num_output_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, bias_term_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, pad_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, kernel_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, stride_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, dilation_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, pad_h_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, pad_w_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, kernel_h_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, kernel_w_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, stride_h_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, stride_w_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, group_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, weight_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, bias_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, engine_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ConvolutionParameter, force_nd_im2col_),
2,
12,
~0u,
~0u,
~0u,
~0u,
3,
4,
5,
6,
7,
8,
13,
0,
1,
9,
11,
10,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::CropParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::CropParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::CropParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::CropParameter, offset_),
0,
~0u,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, source_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, batch_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, rand_skip_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, backend_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, scale_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, mean_file_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, crop_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, mirror_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, force_encoded_color_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DataParameter, prefetch_),
0,
2,
4,
7,
8,
1,
3,
5,
6,
9,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NonMaximumSuppressionParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NonMaximumSuppressionParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NonMaximumSuppressionParameter, nms_threshold_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NonMaximumSuppressionParameter, top_k_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NonMaximumSuppressionParameter, eta_),
1,
0,
2,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, output_directory_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, output_name_prefix_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, output_format_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, label_map_file_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, name_size_file_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SaveOutputParameter, num_test_image_),
0,
1,
2,
3,
4,
5,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DropoutParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DropoutParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DropoutParameter, dropout_ratio_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DropoutParameter, scale_train_),
0,
1,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, data_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, shape_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, num_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, channels_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, height_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::DummyDataParameter, width_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EltwiseParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EltwiseParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EltwiseParameter, operation_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EltwiseParameter, coeff_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EltwiseParameter, stable_prod_grad_),
0,
~0u,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ELUParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ELUParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ELUParameter, alpha_),
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, num_output_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, input_dim_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, bias_term_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, weight_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::EmbedParameter, bias_filler_),
2,
3,
4,
0,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ExpParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ExpParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ExpParameter, base_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ExpParameter, scale_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ExpParameter, shift_),
1,
2,
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FlattenParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FlattenParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FlattenParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::FlattenParameter, end_axis_),
0,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5DataParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5DataParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5DataParameter, source_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5DataParameter, batch_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5DataParameter, shuffle_),
0,
1,
2,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5OutputParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5OutputParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HDF5OutputParameter, file_name_),
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HingeLossParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HingeLossParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::HingeLossParameter, norm_),
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, source_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, batch_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, rand_skip_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, shuffle_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, new_height_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, new_width_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, is_color_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, scale_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, mean_file_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, crop_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, mirror_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ImageDataParameter, root_folder_),
0,
11,
4,
5,
7,
8,
9,
10,
1,
3,
6,
2,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InfogainLossParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InfogainLossParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InfogainLossParameter, source_),
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, num_output_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, bias_term_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, weight_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, bias_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InnerProductParameter, transpose_),
2,
4,
0,
1,
5,
3,
~0u, // no _has_bits_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InputParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::InputParameter, shape_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LogParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LogParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LogParameter, base_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LogParameter, scale_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LogParameter, shift_),
1,
2,
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, local_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, alpha_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, beta_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, norm_region_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, k_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::LRNParameter, engine_),
2,
3,
4,
0,
5,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, batch_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, channels_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, height_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MemoryDataParameter, width_),
0,
1,
2,
3,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MVNParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MVNParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MVNParameter, normalize_variance_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MVNParameter, across_channels_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::MVNParameter, eps_),
1,
0,
2,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParameterParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParameterParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ParameterParameter, shape_),
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, pool_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, pad_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, pad_h_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, pad_w_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, kernel_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, kernel_h_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, kernel_w_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, stride_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, stride_h_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, stride_w_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, engine_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, global_pooling_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PoolingParameter, ceil_mode_),
0,
2,
7,
8,
1,
3,
4,
11,
5,
6,
9,
10,
12,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PowerParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PowerParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PowerParameter, power_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PowerParameter, scale_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PowerParameter, shift_),
1,
2,
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, module_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, layer_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, param_str_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PythonParameter, share_in_parallel_),
0,
1,
2,
3,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, num_output_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, weight_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, bias_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, debug_info_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::RecurrentParameter, expose_hidden_),
2,
0,
1,
3,
4,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReductionParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReductionParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReductionParameter, operation_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReductionParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReductionParameter, coeff_),
1,
0,
2,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReLUParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReLUParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReLUParameter, negative_slope_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReLUParameter, engine_),
0,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReshapeParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReshapeParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReshapeParameter, shape_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReshapeParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ReshapeParameter, num_axes_),
0,
1,
2,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, num_axes_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, bias_term_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ScaleParameter, bias_filler_),
3,
4,
0,
2,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SigmoidParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SigmoidParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SigmoidParameter, engine_),
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SliceParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SliceParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SliceParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SliceParameter, slice_point_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SliceParameter, slice_dim_),
1,
~0u,
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SoftmaxParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SoftmaxParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SoftmaxParameter, engine_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SoftmaxParameter, axis_),
0,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TanHParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TanHParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TanHParameter, engine_),
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TileParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TileParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TileParameter, axis_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::TileParameter, tiles_),
1,
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ThresholdParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ThresholdParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ThresholdParameter, threshold_),
0,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, source_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, scale_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, mean_file_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, batch_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, crop_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, mirror_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, fg_threshold_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, bg_threshold_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, fg_fraction_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, context_pad_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, crop_mode_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, cache_images_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::WindowDataParameter, root_folder_),
0,
9,
1,
4,
5,
6,
10,
11,
12,
8,
2,
7,
3,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SPPParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SPPParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SPPParameter, pyramid_height_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SPPParameter, pool_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::SPPParameter, engine_),
0,
1,
2,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, bottom_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, top_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, name_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, include_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, exclude_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, type_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, blobs_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, blob_share_mode_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, blobs_lr_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, weight_decay_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, loss_weight_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, accuracy_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, argmax_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, concat_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, contrastive_loss_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, convolution_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, dropout_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, dummy_data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, eltwise_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, exp_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, hdf5_data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, hdf5_output_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, hinge_loss_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, image_data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, infogain_loss_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, inner_product_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, lrn_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, memory_data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, mvn_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, pooling_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, power_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, relu_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, sigmoid_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, softmax_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, slice_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, tanh_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, threshold_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, window_data_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, transform_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, loss_param_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V1LayerParameter, layer_),
~0u,
~0u,
0,
~0u,
~0u,
32,
~0u,
~0u,
~0u,
~0u,
~0u,
~0u,
20,
16,
2,
29,
3,
4,
5,
19,
17,
30,
6,
7,
21,
8,
9,
10,
11,
15,
24,
12,
14,
22,
27,
28,
23,
26,
18,
13,
25,
31,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, name_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, type_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, num_output_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, biasterm_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, weight_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, bias_filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, pad_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, kernelsize_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, group_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, stride_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, pool_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, dropout_ratio_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, local_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, alpha_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, beta_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, k_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, source_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, scale_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, meanfile_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, batchsize_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, cropsize_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, mirror_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, blobs_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, blobs_lr_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, weight_decay_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, rand_skip_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, det_fg_threshold_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, det_bg_threshold_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, det_fg_fraction_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, det_context_pad_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, det_crop_mode_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, new_num_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, new_channels_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, new_height_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, new_width_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, shuffle_images_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, concat_dim_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::V0LayerParameter, hdf5_output_param_),
0,
1,
8,
23,
5,
6,
9,
10,
24,
25,
11,
26,
27,
28,
29,
31,
2,
30,
3,
12,
13,
15,
~0u,
~0u,
~0u,
17,
32,
33,
34,
18,
4,
19,
20,
21,
14,
16,
22,
7,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PReLUParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PReLUParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PReLUParameter, filler_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PReLUParameter, channel_shared_),
0,
1,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, xmin_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, ymin_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, xmax_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, ymax_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, label_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, difficult_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, score_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::NormalizedBBox, size_),
0,
1,
2,
3,
4,
5,
6,
7,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ROIPoolingParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ROIPoolingParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ROIPoolingParameter, pooled_h_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ROIPoolingParameter, pooled_w_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ROIPoolingParameter, spatial_scale_),
0,
1,
2,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, feat_stride_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, base_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, min_size_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, ratio_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, scale_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, pre_nms_topn_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, post_nms_topn_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::ProposalParameter, nms_thresh_),
0,
1,
2,
~0u,
~0u,
3,
4,
5,
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PSROIPoolingParameter, _has_bits_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PSROIPoolingParameter, _internal_metadata_),
~0u, // no _extensions_
~0u, // no _oneof_case_
~0u, // no _weak_field_map_
~0u, // no _inlined_string_donated_
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PSROIPoolingParameter, spatial_scale_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PSROIPoolingParameter, output_dim_),
PROTOBUF_FIELD_OFFSET(::opencv_caffe::PSROIPoolingParameter, group_size_),
0,
1,
2,
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
{ 0, -1, -1, sizeof(::opencv_caffe::BlobShape)},
{ 7, 24, -1, sizeof(::opencv_caffe::BlobProto)},
{ 35, -1, -1, sizeof(::opencv_caffe::BlobProtoVector)},
{ 42, -1, -1, sizeof(::opencv_caffe::PermuteParameter)},
{ 49, 59, -1, sizeof(::opencv_caffe::NormalizeBBoxParameter)},
{ 63, 86, -1, sizeof(::opencv_caffe::PriorBoxParameter)},
{ 103, 120, -1, sizeof(::opencv_caffe::DetectionOutputParameter)},
{ 131, 144, -1, sizeof(::opencv_caffe::Datum)},
{ 151, 165, -1, sizeof(::opencv_caffe::FillerParameter)},
{ 173, 188, -1, sizeof(::opencv_caffe::NetParameter)},
{ 197, 243, -1, sizeof(::opencv_caffe::SolverParameter)},
{ 283, 293, -1, sizeof(::opencv_caffe::SolverState)},
{ 297, 306, -1, sizeof(::opencv_caffe::NetState)},
{ 309, 320, -1, sizeof(::opencv_caffe::NetStateRule)},
{ 325, 335, -1, sizeof(::opencv_caffe::ParamSpec)},
{ 339, 410, -1, sizeof(::opencv_caffe::LayerParameter)},
{ 475, 488, -1, sizeof(::opencv_caffe::TransformationParameter)},
{ 495, 504, -1, sizeof(::opencv_caffe::LossParameter)},
{ 507, 516, -1, sizeof(::opencv_caffe::AccuracyParameter)},
{ 519, 528, -1, sizeof(::opencv_caffe::ArgMaxParameter)},
{ 531, 539, -1, sizeof(::opencv_caffe::ConcatParameter)},
{ 541, 551, -1, sizeof(::opencv_caffe::BatchNormParameter)},
{ 555, 564, -1, sizeof(::opencv_caffe::BiasParameter)},
{ 567, 575, -1, sizeof(::opencv_caffe::ContrastiveLossParameter)},
{ 577, 601, -1, sizeof(::opencv_caffe::ConvolutionParameter)},
{ 619, 627, -1, sizeof(::opencv_caffe::CropParameter)},
{ 629, 645, -1, sizeof(::opencv_caffe::DataParameter)},
{ 655, 664, -1, sizeof(::opencv_caffe::NonMaximumSuppressionParameter)},
{ 667, 679, -1, sizeof(::opencv_caffe::SaveOutputParameter)},
{ 685, 693, -1, sizeof(::opencv_caffe::DropoutParameter)},
{ 695, -1, -1, sizeof(::opencv_caffe::DummyDataParameter)},
{ 707, 716, -1, sizeof(::opencv_caffe::EltwiseParameter)},
{ 719, 726, -1, sizeof(::opencv_caffe::ELUParameter)},
{ 727, 738, -1, sizeof(::opencv_caffe::EmbedParameter)},
{ 743, 752, -1, sizeof(::opencv_caffe::ExpParameter)},
{ 755, 763, -1, sizeof(::opencv_caffe::FlattenParameter)},
{ 765, 774, -1, sizeof(::opencv_caffe::HDF5DataParameter)},
{ 777, 784, -1, sizeof(::opencv_caffe::HDF5OutputParameter)},
{ 785, 792, -1, sizeof(::opencv_caffe::HingeLossParameter)},
{ 793, 811, -1, sizeof(::opencv_caffe::ImageDataParameter)},
{ 823, 830, -1, sizeof(::opencv_caffe::InfogainLossParameter)},
{ 831, 843, -1, sizeof(::opencv_caffe::InnerProductParameter)},
{ 849, -1, -1, sizeof(::opencv_caffe::InputParameter)},
{ 856, 865, -1, sizeof(::opencv_caffe::LogParameter)},
{ 868, 880, -1, sizeof(::opencv_caffe::LRNParameter)},
{ 886, 896, -1, sizeof(::opencv_caffe::MemoryDataParameter)},
{ 900, 909, -1, sizeof(::opencv_caffe::MVNParameter)},
{ 912, 919, -1, sizeof(::opencv_caffe::ParameterParameter)},
{ 920, 939, -1, sizeof(::opencv_caffe::PoolingParameter)},
{ 952, 961, -1, sizeof(::opencv_caffe::PowerParameter)},
{ 964, 974, -1, sizeof(::opencv_caffe::PythonParameter)},
{ 978, 989, -1, sizeof(::opencv_caffe::RecurrentParameter)},
{ 994, 1003, -1, sizeof(::opencv_caffe::ReductionParameter)},
{ 1006, 1014, -1, sizeof(::opencv_caffe::ReLUParameter)},
{ 1016, 1025, -1, sizeof(::opencv_caffe::ReshapeParameter)},
{ 1028, 1039, -1, sizeof(::opencv_caffe::ScaleParameter)},
{ 1044, 1051, -1, sizeof(::opencv_caffe::SigmoidParameter)},
{ 1052, 1061, -1, sizeof(::opencv_caffe::SliceParameter)},
{ 1064, 1072, -1, sizeof(::opencv_caffe::SoftmaxParameter)},
{ 1074, 1081, -1, sizeof(::opencv_caffe::TanHParameter)},
{ 1082, 1090, -1, sizeof(::opencv_caffe::TileParameter)},
{ 1092, 1099, -1, sizeof(::opencv_caffe::ThresholdParameter)},
{ 1100, 1119, -1, sizeof(::opencv_caffe::WindowDataParameter)},
{ 1132, 1141, -1, sizeof(::opencv_caffe::SPPParameter)},
{ 1144, 1193, -1, sizeof(::opencv_caffe::V1LayerParameter)},
{ 1236, 1280, -1, sizeof(::opencv_caffe::V0LayerParameter)},
{ 1318, 1326, -1, sizeof(::opencv_caffe::PReLUParameter)},
{ 1328, 1342, -1, sizeof(::opencv_caffe::NormalizedBBox)},
{ 1350, 1359, -1, sizeof(::opencv_caffe::ROIPoolingParameter)},
{ 1362, 1376, -1, sizeof(::opencv_caffe::ProposalParameter)},
{ 1384, 1393, -1, sizeof(::opencv_caffe::PSROIPoolingParameter)},
};
static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_BlobShape_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_BlobProto_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_BlobProtoVector_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_PermuteParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_NormalizeBBoxParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_PriorBoxParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_DetectionOutputParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_Datum_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_FillerParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_NetParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_SolverParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_SolverState_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_NetState_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_NetStateRule_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ParamSpec_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_LayerParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_TransformationParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_LossParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_AccuracyParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ArgMaxParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ConcatParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_BatchNormParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_BiasParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ContrastiveLossParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ConvolutionParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_CropParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_DataParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_NonMaximumSuppressionParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_SaveOutputParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_DropoutParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_DummyDataParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_EltwiseParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ELUParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_EmbedParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ExpParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_FlattenParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_HDF5DataParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_HDF5OutputParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_HingeLossParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ImageDataParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_InfogainLossParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_InnerProductParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_InputParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_LogParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_LRNParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_MemoryDataParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_MVNParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ParameterParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_PoolingParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_PowerParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_PythonParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_RecurrentParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ReductionParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ReLUParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ReshapeParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ScaleParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_SigmoidParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_SliceParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_SoftmaxParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_TanHParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_TileParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ThresholdParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_WindowDataParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_SPPParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_V1LayerParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_V0LayerParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_PReLUParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_NormalizedBBox_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ROIPoolingParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_ProposalParameter_default_instance_),
reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::opencv_caffe::_PSROIPoolingParameter_default_instance_),
};
const char descriptor_table_protodef_opencv_2dcaffe_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
"\n\022opencv-caffe.proto\022\014opencv_caffe\"\034\n\tBl"
"obShape\022\017\n\003dim\030\001 \003(\003B\002\020\001\"\224\002\n\tBlobProto\022&"
"\n\005shape\030\007 \001(\0132\027.opencv_caffe.BlobShape\022\020"
"\n\004data\030\005 \003(\002B\002\020\001\022\020\n\004diff\030\006 \003(\002B\002\020\001\022\027\n\013do"
"uble_data\030\010 \003(\001B\002\020\001\022\027\n\013double_diff\030\t \003(\001"
"B\002\020\001\022)\n\rraw_data_type\030\n \001(\0162\022.opencv_caf"
"fe.Type\022\024\n\010raw_data\030\014 \001(\014B\002\020\000\022\016\n\003num\030\001 \001"
"(\005:\0010\022\023\n\010channels\030\002 \001(\005:\0010\022\021\n\006height\030\003 \001"
"(\005:\0010\022\020\n\005width\030\004 \001(\005:\0010\"9\n\017BlobProtoVect"
"or\022&\n\005blobs\030\001 \003(\0132\027.opencv_caffe.BlobPro"
"to\"!\n\020PermuteParameter\022\r\n\005order\030\001 \003(\r\"\235\001"
"\n\026NormalizeBBoxParameter\022\034\n\016across_spati"
"al\030\001 \001(\010:\004true\0223\n\014scale_filler\030\002 \001(\0132\035.o"
"pencv_caffe.FillerParameter\022\034\n\016channel_s"
"hared\030\003 \001(\010:\004true\022\022\n\003eps\030\004 \001(\002:\0051e-10\"\346\002"
"\n\021PriorBoxParameter\022\020\n\010min_size\030\001 \003(\002\022\020\n"
"\010max_size\030\002 \003(\002\022\024\n\014aspect_ratio\030\003 \003(\002\022\022\n"
"\004flip\030\004 \001(\010:\004true\022\022\n\004clip\030\005 \001(\010:\004true\022\020\n"
"\010variance\030\006 \003(\002\022\020\n\010img_size\030\007 \001(\r\022\r\n\005img"
"_h\030\010 \001(\r\022\r\n\005img_w\030\t \001(\r\022\014\n\004step\030\n \001(\002\022\016\n"
"\006step_h\030\013 \001(\002\022\016\n\006step_w\030\014 \001(\002\022\023\n\006offset\030"
"\r \001(\002:\0030.5\022\020\n\010offset_h\030\016 \003(\002\022\020\n\010offset_w"
"\030\017 \003(\002\022\r\n\005width\030\020 \003(\002\022\016\n\006height\030\021 \003(\002\"\'\n"
"\010CodeType\022\n\n\006CORNER\020\001\022\017\n\013CENTER_SIZE\020\002\"\307"
"\003\n\030DetectionOutputParameter\022\023\n\013num_class"
"es\030\001 \001(\r\022\034\n\016share_location\030\002 \001(\010:\004true\022\036"
"\n\023background_label_id\030\003 \001(\005:\0010\022\?\n\tnms_pa"
"ram\030\004 \001(\0132,.opencv_caffe.NonMaximumSuppr"
"essionParameter\022<\n\021save_output_param\030\005 \001"
"(\0132!.opencv_caffe.SaveOutputParameter\022C\n"
"\tcode_type\030\006 \001(\0162(.opencv_caffe.PriorBox"
"Parameter.CodeType:\006CORNER\022)\n\032variance_e"
"ncoded_in_target\030\010 \001(\010:\005false\022\026\n\nkeep_to"
"p_k\030\007 \001(\005:\002-1\022\034\n\024confidence_threshold\030\t "
"\001(\002\022\035\n\017normalized_bbox\030\n \001(\010:\004true\022\024\n\004cl"
"ip\030\350\007 \001(\010:\005false\"\201\001\n\005Datum\022\020\n\010channels\030\001"
" \001(\005\022\016\n\006height\030\002 \001(\005\022\r\n\005width\030\003 \001(\005\022\014\n\004d"
"ata\030\004 \001(\014\022\r\n\005label\030\005 \001(\005\022\022\n\nfloat_data\030\006"
" \003(\002\022\026\n\007encoded\030\007 \001(\010:\005false\"\221\002\n\017FillerP"
"arameter\022\026\n\004type\030\001 \001(\t:\010constant\022\020\n\005valu"
"e\030\002 \001(\002:\0010\022\016\n\003min\030\003 \001(\002:\0010\022\016\n\003max\030\004 \001(\002:"
"\0011\022\017\n\004mean\030\005 \001(\002:\0010\022\016\n\003std\030\006 \001(\002:\0011\022\022\n\006s"
"parse\030\007 \001(\005:\002-1\022I\n\rvariance_norm\030\010 \001(\0162*"
".opencv_caffe.FillerParameter.VarianceNo"
"rm:\006FAN_IN\"4\n\014VarianceNorm\022\n\n\006FAN_IN\020\000\022\013"
"\n\007FAN_OUT\020\001\022\013\n\007AVERAGE\020\002\"\252\002\n\014NetParamete"
"r\022\014\n\004name\030\001 \001(\t\022\r\n\005input\030\003 \003(\t\022,\n\013input_"
"shape\030\010 \003(\0132\027.opencv_caffe.BlobShape\022\021\n\t"
"input_dim\030\004 \003(\005\022\035\n\016force_backward\030\005 \001(\010:"
"\005false\022%\n\005state\030\006 \001(\0132\026.opencv_caffe.Net"
"State\022\031\n\ndebug_info\030\007 \001(\010:\005false\022+\n\005laye"
"r\030d \003(\0132\034.opencv_caffe.LayerParameter\022.\n"
"\006layers\030\002 \003(\0132\036.opencv_caffe.V1LayerPara"
"meter\"\332\n\n\017SolverParameter\022\013\n\003net\030\030 \001(\t\022-"
"\n\tnet_param\030\031 \001(\0132\032.opencv_caffe.NetPara"
"meter\022\021\n\ttrain_net\030\001 \001(\t\022\020\n\010test_net\030\002 \003"
"(\t\0223\n\017train_net_param\030\025 \001(\0132\032.opencv_caf"
"fe.NetParameter\0222\n\016test_net_param\030\026 \003(\0132"
"\032.opencv_caffe.NetParameter\022+\n\013train_sta"
"te\030\032 \001(\0132\026.opencv_caffe.NetState\022*\n\ntest"
"_state\030\033 \003(\0132\026.opencv_caffe.NetState\022\021\n\t"
"test_iter\030\003 \003(\005\022\030\n\rtest_interval\030\004 \001(\005:\001"
"0\022 \n\021test_compute_loss\030\023 \001(\010:\005false\022!\n\023t"
"est_initialization\030 \001(\010:\004true\022\017\n\007base_l"
"r\030\005 \001(\002\022\017\n\007display\030\006 \001(\005\022\027\n\014average_loss"
"\030! \001(\005:\0011\022\020\n\010max_iter\030\007 \001(\005\022\024\n\titer_size"
"\030$ \001(\005:\0011\022\021\n\tlr_policy\030\010 \001(\t\022\r\n\005gamma\030\t "
"\001(\002\022\r\n\005power\030\n \001(\002\022\020\n\010momentum\030\013 \001(\002\022\024\n\014"
"weight_decay\030\014 \001(\002\022\037\n\023regularization_typ"
"e\030\035 \001(\t:\002L2\022\020\n\010stepsize\030\r \001(\005\022\021\n\tstepval"
"ue\030\" \003(\005\022\032\n\016clip_gradients\030# \001(\002:\002-1\022\023\n\010"
"snapshot\030\016 \001(\005:\0010\022\027\n\017snapshot_prefix\030\017 \001"
"(\t\022\034\n\rsnapshot_diff\030\020 \001(\010:\005false\022R\n\017snap"
"shot_format\030% \001(\0162,.opencv_caffe.SolverP"
"arameter.SnapshotFormat:\013BINARYPROTO\022B\n\013"
"solver_mode\030\021 \001(\0162(.opencv_caffe.SolverP"
"arameter.SolverMode:\003GPU\022\024\n\tdevice_id\030\022 "
"\001(\005:\0010\022\027\n\013random_seed\030\024 \001(\003:\002-1\022\021\n\004type\030"
"( \001(\t:\003SGD\022\024\n\005delta\030\037 \001(\002:\0051e-08\022\030\n\tmome"
"ntum2\030\' \001(\002:\0050.999\022\027\n\trms_decay\030& \001(\002:\0040"
".99\022\031\n\ndebug_info\030\027 \001(\010:\005false\022\"\n\024snapsh"
"ot_after_train\030\034 \001(\010:\004true\022B\n\013solver_typ"
"e\030\036 \001(\0162(.opencv_caffe.SolverParameter.S"
"olverType:\003SGD\"+\n\016SnapshotFormat\022\010\n\004HDF5"
"\020\000\022\017\n\013BINARYPROTO\020\001\"\036\n\nSolverMode\022\007\n\003CPU"
"\020\000\022\007\n\003GPU\020\001\"U\n\nSolverType\022\007\n\003SGD\020\000\022\014\n\010NE"
"STEROV\020\001\022\013\n\007ADAGRAD\020\002\022\013\n\007RMSPROP\020\003\022\014\n\010AD"
"ADELTA\020\004\022\010\n\004ADAM\020\005\"s\n\013SolverState\022\014\n\004ite"
"r\030\001 \001(\005\022\023\n\013learned_net\030\002 \001(\t\022(\n\007history\030"
"\003 \003(\0132\027.opencv_caffe.BlobProto\022\027\n\014curren"
"t_step\030\004 \001(\005:\0010\"U\n\010NetState\022(\n\005phase\030\001 \001"
"(\0162\023.opencv_caffe.Phase:\004TEST\022\020\n\005level\030\002"
" \001(\005:\0010\022\r\n\005stage\030\003 \003(\t\"z\n\014NetStateRule\022\""
"\n\005phase\030\001 \001(\0162\023.opencv_caffe.Phase\022\021\n\tmi"
"n_level\030\002 \001(\005\022\021\n\tmax_level\030\003 \001(\005\022\r\n\005stag"
"e\030\004 \003(\t\022\021\n\tnot_stage\030\005 \003(\t\"\252\001\n\tParamSpec"
"\022\014\n\004name\030\001 \001(\t\0228\n\nshare_mode\030\002 \001(\0162$.ope"
"ncv_caffe.ParamSpec.DimCheckMode\022\022\n\007lr_m"
"ult\030\003 \001(\002:\0011\022\025\n\ndecay_mult\030\004 \001(\002:\0011\"*\n\014D"
"imCheckMode\022\n\n\006STRICT\020\000\022\016\n\nPERMISSIVE\020\001\""
"\243\032\n\016LayerParameter\022\014\n\004name\030\001 \001(\t\022\014\n\004type"
"\030\002 \001(\t\022\016\n\006bottom\030\003 \003(\t\022\013\n\003top\030\004 \003(\t\022\"\n\005p"
"hase\030\n \001(\0162\023.opencv_caffe.Phase\022\023\n\013loss_"
"weight\030\005 \003(\002\022&\n\005param\030\006 \003(\0132\027.opencv_caf"
"fe.ParamSpec\022&\n\005blobs\030\007 \003(\0132\027.opencv_caf"
"fe.BlobProto\022\026\n\016propagate_down\030\013 \003(\010\022+\n\007"
"include\030\010 \003(\0132\032.opencv_caffe.NetStateRul"
"e\022+\n\007exclude\030\t \003(\0132\032.opencv_caffe.NetSta"
"teRule\022>\n\017transform_param\030d \001(\0132%.opencv"
"_caffe.TransformationParameter\022/\n\nloss_p"
"aram\030e \001(\0132\033.opencv_caffe.LossParameter\022"
"7\n\016accuracy_param\030f \001(\0132\037.opencv_caffe.A"
"ccuracyParameter\0223\n\014argmax_param\030g \001(\0132\035"
".opencv_caffe.ArgMaxParameter\022;\n\020batch_n"
"orm_param\030\213\001 \001(\0132 .opencv_caffe.BatchNor"
"mParameter\0220\n\nbias_param\030\215\001 \001(\0132\033.opencv"
"_caffe.BiasParameter\0223\n\014concat_param\030h \001"
"(\0132\035.opencv_caffe.ConcatParameter\022F\n\026con"
"trastive_loss_param\030i \001(\0132&.opencv_caffe"
".ContrastiveLossParameter\022=\n\021convolution"
"_param\030j \001(\0132\".opencv_caffe.ConvolutionP"
"arameter\0220\n\ncrop_param\030\220\001 \001(\0132\033.opencv_c"
"affe.CropParameter\022/\n\ndata_param\030k \001(\0132\033"
".opencv_caffe.DataParameter\022G\n\026detection"
"_output_param\030\223\001 \001(\0132&.opencv_caffe.Dete"
"ctionOutputParameter\0225\n\rdropout_param\030l "
"\001(\0132\036.opencv_caffe.DropoutParameter\022:\n\020d"
"ummy_data_param\030m \001(\0132 .opencv_caffe.Dum"
"myDataParameter\0225\n\reltwise_param\030n \001(\0132\036"
".opencv_caffe.EltwiseParameter\022.\n\telu_pa"
"ram\030\214\001 \001(\0132\032.opencv_caffe.ELUParameter\0222"
"\n\013embed_param\030\211\001 \001(\0132\034.opencv_caffe.Embe"
"dParameter\022-\n\texp_param\030o \001(\0132\032.opencv_c"
"affe.ExpParameter\0226\n\rflatten_param\030\207\001 \001("
"\0132\036.opencv_caffe.FlattenParameter\0228\n\017hdf"
"5_data_param\030p \001(\0132\037.opencv_caffe.HDF5Da"
"taParameter\022<\n\021hdf5_output_param\030q \001(\0132!"
".opencv_caffe.HDF5OutputParameter\022:\n\020hin"
"ge_loss_param\030r \001(\0132 .opencv_caffe.Hinge"
"LossParameter\022:\n\020image_data_param\030s \001(\0132"
" .opencv_caffe.ImageDataParameter\022@\n\023inf"
"ogain_loss_param\030t \001(\0132#.opencv_caffe.In"
"fogainLossParameter\022@\n\023inner_product_par"
"am\030u \001(\0132#.opencv_caffe.InnerProductPara"
"meter\0222\n\013input_param\030\217\001 \001(\0132\034.opencv_caf"
"fe.InputParameter\022.\n\tlog_param\030\206\001 \001(\0132\032."
"opencv_caffe.LogParameter\022-\n\tlrn_param\030v"
" \001(\0132\032.opencv_caffe.LRNParameter\022<\n\021memo"
"ry_data_param\030w \001(\0132!.opencv_caffe.Memor"
"yDataParameter\022-\n\tmvn_param\030x \001(\0132\032.open"
"cv_caffe.MVNParameter\0229\n\nnorm_param\030\225\001 \001"
"(\0132$.opencv_caffe.NormalizeBBoxParameter"
"\0226\n\rpermute_param\030\224\001 \001(\0132\036.opencv_caffe."
"PermuteParameter\022:\n\017parameter_param\030\221\001 \001"
"(\0132 .opencv_caffe.ParameterParameter\0225\n\r"
"pooling_param\030y \001(\0132\036.opencv_caffe.Pooli"
"ngParameter\0221\n\013power_param\030z \001(\0132\034.openc"
"v_caffe.PowerParameter\0222\n\013prelu_param\030\203\001"
" \001(\0132\034.opencv_caffe.PReLUParameter\0229\n\017pr"
"ior_box_param\030\226\001 \001(\0132\037.opencv_caffe.Prio"
"rBoxParameter\0228\n\016proposal_param\030\311\001 \001(\0132\037"
".opencv_caffe.ProposalParameter\022A\n\023psroi"
"_pooling_param\030\222N \001(\0132#.opencv_caffe.PSR"
"OIPoolingParameter\0224\n\014python_param\030\202\001 \001("
"\0132\035.opencv_caffe.PythonParameter\022:\n\017recu"
"rrent_param\030\222\001 \001(\0132 .opencv_caffe.Recurr"
"entParameter\022:\n\017reduction_param\030\210\001 \001(\0132 "
".opencv_caffe.ReductionParameter\022/\n\nrelu"
"_param\030{ \001(\0132\033.opencv_caffe.ReLUParamete"
"r\0226\n\rreshape_param\030\205\001 \001(\0132\036.opencv_caffe"
".ReshapeParameter\022\?\n\021roi_pooling_param\030\327"
"\307\370\003 \001(\0132!.opencv_caffe.ROIPoolingParamet"
"er\0222\n\013scale_param\030\216\001 \001(\0132\034.opencv_caffe."
"ScaleParameter\0225\n\rsigmoid_param\030| \001(\0132\036."
"opencv_caffe.SigmoidParameter\0225\n\rsoftmax"
"_param\030} \001(\0132\036.opencv_caffe.SoftmaxParam"
"eter\022.\n\tspp_param\030\204\001 \001(\0132\032.opencv_caffe."
"SPPParameter\0221\n\013slice_param\030~ \001(\0132\034.open"
"cv_caffe.SliceParameter\022/\n\ntanh_param\030\177 "
"\001(\0132\033.opencv_caffe.TanHParameter\022:\n\017thre"
"shold_param\030\200\001 \001(\0132 .opencv_caffe.Thresh"
"oldParameter\0220\n\ntile_param\030\212\001 \001(\0132\033.open"
"cv_caffe.TileParameter\022=\n\021window_data_pa"
"ram\030\201\001 \001(\0132!.opencv_caffe.WindowDataPara"
"meter\"\266\001\n\027TransformationParameter\022\020\n\005sca"
"le\030\001 \001(\002:\0011\022\025\n\006mirror\030\002 \001(\010:\005false\022\024\n\tcr"
"op_size\030\003 \001(\r:\0010\022\021\n\tmean_file\030\004 \001(\t\022\022\n\nm"
"ean_value\030\005 \003(\002\022\032\n\013force_color\030\006 \001(\010:\005fa"
"lse\022\031\n\nforce_gray\030\007 \001(\010:\005false\"\311\001\n\rLossP"
"arameter\022\024\n\014ignore_label\030\001 \001(\005\022K\n\rnormal"
"ization\030\003 \001(\0162-.opencv_caffe.LossParamet"
"er.NormalizationMode:\005VALID\022\021\n\tnormalize"
"\030\002 \001(\010\"B\n\021NormalizationMode\022\010\n\004FULL\020\000\022\t\n"
"\005VALID\020\001\022\016\n\nBATCH_SIZE\020\002\022\010\n\004NONE\020\003\"L\n\021Ac"
"curacyParameter\022\020\n\005top_k\030\001 \001(\r:\0011\022\017\n\004axi"
"s\030\002 \001(\005:\0011\022\024\n\014ignore_label\030\003 \001(\005\"M\n\017ArgM"
"axParameter\022\032\n\013out_max_val\030\001 \001(\010:\005false\022"
"\020\n\005top_k\030\002 \001(\r:\0011\022\014\n\004axis\030\003 \001(\005\"9\n\017Conca"
"tParameter\022\017\n\004axis\030\002 \001(\005:\0011\022\025\n\nconcat_di"
"m\030\001 \001(\r:\0011\"\205\001\n\022BatchNormParameter\022\030\n\020use"
"_global_stats\030\001 \001(\010\022&\n\027moving_average_fr"
"action\030\002 \001(\002:\0050.999\022\022\n\003eps\030\003 \001(\002:\0051e-05\022"
"\031\n\nscale_bias\030\007 \001(\010:\005false\"d\n\rBiasParame"
"ter\022\017\n\004axis\030\001 \001(\005:\0011\022\023\n\010num_axes\030\002 \001(\005:\001"
"1\022-\n\006filler\030\003 \001(\0132\035.opencv_caffe.FillerP"
"arameter\"L\n\030ContrastiveLossParameter\022\021\n\006"
"margin\030\001 \001(\002:\0011\022\035\n\016legacy_version\030\002 \001(\010:"
"\005false\"\221\004\n\024ConvolutionParameter\022\022\n\nnum_o"
"utput\030\001 \001(\r\022\027\n\tbias_term\030\002 \001(\010:\004true\022\013\n\003"
"pad\030\003 \003(\r\022\023\n\013kernel_size\030\004 \003(\r\022\016\n\006stride"
"\030\006 \003(\r\022\020\n\010dilation\030\022 \003(\r\022\020\n\005pad_h\030\t \001(\r:"
"\0010\022\020\n\005pad_w\030\n \001(\r:\0010\022\020\n\010kernel_h\030\013 \001(\r\022\020"
"\n\010kernel_w\030\014 \001(\r\022\020\n\010stride_h\030\r \001(\r\022\020\n\010st"
"ride_w\030\016 \001(\r\022\020\n\005group\030\005 \001(\r:\0011\0224\n\rweight"
"_filler\030\007 \001(\0132\035.opencv_caffe.FillerParam"
"eter\0222\n\013bias_filler\030\010 \001(\0132\035.opencv_caffe"
".FillerParameter\022B\n\006engine\030\017 \001(\0162).openc"
"v_caffe.ConvolutionParameter.Engine:\007DEF"
"AULT\022\017\n\004axis\030\020 \001(\005:\0011\022\036\n\017force_nd_im2col"
"\030\021 \001(\010:\005false\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005"
"CAFFE\020\001\022\t\n\005CUDNN\020\002\"0\n\rCropParameter\022\017\n\004a"
"xis\030\001 \001(\005:\0012\022\016\n\006offset\030\002 \003(\r\"\253\002\n\rDataPar"
"ameter\022\016\n\006source\030\001 \001(\t\022\022\n\nbatch_size\030\004 \001"
"(\r\022\024\n\trand_skip\030\007 \001(\r:\0010\0228\n\007backend\030\010 \001("
"\0162\036.opencv_caffe.DataParameter.DB:\007LEVEL"
"DB\022\020\n\005scale\030\002 \001(\002:\0011\022\021\n\tmean_file\030\003 \001(\t\022"
"\024\n\tcrop_size\030\005 \001(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005f"
"alse\022\"\n\023force_encoded_color\030\t \001(\010:\005false"
"\022\023\n\010prefetch\030\n \001(\r:\0014\"\033\n\002DB\022\013\n\007LEVELDB\020\000"
"\022\010\n\004LMDB\020\001\"[\n\036NonMaximumSuppressionParam"
"eter\022\032\n\rnms_threshold\030\001 \001(\002:\0030.3\022\r\n\005top_"
"k\030\002 \001(\005\022\016\n\003eta\030\003 \001(\002:\0011\"\252\001\n\023SaveOutputPa"
"rameter\022\030\n\020output_directory\030\001 \001(\t\022\032\n\022out"
"put_name_prefix\030\002 \001(\t\022\025\n\routput_format\030\003"
" \001(\t\022\026\n\016label_map_file\030\004 \001(\t\022\026\n\016name_siz"
"e_file\030\005 \001(\t\022\026\n\016num_test_image\030\006 \001(\r\"I\n\020"
"DropoutParameter\022\032\n\rdropout_ratio\030\001 \001(\002:"
"\0030.5\022\031\n\013scale_train\030\002 \001(\010:\004true\"\256\001\n\022Dumm"
"yDataParameter\0222\n\013data_filler\030\001 \003(\0132\035.op"
"encv_caffe.FillerParameter\022&\n\005shape\030\006 \003("
"\0132\027.opencv_caffe.BlobShape\022\013\n\003num\030\002 \003(\r\022"
"\020\n\010channels\030\003 \003(\r\022\016\n\006height\030\004 \003(\r\022\r\n\005wid"
"th\030\005 \003(\r\"\254\001\n\020EltwiseParameter\022@\n\toperati"
"on\030\001 \001(\0162(.opencv_caffe.EltwiseParameter"
".EltwiseOp:\003SUM\022\r\n\005coeff\030\002 \003(\002\022\036\n\020stable"
"_prod_grad\030\003 \001(\010:\004true\"\'\n\tEltwiseOp\022\010\n\004P"
"ROD\020\000\022\007\n\003SUM\020\001\022\007\n\003MAX\020\002\" \n\014ELUParameter\022"
"\020\n\005alpha\030\001 \001(\002:\0011\"\272\001\n\016EmbedParameter\022\022\n\n"
"num_output\030\001 \001(\r\022\021\n\tinput_dim\030\002 \001(\r\022\027\n\tb"
"ias_term\030\003 \001(\010:\004true\0224\n\rweight_filler\030\004 "
"\001(\0132\035.opencv_caffe.FillerParameter\0222\n\013bi"
"as_filler\030\005 \001(\0132\035.opencv_caffe.FillerPar"
"ameter\"D\n\014ExpParameter\022\020\n\004base\030\001 \001(\002:\002-1"
"\022\020\n\005scale\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"9\n\020"
"FlattenParameter\022\017\n\004axis\030\001 \001(\005:\0011\022\024\n\010end"
"_axis\030\002 \001(\005:\002-1\"O\n\021HDF5DataParameter\022\016\n\006"
"source\030\001 \001(\t\022\022\n\nbatch_size\030\002 \001(\r\022\026\n\007shuf"
"fle\030\003 \001(\010:\005false\"(\n\023HDF5OutputParameter\022"
"\021\n\tfile_name\030\001 \001(\t\"e\n\022HingeLossParameter"
"\0227\n\004norm\030\001 \001(\0162%.opencv_caffe.HingeLossP"
"arameter.Norm:\002L1\"\026\n\004Norm\022\006\n\002L1\020\001\022\006\n\002L2\020"
"\002\"\227\002\n\022ImageDataParameter\022\016\n\006source\030\001 \001(\t"
"\022\025\n\nbatch_size\030\004 \001(\r:\0011\022\024\n\trand_skip\030\007 \001"
"(\r:\0010\022\026\n\007shuffle\030\010 \001(\010:\005false\022\025\n\nnew_hei"
"ght\030\t \001(\r:\0010\022\024\n\tnew_width\030\n \001(\r:\0010\022\026\n\010is"
"_color\030\013 \001(\010:\004true\022\020\n\005scale\030\002 \001(\002:\0011\022\021\n\t"
"mean_file\030\003 \001(\t\022\024\n\tcrop_size\030\005 \001(\r:\0010\022\025\n"
"\006mirror\030\006 \001(\010:\005false\022\025\n\013root_folder\030\014 \001("
"\t:\000\"\'\n\025InfogainLossParameter\022\016\n\006source\030\001"
" \001(\t\"\331\001\n\025InnerProductParameter\022\022\n\nnum_ou"
"tput\030\001 \001(\r\022\027\n\tbias_term\030\002 \001(\010:\004true\0224\n\rw"
"eight_filler\030\003 \001(\0132\035.opencv_caffe.Filler"
"Parameter\0222\n\013bias_filler\030\004 \001(\0132\035.opencv_"
"caffe.FillerParameter\022\017\n\004axis\030\005 \001(\005:\0011\022\030"
"\n\ttranspose\030\006 \001(\010:\005false\"8\n\016InputParamet"
"er\022&\n\005shape\030\001 \003(\0132\027.opencv_caffe.BlobSha"
"pe\"D\n\014LogParameter\022\020\n\004base\030\001 \001(\002:\002-1\022\020\n\005"
"scale\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"\306\002\n\014LRN"
"Parameter\022\025\n\nlocal_size\030\001 \001(\r:\0015\022\020\n\005alph"
"a\030\002 \001(\002:\0011\022\022\n\004beta\030\003 \001(\002:\0040.75\022K\n\013norm_r"
"egion\030\004 \001(\0162%.opencv_caffe.LRNParameter."
"NormRegion:\017ACROSS_CHANNELS\022\014\n\001k\030\005 \001(\002:\001"
"1\022:\n\006engine\030\006 \001(\0162!.opencv_caffe.LRNPara"
"meter.Engine:\007DEFAULT\"5\n\nNormRegion\022\023\n\017A"
"CROSS_CHANNELS\020\000\022\022\n\016WITHIN_CHANNEL\020\001\"+\n\006"
"Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020"
"\002\"Z\n\023MemoryDataParameter\022\022\n\nbatch_size\030\001"
" \001(\r\022\020\n\010channels\030\002 \001(\r\022\016\n\006height\030\003 \001(\r\022\r"
"\n\005width\030\004 \001(\r\"d\n\014MVNParameter\022 \n\022normali"
"ze_variance\030\001 \001(\010:\004true\022\036\n\017across_channe"
"ls\030\002 \001(\010:\005false\022\022\n\003eps\030\003 \001(\002:\0051e-09\"<\n\022P"
"arameterParameter\022&\n\005shape\030\001 \001(\0132\027.openc"
"v_caffe.BlobShape\"\311\003\n\020PoolingParameter\022<"
"\n\004pool\030\001 \001(\0162).opencv_caffe.PoolingParam"
"eter.PoolMethod:\003MAX\022\016\n\003pad\030\004 \001(\r:\0010\022\020\n\005"
"pad_h\030\t \001(\r:\0010\022\020\n\005pad_w\030\n \001(\r:\0010\022\023\n\013kern"
"el_size\030\002 \001(\r\022\020\n\010kernel_h\030\005 \001(\r\022\020\n\010kerne"
"l_w\030\006 \001(\r\022\021\n\006stride\030\003 \001(\r:\0011\022\020\n\010stride_h"
"\030\007 \001(\r\022\020\n\010stride_w\030\010 \001(\r\022>\n\006engine\030\013 \001(\016"
"2%.opencv_caffe.PoolingParameter.Engine:"
"\007DEFAULT\022\035\n\016global_pooling\030\014 \001(\010:\005false\022"
"\027\n\tceil_mode\030\r \001(\010:\004true\".\n\nPoolMethod\022\007"
"\n\003MAX\020\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Engi"
"ne\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"F\n"
"\016PowerParameter\022\020\n\005power\030\001 \001(\002:\0011\022\020\n\005sca"
"le\030\002 \001(\002:\0011\022\020\n\005shift\030\003 \001(\002:\0010\"g\n\017PythonP"
"arameter\022\016\n\006module\030\001 \001(\t\022\r\n\005layer\030\002 \001(\t\022"
"\023\n\tparam_str\030\003 \001(\t:\000\022 \n\021share_in_paralle"
"l\030\004 \001(\010:\005false\"\316\001\n\022RecurrentParameter\022\025\n"
"\nnum_output\030\001 \001(\r:\0010\0224\n\rweight_filler\030\002 "
"\001(\0132\035.opencv_caffe.FillerParameter\0222\n\013bi"
"as_filler\030\003 \001(\0132\035.opencv_caffe.FillerPar"
"ameter\022\031\n\ndebug_info\030\004 \001(\010:\005false\022\034\n\rexp"
"ose_hidden\030\005 \001(\010:\005false\"\264\001\n\022ReductionPar"
"ameter\022D\n\toperation\030\001 \001(\0162,.opencv_caffe"
".ReductionParameter.ReductionOp:\003SUM\022\017\n\004"
"axis\030\002 \001(\005:\0010\022\020\n\005coeff\030\003 \001(\002:\0011\"5\n\013Reduc"
"tionOp\022\007\n\003SUM\020\001\022\010\n\004ASUM\020\002\022\t\n\005SUMSQ\020\003\022\010\n\004"
"MEAN\020\004\"\224\001\n\rReLUParameter\022\031\n\016negative_slo"
"pe\030\001 \001(\002:\0010\022;\n\006engine\030\002 \001(\0162\".opencv_caf"
"fe.ReLUParameter.Engine:\007DEFAULT\"+\n\006Engi"
"ne\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"a\n"
"\020ReshapeParameter\022&\n\005shape\030\001 \001(\0132\027.openc"
"v_caffe.BlobShape\022\017\n\004axis\030\002 \001(\005:\0010\022\024\n\010nu"
"m_axes\030\003 \001(\005:\002-1\"\263\001\n\016ScaleParameter\022\017\n\004a"
"xis\030\001 \001(\005:\0011\022\023\n\010num_axes\030\002 \001(\005:\0011\022-\n\006fil"
"ler\030\003 \001(\0132\035.opencv_caffe.FillerParameter"
"\022\030\n\tbias_term\030\004 \001(\010:\005false\0222\n\013bias_fille"
"r\030\005 \001(\0132\035.opencv_caffe.FillerParameter\"\177"
"\n\020SigmoidParameter\022>\n\006engine\030\001 \001(\0162%.ope"
"ncv_caffe.SigmoidParameter.Engine:\007DEFAU"
"LT\"+\n\006Engine\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005"
"CUDNN\020\002\"L\n\016SliceParameter\022\017\n\004axis\030\003 \001(\005:"
"\0011\022\023\n\013slice_point\030\002 \003(\r\022\024\n\tslice_dim\030\001 \001"
"(\r:\0011\"\220\001\n\020SoftmaxParameter\022>\n\006engine\030\001 \001"
"(\0162%.opencv_caffe.SoftmaxParameter.Engin"
"e:\007DEFAULT\022\017\n\004axis\030\002 \001(\005:\0011\"+\n\006Engine\022\013\n"
"\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"y\n\rTanH"
"Parameter\022;\n\006engine\030\001 \001(\0162\".opencv_caffe"
".TanHParameter.Engine:\007DEFAULT\"+\n\006Engine"
"\022\013\n\007DEFAULT\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"/\n\rT"
"ileParameter\022\017\n\004axis\030\001 \001(\005:\0011\022\r\n\005tiles\030\002"
" \001(\005\"*\n\022ThresholdParameter\022\024\n\tthreshold\030"
"\001 \001(\002:\0010\"\301\002\n\023WindowDataParameter\022\016\n\006sour"
"ce\030\001 \001(\t\022\020\n\005scale\030\002 \001(\002:\0011\022\021\n\tmean_file\030"
"\003 \001(\t\022\022\n\nbatch_size\030\004 \001(\r\022\024\n\tcrop_size\030\005"
" \001(\r:\0010\022\025\n\006mirror\030\006 \001(\010:\005false\022\031\n\014fg_thr"
"eshold\030\007 \001(\002:\0030.5\022\031\n\014bg_threshold\030\010 \001(\002:"
"\0030.5\022\031\n\013fg_fraction\030\t \001(\002:\0040.25\022\026\n\013conte"
"xt_pad\030\n \001(\r:\0010\022\027\n\tcrop_mode\030\013 \001(\t:\004warp"
"\022\033\n\014cache_images\030\014 \001(\010:\005false\022\025\n\013root_fo"
"lder\030\r \001(\t:\000\"\371\001\n\014SPPParameter\022\026\n\016pyramid"
"_height\030\001 \001(\r\0228\n\004pool\030\002 \001(\0162%.opencv_caf"
"fe.SPPParameter.PoolMethod:\003MAX\022:\n\006engin"
"e\030\006 \001(\0162!.opencv_caffe.SPPParameter.Engi"
"ne:\007DEFAULT\".\n\nPoolMethod\022\007\n\003MAX\020\000\022\007\n\003AV"
"E\020\001\022\016\n\nSTOCHASTIC\020\002\"+\n\006Engine\022\013\n\007DEFAULT"
"\020\000\022\t\n\005CAFFE\020\001\022\t\n\005CUDNN\020\002\"\334\025\n\020V1LayerPara"
"meter\022\016\n\006bottom\030\002 \003(\t\022\013\n\003top\030\003 \003(\t\022\014\n\004na"
"me\030\004 \001(\t\022+\n\007include\030 \003(\0132\032.opencv_caffe"
".NetStateRule\022+\n\007exclude\030! \003(\0132\032.opencv_"
"caffe.NetStateRule\0226\n\004type\030\005 \001(\0162(.openc"
"v_caffe.V1LayerParameter.LayerType\022&\n\005bl"
"obs\030\006 \003(\0132\027.opencv_caffe.BlobProto\022\016\n\005pa"
"ram\030\351\007 \003(\t\022E\n\017blob_share_mode\030\352\007 \003(\0162+.o"
"pencv_caffe.V1LayerParameter.DimCheckMod"
"e\022\020\n\010blobs_lr\030\007 \003(\002\022\024\n\014weight_decay\030\010 \003("
"\002\022\023\n\013loss_weight\030# \003(\002\0227\n\016accuracy_param"
"\030\033 \001(\0132\037.opencv_caffe.AccuracyParameter\022"
"3\n\014argmax_param\030\027 \001(\0132\035.opencv_caffe.Arg"
"MaxParameter\0223\n\014concat_param\030\t \001(\0132\035.ope"
"ncv_caffe.ConcatParameter\022F\n\026contrastive"
"_loss_param\030( \001(\0132&.opencv_caffe.Contras"
"tiveLossParameter\022=\n\021convolution_param\030\n"
" \001(\0132\".opencv_caffe.ConvolutionParameter"
"\022/\n\ndata_param\030\013 \001(\0132\033.opencv_caffe.Data"
"Parameter\0225\n\rdropout_param\030\014 \001(\0132\036.openc"
"v_caffe.DropoutParameter\022:\n\020dummy_data_p"
"aram\030\032 \001(\0132 .opencv_caffe.DummyDataParam"
"eter\0225\n\reltwise_param\030\030 \001(\0132\036.opencv_caf"
"fe.EltwiseParameter\022-\n\texp_param\030) \001(\0132\032"
".opencv_caffe.ExpParameter\0228\n\017hdf5_data_"
"param\030\r \001(\0132\037.opencv_caffe.HDF5DataParam"
"eter\022<\n\021hdf5_output_param\030\016 \001(\0132!.opencv"
"_caffe.HDF5OutputParameter\022:\n\020hinge_loss"
"_param\030\035 \001(\0132 .opencv_caffe.HingeLossPar"
"ameter\022:\n\020image_data_param\030\017 \001(\0132 .openc"
"v_caffe.ImageDataParameter\022@\n\023infogain_l"
"oss_param\030\020 \001(\0132#.opencv_caffe.InfogainL"
"ossParameter\022@\n\023inner_product_param\030\021 \001("
"\0132#.opencv_caffe.InnerProductParameter\022-"
"\n\tlrn_param\030\022 \001(\0132\032.opencv_caffe.LRNPara"
"meter\022<\n\021memory_data_param\030\026 \001(\0132!.openc"
"v_caffe.MemoryDataParameter\022-\n\tmvn_param"
"\030\" \001(\0132\032.opencv_caffe.MVNParameter\0225\n\rpo"
"oling_param\030\023 \001(\0132\036.opencv_caffe.Pooling"
"Parameter\0221\n\013power_param\030\025 \001(\0132\034.opencv_"
"caffe.PowerParameter\022/\n\nrelu_param\030\036 \001(\013"
"2\033.opencv_caffe.ReLUParameter\0225\n\rsigmoid"
"_param\030& \001(\0132\036.opencv_caffe.SigmoidParam"
"eter\0225\n\rsoftmax_param\030\' \001(\0132\036.opencv_caf"
"fe.SoftmaxParameter\0221\n\013slice_param\030\037 \001(\013"
"2\034.opencv_caffe.SliceParameter\022/\n\ntanh_p"
"aram\030% \001(\0132\033.opencv_caffe.TanHParameter\022"
"9\n\017threshold_param\030\031 \001(\0132 .opencv_caffe."
"ThresholdParameter\022<\n\021window_data_param\030"
"\024 \001(\0132!.opencv_caffe.WindowDataParameter"
"\022>\n\017transform_param\030$ \001(\0132%.opencv_caffe"
".TransformationParameter\022/\n\nloss_param\030*"
" \001(\0132\033.opencv_caffe.LossParameter\022-\n\005lay"
"er\030\001 \001(\0132\036.opencv_caffe.V0LayerParameter"
"\"\330\004\n\tLayerType\022\010\n\004NONE\020\000\022\n\n\006ABSVAL\020#\022\014\n\010"
"ACCURACY\020\001\022\n\n\006ARGMAX\020\036\022\010\n\004BNLL\020\002\022\n\n\006CONC"
"AT\020\003\022\024\n\020CONTRASTIVE_LOSS\020%\022\017\n\013CONVOLUTIO"
"N\020\004\022\010\n\004DATA\020\005\022\021\n\rDECONVOLUTION\020\'\022\013\n\007DROP"
"OUT\020\006\022\016\n\nDUMMY_DATA\020 \022\022\n\016EUCLIDEAN_LOSS\020"
"\007\022\013\n\007ELTWISE\020\031\022\007\n\003EXP\020&\022\013\n\007FLATTEN\020\010\022\r\n\t"
"HDF5_DATA\020\t\022\017\n\013HDF5_OUTPUT\020\n\022\016\n\nHINGE_LO"
"SS\020\034\022\n\n\006IM2COL\020\013\022\016\n\nIMAGE_DATA\020\014\022\021\n\rINFO"
"GAIN_LOSS\020\r\022\021\n\rINNER_PRODUCT\020\016\022\007\n\003LRN\020\017\022"
"\017\n\013MEMORY_DATA\020\035\022\035\n\031MULTINOMIAL_LOGISTIC"
"_LOSS\020\020\022\007\n\003MVN\020\"\022\013\n\007POOLING\020\021\022\t\n\005POWER\020\032"
"\022\010\n\004RELU\020\022\022\013\n\007SIGMOID\020\023\022\036\n\032SIGMOID_CROSS"
"_ENTROPY_LOSS\020\033\022\013\n\007SILENCE\020$\022\013\n\007SOFTMAX\020"
"\024\022\020\n\014SOFTMAX_LOSS\020\025\022\t\n\005SPLIT\020\026\022\t\n\005SLICE\020"
"!\022\010\n\004TANH\020\027\022\017\n\013WINDOW_DATA\020\030\022\r\n\tTHRESHOL"
"D\020\037\"*\n\014DimCheckMode\022\n\n\006STRICT\020\000\022\016\n\nPERMI"
"SSIVE\020\001\"\240\010\n\020V0LayerParameter\022\014\n\004name\030\001 \001"
"(\t\022\014\n\004type\030\002 \001(\t\022\022\n\nnum_output\030\003 \001(\r\022\026\n\010"
"biasterm\030\004 \001(\010:\004true\0224\n\rweight_filler\030\005 "
"\001(\0132\035.opencv_caffe.FillerParameter\0222\n\013bi"
"as_filler\030\006 \001(\0132\035.opencv_caffe.FillerPar"
"ameter\022\016\n\003pad\030\007 \001(\r:\0010\022\022\n\nkernelsize\030\010 \001"
"(\r\022\020\n\005group\030\t \001(\r:\0011\022\021\n\006stride\030\n \001(\r:\0011\022"
"<\n\004pool\030\013 \001(\0162).opencv_caffe.V0LayerPara"
"meter.PoolMethod:\003MAX\022\032\n\rdropout_ratio\030\014"
" \001(\002:\0030.5\022\025\n\nlocal_size\030\r \001(\r:\0015\022\020\n\005alph"
"a\030\016 \001(\002:\0011\022\022\n\004beta\030\017 \001(\002:\0040.75\022\014\n\001k\030\026 \001("
"\002:\0011\022\016\n\006source\030\020 \001(\t\022\020\n\005scale\030\021 \001(\002:\0011\022\020"
"\n\010meanfile\030\022 \001(\t\022\021\n\tbatchsize\030\023 \001(\r\022\023\n\010c"
"ropsize\030\024 \001(\r:\0010\022\025\n\006mirror\030\025 \001(\010:\005false\022"
"&\n\005blobs\0302 \003(\0132\027.opencv_caffe.BlobProto\022"
"\020\n\010blobs_lr\0303 \003(\002\022\024\n\014weight_decay\0304 \003(\002\022"
"\024\n\trand_skip\0305 \001(\r:\0010\022\035\n\020det_fg_threshol"
"d\0306 \001(\002:\0030.5\022\035\n\020det_bg_threshold\0307 \001(\002:\003"
"0.5\022\035\n\017det_fg_fraction\0308 \001(\002:\0040.25\022\032\n\017de"
"t_context_pad\030: \001(\r:\0010\022\033\n\rdet_crop_mode\030"
"; \001(\t:\004warp\022\022\n\007new_num\030< \001(\005:\0010\022\027\n\014new_c"
"hannels\030= \001(\005:\0010\022\025\n\nnew_height\030> \001(\005:\0010\022"
"\024\n\tnew_width\030\? \001(\005:\0010\022\035\n\016shuffle_images\030"
"@ \001(\010:\005false\022\025\n\nconcat_dim\030A \001(\r:\0011\022=\n\021h"
"df5_output_param\030\351\007 \001(\0132!.opencv_caffe.H"
"DF5OutputParameter\".\n\nPoolMethod\022\007\n\003MAX\020"
"\000\022\007\n\003AVE\020\001\022\016\n\nSTOCHASTIC\020\002\"^\n\016PReLUParam"
"eter\022-\n\006filler\030\001 \001(\0132\035.opencv_caffe.Fill"
"erParameter\022\035\n\016channel_shared\030\002 \001(\010:\005fal"
"se\"\207\001\n\016NormalizedBBox\022\014\n\004xmin\030\001 \001(\002\022\014\n\004y"
"min\030\002 \001(\002\022\014\n\004xmax\030\003 \001(\002\022\014\n\004ymax\030\004 \001(\002\022\r\n"
"\005label\030\005 \001(\005\022\021\n\tdifficult\030\006 \001(\010\022\r\n\005score"
"\030\007 \001(\002\022\014\n\004size\030\010 \001(\002\"Y\n\023ROIPoolingParame"
"ter\022\023\n\010pooled_h\030\001 \001(\r:\0010\022\023\n\010pooled_w\030\002 \001"
"(\r:\0010\022\030\n\rspatial_scale\030\003 \001(\002:\0011\"\310\001\n\021Prop"
"osalParameter\022\027\n\013feat_stride\030\001 \001(\r:\00216\022\025"
"\n\tbase_size\030\002 \001(\r:\00216\022\024\n\010min_size\030\003 \001(\r:"
"\00216\022\r\n\005ratio\030\004 \003(\002\022\r\n\005scale\030\005 \003(\002\022\032\n\014pre"
"_nms_topn\030\006 \001(\r:\0046000\022\032\n\rpost_nms_topn\030\007"
" \001(\r:\003300\022\027\n\nnms_thresh\030\010 \001(\002:\0030.7\"V\n\025PS"
"ROIPoolingParameter\022\025\n\rspatial_scale\030\001 \002"
"(\002\022\022\n\noutput_dim\030\002 \002(\005\022\022\n\ngroup_size\030\003 \002"
"(\005*=\n\004Type\022\n\n\006DOUBLE\020\000\022\t\n\005FLOAT\020\001\022\013\n\007FLO"
"AT16\020\002\022\007\n\003INT\020\003\022\010\n\004UINT\020\004*\034\n\005Phase\022\t\n\005TR"
"AIN\020\000\022\010\n\004TEST\020\001"
;
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_opencv_2dcaffe_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_opencv_2dcaffe_2eproto = {
false, false, 18855, descriptor_table_protodef_opencv_2dcaffe_2eproto, "opencv-caffe.proto",
&descriptor_table_opencv_2dcaffe_2eproto_once, nullptr, 0, 71,
schemas, file_default_instances, TableStruct_opencv_2dcaffe_2eproto::offsets,
file_level_metadata_opencv_2dcaffe_2eproto, file_level_enum_descriptors_opencv_2dcaffe_2eproto, file_level_service_descriptors_opencv_2dcaffe_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_opencv_2dcaffe_2eproto_getter() {
return &descriptor_table_opencv_2dcaffe_2eproto;
}
// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_opencv_2dcaffe_2eproto(&descriptor_table_opencv_2dcaffe_2eproto);
namespace opencv_caffe {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PriorBoxParameter_CodeType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[0];
}
bool PriorBoxParameter_CodeType_IsValid(int value) {
switch (value) {
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr PriorBoxParameter_CodeType PriorBoxParameter::CORNER;
constexpr PriorBoxParameter_CodeType PriorBoxParameter::CENTER_SIZE;
constexpr PriorBoxParameter_CodeType PriorBoxParameter::CodeType_MIN;
constexpr PriorBoxParameter_CodeType PriorBoxParameter::CodeType_MAX;
constexpr int PriorBoxParameter::CodeType_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* FillerParameter_VarianceNorm_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[1];
}
bool FillerParameter_VarianceNorm_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr FillerParameter_VarianceNorm FillerParameter::FAN_IN;
constexpr FillerParameter_VarianceNorm FillerParameter::FAN_OUT;
constexpr FillerParameter_VarianceNorm FillerParameter::AVERAGE;
constexpr FillerParameter_VarianceNorm FillerParameter::VarianceNorm_MIN;
constexpr FillerParameter_VarianceNorm FillerParameter::VarianceNorm_MAX;
constexpr int FillerParameter::VarianceNorm_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SolverParameter_SnapshotFormat_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[2];
}
bool SolverParameter_SnapshotFormat_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SolverParameter_SnapshotFormat SolverParameter::HDF5;
constexpr SolverParameter_SnapshotFormat SolverParameter::BINARYPROTO;
constexpr SolverParameter_SnapshotFormat SolverParameter::SnapshotFormat_MIN;
constexpr SolverParameter_SnapshotFormat SolverParameter::SnapshotFormat_MAX;
constexpr int SolverParameter::SnapshotFormat_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SolverParameter_SolverMode_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[3];
}
bool SolverParameter_SolverMode_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SolverParameter_SolverMode SolverParameter::CPU;
constexpr SolverParameter_SolverMode SolverParameter::GPU;
constexpr SolverParameter_SolverMode SolverParameter::SolverMode_MIN;
constexpr SolverParameter_SolverMode SolverParameter::SolverMode_MAX;
constexpr int SolverParameter::SolverMode_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SolverParameter_SolverType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[4];
}
bool SolverParameter_SolverType_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SolverParameter_SolverType SolverParameter::SGD;
constexpr SolverParameter_SolverType SolverParameter::NESTEROV;
constexpr SolverParameter_SolverType SolverParameter::ADAGRAD;
constexpr SolverParameter_SolverType SolverParameter::RMSPROP;
constexpr SolverParameter_SolverType SolverParameter::ADADELTA;
constexpr SolverParameter_SolverType SolverParameter::ADAM;
constexpr SolverParameter_SolverType SolverParameter::SolverType_MIN;
constexpr SolverParameter_SolverType SolverParameter::SolverType_MAX;
constexpr int SolverParameter::SolverType_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ParamSpec_DimCheckMode_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[5];
}
bool ParamSpec_DimCheckMode_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ParamSpec_DimCheckMode ParamSpec::STRICT;
constexpr ParamSpec_DimCheckMode ParamSpec::PERMISSIVE;
constexpr ParamSpec_DimCheckMode ParamSpec::DimCheckMode_MIN;
constexpr ParamSpec_DimCheckMode ParamSpec::DimCheckMode_MAX;
constexpr int ParamSpec::DimCheckMode_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LossParameter_NormalizationMode_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[6];
}
bool LossParameter_NormalizationMode_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr LossParameter_NormalizationMode LossParameter::FULL;
constexpr LossParameter_NormalizationMode LossParameter::VALID;
constexpr LossParameter_NormalizationMode LossParameter::BATCH_SIZE;
constexpr LossParameter_NormalizationMode LossParameter::NONE;
constexpr LossParameter_NormalizationMode LossParameter::NormalizationMode_MIN;
constexpr LossParameter_NormalizationMode LossParameter::NormalizationMode_MAX;
constexpr int LossParameter::NormalizationMode_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ConvolutionParameter_Engine_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[7];
}
bool ConvolutionParameter_Engine_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ConvolutionParameter_Engine ConvolutionParameter::DEFAULT;
constexpr ConvolutionParameter_Engine ConvolutionParameter::CAFFE;
constexpr ConvolutionParameter_Engine ConvolutionParameter::CUDNN;
constexpr ConvolutionParameter_Engine ConvolutionParameter::Engine_MIN;
constexpr ConvolutionParameter_Engine ConvolutionParameter::Engine_MAX;
constexpr int ConvolutionParameter::Engine_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DataParameter_DB_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[8];
}
bool DataParameter_DB_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr DataParameter_DB DataParameter::LEVELDB;
constexpr DataParameter_DB DataParameter::LMDB;
constexpr DataParameter_DB DataParameter::DB_MIN;
constexpr DataParameter_DB DataParameter::DB_MAX;
constexpr int DataParameter::DB_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EltwiseParameter_EltwiseOp_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[9];
}
bool EltwiseParameter_EltwiseOp_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr EltwiseParameter_EltwiseOp EltwiseParameter::PROD;
constexpr EltwiseParameter_EltwiseOp EltwiseParameter::SUM;
constexpr EltwiseParameter_EltwiseOp EltwiseParameter::MAX;
constexpr EltwiseParameter_EltwiseOp EltwiseParameter::EltwiseOp_MIN;
constexpr EltwiseParameter_EltwiseOp EltwiseParameter::EltwiseOp_MAX;
constexpr int EltwiseParameter::EltwiseOp_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HingeLossParameter_Norm_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[10];
}
bool HingeLossParameter_Norm_IsValid(int value) {
switch (value) {
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr HingeLossParameter_Norm HingeLossParameter::L1;
constexpr HingeLossParameter_Norm HingeLossParameter::L2;
constexpr HingeLossParameter_Norm HingeLossParameter::Norm_MIN;
constexpr HingeLossParameter_Norm HingeLossParameter::Norm_MAX;
constexpr int HingeLossParameter::Norm_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LRNParameter_NormRegion_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[11];
}
bool LRNParameter_NormRegion_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr LRNParameter_NormRegion LRNParameter::ACROSS_CHANNELS;
constexpr LRNParameter_NormRegion LRNParameter::WITHIN_CHANNEL;
constexpr LRNParameter_NormRegion LRNParameter::NormRegion_MIN;
constexpr LRNParameter_NormRegion LRNParameter::NormRegion_MAX;
constexpr int LRNParameter::NormRegion_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LRNParameter_Engine_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[12];
}
bool LRNParameter_Engine_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr LRNParameter_Engine LRNParameter::DEFAULT;
constexpr LRNParameter_Engine LRNParameter::CAFFE;
constexpr LRNParameter_Engine LRNParameter::CUDNN;
constexpr LRNParameter_Engine LRNParameter::Engine_MIN;
constexpr LRNParameter_Engine LRNParameter::Engine_MAX;
constexpr int LRNParameter::Engine_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PoolingParameter_PoolMethod_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[13];
}
bool PoolingParameter_PoolMethod_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr PoolingParameter_PoolMethod PoolingParameter::MAX;
constexpr PoolingParameter_PoolMethod PoolingParameter::AVE;
constexpr PoolingParameter_PoolMethod PoolingParameter::STOCHASTIC;
constexpr PoolingParameter_PoolMethod PoolingParameter::PoolMethod_MIN;
constexpr PoolingParameter_PoolMethod PoolingParameter::PoolMethod_MAX;
constexpr int PoolingParameter::PoolMethod_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PoolingParameter_Engine_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[14];
}
bool PoolingParameter_Engine_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr PoolingParameter_Engine PoolingParameter::DEFAULT;
constexpr PoolingParameter_Engine PoolingParameter::CAFFE;
constexpr PoolingParameter_Engine PoolingParameter::CUDNN;
constexpr PoolingParameter_Engine PoolingParameter::Engine_MIN;
constexpr PoolingParameter_Engine PoolingParameter::Engine_MAX;
constexpr int PoolingParameter::Engine_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ReductionParameter_ReductionOp_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[15];
}
bool ReductionParameter_ReductionOp_IsValid(int value) {
switch (value) {
case 1:
case 2:
case 3:
case 4:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ReductionParameter_ReductionOp ReductionParameter::SUM;
constexpr ReductionParameter_ReductionOp ReductionParameter::ASUM;
constexpr ReductionParameter_ReductionOp ReductionParameter::SUMSQ;
constexpr ReductionParameter_ReductionOp ReductionParameter::MEAN;
constexpr ReductionParameter_ReductionOp ReductionParameter::ReductionOp_MIN;
constexpr ReductionParameter_ReductionOp ReductionParameter::ReductionOp_MAX;
constexpr int ReductionParameter::ReductionOp_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ReLUParameter_Engine_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[16];
}
bool ReLUParameter_Engine_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr ReLUParameter_Engine ReLUParameter::DEFAULT;
constexpr ReLUParameter_Engine ReLUParameter::CAFFE;
constexpr ReLUParameter_Engine ReLUParameter::CUDNN;
constexpr ReLUParameter_Engine ReLUParameter::Engine_MIN;
constexpr ReLUParameter_Engine ReLUParameter::Engine_MAX;
constexpr int ReLUParameter::Engine_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SigmoidParameter_Engine_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[17];
}
bool SigmoidParameter_Engine_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SigmoidParameter_Engine SigmoidParameter::DEFAULT;
constexpr SigmoidParameter_Engine SigmoidParameter::CAFFE;
constexpr SigmoidParameter_Engine SigmoidParameter::CUDNN;
constexpr SigmoidParameter_Engine SigmoidParameter::Engine_MIN;
constexpr SigmoidParameter_Engine SigmoidParameter::Engine_MAX;
constexpr int SigmoidParameter::Engine_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SoftmaxParameter_Engine_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[18];
}
bool SoftmaxParameter_Engine_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SoftmaxParameter_Engine SoftmaxParameter::DEFAULT;
constexpr SoftmaxParameter_Engine SoftmaxParameter::CAFFE;
constexpr SoftmaxParameter_Engine SoftmaxParameter::CUDNN;
constexpr SoftmaxParameter_Engine SoftmaxParameter::Engine_MIN;
constexpr SoftmaxParameter_Engine SoftmaxParameter::Engine_MAX;
constexpr int SoftmaxParameter::Engine_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* TanHParameter_Engine_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[19];
}
bool TanHParameter_Engine_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr TanHParameter_Engine TanHParameter::DEFAULT;
constexpr TanHParameter_Engine TanHParameter::CAFFE;
constexpr TanHParameter_Engine TanHParameter::CUDNN;
constexpr TanHParameter_Engine TanHParameter::Engine_MIN;
constexpr TanHParameter_Engine TanHParameter::Engine_MAX;
constexpr int TanHParameter::Engine_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SPPParameter_PoolMethod_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[20];
}
bool SPPParameter_PoolMethod_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SPPParameter_PoolMethod SPPParameter::MAX;
constexpr SPPParameter_PoolMethod SPPParameter::AVE;
constexpr SPPParameter_PoolMethod SPPParameter::STOCHASTIC;
constexpr SPPParameter_PoolMethod SPPParameter::PoolMethod_MIN;
constexpr SPPParameter_PoolMethod SPPParameter::PoolMethod_MAX;
constexpr int SPPParameter::PoolMethod_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SPPParameter_Engine_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[21];
}
bool SPPParameter_Engine_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr SPPParameter_Engine SPPParameter::DEFAULT;
constexpr SPPParameter_Engine SPPParameter::CAFFE;
constexpr SPPParameter_Engine SPPParameter::CUDNN;
constexpr SPPParameter_Engine SPPParameter::Engine_MIN;
constexpr SPPParameter_Engine SPPParameter::Engine_MAX;
constexpr int SPPParameter::Engine_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* V1LayerParameter_LayerType_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[22];
}
bool V1LayerParameter_LayerType_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 31:
case 32:
case 33:
case 34:
case 35:
case 36:
case 37:
case 38:
case 39:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr V1LayerParameter_LayerType V1LayerParameter::NONE;
constexpr V1LayerParameter_LayerType V1LayerParameter::ABSVAL;
constexpr V1LayerParameter_LayerType V1LayerParameter::ACCURACY;
constexpr V1LayerParameter_LayerType V1LayerParameter::ARGMAX;
constexpr V1LayerParameter_LayerType V1LayerParameter::BNLL;
constexpr V1LayerParameter_LayerType V1LayerParameter::CONCAT;
constexpr V1LayerParameter_LayerType V1LayerParameter::CONTRASTIVE_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::CONVOLUTION;
constexpr V1LayerParameter_LayerType V1LayerParameter::DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::DECONVOLUTION;
constexpr V1LayerParameter_LayerType V1LayerParameter::DROPOUT;
constexpr V1LayerParameter_LayerType V1LayerParameter::DUMMY_DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::EUCLIDEAN_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::ELTWISE;
constexpr V1LayerParameter_LayerType V1LayerParameter::EXP;
constexpr V1LayerParameter_LayerType V1LayerParameter::FLATTEN;
constexpr V1LayerParameter_LayerType V1LayerParameter::HDF5_DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::HDF5_OUTPUT;
constexpr V1LayerParameter_LayerType V1LayerParameter::HINGE_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::IM2COL;
constexpr V1LayerParameter_LayerType V1LayerParameter::IMAGE_DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::INFOGAIN_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::INNER_PRODUCT;
constexpr V1LayerParameter_LayerType V1LayerParameter::LRN;
constexpr V1LayerParameter_LayerType V1LayerParameter::MEMORY_DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::MULTINOMIAL_LOGISTIC_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::MVN;
constexpr V1LayerParameter_LayerType V1LayerParameter::POOLING;
constexpr V1LayerParameter_LayerType V1LayerParameter::POWER;
constexpr V1LayerParameter_LayerType V1LayerParameter::RELU;
constexpr V1LayerParameter_LayerType V1LayerParameter::SIGMOID;
constexpr V1LayerParameter_LayerType V1LayerParameter::SIGMOID_CROSS_ENTROPY_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::SILENCE;
constexpr V1LayerParameter_LayerType V1LayerParameter::SOFTMAX;
constexpr V1LayerParameter_LayerType V1LayerParameter::SOFTMAX_LOSS;
constexpr V1LayerParameter_LayerType V1LayerParameter::SPLIT;
constexpr V1LayerParameter_LayerType V1LayerParameter::SLICE;
constexpr V1LayerParameter_LayerType V1LayerParameter::TANH;
constexpr V1LayerParameter_LayerType V1LayerParameter::WINDOW_DATA;
constexpr V1LayerParameter_LayerType V1LayerParameter::THRESHOLD;
constexpr V1LayerParameter_LayerType V1LayerParameter::LayerType_MIN;
constexpr V1LayerParameter_LayerType V1LayerParameter::LayerType_MAX;
constexpr int V1LayerParameter::LayerType_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* V1LayerParameter_DimCheckMode_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[23];
}
bool V1LayerParameter_DimCheckMode_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr V1LayerParameter_DimCheckMode V1LayerParameter::STRICT;
constexpr V1LayerParameter_DimCheckMode V1LayerParameter::PERMISSIVE;
constexpr V1LayerParameter_DimCheckMode V1LayerParameter::DimCheckMode_MIN;
constexpr V1LayerParameter_DimCheckMode V1LayerParameter::DimCheckMode_MAX;
constexpr int V1LayerParameter::DimCheckMode_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* V0LayerParameter_PoolMethod_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[24];
}
bool V0LayerParameter_PoolMethod_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
return true;
default:
return false;
}
}
#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
constexpr V0LayerParameter_PoolMethod V0LayerParameter::MAX;
constexpr V0LayerParameter_PoolMethod V0LayerParameter::AVE;
constexpr V0LayerParameter_PoolMethod V0LayerParameter::STOCHASTIC;
constexpr V0LayerParameter_PoolMethod V0LayerParameter::PoolMethod_MIN;
constexpr V0LayerParameter_PoolMethod V0LayerParameter::PoolMethod_MAX;
constexpr int V0LayerParameter::PoolMethod_ARRAYSIZE;
#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Type_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[25];
}
bool Type_IsValid(int value) {
switch (value) {
case 0:
case 1:
case 2:
case 3:
case 4:
return true;
default:
return false;
}
}
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Phase_descriptor() {
::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_opencv_2dcaffe_2eproto);
return file_level_enum_descriptors_opencv_2dcaffe_2eproto[26];
}
bool Phase_IsValid(int value) {
switch (value) {
case 0:
case 1:
return true;
default:
return false;
}
}
// ===================================================================
class BlobShape::_Internal {
public:
};
BlobShape::BlobShape(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
dim_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.BlobShape)
}
BlobShape::BlobShape(const BlobShape& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
dim_(from.dim_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:opencv_caffe.BlobShape)
}
inline void BlobShape::SharedCtor() {
}
BlobShape::~BlobShape() {
// @@protoc_insertion_point(destructor:opencv_caffe.BlobShape)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void BlobShape::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void BlobShape::ArenaDtor(void* object) {
BlobShape* _this = reinterpret_cast< BlobShape* >(object);
(void)_this;
}
void BlobShape::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BlobShape::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void BlobShape::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.BlobShape)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
dim_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* BlobShape::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated int64 dim = 1 [packed = true];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_dim(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 8) {
_internal_add_dim(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* BlobShape::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.BlobShape)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated int64 dim = 1 [packed = true];
{
int byte_size = _dim_cached_byte_size_.load(std::memory_order_relaxed);
if (byte_size > 0) {
target = stream->WriteInt64Packed(
1, _internal_dim(), byte_size, target);
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.BlobShape)
return target;
}
size_t BlobShape::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.BlobShape)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated int64 dim = 1 [packed = true];
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
Int64Size(this->dim_);
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
_dim_cached_byte_size_.store(cached_size,
std::memory_order_relaxed);
total_size += data_size;
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BlobShape::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
BlobShape::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BlobShape::GetClassData() const { return &_class_data_; }
void BlobShape::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<BlobShape *>(to)->MergeFrom(
static_cast<const BlobShape &>(from));
}
void BlobShape::MergeFrom(const BlobShape& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.BlobShape)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
dim_.MergeFrom(from.dim_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void BlobShape::CopyFrom(const BlobShape& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.BlobShape)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool BlobShape::IsInitialized() const {
return true;
}
void BlobShape::InternalSwap(BlobShape* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
dim_.InternalSwap(&other->dim_);
}
::PROTOBUF_NAMESPACE_ID::Metadata BlobShape::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[0]);
}
// ===================================================================
class BlobProto::_Internal {
public:
using HasBits = decltype(std::declval<BlobProto>()._has_bits_);
static const ::opencv_caffe::BlobShape& shape(const BlobProto* msg);
static void set_has_shape(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_raw_data_type(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_raw_data(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_num(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_channels(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_height(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_width(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
};
const ::opencv_caffe::BlobShape&
BlobProto::_Internal::shape(const BlobProto* msg) {
return *msg->shape_;
}
BlobProto::BlobProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
data_(arena),
diff_(arena),
double_data_(arena),
double_diff_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.BlobProto)
}
BlobProto::BlobProto(const BlobProto& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
data_(from.data_),
diff_(from.diff_),
double_data_(from.double_data_),
double_diff_(from.double_diff_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
raw_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
raw_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_raw_data()) {
raw_data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_raw_data(),
GetArenaForAllocation());
}
if (from._internal_has_shape()) {
shape_ = new ::opencv_caffe::BlobShape(*from.shape_);
} else {
shape_ = nullptr;
}
::memcpy(&num_, &from.num_,
static_cast<size_t>(reinterpret_cast<char*>(&raw_data_type_) -
reinterpret_cast<char*>(&num_)) + sizeof(raw_data_type_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.BlobProto)
}
inline void BlobProto::SharedCtor() {
raw_data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
raw_data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&shape_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&raw_data_type_) -
reinterpret_cast<char*>(&shape_)) + sizeof(raw_data_type_));
}
BlobProto::~BlobProto() {
// @@protoc_insertion_point(destructor:opencv_caffe.BlobProto)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void BlobProto::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
raw_data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete shape_;
}
void BlobProto::ArenaDtor(void* object) {
BlobProto* _this = reinterpret_cast< BlobProto* >(object);
(void)_this;
}
void BlobProto::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BlobProto::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void BlobProto::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.BlobProto)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
data_.Clear();
diff_.Clear();
double_data_.Clear();
double_diff_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
raw_data_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(shape_ != nullptr);
shape_->Clear();
}
}
if (cached_has_bits & 0x0000007cu) {
::memset(&num_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&raw_data_type_) -
reinterpret_cast<char*>(&num_)) + sizeof(raw_data_type_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* BlobProto::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 num = 1 [default = 0];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_num(&has_bits);
num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 channels = 2 [default = 0];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_channels(&has_bits);
channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 height = 3 [default = 0];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_height(&has_bits);
height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 width = 4 [default = 0];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_width(&has_bits);
width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float data = 5 [packed = true];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_data(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 45) {
_internal_add_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// repeated float diff = 6 [packed = true];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_diff(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 53) {
_internal_add_diff(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.BlobShape shape = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated double double_data = 8 [packed = true];
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_double_data(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 65) {
_internal_add_double_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
ptr += sizeof(double);
} else
goto handle_unusual;
continue;
// repeated double double_diff = 9 [packed = true];
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_double_diff(), ptr, ctx);
CHK_(ptr);
} else if (static_cast<uint8_t>(tag) == 73) {
_internal_add_double_diff(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
ptr += sizeof(double);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.Type raw_data_type = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::Type_IsValid(val))) {
_internal_set_raw_data_type(static_cast<::opencv_caffe::Type>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(10, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional bytes raw_data = 12 [packed = false];
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
auto str = _internal_mutable_raw_data();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* BlobProto::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.BlobProto)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int32 num = 1 [default = 0];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_num(), target);
}
// optional int32 channels = 2 [default = 0];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_channels(), target);
}
// optional int32 height = 3 [default = 0];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_height(), target);
}
// optional int32 width = 4 [default = 0];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_width(), target);
}
// repeated float data = 5 [packed = true];
if (this->_internal_data_size() > 0) {
target = stream->WriteFixedPacked(5, _internal_data(), target);
}
// repeated float diff = 6 [packed = true];
if (this->_internal_diff_size() > 0) {
target = stream->WriteFixedPacked(6, _internal_diff(), target);
}
// optional .opencv_caffe.BlobShape shape = 7;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
7, _Internal::shape(this), target, stream);
}
// repeated double double_data = 8 [packed = true];
if (this->_internal_double_data_size() > 0) {
target = stream->WriteFixedPacked(8, _internal_double_data(), target);
}
// repeated double double_diff = 9 [packed = true];
if (this->_internal_double_diff_size() > 0) {
target = stream->WriteFixedPacked(9, _internal_double_diff(), target);
}
// optional .opencv_caffe.Type raw_data_type = 10;
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
10, this->_internal_raw_data_type(), target);
}
// optional bytes raw_data = 12 [packed = false];
if (cached_has_bits & 0x00000001u) {
target = stream->WriteBytesMaybeAliased(
12, this->_internal_raw_data(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.BlobProto)
return target;
}
size_t BlobProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.BlobProto)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated float data = 5 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->_internal_data_size());
size_t data_size = 4UL * count;
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
total_size += data_size;
}
// repeated float diff = 6 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->_internal_diff_size());
size_t data_size = 4UL * count;
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
total_size += data_size;
}
// repeated double double_data = 8 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->_internal_double_data_size());
size_t data_size = 8UL * count;
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
total_size += data_size;
}
// repeated double double_diff = 9 [packed = true];
{
unsigned int count = static_cast<unsigned int>(this->_internal_double_diff_size());
size_t data_size = 8UL * count;
if (data_size > 0) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
static_cast<int32_t>(data_size));
}
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
// optional bytes raw_data = 12 [packed = false];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->_internal_raw_data());
}
// optional .opencv_caffe.BlobShape shape = 7;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*shape_);
}
// optional int32 num = 1 [default = 0];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num());
}
// optional int32 channels = 2 [default = 0];
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_channels());
}
// optional int32 height = 3 [default = 0];
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_height());
}
// optional int32 width = 4 [default = 0];
if (cached_has_bits & 0x00000020u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_width());
}
// optional .opencv_caffe.Type raw_data_type = 10;
if (cached_has_bits & 0x00000040u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_raw_data_type());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BlobProto::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
BlobProto::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BlobProto::GetClassData() const { return &_class_data_; }
void BlobProto::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<BlobProto *>(to)->MergeFrom(
static_cast<const BlobProto &>(from));
}
void BlobProto::MergeFrom(const BlobProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.BlobProto)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
data_.MergeFrom(from.data_);
diff_.MergeFrom(from.diff_);
double_data_.MergeFrom(from.double_data_);
double_diff_.MergeFrom(from.double_diff_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000007fu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_raw_data(from._internal_raw_data());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_shape()->::opencv_caffe::BlobShape::MergeFrom(from._internal_shape());
}
if (cached_has_bits & 0x00000004u) {
num_ = from.num_;
}
if (cached_has_bits & 0x00000008u) {
channels_ = from.channels_;
}
if (cached_has_bits & 0x00000010u) {
height_ = from.height_;
}
if (cached_has_bits & 0x00000020u) {
width_ = from.width_;
}
if (cached_has_bits & 0x00000040u) {
raw_data_type_ = from.raw_data_type_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void BlobProto::CopyFrom(const BlobProto& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.BlobProto)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool BlobProto::IsInitialized() const {
return true;
}
void BlobProto::InternalSwap(BlobProto* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
data_.InternalSwap(&other->data_);
diff_.InternalSwap(&other->diff_);
double_data_.InternalSwap(&other->double_data_);
double_diff_.InternalSwap(&other->double_diff_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&raw_data_, lhs_arena,
&other->raw_data_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(BlobProto, raw_data_type_)
+ sizeof(BlobProto::raw_data_type_)
- PROTOBUF_FIELD_OFFSET(BlobProto, shape_)>(
reinterpret_cast<char*>(&shape_),
reinterpret_cast<char*>(&other->shape_));
}
::PROTOBUF_NAMESPACE_ID::Metadata BlobProto::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[1]);
}
// ===================================================================
class BlobProtoVector::_Internal {
public:
};
BlobProtoVector::BlobProtoVector(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
blobs_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.BlobProtoVector)
}
BlobProtoVector::BlobProtoVector(const BlobProtoVector& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
blobs_(from.blobs_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:opencv_caffe.BlobProtoVector)
}
inline void BlobProtoVector::SharedCtor() {
}
BlobProtoVector::~BlobProtoVector() {
// @@protoc_insertion_point(destructor:opencv_caffe.BlobProtoVector)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void BlobProtoVector::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void BlobProtoVector::ArenaDtor(void* object) {
BlobProtoVector* _this = reinterpret_cast< BlobProtoVector* >(object);
(void)_this;
}
void BlobProtoVector::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BlobProtoVector::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void BlobProtoVector::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.BlobProtoVector)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
blobs_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* BlobProtoVector::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .opencv_caffe.BlobProto blobs = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_blobs(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* BlobProtoVector::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.BlobProtoVector)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .opencv_caffe.BlobProto blobs = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_blobs_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, this->_internal_blobs(i), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.BlobProtoVector)
return target;
}
size_t BlobProtoVector::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.BlobProtoVector)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .opencv_caffe.BlobProto blobs = 1;
total_size += 1UL * this->_internal_blobs_size();
for (const auto& msg : this->blobs_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BlobProtoVector::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
BlobProtoVector::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BlobProtoVector::GetClassData() const { return &_class_data_; }
void BlobProtoVector::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<BlobProtoVector *>(to)->MergeFrom(
static_cast<const BlobProtoVector &>(from));
}
void BlobProtoVector::MergeFrom(const BlobProtoVector& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.BlobProtoVector)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
blobs_.MergeFrom(from.blobs_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void BlobProtoVector::CopyFrom(const BlobProtoVector& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.BlobProtoVector)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool BlobProtoVector::IsInitialized() const {
return true;
}
void BlobProtoVector::InternalSwap(BlobProtoVector* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
blobs_.InternalSwap(&other->blobs_);
}
::PROTOBUF_NAMESPACE_ID::Metadata BlobProtoVector::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[2]);
}
// ===================================================================
class PermuteParameter::_Internal {
public:
};
PermuteParameter::PermuteParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
order_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.PermuteParameter)
}
PermuteParameter::PermuteParameter(const PermuteParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
order_(from.order_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:opencv_caffe.PermuteParameter)
}
inline void PermuteParameter::SharedCtor() {
}
PermuteParameter::~PermuteParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.PermuteParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void PermuteParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void PermuteParameter::ArenaDtor(void* object) {
PermuteParameter* _this = reinterpret_cast< PermuteParameter* >(object);
(void)_this;
}
void PermuteParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PermuteParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void PermuteParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.PermuteParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
order_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* PermuteParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated uint32 order = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_order(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8>(ptr));
} else if (static_cast<uint8_t>(tag) == 10) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_order(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* PermuteParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PermuteParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated uint32 order = 1;
for (int i = 0, n = this->_internal_order_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_order(i), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.PermuteParameter)
return target;
}
size_t PermuteParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PermuteParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated uint32 order = 1;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->order_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_order_size());
total_size += data_size;
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PermuteParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
PermuteParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PermuteParameter::GetClassData() const { return &_class_data_; }
void PermuteParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<PermuteParameter *>(to)->MergeFrom(
static_cast<const PermuteParameter &>(from));
}
void PermuteParameter::MergeFrom(const PermuteParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PermuteParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
order_.MergeFrom(from.order_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void PermuteParameter::CopyFrom(const PermuteParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.PermuteParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool PermuteParameter::IsInitialized() const {
return true;
}
void PermuteParameter::InternalSwap(PermuteParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
order_.InternalSwap(&other->order_);
}
::PROTOBUF_NAMESPACE_ID::Metadata PermuteParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[3]);
}
// ===================================================================
class NormalizeBBoxParameter::_Internal {
public:
using HasBits = decltype(std::declval<NormalizeBBoxParameter>()._has_bits_);
static void set_has_across_spatial(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static const ::opencv_caffe::FillerParameter& scale_filler(const NormalizeBBoxParameter* msg);
static void set_has_scale_filler(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_channel_shared(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_eps(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
};
const ::opencv_caffe::FillerParameter&
NormalizeBBoxParameter::_Internal::scale_filler(const NormalizeBBoxParameter* msg) {
return *msg->scale_filler_;
}
NormalizeBBoxParameter::NormalizeBBoxParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.NormalizeBBoxParameter)
}
NormalizeBBoxParameter::NormalizeBBoxParameter(const NormalizeBBoxParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_scale_filler()) {
scale_filler_ = new ::opencv_caffe::FillerParameter(*from.scale_filler_);
} else {
scale_filler_ = nullptr;
}
::memcpy(&across_spatial_, &from.across_spatial_,
static_cast<size_t>(reinterpret_cast<char*>(&eps_) -
reinterpret_cast<char*>(&across_spatial_)) + sizeof(eps_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.NormalizeBBoxParameter)
}
inline void NormalizeBBoxParameter::SharedCtor() {
scale_filler_ = nullptr;
across_spatial_ = true;
channel_shared_ = true;
eps_ = 1e-10f;
}
NormalizeBBoxParameter::~NormalizeBBoxParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.NormalizeBBoxParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void NormalizeBBoxParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete scale_filler_;
}
void NormalizeBBoxParameter::ArenaDtor(void* object) {
NormalizeBBoxParameter* _this = reinterpret_cast< NormalizeBBoxParameter* >(object);
(void)_this;
}
void NormalizeBBoxParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NormalizeBBoxParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void NormalizeBBoxParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.NormalizeBBoxParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(scale_filler_ != nullptr);
scale_filler_->Clear();
}
across_spatial_ = true;
channel_shared_ = true;
eps_ = 1e-10f;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* NormalizeBBoxParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional bool across_spatial = 1 [default = true];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_across_spatial(&has_bits);
across_spatial_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter scale_filler = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_scale_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool channel_shared = 3 [default = true];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_channel_shared(&has_bits);
channel_shared_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float eps = 4 [default = 1e-10];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
_Internal::set_has_eps(&has_bits);
eps_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* NormalizeBBoxParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NormalizeBBoxParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional bool across_spatial = 1 [default = true];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_across_spatial(), target);
}
// optional .opencv_caffe.FillerParameter scale_filler = 2;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
2, _Internal::scale_filler(this), target, stream);
}
// optional bool channel_shared = 3 [default = true];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_channel_shared(), target);
}
// optional float eps = 4 [default = 1e-10];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_eps(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.NormalizeBBoxParameter)
return target;
}
size_t NormalizeBBoxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NormalizeBBoxParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
// optional .opencv_caffe.FillerParameter scale_filler = 2;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*scale_filler_);
}
// optional bool across_spatial = 1 [default = true];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 1;
}
// optional bool channel_shared = 3 [default = true];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 1;
}
// optional float eps = 4 [default = 1e-10];
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NormalizeBBoxParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
NormalizeBBoxParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NormalizeBBoxParameter::GetClassData() const { return &_class_data_; }
void NormalizeBBoxParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<NormalizeBBoxParameter *>(to)->MergeFrom(
static_cast<const NormalizeBBoxParameter &>(from));
}
void NormalizeBBoxParameter::MergeFrom(const NormalizeBBoxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.NormalizeBBoxParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_scale_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_scale_filler());
}
if (cached_has_bits & 0x00000002u) {
across_spatial_ = from.across_spatial_;
}
if (cached_has_bits & 0x00000004u) {
channel_shared_ = from.channel_shared_;
}
if (cached_has_bits & 0x00000008u) {
eps_ = from.eps_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void NormalizeBBoxParameter::CopyFrom(const NormalizeBBoxParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.NormalizeBBoxParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NormalizeBBoxParameter::IsInitialized() const {
return true;
}
void NormalizeBBoxParameter::InternalSwap(NormalizeBBoxParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(scale_filler_, other->scale_filler_);
swap(across_spatial_, other->across_spatial_);
swap(channel_shared_, other->channel_shared_);
swap(eps_, other->eps_);
}
::PROTOBUF_NAMESPACE_ID::Metadata NormalizeBBoxParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[4]);
}
// ===================================================================
class PriorBoxParameter::_Internal {
public:
using HasBits = decltype(std::declval<PriorBoxParameter>()._has_bits_);
static void set_has_flip(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_clip(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static void set_has_img_size(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_img_h(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_img_w(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_step(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_step_h(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_step_w(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_offset(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
};
PriorBoxParameter::PriorBoxParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
min_size_(arena),
max_size_(arena),
aspect_ratio_(arena),
variance_(arena),
offset_h_(arena),
offset_w_(arena),
width_(arena),
height_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.PriorBoxParameter)
}
PriorBoxParameter::PriorBoxParameter(const PriorBoxParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
min_size_(from.min_size_),
max_size_(from.max_size_),
aspect_ratio_(from.aspect_ratio_),
variance_(from.variance_),
offset_h_(from.offset_h_),
offset_w_(from.offset_w_),
width_(from.width_),
height_(from.height_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&img_size_, &from.img_size_,
static_cast<size_t>(reinterpret_cast<char*>(&offset_) -
reinterpret_cast<char*>(&img_size_)) + sizeof(offset_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.PriorBoxParameter)
}
inline void PriorBoxParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&img_size_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&step_w_) -
reinterpret_cast<char*>(&img_size_)) + sizeof(step_w_));
flip_ = true;
clip_ = true;
offset_ = 0.5f;
}
PriorBoxParameter::~PriorBoxParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.PriorBoxParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void PriorBoxParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void PriorBoxParameter::ArenaDtor(void* object) {
PriorBoxParameter* _this = reinterpret_cast< PriorBoxParameter* >(object);
(void)_this;
}
void PriorBoxParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PriorBoxParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void PriorBoxParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.PriorBoxParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
min_size_.Clear();
max_size_.Clear();
aspect_ratio_.Clear();
variance_.Clear();
offset_h_.Clear();
offset_w_.Clear();
width_.Clear();
height_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
::memset(&img_size_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&step_w_) -
reinterpret_cast<char*>(&img_size_)) + sizeof(step_w_));
flip_ = true;
clip_ = true;
}
offset_ = 0.5f;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* PriorBoxParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated float min_size = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_min_size(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<13>(ptr));
} else if (static_cast<uint8_t>(tag) == 10) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_min_size(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float max_size = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_max_size(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<21>(ptr));
} else if (static_cast<uint8_t>(tag) == 18) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_max_size(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float aspect_ratio = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_aspect_ratio(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<29>(ptr));
} else if (static_cast<uint8_t>(tag) == 26) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_aspect_ratio(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool flip = 4 [default = true];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_flip(&has_bits);
flip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool clip = 5 [default = true];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_clip(&has_bits);
clip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float variance = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_variance(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<53>(ptr));
} else if (static_cast<uint8_t>(tag) == 50) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_variance(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 img_size = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_img_size(&has_bits);
img_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 img_h = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
_Internal::set_has_img_h(&has_bits);
img_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 img_w = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
_Internal::set_has_img_w(&has_bits);
img_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float step = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 85)) {
_Internal::set_has_step(&has_bits);
step_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float step_h = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 93)) {
_Internal::set_has_step_h(&has_bits);
step_h_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float step_w = 12;
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 101)) {
_Internal::set_has_step_w(&has_bits);
step_w_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float offset = 13 [default = 0.5];
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 109)) {
_Internal::set_has_offset(&has_bits);
offset_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// repeated float offset_h = 14;
case 14:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 117)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_offset_h(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<117>(ptr));
} else if (static_cast<uint8_t>(tag) == 114) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_offset_h(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float offset_w = 15;
case 15:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 125)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_offset_w(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<125>(ptr));
} else if (static_cast<uint8_t>(tag) == 122) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_offset_w(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float width = 16;
case 16:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 133)) {
ptr -= 2;
do {
ptr += 2;
_internal_add_width(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<133>(ptr));
} else if (static_cast<uint8_t>(tag) == 130) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_width(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float height = 17;
case 17:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 141)) {
ptr -= 2;
do {
ptr += 2;
_internal_add_height(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<141>(ptr));
} else if (static_cast<uint8_t>(tag) == 138) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_height(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* PriorBoxParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PriorBoxParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated float min_size = 1;
for (int i = 0, n = this->_internal_min_size_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_min_size(i), target);
}
// repeated float max_size = 2;
for (int i = 0, n = this->_internal_max_size_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_max_size(i), target);
}
// repeated float aspect_ratio = 3;
for (int i = 0, n = this->_internal_aspect_ratio_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_aspect_ratio(i), target);
}
cached_has_bits = _has_bits_[0];
// optional bool flip = 4 [default = true];
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_flip(), target);
}
// optional bool clip = 5 [default = true];
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_clip(), target);
}
// repeated float variance = 6;
for (int i = 0, n = this->_internal_variance_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_variance(i), target);
}
// optional uint32 img_size = 7;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_img_size(), target);
}
// optional uint32 img_h = 8;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(8, this->_internal_img_h(), target);
}
// optional uint32 img_w = 9;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(9, this->_internal_img_w(), target);
}
// optional float step = 10;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_step(), target);
}
// optional float step_h = 11;
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_step_h(), target);
}
// optional float step_w = 12;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(12, this->_internal_step_w(), target);
}
// optional float offset = 13 [default = 0.5];
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(13, this->_internal_offset(), target);
}
// repeated float offset_h = 14;
for (int i = 0, n = this->_internal_offset_h_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(14, this->_internal_offset_h(i), target);
}
// repeated float offset_w = 15;
for (int i = 0, n = this->_internal_offset_w_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(15, this->_internal_offset_w(i), target);
}
// repeated float width = 16;
for (int i = 0, n = this->_internal_width_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(16, this->_internal_width(i), target);
}
// repeated float height = 17;
for (int i = 0, n = this->_internal_height_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(17, this->_internal_height(i), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.PriorBoxParameter)
return target;
}
size_t PriorBoxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PriorBoxParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated float min_size = 1;
{
unsigned int count = static_cast<unsigned int>(this->_internal_min_size_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_min_size_size());
total_size += data_size;
}
// repeated float max_size = 2;
{
unsigned int count = static_cast<unsigned int>(this->_internal_max_size_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_max_size_size());
total_size += data_size;
}
// repeated float aspect_ratio = 3;
{
unsigned int count = static_cast<unsigned int>(this->_internal_aspect_ratio_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_aspect_ratio_size());
total_size += data_size;
}
// repeated float variance = 6;
{
unsigned int count = static_cast<unsigned int>(this->_internal_variance_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_variance_size());
total_size += data_size;
}
// repeated float offset_h = 14;
{
unsigned int count = static_cast<unsigned int>(this->_internal_offset_h_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_offset_h_size());
total_size += data_size;
}
// repeated float offset_w = 15;
{
unsigned int count = static_cast<unsigned int>(this->_internal_offset_w_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_offset_w_size());
total_size += data_size;
}
// repeated float width = 16;
{
unsigned int count = static_cast<unsigned int>(this->_internal_width_size());
size_t data_size = 4UL * count;
total_size += 2 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_width_size());
total_size += data_size;
}
// repeated float height = 17;
{
unsigned int count = static_cast<unsigned int>(this->_internal_height_size());
size_t data_size = 4UL * count;
total_size += 2 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_height_size());
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional uint32 img_size = 7;
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_img_size());
}
// optional uint32 img_h = 8;
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_img_h());
}
// optional uint32 img_w = 9;
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_img_w());
}
// optional float step = 10;
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 4;
}
// optional float step_h = 11;
if (cached_has_bits & 0x00000010u) {
total_size += 1 + 4;
}
// optional float step_w = 12;
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 4;
}
// optional bool flip = 4 [default = true];
if (cached_has_bits & 0x00000040u) {
total_size += 1 + 1;
}
// optional bool clip = 5 [default = true];
if (cached_has_bits & 0x00000080u) {
total_size += 1 + 1;
}
}
// optional float offset = 13 [default = 0.5];
if (cached_has_bits & 0x00000100u) {
total_size += 1 + 4;
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PriorBoxParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
PriorBoxParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PriorBoxParameter::GetClassData() const { return &_class_data_; }
void PriorBoxParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<PriorBoxParameter *>(to)->MergeFrom(
static_cast<const PriorBoxParameter &>(from));
}
void PriorBoxParameter::MergeFrom(const PriorBoxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PriorBoxParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
min_size_.MergeFrom(from.min_size_);
max_size_.MergeFrom(from.max_size_);
aspect_ratio_.MergeFrom(from.aspect_ratio_);
variance_.MergeFrom(from.variance_);
offset_h_.MergeFrom(from.offset_h_);
offset_w_.MergeFrom(from.offset_w_);
width_.MergeFrom(from.width_);
height_.MergeFrom(from.height_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
img_size_ = from.img_size_;
}
if (cached_has_bits & 0x00000002u) {
img_h_ = from.img_h_;
}
if (cached_has_bits & 0x00000004u) {
img_w_ = from.img_w_;
}
if (cached_has_bits & 0x00000008u) {
step_ = from.step_;
}
if (cached_has_bits & 0x00000010u) {
step_h_ = from.step_h_;
}
if (cached_has_bits & 0x00000020u) {
step_w_ = from.step_w_;
}
if (cached_has_bits & 0x00000040u) {
flip_ = from.flip_;
}
if (cached_has_bits & 0x00000080u) {
clip_ = from.clip_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00000100u) {
_internal_set_offset(from._internal_offset());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void PriorBoxParameter::CopyFrom(const PriorBoxParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.PriorBoxParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool PriorBoxParameter::IsInitialized() const {
return true;
}
void PriorBoxParameter::InternalSwap(PriorBoxParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
min_size_.InternalSwap(&other->min_size_);
max_size_.InternalSwap(&other->max_size_);
aspect_ratio_.InternalSwap(&other->aspect_ratio_);
variance_.InternalSwap(&other->variance_);
offset_h_.InternalSwap(&other->offset_h_);
offset_w_.InternalSwap(&other->offset_w_);
width_.InternalSwap(&other->width_);
height_.InternalSwap(&other->height_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(PriorBoxParameter, step_w_)
+ sizeof(PriorBoxParameter::step_w_)
- PROTOBUF_FIELD_OFFSET(PriorBoxParameter, img_size_)>(
reinterpret_cast<char*>(&img_size_),
reinterpret_cast<char*>(&other->img_size_));
swap(flip_, other->flip_);
swap(clip_, other->clip_);
swap(offset_, other->offset_);
}
::PROTOBUF_NAMESPACE_ID::Metadata PriorBoxParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[5]);
}
// ===================================================================
class DetectionOutputParameter::_Internal {
public:
using HasBits = decltype(std::declval<DetectionOutputParameter>()._has_bits_);
static void set_has_num_classes(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_share_location(HasBits* has_bits) {
(*has_bits)[0] |= 512u;
}
static void set_has_background_label_id(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static const ::opencv_caffe::NonMaximumSuppressionParameter& nms_param(const DetectionOutputParameter* msg);
static void set_has_nms_param(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static const ::opencv_caffe::SaveOutputParameter& save_output_param(const DetectionOutputParameter* msg);
static void set_has_save_output_param(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_code_type(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
static void set_has_variance_encoded_in_target(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_keep_top_k(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static void set_has_confidence_threshold(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_normalized_bbox(HasBits* has_bits) {
(*has_bits)[0] |= 1024u;
}
static void set_has_clip(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
};
const ::opencv_caffe::NonMaximumSuppressionParameter&
DetectionOutputParameter::_Internal::nms_param(const DetectionOutputParameter* msg) {
return *msg->nms_param_;
}
const ::opencv_caffe::SaveOutputParameter&
DetectionOutputParameter::_Internal::save_output_param(const DetectionOutputParameter* msg) {
return *msg->save_output_param_;
}
DetectionOutputParameter::DetectionOutputParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.DetectionOutputParameter)
}
DetectionOutputParameter::DetectionOutputParameter(const DetectionOutputParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_nms_param()) {
nms_param_ = new ::opencv_caffe::NonMaximumSuppressionParameter(*from.nms_param_);
} else {
nms_param_ = nullptr;
}
if (from._internal_has_save_output_param()) {
save_output_param_ = new ::opencv_caffe::SaveOutputParameter(*from.save_output_param_);
} else {
save_output_param_ = nullptr;
}
::memcpy(&num_classes_, &from.num_classes_,
static_cast<size_t>(reinterpret_cast<char*>(&normalized_bbox_) -
reinterpret_cast<char*>(&num_classes_)) + sizeof(normalized_bbox_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.DetectionOutputParameter)
}
inline void DetectionOutputParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&nms_param_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&clip_) -
reinterpret_cast<char*>(&nms_param_)) + sizeof(clip_));
keep_top_k_ = -1;
code_type_ = 1;
share_location_ = true;
normalized_bbox_ = true;
}
DetectionOutputParameter::~DetectionOutputParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.DetectionOutputParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void DetectionOutputParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete nms_param_;
if (this != internal_default_instance()) delete save_output_param_;
}
void DetectionOutputParameter::ArenaDtor(void* object) {
DetectionOutputParameter* _this = reinterpret_cast< DetectionOutputParameter* >(object);
(void)_this;
}
void DetectionOutputParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DetectionOutputParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void DetectionOutputParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.DetectionOutputParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(nms_param_ != nullptr);
nms_param_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(save_output_param_ != nullptr);
save_output_param_->Clear();
}
}
if (cached_has_bits & 0x000000fcu) {
::memset(&num_classes_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&clip_) -
reinterpret_cast<char*>(&num_classes_)) + sizeof(clip_));
keep_top_k_ = -1;
}
if (cached_has_bits & 0x00000700u) {
code_type_ = 1;
share_location_ = true;
normalized_bbox_ = true;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* DetectionOutputParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 num_classes = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_num_classes(&has_bits);
num_classes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool share_location = 2 [default = true];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_share_location(&has_bits);
share_location_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 background_label_id = 3 [default = 0];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_background_label_id(&has_bits);
background_label_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.NonMaximumSuppressionParameter nms_param = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_nms_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SaveOutputParameter save_output_param = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_save_output_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::PriorBoxParameter_CodeType_IsValid(val))) {
_internal_set_code_type(static_cast<::opencv_caffe::PriorBoxParameter_CodeType>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional int32 keep_top_k = 7 [default = -1];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_keep_top_k(&has_bits);
keep_top_k_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool variance_encoded_in_target = 8 [default = false];
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
_Internal::set_has_variance_encoded_in_target(&has_bits);
variance_encoded_in_target_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float confidence_threshold = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 77)) {
_Internal::set_has_confidence_threshold(&has_bits);
confidence_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional bool normalized_bbox = 10 [default = true];
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_normalized_bbox(&has_bits);
normalized_bbox_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool clip = 1000 [default = false];
case 1000:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
_Internal::set_has_clip(&has_bits);
clip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* DetectionOutputParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.DetectionOutputParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 num_classes = 1;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_classes(), target);
}
// optional bool share_location = 2 [default = true];
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_share_location(), target);
}
// optional int32 background_label_id = 3 [default = 0];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_background_label_id(), target);
}
// optional .opencv_caffe.NonMaximumSuppressionParameter nms_param = 4;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
4, _Internal::nms_param(this), target, stream);
}
// optional .opencv_caffe.SaveOutputParameter save_output_param = 5;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
5, _Internal::save_output_param(this), target, stream);
}
// optional .opencv_caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
6, this->_internal_code_type(), target);
}
// optional int32 keep_top_k = 7 [default = -1];
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_keep_top_k(), target);
}
// optional bool variance_encoded_in_target = 8 [default = false];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_variance_encoded_in_target(), target);
}
// optional float confidence_threshold = 9;
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(9, this->_internal_confidence_threshold(), target);
}
// optional bool normalized_bbox = 10 [default = true];
if (cached_has_bits & 0x00000400u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(10, this->_internal_normalized_bbox(), target);
}
// optional bool clip = 1000 [default = false];
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1000, this->_internal_clip(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.DetectionOutputParameter)
return target;
}
size_t DetectionOutputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.DetectionOutputParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional .opencv_caffe.NonMaximumSuppressionParameter nms_param = 4;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*nms_param_);
}
// optional .opencv_caffe.SaveOutputParameter save_output_param = 5;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*save_output_param_);
}
// optional uint32 num_classes = 1;
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_classes());
}
// optional int32 background_label_id = 3 [default = 0];
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_background_label_id());
}
// optional float confidence_threshold = 9;
if (cached_has_bits & 0x00000010u) {
total_size += 1 + 4;
}
// optional bool variance_encoded_in_target = 8 [default = false];
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 1;
}
// optional bool clip = 1000 [default = false];
if (cached_has_bits & 0x00000040u) {
total_size += 2 + 1;
}
// optional int32 keep_top_k = 7 [default = -1];
if (cached_has_bits & 0x00000080u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_keep_top_k());
}
}
if (cached_has_bits & 0x00000700u) {
// optional .opencv_caffe.PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
if (cached_has_bits & 0x00000100u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_code_type());
}
// optional bool share_location = 2 [default = true];
if (cached_has_bits & 0x00000200u) {
total_size += 1 + 1;
}
// optional bool normalized_bbox = 10 [default = true];
if (cached_has_bits & 0x00000400u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DetectionOutputParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
DetectionOutputParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DetectionOutputParameter::GetClassData() const { return &_class_data_; }
void DetectionOutputParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<DetectionOutputParameter *>(to)->MergeFrom(
static_cast<const DetectionOutputParameter &>(from));
}
void DetectionOutputParameter::MergeFrom(const DetectionOutputParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.DetectionOutputParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_nms_param()->::opencv_caffe::NonMaximumSuppressionParameter::MergeFrom(from._internal_nms_param());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_save_output_param()->::opencv_caffe::SaveOutputParameter::MergeFrom(from._internal_save_output_param());
}
if (cached_has_bits & 0x00000004u) {
num_classes_ = from.num_classes_;
}
if (cached_has_bits & 0x00000008u) {
background_label_id_ = from.background_label_id_;
}
if (cached_has_bits & 0x00000010u) {
confidence_threshold_ = from.confidence_threshold_;
}
if (cached_has_bits & 0x00000020u) {
variance_encoded_in_target_ = from.variance_encoded_in_target_;
}
if (cached_has_bits & 0x00000040u) {
clip_ = from.clip_;
}
if (cached_has_bits & 0x00000080u) {
keep_top_k_ = from.keep_top_k_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00000700u) {
if (cached_has_bits & 0x00000100u) {
code_type_ = from.code_type_;
}
if (cached_has_bits & 0x00000200u) {
share_location_ = from.share_location_;
}
if (cached_has_bits & 0x00000400u) {
normalized_bbox_ = from.normalized_bbox_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void DetectionOutputParameter::CopyFrom(const DetectionOutputParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.DetectionOutputParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DetectionOutputParameter::IsInitialized() const {
return true;
}
void DetectionOutputParameter::InternalSwap(DetectionOutputParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(DetectionOutputParameter, clip_)
+ sizeof(DetectionOutputParameter::clip_)
- PROTOBUF_FIELD_OFFSET(DetectionOutputParameter, nms_param_)>(
reinterpret_cast<char*>(&nms_param_),
reinterpret_cast<char*>(&other->nms_param_));
swap(keep_top_k_, other->keep_top_k_);
swap(code_type_, other->code_type_);
swap(share_location_, other->share_location_);
swap(normalized_bbox_, other->normalized_bbox_);
}
::PROTOBUF_NAMESPACE_ID::Metadata DetectionOutputParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[6]);
}
// ===================================================================
class Datum::_Internal {
public:
using HasBits = decltype(std::declval<Datum>()._has_bits_);
static void set_has_channels(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_height(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_width(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_data(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_label(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_encoded(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
};
Datum::Datum(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
float_data_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.Datum)
}
Datum::Datum(const Datum& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
float_data_(from.float_data_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_data()) {
data_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_data(),
GetArenaForAllocation());
}
::memcpy(&channels_, &from.channels_,
static_cast<size_t>(reinterpret_cast<char*>(&encoded_) -
reinterpret_cast<char*>(&channels_)) + sizeof(encoded_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.Datum)
}
inline void Datum::SharedCtor() {
data_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
data_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&channels_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&encoded_) -
reinterpret_cast<char*>(&channels_)) + sizeof(encoded_));
}
Datum::~Datum() {
// @@protoc_insertion_point(destructor:opencv_caffe.Datum)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void Datum::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
data_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void Datum::ArenaDtor(void* object) {
Datum* _this = reinterpret_cast< Datum* >(object);
(void)_this;
}
void Datum::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void Datum::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void Datum::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.Datum)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
float_data_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
data_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x0000003eu) {
::memset(&channels_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&encoded_) -
reinterpret_cast<char*>(&channels_)) + sizeof(encoded_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* Datum::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 channels = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_channels(&has_bits);
channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 height = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_height(&has_bits);
height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 width = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_width(&has_bits);
width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bytes data = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_data();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 label = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_label(&has_bits);
label_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float float_data = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_float_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<53>(ptr));
} else if (static_cast<uint8_t>(tag) == 50) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_float_data(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool encoded = 7 [default = false];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_encoded(&has_bits);
encoded_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* Datum::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.Datum)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int32 channels = 1;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_channels(), target);
}
// optional int32 height = 2;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_height(), target);
}
// optional int32 width = 3;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_width(), target);
}
// optional bytes data = 4;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteBytesMaybeAliased(
4, this->_internal_data(), target);
}
// optional int32 label = 5;
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_label(), target);
}
// repeated float float_data = 6;
for (int i = 0, n = this->_internal_float_data_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_float_data(i), target);
}
// optional bool encoded = 7 [default = false];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_encoded(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.Datum)
return target;
}
size_t Datum::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.Datum)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated float float_data = 6;
{
unsigned int count = static_cast<unsigned int>(this->_internal_float_data_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_float_data_size());
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional bytes data = 4;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
this->_internal_data());
}
// optional int32 channels = 1;
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_channels());
}
// optional int32 height = 2;
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_height());
}
// optional int32 width = 3;
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_width());
}
// optional int32 label = 5;
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_label());
}
// optional bool encoded = 7 [default = false];
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Datum::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
Datum::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Datum::GetClassData() const { return &_class_data_; }
void Datum::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<Datum *>(to)->MergeFrom(
static_cast<const Datum &>(from));
}
void Datum::MergeFrom(const Datum& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.Datum)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
float_data_.MergeFrom(from.float_data_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_data(from._internal_data());
}
if (cached_has_bits & 0x00000002u) {
channels_ = from.channels_;
}
if (cached_has_bits & 0x00000004u) {
height_ = from.height_;
}
if (cached_has_bits & 0x00000008u) {
width_ = from.width_;
}
if (cached_has_bits & 0x00000010u) {
label_ = from.label_;
}
if (cached_has_bits & 0x00000020u) {
encoded_ = from.encoded_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void Datum::CopyFrom(const Datum& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.Datum)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool Datum::IsInitialized() const {
return true;
}
void Datum::InternalSwap(Datum* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
float_data_.InternalSwap(&other->float_data_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&data_, lhs_arena,
&other->data_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(Datum, encoded_)
+ sizeof(Datum::encoded_)
- PROTOBUF_FIELD_OFFSET(Datum, channels_)>(
reinterpret_cast<char*>(&channels_),
reinterpret_cast<char*>(&other->channels_));
}
::PROTOBUF_NAMESPACE_ID::Metadata Datum::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[7]);
}
// ===================================================================
class FillerParameter::_Internal {
public:
using HasBits = decltype(std::declval<FillerParameter>()._has_bits_);
static void set_has_type(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_value(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_min(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_max(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_mean(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_std(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static void set_has_sparse(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_variance_norm(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
};
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString FillerParameter::_i_give_permission_to_break_this_code_default_type_{{{"constant", 8}}, {nullptr}};
FillerParameter::FillerParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.FillerParameter)
}
FillerParameter::FillerParameter(const FillerParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
type_.UnsafeSetDefault(nullptr);
if (from._internal_has_type()) {
type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_type(),
GetArenaForAllocation());
}
::memcpy(&value_, &from.value_,
static_cast<size_t>(reinterpret_cast<char*>(&std_) -
reinterpret_cast<char*>(&value_)) + sizeof(std_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.FillerParameter)
}
inline void FillerParameter::SharedCtor() {
type_.UnsafeSetDefault(nullptr);
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&value_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&variance_norm_) -
reinterpret_cast<char*>(&value_)) + sizeof(variance_norm_));
sparse_ = -1;
max_ = 1;
std_ = 1;
}
FillerParameter::~FillerParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.FillerParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void FillerParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
type_.DestroyNoArena(nullptr);
}
void FillerParameter::ArenaDtor(void* object) {
FillerParameter* _this = reinterpret_cast< FillerParameter* >(object);
(void)_this;
}
void FillerParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void FillerParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void FillerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.FillerParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
type_.ClearToDefault(::opencv_caffe::FillerParameter::_i_give_permission_to_break_this_code_default_type_, GetArenaForAllocation());
}
if (cached_has_bits & 0x000000feu) {
::memset(&value_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&variance_norm_) -
reinterpret_cast<char*>(&value_)) + sizeof(variance_norm_));
sparse_ = -1;
max_ = 1;
std_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* FillerParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string type = 1 [default = "constant"];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_type();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.FillerParameter.type");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float value = 2 [default = 0];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
_Internal::set_has_value(&has_bits);
value_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float min = 3 [default = 0];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_min(&has_bits);
min_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float max = 4 [default = 1];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
_Internal::set_has_max(&has_bits);
max_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float mean = 5 [default = 0];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
_Internal::set_has_mean(&has_bits);
mean_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float std = 6 [default = 1];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
_Internal::set_has_std(&has_bits);
std_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional int32 sparse = 7 [default = -1];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_sparse(&has_bits);
sparse_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::FillerParameter_VarianceNorm_IsValid(val))) {
_internal_set_variance_norm(static_cast<::opencv_caffe::FillerParameter_VarianceNorm>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(8, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* FillerParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.FillerParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string type = 1 [default = "constant"];
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_type().data(), static_cast<int>(this->_internal_type().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.FillerParameter.type");
target = stream->WriteStringMaybeAliased(
1, this->_internal_type(), target);
}
// optional float value = 2 [default = 0];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_value(), target);
}
// optional float min = 3 [default = 0];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_min(), target);
}
// optional float max = 4 [default = 1];
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_max(), target);
}
// optional float mean = 5 [default = 0];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_mean(), target);
}
// optional float std = 6 [default = 1];
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(6, this->_internal_std(), target);
}
// optional int32 sparse = 7 [default = -1];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_sparse(), target);
}
// optional .opencv_caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
8, this->_internal_variance_norm(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.FillerParameter)
return target;
}
size_t FillerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.FillerParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string type = 1 [default = "constant"];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_type());
}
// optional float value = 2 [default = 0];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 4;
}
// optional float min = 3 [default = 0];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
// optional float mean = 5 [default = 0];
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 4;
}
// optional .opencv_caffe.FillerParameter.VarianceNorm variance_norm = 8 [default = FAN_IN];
if (cached_has_bits & 0x00000010u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_variance_norm());
}
// optional int32 sparse = 7 [default = -1];
if (cached_has_bits & 0x00000020u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_sparse());
}
// optional float max = 4 [default = 1];
if (cached_has_bits & 0x00000040u) {
total_size += 1 + 4;
}
// optional float std = 6 [default = 1];
if (cached_has_bits & 0x00000080u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FillerParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
FillerParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FillerParameter::GetClassData() const { return &_class_data_; }
void FillerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<FillerParameter *>(to)->MergeFrom(
static_cast<const FillerParameter &>(from));
}
void FillerParameter::MergeFrom(const FillerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.FillerParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_type(from._internal_type());
}
if (cached_has_bits & 0x00000002u) {
value_ = from.value_;
}
if (cached_has_bits & 0x00000004u) {
min_ = from.min_;
}
if (cached_has_bits & 0x00000008u) {
mean_ = from.mean_;
}
if (cached_has_bits & 0x00000010u) {
variance_norm_ = from.variance_norm_;
}
if (cached_has_bits & 0x00000020u) {
sparse_ = from.sparse_;
}
if (cached_has_bits & 0x00000040u) {
max_ = from.max_;
}
if (cached_has_bits & 0x00000080u) {
std_ = from.std_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void FillerParameter::CopyFrom(const FillerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.FillerParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool FillerParameter::IsInitialized() const {
return true;
}
void FillerParameter::InternalSwap(FillerParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
nullptr,
&type_, lhs_arena,
&other->type_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(FillerParameter, variance_norm_)
+ sizeof(FillerParameter::variance_norm_)
- PROTOBUF_FIELD_OFFSET(FillerParameter, value_)>(
reinterpret_cast<char*>(&value_),
reinterpret_cast<char*>(&other->value_));
swap(sparse_, other->sparse_);
swap(max_, other->max_);
swap(std_, other->std_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FillerParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[8]);
}
// ===================================================================
class NetParameter::_Internal {
public:
using HasBits = decltype(std::declval<NetParameter>()._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_force_backward(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static const ::opencv_caffe::NetState& state(const NetParameter* msg);
static void set_has_state(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_debug_info(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
};
const ::opencv_caffe::NetState&
NetParameter::_Internal::state(const NetParameter* msg) {
return *msg->state_;
}
NetParameter::NetParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
layers_(arena),
input_(arena),
input_dim_(arena),
input_shape_(arena),
layer_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.NetParameter)
}
NetParameter::NetParameter(const NetParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
layers_(from.layers_),
input_(from.input_),
input_dim_(from.input_dim_),
input_shape_(from.input_shape_),
layer_(from.layer_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
if (from._internal_has_state()) {
state_ = new ::opencv_caffe::NetState(*from.state_);
} else {
state_ = nullptr;
}
::memcpy(&force_backward_, &from.force_backward_,
static_cast<size_t>(reinterpret_cast<char*>(&debug_info_) -
reinterpret_cast<char*>(&force_backward_)) + sizeof(debug_info_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.NetParameter)
}
inline void NetParameter::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&state_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&debug_info_) -
reinterpret_cast<char*>(&state_)) + sizeof(debug_info_));
}
NetParameter::~NetParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.NetParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void NetParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete state_;
}
void NetParameter::ArenaDtor(void* object) {
NetParameter* _this = reinterpret_cast< NetParameter* >(object);
(void)_this;
}
void NetParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NetParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void NetParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.NetParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
layers_.Clear();
input_.Clear();
input_dim_.Clear();
input_shape_.Clear();
layer_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(state_ != nullptr);
state_->Clear();
}
}
::memset(&force_backward_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&debug_info_) -
reinterpret_cast<char*>(&force_backward_)) + sizeof(debug_info_));
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* NetParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.NetParameter.name");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.V1LayerParameter layers = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_layers(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
} else
goto handle_unusual;
continue;
// repeated string input = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_input();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.NetParameter.input");
#endif // !NDEBUG
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
// repeated int32 input_dim = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_input_dim(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
} else if (static_cast<uint8_t>(tag) == 34) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_input_dim(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool force_backward = 5 [default = false];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_force_backward(&has_bits);
force_backward_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.NetState state = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr = ctx->ParseMessage(_internal_mutable_state(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool debug_info = 7 [default = false];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_debug_info(&has_bits);
debug_info_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.BlobShape input_shape = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_input_shape(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.LayerParameter layer = 100;
case 100:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 2;
do {
ptr += 2;
ptr = ctx->ParseMessage(_internal_add_layer(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<802>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* NetParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NetParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.NetParameter.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// repeated .opencv_caffe.V1LayerParameter layers = 2;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_layers_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, this->_internal_layers(i), target, stream);
}
// repeated string input = 3;
for (int i = 0, n = this->_internal_input_size(); i < n; i++) {
const auto& s = this->_internal_input(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.NetParameter.input");
target = stream->WriteString(3, s, target);
}
// repeated int32 input_dim = 4;
for (int i = 0, n = this->_internal_input_dim_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_input_dim(i), target);
}
// optional bool force_backward = 5 [default = false];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_force_backward(), target);
}
// optional .opencv_caffe.NetState state = 6;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
6, _Internal::state(this), target, stream);
}
// optional bool debug_info = 7 [default = false];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_debug_info(), target);
}
// repeated .opencv_caffe.BlobShape input_shape = 8;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_input_shape_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(8, this->_internal_input_shape(i), target, stream);
}
// repeated .opencv_caffe.LayerParameter layer = 100;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_layer_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(100, this->_internal_layer(i), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.NetParameter)
return target;
}
size_t NetParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NetParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .opencv_caffe.V1LayerParameter layers = 2;
total_size += 1UL * this->_internal_layers_size();
for (const auto& msg : this->layers_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated string input = 3;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(input_.size());
for (int i = 0, n = input_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
input_.Get(i));
}
// repeated int32 input_dim = 4;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
Int32Size(this->input_dim_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_input_dim_size());
total_size += data_size;
}
// repeated .opencv_caffe.BlobShape input_shape = 8;
total_size += 1UL * this->_internal_input_shape_size();
for (const auto& msg : this->input_shape_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .opencv_caffe.LayerParameter layer = 100;
total_size += 2UL * this->_internal_layer_size();
for (const auto& msg : this->layer_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// optional .opencv_caffe.NetState state = 6;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*state_);
}
// optional bool force_backward = 5 [default = false];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 1;
}
// optional bool debug_info = 7 [default = false];
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NetParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
NetParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NetParameter::GetClassData() const { return &_class_data_; }
void NetParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<NetParameter *>(to)->MergeFrom(
static_cast<const NetParameter &>(from));
}
void NetParameter::MergeFrom(const NetParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.NetParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
layers_.MergeFrom(from.layers_);
input_.MergeFrom(from.input_);
input_dim_.MergeFrom(from.input_dim_);
input_shape_.MergeFrom(from.input_shape_);
layer_.MergeFrom(from.layer_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_state()->::opencv_caffe::NetState::MergeFrom(from._internal_state());
}
if (cached_has_bits & 0x00000004u) {
force_backward_ = from.force_backward_;
}
if (cached_has_bits & 0x00000008u) {
debug_info_ = from.debug_info_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void NetParameter::CopyFrom(const NetParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.NetParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NetParameter::IsInitialized() const {
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(layer_))
return false;
return true;
}
void NetParameter::InternalSwap(NetParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
layers_.InternalSwap(&other->layers_);
input_.InternalSwap(&other->input_);
input_dim_.InternalSwap(&other->input_dim_);
input_shape_.InternalSwap(&other->input_shape_);
layer_.InternalSwap(&other->layer_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, lhs_arena,
&other->name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(NetParameter, debug_info_)
+ sizeof(NetParameter::debug_info_)
- PROTOBUF_FIELD_OFFSET(NetParameter, state_)>(
reinterpret_cast<char*>(&state_),
reinterpret_cast<char*>(&other->state_));
}
::PROTOBUF_NAMESPACE_ID::Metadata NetParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[9]);
}
// ===================================================================
class SolverParameter::_Internal {
public:
using HasBits = decltype(std::declval<SolverParameter>()._has_bits_);
static void set_has_net(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static const ::opencv_caffe::NetParameter& net_param(const SolverParameter* msg);
static void set_has_net_param(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static void set_has_train_net(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static const ::opencv_caffe::NetParameter& train_net_param(const SolverParameter* msg);
static void set_has_train_net_param(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static const ::opencv_caffe::NetState& train_state(const SolverParameter* msg);
static void set_has_train_state(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
static void set_has_test_interval(HasBits* has_bits) {
(*has_bits)[0] |= 512u;
}
static void set_has_test_compute_loss(HasBits* has_bits) {
(*has_bits)[0] |= 1048576u;
}
static void set_has_test_initialization(HasBits* has_bits) {
(*has_bits)[0] |= 134217728u;
}
static void set_has_base_lr(HasBits* has_bits) {
(*has_bits)[0] |= 1024u;
}
static void set_has_display(HasBits* has_bits) {
(*has_bits)[0] |= 2048u;
}
static void set_has_average_loss(HasBits* has_bits) {
(*has_bits)[0] |= 1073741824u;
}
static void set_has_max_iter(HasBits* has_bits) {
(*has_bits)[0] |= 4096u;
}
static void set_has_iter_size(HasBits* has_bits) {
(*has_bits)[1] |= 1u;
}
static void set_has_lr_policy(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_gamma(HasBits* has_bits) {
(*has_bits)[0] |= 8192u;
}
static void set_has_power(HasBits* has_bits) {
(*has_bits)[0] |= 16384u;
}
static void set_has_momentum(HasBits* has_bits) {
(*has_bits)[0] |= 32768u;
}
static void set_has_weight_decay(HasBits* has_bits) {
(*has_bits)[0] |= 65536u;
}
static void set_has_regularization_type(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_stepsize(HasBits* has_bits) {
(*has_bits)[0] |= 131072u;
}
static void set_has_clip_gradients(HasBits* has_bits) {
(*has_bits)[0] |= 2147483648u;
}
static void set_has_snapshot(HasBits* has_bits) {
(*has_bits)[0] |= 262144u;
}
static void set_has_snapshot_prefix(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_snapshot_diff(HasBits* has_bits) {
(*has_bits)[0] |= 2097152u;
}
static void set_has_snapshot_format(HasBits* has_bits) {
(*has_bits)[1] |= 2u;
}
static void set_has_solver_mode(HasBits* has_bits) {
(*has_bits)[0] |= 67108864u;
}
static void set_has_device_id(HasBits* has_bits) {
(*has_bits)[0] |= 524288u;
}
static void set_has_random_seed(HasBits* has_bits) {
(*has_bits)[0] |= 33554432u;
}
static void set_has_type(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_delta(HasBits* has_bits) {
(*has_bits)[0] |= 536870912u;
}
static void set_has_momentum2(HasBits* has_bits) {
(*has_bits)[0] |= 16777216u;
}
static void set_has_rms_decay(HasBits* has_bits) {
(*has_bits)[1] |= 4u;
}
static void set_has_debug_info(HasBits* has_bits) {
(*has_bits)[0] |= 4194304u;
}
static void set_has_snapshot_after_train(HasBits* has_bits) {
(*has_bits)[0] |= 268435456u;
}
static void set_has_solver_type(HasBits* has_bits) {
(*has_bits)[0] |= 8388608u;
}
};
const ::opencv_caffe::NetParameter&
SolverParameter::_Internal::net_param(const SolverParameter* msg) {
return *msg->net_param_;
}
const ::opencv_caffe::NetParameter&
SolverParameter::_Internal::train_net_param(const SolverParameter* msg) {
return *msg->train_net_param_;
}
const ::opencv_caffe::NetState&
SolverParameter::_Internal::train_state(const SolverParameter* msg) {
return *msg->train_state_;
}
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString SolverParameter::_i_give_permission_to_break_this_code_default_regularization_type_{{{"L2", 2}}, {nullptr}};
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString SolverParameter::_i_give_permission_to_break_this_code_default_type_{{{"SGD", 3}}, {nullptr}};
SolverParameter::SolverParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
test_net_(arena),
test_iter_(arena),
test_net_param_(arena),
test_state_(arena),
stepvalue_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.SolverParameter)
}
SolverParameter::SolverParameter(const SolverParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
test_net_(from.test_net_),
test_iter_(from.test_iter_),
test_net_param_(from.test_net_param_),
test_state_(from.test_state_),
stepvalue_(from.stepvalue_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
train_net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
train_net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_train_net()) {
train_net_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_train_net(),
GetArenaForAllocation());
}
lr_policy_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
lr_policy_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_lr_policy()) {
lr_policy_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_lr_policy(),
GetArenaForAllocation());
}
snapshot_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
snapshot_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_snapshot_prefix()) {
snapshot_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_snapshot_prefix(),
GetArenaForAllocation());
}
net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_net()) {
net_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_net(),
GetArenaForAllocation());
}
regularization_type_.UnsafeSetDefault(nullptr);
if (from._internal_has_regularization_type()) {
regularization_type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_regularization_type(),
GetArenaForAllocation());
}
type_.UnsafeSetDefault(nullptr);
if (from._internal_has_type()) {
type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_type(),
GetArenaForAllocation());
}
if (from._internal_has_train_net_param()) {
train_net_param_ = new ::opencv_caffe::NetParameter(*from.train_net_param_);
} else {
train_net_param_ = nullptr;
}
if (from._internal_has_net_param()) {
net_param_ = new ::opencv_caffe::NetParameter(*from.net_param_);
} else {
net_param_ = nullptr;
}
if (from._internal_has_train_state()) {
train_state_ = new ::opencv_caffe::NetState(*from.train_state_);
} else {
train_state_ = nullptr;
}
::memcpy(&test_interval_, &from.test_interval_,
static_cast<size_t>(reinterpret_cast<char*>(&rms_decay_) -
reinterpret_cast<char*>(&test_interval_)) + sizeof(rms_decay_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.SolverParameter)
}
inline void SolverParameter::SharedCtor() {
train_net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
train_net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
lr_policy_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
lr_policy_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
snapshot_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
snapshot_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
regularization_type_.UnsafeSetDefault(nullptr);
type_.UnsafeSetDefault(nullptr);
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&train_net_param_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&solver_type_) -
reinterpret_cast<char*>(&train_net_param_)) + sizeof(solver_type_));
momentum2_ = 0.999f;
random_seed_ = int64_t{-1};
solver_mode_ = 1;
test_initialization_ = true;
snapshot_after_train_ = true;
delta_ = 1e-08f;
average_loss_ = 1;
clip_gradients_ = -1;
iter_size_ = 1;
snapshot_format_ = 1;
rms_decay_ = 0.99f;
}
SolverParameter::~SolverParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.SolverParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void SolverParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
train_net_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
lr_policy_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
snapshot_prefix_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
net_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
regularization_type_.DestroyNoArena(nullptr);
type_.DestroyNoArena(nullptr);
if (this != internal_default_instance()) delete train_net_param_;
if (this != internal_default_instance()) delete net_param_;
if (this != internal_default_instance()) delete train_state_;
}
void SolverParameter::ArenaDtor(void* object) {
SolverParameter* _this = reinterpret_cast< SolverParameter* >(object);
(void)_this;
}
void SolverParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SolverParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void SolverParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.SolverParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
test_net_.Clear();
test_iter_.Clear();
test_net_param_.Clear();
test_state_.Clear();
stepvalue_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
train_net_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
lr_policy_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
snapshot_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
net_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000010u) {
regularization_type_.ClearToDefault(::opencv_caffe::SolverParameter::_i_give_permission_to_break_this_code_default_regularization_type_, GetArenaForAllocation());
}
if (cached_has_bits & 0x00000020u) {
type_.ClearToDefault(::opencv_caffe::SolverParameter::_i_give_permission_to_break_this_code_default_type_, GetArenaForAllocation());
}
if (cached_has_bits & 0x00000040u) {
GOOGLE_DCHECK(train_net_param_ != nullptr);
train_net_param_->Clear();
}
if (cached_has_bits & 0x00000080u) {
GOOGLE_DCHECK(net_param_ != nullptr);
net_param_->Clear();
}
}
if (cached_has_bits & 0x00000100u) {
GOOGLE_DCHECK(train_state_ != nullptr);
train_state_->Clear();
}
if (cached_has_bits & 0x0000fe00u) {
::memset(&test_interval_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&momentum_) -
reinterpret_cast<char*>(&test_interval_)) + sizeof(momentum_));
}
if (cached_has_bits & 0x00ff0000u) {
::memset(&weight_decay_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&solver_type_) -
reinterpret_cast<char*>(&weight_decay_)) + sizeof(solver_type_));
}
if (cached_has_bits & 0xff000000u) {
momentum2_ = 0.999f;
random_seed_ = int64_t{-1};
solver_mode_ = 1;
test_initialization_ = true;
snapshot_after_train_ = true;
delta_ = 1e-08f;
average_loss_ = 1;
clip_gradients_ = -1;
}
cached_has_bits = _has_bits_[1];
if (cached_has_bits & 0x00000007u) {
iter_size_ = 1;
snapshot_format_ = 1;
rms_decay_ = 0.99f;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* SolverParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string train_net = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_train_net();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SolverParameter.train_net");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated string test_net = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_test_net();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SolverParameter.test_net");
#endif // !NDEBUG
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
} else
goto handle_unusual;
continue;
// repeated int32 test_iter = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_test_iter(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
} else if (static_cast<uint8_t>(tag) == 26) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_test_iter(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 test_interval = 4 [default = 0];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_test_interval(&_has_bits_);
test_interval_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float base_lr = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
_Internal::set_has_base_lr(&_has_bits_);
base_lr_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional int32 display = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_display(&_has_bits_);
display_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 max_iter = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_max_iter(&_has_bits_);
max_iter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string lr_policy = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
auto str = _internal_mutable_lr_policy();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SolverParameter.lr_policy");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float gamma = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 77)) {
_Internal::set_has_gamma(&_has_bits_);
gamma_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float power = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 85)) {
_Internal::set_has_power(&_has_bits_);
power_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float momentum = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 93)) {
_Internal::set_has_momentum(&_has_bits_);
momentum_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float weight_decay = 12;
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 101)) {
_Internal::set_has_weight_decay(&_has_bits_);
weight_decay_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional int32 stepsize = 13;
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
_Internal::set_has_stepsize(&_has_bits_);
stepsize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 snapshot = 14 [default = 0];
case 14:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
_Internal::set_has_snapshot(&_has_bits_);
snapshot_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string snapshot_prefix = 15;
case 15:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
auto str = _internal_mutable_snapshot_prefix();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SolverParameter.snapshot_prefix");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool snapshot_diff = 16 [default = false];
case 16:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
_Internal::set_has_snapshot_diff(&_has_bits_);
snapshot_diff_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
case 17:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SolverParameter_SolverMode_IsValid(val))) {
_internal_set_solver_mode(static_cast<::opencv_caffe::SolverParameter_SolverMode>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(17, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional int32 device_id = 18 [default = 0];
case 18:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
_Internal::set_has_device_id(&_has_bits_);
device_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool test_compute_loss = 19 [default = false];
case 19:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
_Internal::set_has_test_compute_loss(&_has_bits_);
test_compute_loss_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int64 random_seed = 20 [default = -1];
case 20:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
_Internal::set_has_random_seed(&_has_bits_);
random_seed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.NetParameter train_net_param = 21;
case 21:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
ptr = ctx->ParseMessage(_internal_mutable_train_net_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.NetParameter test_net_param = 22;
case 22:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 178)) {
ptr -= 2;
do {
ptr += 2;
ptr = ctx->ParseMessage(_internal_add_test_net_param(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<178>(ptr));
} else
goto handle_unusual;
continue;
// optional bool debug_info = 23 [default = false];
case 23:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 184)) {
_Internal::set_has_debug_info(&_has_bits_);
debug_info_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string net = 24;
case 24:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 194)) {
auto str = _internal_mutable_net();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SolverParameter.net");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.NetParameter net_param = 25;
case 25:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 202)) {
ptr = ctx->ParseMessage(_internal_mutable_net_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.NetState train_state = 26;
case 26:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 210)) {
ptr = ctx->ParseMessage(_internal_mutable_train_state(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.NetState test_state = 27;
case 27:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 218)) {
ptr -= 2;
do {
ptr += 2;
ptr = ctx->ParseMessage(_internal_add_test_state(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<218>(ptr));
} else
goto handle_unusual;
continue;
// optional bool snapshot_after_train = 28 [default = true];
case 28:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 224)) {
_Internal::set_has_snapshot_after_train(&_has_bits_);
snapshot_after_train_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string regularization_type = 29 [default = "L2"];
case 29:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 234)) {
auto str = _internal_mutable_regularization_type();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SolverParameter.regularization_type");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
case 30:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 240)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SolverParameter_SolverType_IsValid(val))) {
_internal_set_solver_type(static_cast<::opencv_caffe::SolverParameter_SolverType>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(30, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional float delta = 31 [default = 1e-08];
case 31:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 253)) {
_Internal::set_has_delta(&_has_bits_);
delta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional bool test_initialization = 32 [default = true];
case 32:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 0)) {
_Internal::set_has_test_initialization(&_has_bits_);
test_initialization_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 average_loss = 33 [default = 1];
case 33:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_average_loss(&_has_bits_);
average_loss_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated int32 stepvalue = 34;
case 34:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
ptr -= 2;
do {
ptr += 2;
_internal_add_stepvalue(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<272>(ptr));
} else if (static_cast<uint8_t>(tag) == 18) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_stepvalue(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float clip_gradients = 35 [default = -1];
case 35:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_clip_gradients(&_has_bits_);
clip_gradients_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional int32 iter_size = 36 [default = 1];
case 36:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_iter_size(&_has_bits_);
iter_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
case 37:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SolverParameter_SnapshotFormat_IsValid(val))) {
_internal_set_snapshot_format(static_cast<::opencv_caffe::SolverParameter_SnapshotFormat>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(37, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional float rms_decay = 38 [default = 0.99];
case 38:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
_Internal::set_has_rms_decay(&_has_bits_);
rms_decay_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float momentum2 = 39 [default = 0.999];
case 39:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
_Internal::set_has_momentum2(&_has_bits_);
momentum2_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional string type = 40 [default = "SGD"];
case 40:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
auto str = _internal_mutable_type();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SolverParameter.type");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* SolverParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SolverParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string train_net = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_train_net().data(), static_cast<int>(this->_internal_train_net().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SolverParameter.train_net");
target = stream->WriteStringMaybeAliased(
1, this->_internal_train_net(), target);
}
// repeated string test_net = 2;
for (int i = 0, n = this->_internal_test_net_size(); i < n; i++) {
const auto& s = this->_internal_test_net(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SolverParameter.test_net");
target = stream->WriteString(2, s, target);
}
// repeated int32 test_iter = 3;
for (int i = 0, n = this->_internal_test_iter_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_test_iter(i), target);
}
// optional int32 test_interval = 4 [default = 0];
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_test_interval(), target);
}
// optional float base_lr = 5;
if (cached_has_bits & 0x00000400u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_base_lr(), target);
}
// optional int32 display = 6;
if (cached_has_bits & 0x00000800u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_display(), target);
}
// optional int32 max_iter = 7;
if (cached_has_bits & 0x00001000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_max_iter(), target);
}
// optional string lr_policy = 8;
if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_lr_policy().data(), static_cast<int>(this->_internal_lr_policy().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SolverParameter.lr_policy");
target = stream->WriteStringMaybeAliased(
8, this->_internal_lr_policy(), target);
}
// optional float gamma = 9;
if (cached_has_bits & 0x00002000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(9, this->_internal_gamma(), target);
}
// optional float power = 10;
if (cached_has_bits & 0x00004000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(10, this->_internal_power(), target);
}
// optional float momentum = 11;
if (cached_has_bits & 0x00008000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(11, this->_internal_momentum(), target);
}
// optional float weight_decay = 12;
if (cached_has_bits & 0x00010000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(12, this->_internal_weight_decay(), target);
}
// optional int32 stepsize = 13;
if (cached_has_bits & 0x00020000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(13, this->_internal_stepsize(), target);
}
// optional int32 snapshot = 14 [default = 0];
if (cached_has_bits & 0x00040000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(14, this->_internal_snapshot(), target);
}
// optional string snapshot_prefix = 15;
if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_snapshot_prefix().data(), static_cast<int>(this->_internal_snapshot_prefix().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SolverParameter.snapshot_prefix");
target = stream->WriteStringMaybeAliased(
15, this->_internal_snapshot_prefix(), target);
}
// optional bool snapshot_diff = 16 [default = false];
if (cached_has_bits & 0x00200000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(16, this->_internal_snapshot_diff(), target);
}
// optional .opencv_caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
if (cached_has_bits & 0x04000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
17, this->_internal_solver_mode(), target);
}
// optional int32 device_id = 18 [default = 0];
if (cached_has_bits & 0x00080000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(18, this->_internal_device_id(), target);
}
// optional bool test_compute_loss = 19 [default = false];
if (cached_has_bits & 0x00100000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(19, this->_internal_test_compute_loss(), target);
}
// optional int64 random_seed = 20 [default = -1];
if (cached_has_bits & 0x02000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(20, this->_internal_random_seed(), target);
}
// optional .opencv_caffe.NetParameter train_net_param = 21;
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
21, _Internal::train_net_param(this), target, stream);
}
// repeated .opencv_caffe.NetParameter test_net_param = 22;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_test_net_param_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(22, this->_internal_test_net_param(i), target, stream);
}
// optional bool debug_info = 23 [default = false];
if (cached_has_bits & 0x00400000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(23, this->_internal_debug_info(), target);
}
// optional string net = 24;
if (cached_has_bits & 0x00000008u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_net().data(), static_cast<int>(this->_internal_net().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SolverParameter.net");
target = stream->WriteStringMaybeAliased(
24, this->_internal_net(), target);
}
// optional .opencv_caffe.NetParameter net_param = 25;
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
25, _Internal::net_param(this), target, stream);
}
// optional .opencv_caffe.NetState train_state = 26;
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
26, _Internal::train_state(this), target, stream);
}
// repeated .opencv_caffe.NetState test_state = 27;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_test_state_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(27, this->_internal_test_state(i), target, stream);
}
// optional bool snapshot_after_train = 28 [default = true];
if (cached_has_bits & 0x10000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(28, this->_internal_snapshot_after_train(), target);
}
// optional string regularization_type = 29 [default = "L2"];
if (cached_has_bits & 0x00000010u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_regularization_type().data(), static_cast<int>(this->_internal_regularization_type().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SolverParameter.regularization_type");
target = stream->WriteStringMaybeAliased(
29, this->_internal_regularization_type(), target);
}
// optional .opencv_caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
if (cached_has_bits & 0x00800000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
30, this->_internal_solver_type(), target);
}
// optional float delta = 31 [default = 1e-08];
if (cached_has_bits & 0x20000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(31, this->_internal_delta(), target);
}
// optional bool test_initialization = 32 [default = true];
if (cached_has_bits & 0x08000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(32, this->_internal_test_initialization(), target);
}
// optional int32 average_loss = 33 [default = 1];
if (cached_has_bits & 0x40000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(33, this->_internal_average_loss(), target);
}
// repeated int32 stepvalue = 34;
for (int i = 0, n = this->_internal_stepvalue_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(34, this->_internal_stepvalue(i), target);
}
// optional float clip_gradients = 35 [default = -1];
if (cached_has_bits & 0x80000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(35, this->_internal_clip_gradients(), target);
}
cached_has_bits = _has_bits_[1];
// optional int32 iter_size = 36 [default = 1];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(36, this->_internal_iter_size(), target);
}
// optional .opencv_caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
37, this->_internal_snapshot_format(), target);
}
// optional float rms_decay = 38 [default = 0.99];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(38, this->_internal_rms_decay(), target);
}
cached_has_bits = _has_bits_[0];
// optional float momentum2 = 39 [default = 0.999];
if (cached_has_bits & 0x01000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(39, this->_internal_momentum2(), target);
}
// optional string type = 40 [default = "SGD"];
if (cached_has_bits & 0x00000020u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_type().data(), static_cast<int>(this->_internal_type().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SolverParameter.type");
target = stream->WriteStringMaybeAliased(
40, this->_internal_type(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.SolverParameter)
return target;
}
size_t SolverParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SolverParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string test_net = 2;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(test_net_.size());
for (int i = 0, n = test_net_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
test_net_.Get(i));
}
// repeated int32 test_iter = 3;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
Int32Size(this->test_iter_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_test_iter_size());
total_size += data_size;
}
// repeated .opencv_caffe.NetParameter test_net_param = 22;
total_size += 2UL * this->_internal_test_net_param_size();
for (const auto& msg : this->test_net_param_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .opencv_caffe.NetState test_state = 27;
total_size += 2UL * this->_internal_test_state_size();
for (const auto& msg : this->test_state_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated int32 stepvalue = 34;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
Int32Size(this->stepvalue_);
total_size += 2 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_stepvalue_size());
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string train_net = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_train_net());
}
// optional string lr_policy = 8;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_lr_policy());
}
// optional string snapshot_prefix = 15;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_snapshot_prefix());
}
// optional string net = 24;
if (cached_has_bits & 0x00000008u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_net());
}
// optional string regularization_type = 29 [default = "L2"];
if (cached_has_bits & 0x00000010u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_regularization_type());
}
// optional string type = 40 [default = "SGD"];
if (cached_has_bits & 0x00000020u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_type());
}
// optional .opencv_caffe.NetParameter train_net_param = 21;
if (cached_has_bits & 0x00000040u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*train_net_param_);
}
// optional .opencv_caffe.NetParameter net_param = 25;
if (cached_has_bits & 0x00000080u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*net_param_);
}
}
if (cached_has_bits & 0x0000ff00u) {
// optional .opencv_caffe.NetState train_state = 26;
if (cached_has_bits & 0x00000100u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*train_state_);
}
// optional int32 test_interval = 4 [default = 0];
if (cached_has_bits & 0x00000200u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_test_interval());
}
// optional float base_lr = 5;
if (cached_has_bits & 0x00000400u) {
total_size += 1 + 4;
}
// optional int32 display = 6;
if (cached_has_bits & 0x00000800u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_display());
}
// optional int32 max_iter = 7;
if (cached_has_bits & 0x00001000u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_max_iter());
}
// optional float gamma = 9;
if (cached_has_bits & 0x00002000u) {
total_size += 1 + 4;
}
// optional float power = 10;
if (cached_has_bits & 0x00004000u) {
total_size += 1 + 4;
}
// optional float momentum = 11;
if (cached_has_bits & 0x00008000u) {
total_size += 1 + 4;
}
}
if (cached_has_bits & 0x00ff0000u) {
// optional float weight_decay = 12;
if (cached_has_bits & 0x00010000u) {
total_size += 1 + 4;
}
// optional int32 stepsize = 13;
if (cached_has_bits & 0x00020000u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_stepsize());
}
// optional int32 snapshot = 14 [default = 0];
if (cached_has_bits & 0x00040000u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_snapshot());
}
// optional int32 device_id = 18 [default = 0];
if (cached_has_bits & 0x00080000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_device_id());
}
// optional bool test_compute_loss = 19 [default = false];
if (cached_has_bits & 0x00100000u) {
total_size += 2 + 1;
}
// optional bool snapshot_diff = 16 [default = false];
if (cached_has_bits & 0x00200000u) {
total_size += 2 + 1;
}
// optional bool debug_info = 23 [default = false];
if (cached_has_bits & 0x00400000u) {
total_size += 2 + 1;
}
// optional .opencv_caffe.SolverParameter.SolverType solver_type = 30 [default = SGD];
if (cached_has_bits & 0x00800000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_solver_type());
}
}
if (cached_has_bits & 0xff000000u) {
// optional float momentum2 = 39 [default = 0.999];
if (cached_has_bits & 0x01000000u) {
total_size += 2 + 4;
}
// optional int64 random_seed = 20 [default = -1];
if (cached_has_bits & 0x02000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size(
this->_internal_random_seed());
}
// optional .opencv_caffe.SolverParameter.SolverMode solver_mode = 17 [default = GPU];
if (cached_has_bits & 0x04000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_solver_mode());
}
// optional bool test_initialization = 32 [default = true];
if (cached_has_bits & 0x08000000u) {
total_size += 2 + 1;
}
// optional bool snapshot_after_train = 28 [default = true];
if (cached_has_bits & 0x10000000u) {
total_size += 2 + 1;
}
// optional float delta = 31 [default = 1e-08];
if (cached_has_bits & 0x20000000u) {
total_size += 2 + 4;
}
// optional int32 average_loss = 33 [default = 1];
if (cached_has_bits & 0x40000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_average_loss());
}
// optional float clip_gradients = 35 [default = -1];
if (cached_has_bits & 0x80000000u) {
total_size += 2 + 4;
}
}
cached_has_bits = _has_bits_[1];
if (cached_has_bits & 0x00000007u) {
// optional int32 iter_size = 36 [default = 1];
if (cached_has_bits & 0x00000001u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_iter_size());
}
// optional .opencv_caffe.SolverParameter.SnapshotFormat snapshot_format = 37 [default = BINARYPROTO];
if (cached_has_bits & 0x00000002u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_snapshot_format());
}
// optional float rms_decay = 38 [default = 0.99];
if (cached_has_bits & 0x00000004u) {
total_size += 2 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SolverParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
SolverParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SolverParameter::GetClassData() const { return &_class_data_; }
void SolverParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<SolverParameter *>(to)->MergeFrom(
static_cast<const SolverParameter &>(from));
}
void SolverParameter::MergeFrom(const SolverParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.SolverParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
test_net_.MergeFrom(from.test_net_);
test_iter_.MergeFrom(from.test_iter_);
test_net_param_.MergeFrom(from.test_net_param_);
test_state_.MergeFrom(from.test_state_);
stepvalue_.MergeFrom(from.stepvalue_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_train_net(from._internal_train_net());
}
if (cached_has_bits & 0x00000002u) {
_internal_set_lr_policy(from._internal_lr_policy());
}
if (cached_has_bits & 0x00000004u) {
_internal_set_snapshot_prefix(from._internal_snapshot_prefix());
}
if (cached_has_bits & 0x00000008u) {
_internal_set_net(from._internal_net());
}
if (cached_has_bits & 0x00000010u) {
_internal_set_regularization_type(from._internal_regularization_type());
}
if (cached_has_bits & 0x00000020u) {
_internal_set_type(from._internal_type());
}
if (cached_has_bits & 0x00000040u) {
_internal_mutable_train_net_param()->::opencv_caffe::NetParameter::MergeFrom(from._internal_train_net_param());
}
if (cached_has_bits & 0x00000080u) {
_internal_mutable_net_param()->::opencv_caffe::NetParameter::MergeFrom(from._internal_net_param());
}
}
if (cached_has_bits & 0x0000ff00u) {
if (cached_has_bits & 0x00000100u) {
_internal_mutable_train_state()->::opencv_caffe::NetState::MergeFrom(from._internal_train_state());
}
if (cached_has_bits & 0x00000200u) {
test_interval_ = from.test_interval_;
}
if (cached_has_bits & 0x00000400u) {
base_lr_ = from.base_lr_;
}
if (cached_has_bits & 0x00000800u) {
display_ = from.display_;
}
if (cached_has_bits & 0x00001000u) {
max_iter_ = from.max_iter_;
}
if (cached_has_bits & 0x00002000u) {
gamma_ = from.gamma_;
}
if (cached_has_bits & 0x00004000u) {
power_ = from.power_;
}
if (cached_has_bits & 0x00008000u) {
momentum_ = from.momentum_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00ff0000u) {
if (cached_has_bits & 0x00010000u) {
weight_decay_ = from.weight_decay_;
}
if (cached_has_bits & 0x00020000u) {
stepsize_ = from.stepsize_;
}
if (cached_has_bits & 0x00040000u) {
snapshot_ = from.snapshot_;
}
if (cached_has_bits & 0x00080000u) {
device_id_ = from.device_id_;
}
if (cached_has_bits & 0x00100000u) {
test_compute_loss_ = from.test_compute_loss_;
}
if (cached_has_bits & 0x00200000u) {
snapshot_diff_ = from.snapshot_diff_;
}
if (cached_has_bits & 0x00400000u) {
debug_info_ = from.debug_info_;
}
if (cached_has_bits & 0x00800000u) {
solver_type_ = from.solver_type_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0xff000000u) {
if (cached_has_bits & 0x01000000u) {
momentum2_ = from.momentum2_;
}
if (cached_has_bits & 0x02000000u) {
random_seed_ = from.random_seed_;
}
if (cached_has_bits & 0x04000000u) {
solver_mode_ = from.solver_mode_;
}
if (cached_has_bits & 0x08000000u) {
test_initialization_ = from.test_initialization_;
}
if (cached_has_bits & 0x10000000u) {
snapshot_after_train_ = from.snapshot_after_train_;
}
if (cached_has_bits & 0x20000000u) {
delta_ = from.delta_;
}
if (cached_has_bits & 0x40000000u) {
average_loss_ = from.average_loss_;
}
if (cached_has_bits & 0x80000000u) {
clip_gradients_ = from.clip_gradients_;
}
_has_bits_[0] |= cached_has_bits;
}
cached_has_bits = from._has_bits_[1];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
iter_size_ = from.iter_size_;
}
if (cached_has_bits & 0x00000002u) {
snapshot_format_ = from.snapshot_format_;
}
if (cached_has_bits & 0x00000004u) {
rms_decay_ = from.rms_decay_;
}
_has_bits_[1] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void SolverParameter::CopyFrom(const SolverParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.SolverParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SolverParameter::IsInitialized() const {
if (!::PROTOBUF_NAMESPACE_ID::internal::AllAreInitialized(test_net_param_))
return false;
if (_internal_has_train_net_param()) {
if (!train_net_param_->IsInitialized()) return false;
}
if (_internal_has_net_param()) {
if (!net_param_->IsInitialized()) return false;
}
return true;
}
void SolverParameter::InternalSwap(SolverParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(_has_bits_[1], other->_has_bits_[1]);
test_net_.InternalSwap(&other->test_net_);
test_iter_.InternalSwap(&other->test_iter_);
test_net_param_.InternalSwap(&other->test_net_param_);
test_state_.InternalSwap(&other->test_state_);
stepvalue_.InternalSwap(&other->stepvalue_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&train_net_, lhs_arena,
&other->train_net_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&lr_policy_, lhs_arena,
&other->lr_policy_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&snapshot_prefix_, lhs_arena,
&other->snapshot_prefix_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&net_, lhs_arena,
&other->net_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
nullptr,
&regularization_type_, lhs_arena,
&other->regularization_type_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
nullptr,
&type_, lhs_arena,
&other->type_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(SolverParameter, solver_type_)
+ sizeof(SolverParameter::solver_type_)
- PROTOBUF_FIELD_OFFSET(SolverParameter, train_net_param_)>(
reinterpret_cast<char*>(&train_net_param_),
reinterpret_cast<char*>(&other->train_net_param_));
swap(momentum2_, other->momentum2_);
swap(random_seed_, other->random_seed_);
swap(solver_mode_, other->solver_mode_);
swap(test_initialization_, other->test_initialization_);
swap(snapshot_after_train_, other->snapshot_after_train_);
swap(delta_, other->delta_);
swap(average_loss_, other->average_loss_);
swap(clip_gradients_, other->clip_gradients_);
swap(iter_size_, other->iter_size_);
swap(snapshot_format_, other->snapshot_format_);
swap(rms_decay_, other->rms_decay_);
}
::PROTOBUF_NAMESPACE_ID::Metadata SolverParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[10]);
}
// ===================================================================
class SolverState::_Internal {
public:
using HasBits = decltype(std::declval<SolverState>()._has_bits_);
static void set_has_iter(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_learned_net(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_current_step(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
SolverState::SolverState(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
history_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.SolverState)
}
SolverState::SolverState(const SolverState& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
history_(from.history_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
learned_net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
learned_net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_learned_net()) {
learned_net_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_learned_net(),
GetArenaForAllocation());
}
::memcpy(&iter_, &from.iter_,
static_cast<size_t>(reinterpret_cast<char*>(&current_step_) -
reinterpret_cast<char*>(&iter_)) + sizeof(current_step_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.SolverState)
}
inline void SolverState::SharedCtor() {
learned_net_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
learned_net_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&iter_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&current_step_) -
reinterpret_cast<char*>(&iter_)) + sizeof(current_step_));
}
SolverState::~SolverState() {
// @@protoc_insertion_point(destructor:opencv_caffe.SolverState)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void SolverState::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
learned_net_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void SolverState::ArenaDtor(void* object) {
SolverState* _this = reinterpret_cast< SolverState* >(object);
(void)_this;
}
void SolverState::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SolverState::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void SolverState::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.SolverState)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
history_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
learned_net_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000006u) {
::memset(&iter_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&current_step_) -
reinterpret_cast<char*>(&iter_)) + sizeof(current_step_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* SolverState::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 iter = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_iter(&has_bits);
iter_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string learned_net = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_learned_net();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SolverState.learned_net");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.BlobProto history = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_history(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
// optional int32 current_step = 4 [default = 0];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_current_step(&has_bits);
current_step_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* SolverState::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SolverState)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int32 iter = 1;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_iter(), target);
}
// optional string learned_net = 2;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_learned_net().data(), static_cast<int>(this->_internal_learned_net().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SolverState.learned_net");
target = stream->WriteStringMaybeAliased(
2, this->_internal_learned_net(), target);
}
// repeated .opencv_caffe.BlobProto history = 3;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_history_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, this->_internal_history(i), target, stream);
}
// optional int32 current_step = 4 [default = 0];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(4, this->_internal_current_step(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.SolverState)
return target;
}
size_t SolverState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SolverState)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .opencv_caffe.BlobProto history = 3;
total_size += 1UL * this->_internal_history_size();
for (const auto& msg : this->history_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional string learned_net = 2;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_learned_net());
}
// optional int32 iter = 1;
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_iter());
}
// optional int32 current_step = 4 [default = 0];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_current_step());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SolverState::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
SolverState::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SolverState::GetClassData() const { return &_class_data_; }
void SolverState::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<SolverState *>(to)->MergeFrom(
static_cast<const SolverState &>(from));
}
void SolverState::MergeFrom(const SolverState& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.SolverState)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
history_.MergeFrom(from.history_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
_internal_set_learned_net(from._internal_learned_net());
}
if (cached_has_bits & 0x00000002u) {
iter_ = from.iter_;
}
if (cached_has_bits & 0x00000004u) {
current_step_ = from.current_step_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void SolverState::CopyFrom(const SolverState& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.SolverState)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SolverState::IsInitialized() const {
return true;
}
void SolverState::InternalSwap(SolverState* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
history_.InternalSwap(&other->history_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&learned_net_, lhs_arena,
&other->learned_net_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(SolverState, current_step_)
+ sizeof(SolverState::current_step_)
- PROTOBUF_FIELD_OFFSET(SolverState, iter_)>(
reinterpret_cast<char*>(&iter_),
reinterpret_cast<char*>(&other->iter_));
}
::PROTOBUF_NAMESPACE_ID::Metadata SolverState::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[11]);
}
// ===================================================================
class NetState::_Internal {
public:
using HasBits = decltype(std::declval<NetState>()._has_bits_);
static void set_has_phase(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_level(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
NetState::NetState(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
stage_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.NetState)
}
NetState::NetState(const NetState& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
stage_(from.stage_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&level_, &from.level_,
static_cast<size_t>(reinterpret_cast<char*>(&phase_) -
reinterpret_cast<char*>(&level_)) + sizeof(phase_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.NetState)
}
inline void NetState::SharedCtor() {
level_ = 0;
phase_ = 1;
}
NetState::~NetState() {
// @@protoc_insertion_point(destructor:opencv_caffe.NetState)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void NetState::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void NetState::ArenaDtor(void* object) {
NetState* _this = reinterpret_cast< NetState* >(object);
(void)_this;
}
void NetState::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NetState::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void NetState::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.NetState)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
stage_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
level_ = 0;
phase_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* NetState::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.Phase phase = 1 [default = TEST];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::Phase_IsValid(val))) {
_internal_set_phase(static_cast<::opencv_caffe::Phase>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional int32 level = 2 [default = 0];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_level(&has_bits);
level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated string stage = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_stage();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.NetState.stage");
#endif // !NDEBUG
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* NetState::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NetState)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.Phase phase = 1 [default = TEST];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_phase(), target);
}
// optional int32 level = 2 [default = 0];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_level(), target);
}
// repeated string stage = 3;
for (int i = 0, n = this->_internal_stage_size(); i < n; i++) {
const auto& s = this->_internal_stage(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.NetState.stage");
target = stream->WriteString(3, s, target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.NetState)
return target;
}
size_t NetState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NetState)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string stage = 3;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(stage_.size());
for (int i = 0, n = stage_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
stage_.Get(i));
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional int32 level = 2 [default = 0];
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_level());
}
// optional .opencv_caffe.Phase phase = 1 [default = TEST];
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_phase());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NetState::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
NetState::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NetState::GetClassData() const { return &_class_data_; }
void NetState::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<NetState *>(to)->MergeFrom(
static_cast<const NetState &>(from));
}
void NetState::MergeFrom(const NetState& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.NetState)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
stage_.MergeFrom(from.stage_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
level_ = from.level_;
}
if (cached_has_bits & 0x00000002u) {
phase_ = from.phase_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void NetState::CopyFrom(const NetState& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.NetState)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NetState::IsInitialized() const {
return true;
}
void NetState::InternalSwap(NetState* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
stage_.InternalSwap(&other->stage_);
swap(level_, other->level_);
swap(phase_, other->phase_);
}
::PROTOBUF_NAMESPACE_ID::Metadata NetState::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[12]);
}
// ===================================================================
class NetStateRule::_Internal {
public:
using HasBits = decltype(std::declval<NetStateRule>()._has_bits_);
static void set_has_phase(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_min_level(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_max_level(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
NetStateRule::NetStateRule(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
stage_(arena),
not_stage_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.NetStateRule)
}
NetStateRule::NetStateRule(const NetStateRule& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
stage_(from.stage_),
not_stage_(from.not_stage_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&phase_, &from.phase_,
static_cast<size_t>(reinterpret_cast<char*>(&max_level_) -
reinterpret_cast<char*>(&phase_)) + sizeof(max_level_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.NetStateRule)
}
inline void NetStateRule::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&phase_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&max_level_) -
reinterpret_cast<char*>(&phase_)) + sizeof(max_level_));
}
NetStateRule::~NetStateRule() {
// @@protoc_insertion_point(destructor:opencv_caffe.NetStateRule)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void NetStateRule::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void NetStateRule::ArenaDtor(void* object) {
NetStateRule* _this = reinterpret_cast< NetStateRule* >(object);
(void)_this;
}
void NetStateRule::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NetStateRule::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void NetStateRule::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.NetStateRule)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
stage_.Clear();
not_stage_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
::memset(&phase_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&max_level_) -
reinterpret_cast<char*>(&phase_)) + sizeof(max_level_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* NetStateRule::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.Phase phase = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::Phase_IsValid(val))) {
_internal_set_phase(static_cast<::opencv_caffe::Phase>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional int32 min_level = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_min_level(&has_bits);
min_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 max_level = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_max_level(&has_bits);
max_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated string stage = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_stage();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.NetStateRule.stage");
#endif // !NDEBUG
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
} else
goto handle_unusual;
continue;
// repeated string not_stage = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_not_stage();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.NetStateRule.not_stage");
#endif // !NDEBUG
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* NetStateRule::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NetStateRule)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.Phase phase = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_phase(), target);
}
// optional int32 min_level = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_min_level(), target);
}
// optional int32 max_level = 3;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_max_level(), target);
}
// repeated string stage = 4;
for (int i = 0, n = this->_internal_stage_size(); i < n; i++) {
const auto& s = this->_internal_stage(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.NetStateRule.stage");
target = stream->WriteString(4, s, target);
}
// repeated string not_stage = 5;
for (int i = 0, n = this->_internal_not_stage_size(); i < n; i++) {
const auto& s = this->_internal_not_stage(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.NetStateRule.not_stage");
target = stream->WriteString(5, s, target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.NetStateRule)
return target;
}
size_t NetStateRule::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NetStateRule)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string stage = 4;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(stage_.size());
for (int i = 0, n = stage_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
stage_.Get(i));
}
// repeated string not_stage = 5;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(not_stage_.size());
for (int i = 0, n = not_stage_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
not_stage_.Get(i));
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional .opencv_caffe.Phase phase = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_phase());
}
// optional int32 min_level = 2;
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_min_level());
}
// optional int32 max_level = 3;
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_max_level());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NetStateRule::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
NetStateRule::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NetStateRule::GetClassData() const { return &_class_data_; }
void NetStateRule::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<NetStateRule *>(to)->MergeFrom(
static_cast<const NetStateRule &>(from));
}
void NetStateRule::MergeFrom(const NetStateRule& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.NetStateRule)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
stage_.MergeFrom(from.stage_);
not_stage_.MergeFrom(from.not_stage_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
phase_ = from.phase_;
}
if (cached_has_bits & 0x00000002u) {
min_level_ = from.min_level_;
}
if (cached_has_bits & 0x00000004u) {
max_level_ = from.max_level_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void NetStateRule::CopyFrom(const NetStateRule& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.NetStateRule)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NetStateRule::IsInitialized() const {
return true;
}
void NetStateRule::InternalSwap(NetStateRule* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
stage_.InternalSwap(&other->stage_);
not_stage_.InternalSwap(&other->not_stage_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(NetStateRule, max_level_)
+ sizeof(NetStateRule::max_level_)
- PROTOBUF_FIELD_OFFSET(NetStateRule, phase_)>(
reinterpret_cast<char*>(&phase_),
reinterpret_cast<char*>(&other->phase_));
}
::PROTOBUF_NAMESPACE_ID::Metadata NetStateRule::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[13]);
}
// ===================================================================
class ParamSpec::_Internal {
public:
using HasBits = decltype(std::declval<ParamSpec>()._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_share_mode(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_lr_mult(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_decay_mult(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
};
ParamSpec::ParamSpec(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ParamSpec)
}
ParamSpec::ParamSpec(const ParamSpec& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
::memcpy(&share_mode_, &from.share_mode_,
static_cast<size_t>(reinterpret_cast<char*>(&decay_mult_) -
reinterpret_cast<char*>(&share_mode_)) + sizeof(decay_mult_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ParamSpec)
}
inline void ParamSpec::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
share_mode_ = 0;
lr_mult_ = 1;
decay_mult_ = 1;
}
ParamSpec::~ParamSpec() {
// @@protoc_insertion_point(destructor:opencv_caffe.ParamSpec)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ParamSpec::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void ParamSpec::ArenaDtor(void* object) {
ParamSpec* _this = reinterpret_cast< ParamSpec* >(object);
(void)_this;
}
void ParamSpec::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ParamSpec::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ParamSpec::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ParamSpec)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x0000000eu) {
share_mode_ = 0;
lr_mult_ = 1;
decay_mult_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ParamSpec::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.ParamSpec.name");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ParamSpec.DimCheckMode share_mode = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::ParamSpec_DimCheckMode_IsValid(val))) {
_internal_set_share_mode(static_cast<::opencv_caffe::ParamSpec_DimCheckMode>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional float lr_mult = 3 [default = 1];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_lr_mult(&has_bits);
lr_mult_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float decay_mult = 4 [default = 1];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
_Internal::set_has_decay_mult(&has_bits);
decay_mult_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ParamSpec::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ParamSpec)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.ParamSpec.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// optional .opencv_caffe.ParamSpec.DimCheckMode share_mode = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
2, this->_internal_share_mode(), target);
}
// optional float lr_mult = 3 [default = 1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_lr_mult(), target);
}
// optional float decay_mult = 4 [default = 1];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_decay_mult(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ParamSpec)
return target;
}
size_t ParamSpec::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ParamSpec)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// optional .opencv_caffe.ParamSpec.DimCheckMode share_mode = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_share_mode());
}
// optional float lr_mult = 3 [default = 1];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
// optional float decay_mult = 4 [default = 1];
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ParamSpec::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ParamSpec::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ParamSpec::GetClassData() const { return &_class_data_; }
void ParamSpec::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ParamSpec *>(to)->MergeFrom(
static_cast<const ParamSpec &>(from));
}
void ParamSpec::MergeFrom(const ParamSpec& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ParamSpec)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
share_mode_ = from.share_mode_;
}
if (cached_has_bits & 0x00000004u) {
lr_mult_ = from.lr_mult_;
}
if (cached_has_bits & 0x00000008u) {
decay_mult_ = from.decay_mult_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ParamSpec::CopyFrom(const ParamSpec& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ParamSpec)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ParamSpec::IsInitialized() const {
return true;
}
void ParamSpec::InternalSwap(ParamSpec* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, lhs_arena,
&other->name_, rhs_arena
);
swap(share_mode_, other->share_mode_);
swap(lr_mult_, other->lr_mult_);
swap(decay_mult_, other->decay_mult_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ParamSpec::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[14]);
}
// ===================================================================
class LayerParameter::_Internal {
public:
using HasBits = decltype(std::declval<LayerParameter>()._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_type(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_phase(HasBits* has_bits) {
(*has_bits)[1] |= 16777216u;
}
static const ::opencv_caffe::TransformationParameter& transform_param(const LayerParameter* msg);
static void set_has_transform_param(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static const ::opencv_caffe::LossParameter& loss_param(const LayerParameter* msg);
static void set_has_loss_param(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static const ::opencv_caffe::AccuracyParameter& accuracy_param(const LayerParameter* msg);
static void set_has_accuracy_param(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static const ::opencv_caffe::ArgMaxParameter& argmax_param(const LayerParameter* msg);
static void set_has_argmax_param(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static const ::opencv_caffe::BatchNormParameter& batch_norm_param(const LayerParameter* msg);
static void set_has_batch_norm_param(HasBits* has_bits) {
(*has_bits)[1] |= 512u;
}
static const ::opencv_caffe::BiasParameter& bias_param(const LayerParameter* msg);
static void set_has_bias_param(HasBits* has_bits) {
(*has_bits)[1] |= 2048u;
}
static const ::opencv_caffe::ConcatParameter& concat_param(const LayerParameter* msg);
static void set_has_concat_param(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static const ::opencv_caffe::ContrastiveLossParameter& contrastive_loss_param(const LayerParameter* msg);
static void set_has_contrastive_loss_param(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static const ::opencv_caffe::ConvolutionParameter& convolution_param(const LayerParameter* msg);
static void set_has_convolution_param(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
static const ::opencv_caffe::CropParameter& crop_param(const LayerParameter* msg);
static void set_has_crop_param(HasBits* has_bits) {
(*has_bits)[1] |= 16384u;
}
static const ::opencv_caffe::DataParameter& data_param(const LayerParameter* msg);
static void set_has_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 512u;
}
static const ::opencv_caffe::DetectionOutputParameter& detection_output_param(const LayerParameter* msg);
static void set_has_detection_output_param(HasBits* has_bits) {
(*has_bits)[1] |= 131072u;
}
static const ::opencv_caffe::DropoutParameter& dropout_param(const LayerParameter* msg);
static void set_has_dropout_param(HasBits* has_bits) {
(*has_bits)[0] |= 1024u;
}
static const ::opencv_caffe::DummyDataParameter& dummy_data_param(const LayerParameter* msg);
static void set_has_dummy_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 2048u;
}
static const ::opencv_caffe::EltwiseParameter& eltwise_param(const LayerParameter* msg);
static void set_has_eltwise_param(HasBits* has_bits) {
(*has_bits)[0] |= 4096u;
}
static const ::opencv_caffe::ELUParameter& elu_param(const LayerParameter* msg);
static void set_has_elu_param(HasBits* has_bits) {
(*has_bits)[1] |= 1024u;
}
static const ::opencv_caffe::EmbedParameter& embed_param(const LayerParameter* msg);
static void set_has_embed_param(HasBits* has_bits) {
(*has_bits)[1] |= 128u;
}
static const ::opencv_caffe::ExpParameter& exp_param(const LayerParameter* msg);
static void set_has_exp_param(HasBits* has_bits) {
(*has_bits)[0] |= 8192u;
}
static const ::opencv_caffe::FlattenParameter& flatten_param(const LayerParameter* msg);
static void set_has_flatten_param(HasBits* has_bits) {
(*has_bits)[1] |= 32u;
}
static const ::opencv_caffe::HDF5DataParameter& hdf5_data_param(const LayerParameter* msg);
static void set_has_hdf5_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 16384u;
}
static const ::opencv_caffe::HDF5OutputParameter& hdf5_output_param(const LayerParameter* msg);
static void set_has_hdf5_output_param(HasBits* has_bits) {
(*has_bits)[0] |= 32768u;
}
static const ::opencv_caffe::HingeLossParameter& hinge_loss_param(const LayerParameter* msg);
static void set_has_hinge_loss_param(HasBits* has_bits) {
(*has_bits)[0] |= 65536u;
}
static const ::opencv_caffe::ImageDataParameter& image_data_param(const LayerParameter* msg);
static void set_has_image_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 131072u;
}
static const ::opencv_caffe::InfogainLossParameter& infogain_loss_param(const LayerParameter* msg);
static void set_has_infogain_loss_param(HasBits* has_bits) {
(*has_bits)[0] |= 262144u;
}
static const ::opencv_caffe::InnerProductParameter& inner_product_param(const LayerParameter* msg);
static void set_has_inner_product_param(HasBits* has_bits) {
(*has_bits)[0] |= 524288u;
}
static const ::opencv_caffe::InputParameter& input_param(const LayerParameter* msg);
static void set_has_input_param(HasBits* has_bits) {
(*has_bits)[1] |= 8192u;
}
static const ::opencv_caffe::LogParameter& log_param(const LayerParameter* msg);
static void set_has_log_param(HasBits* has_bits) {
(*has_bits)[1] |= 16u;
}
static const ::opencv_caffe::LRNParameter& lrn_param(const LayerParameter* msg);
static void set_has_lrn_param(HasBits* has_bits) {
(*has_bits)[0] |= 1048576u;
}
static const ::opencv_caffe::MemoryDataParameter& memory_data_param(const LayerParameter* msg);
static void set_has_memory_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 2097152u;
}
static const ::opencv_caffe::MVNParameter& mvn_param(const LayerParameter* msg);
static void set_has_mvn_param(HasBits* has_bits) {
(*has_bits)[0] |= 4194304u;
}
static const ::opencv_caffe::NormalizeBBoxParameter& norm_param(const LayerParameter* msg);
static void set_has_norm_param(HasBits* has_bits) {
(*has_bits)[1] |= 524288u;
}
static const ::opencv_caffe::PermuteParameter& permute_param(const LayerParameter* msg);
static void set_has_permute_param(HasBits* has_bits) {
(*has_bits)[1] |= 262144u;
}
static const ::opencv_caffe::ParameterParameter& parameter_param(const LayerParameter* msg);
static void set_has_parameter_param(HasBits* has_bits) {
(*has_bits)[1] |= 32768u;
}
static const ::opencv_caffe::PoolingParameter& pooling_param(const LayerParameter* msg);
static void set_has_pooling_param(HasBits* has_bits) {
(*has_bits)[0] |= 8388608u;
}
static const ::opencv_caffe::PowerParameter& power_param(const LayerParameter* msg);
static void set_has_power_param(HasBits* has_bits) {
(*has_bits)[0] |= 16777216u;
}
static const ::opencv_caffe::PReLUParameter& prelu_param(const LayerParameter* msg);
static void set_has_prelu_param(HasBits* has_bits) {
(*has_bits)[1] |= 2u;
}
static const ::opencv_caffe::PriorBoxParameter& prior_box_param(const LayerParameter* msg);
static void set_has_prior_box_param(HasBits* has_bits) {
(*has_bits)[1] |= 1048576u;
}
static const ::opencv_caffe::ProposalParameter& proposal_param(const LayerParameter* msg);
static void set_has_proposal_param(HasBits* has_bits) {
(*has_bits)[1] |= 2097152u;
}
static const ::opencv_caffe::PSROIPoolingParameter& psroi_pooling_param(const LayerParameter* msg);
static void set_has_psroi_pooling_param(HasBits* has_bits) {
(*has_bits)[1] |= 4194304u;
}
static const ::opencv_caffe::PythonParameter& python_param(const LayerParameter* msg);
static void set_has_python_param(HasBits* has_bits) {
(*has_bits)[1] |= 1u;
}
static const ::opencv_caffe::RecurrentParameter& recurrent_param(const LayerParameter* msg);
static void set_has_recurrent_param(HasBits* has_bits) {
(*has_bits)[1] |= 65536u;
}
static const ::opencv_caffe::ReductionParameter& reduction_param(const LayerParameter* msg);
static void set_has_reduction_param(HasBits* has_bits) {
(*has_bits)[1] |= 64u;
}
static const ::opencv_caffe::ReLUParameter& relu_param(const LayerParameter* msg);
static void set_has_relu_param(HasBits* has_bits) {
(*has_bits)[0] |= 33554432u;
}
static const ::opencv_caffe::ReshapeParameter& reshape_param(const LayerParameter* msg);
static void set_has_reshape_param(HasBits* has_bits) {
(*has_bits)[1] |= 8u;
}
static const ::opencv_caffe::ROIPoolingParameter& roi_pooling_param(const LayerParameter* msg);
static void set_has_roi_pooling_param(HasBits* has_bits) {
(*has_bits)[1] |= 8388608u;
}
static const ::opencv_caffe::ScaleParameter& scale_param(const LayerParameter* msg);
static void set_has_scale_param(HasBits* has_bits) {
(*has_bits)[1] |= 4096u;
}
static const ::opencv_caffe::SigmoidParameter& sigmoid_param(const LayerParameter* msg);
static void set_has_sigmoid_param(HasBits* has_bits) {
(*has_bits)[0] |= 67108864u;
}
static const ::opencv_caffe::SoftmaxParameter& softmax_param(const LayerParameter* msg);
static void set_has_softmax_param(HasBits* has_bits) {
(*has_bits)[0] |= 134217728u;
}
static const ::opencv_caffe::SPPParameter& spp_param(const LayerParameter* msg);
static void set_has_spp_param(HasBits* has_bits) {
(*has_bits)[1] |= 4u;
}
static const ::opencv_caffe::SliceParameter& slice_param(const LayerParameter* msg);
static void set_has_slice_param(HasBits* has_bits) {
(*has_bits)[0] |= 268435456u;
}
static const ::opencv_caffe::TanHParameter& tanh_param(const LayerParameter* msg);
static void set_has_tanh_param(HasBits* has_bits) {
(*has_bits)[0] |= 536870912u;
}
static const ::opencv_caffe::ThresholdParameter& threshold_param(const LayerParameter* msg);
static void set_has_threshold_param(HasBits* has_bits) {
(*has_bits)[0] |= 1073741824u;
}
static const ::opencv_caffe::TileParameter& tile_param(const LayerParameter* msg);
static void set_has_tile_param(HasBits* has_bits) {
(*has_bits)[1] |= 256u;
}
static const ::opencv_caffe::WindowDataParameter& window_data_param(const LayerParameter* msg);
static void set_has_window_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 2147483648u;
}
};
const ::opencv_caffe::TransformationParameter&
LayerParameter::_Internal::transform_param(const LayerParameter* msg) {
return *msg->transform_param_;
}
const ::opencv_caffe::LossParameter&
LayerParameter::_Internal::loss_param(const LayerParameter* msg) {
return *msg->loss_param_;
}
const ::opencv_caffe::AccuracyParameter&
LayerParameter::_Internal::accuracy_param(const LayerParameter* msg) {
return *msg->accuracy_param_;
}
const ::opencv_caffe::ArgMaxParameter&
LayerParameter::_Internal::argmax_param(const LayerParameter* msg) {
return *msg->argmax_param_;
}
const ::opencv_caffe::BatchNormParameter&
LayerParameter::_Internal::batch_norm_param(const LayerParameter* msg) {
return *msg->batch_norm_param_;
}
const ::opencv_caffe::BiasParameter&
LayerParameter::_Internal::bias_param(const LayerParameter* msg) {
return *msg->bias_param_;
}
const ::opencv_caffe::ConcatParameter&
LayerParameter::_Internal::concat_param(const LayerParameter* msg) {
return *msg->concat_param_;
}
const ::opencv_caffe::ContrastiveLossParameter&
LayerParameter::_Internal::contrastive_loss_param(const LayerParameter* msg) {
return *msg->contrastive_loss_param_;
}
const ::opencv_caffe::ConvolutionParameter&
LayerParameter::_Internal::convolution_param(const LayerParameter* msg) {
return *msg->convolution_param_;
}
const ::opencv_caffe::CropParameter&
LayerParameter::_Internal::crop_param(const LayerParameter* msg) {
return *msg->crop_param_;
}
const ::opencv_caffe::DataParameter&
LayerParameter::_Internal::data_param(const LayerParameter* msg) {
return *msg->data_param_;
}
const ::opencv_caffe::DetectionOutputParameter&
LayerParameter::_Internal::detection_output_param(const LayerParameter* msg) {
return *msg->detection_output_param_;
}
const ::opencv_caffe::DropoutParameter&
LayerParameter::_Internal::dropout_param(const LayerParameter* msg) {
return *msg->dropout_param_;
}
const ::opencv_caffe::DummyDataParameter&
LayerParameter::_Internal::dummy_data_param(const LayerParameter* msg) {
return *msg->dummy_data_param_;
}
const ::opencv_caffe::EltwiseParameter&
LayerParameter::_Internal::eltwise_param(const LayerParameter* msg) {
return *msg->eltwise_param_;
}
const ::opencv_caffe::ELUParameter&
LayerParameter::_Internal::elu_param(const LayerParameter* msg) {
return *msg->elu_param_;
}
const ::opencv_caffe::EmbedParameter&
LayerParameter::_Internal::embed_param(const LayerParameter* msg) {
return *msg->embed_param_;
}
const ::opencv_caffe::ExpParameter&
LayerParameter::_Internal::exp_param(const LayerParameter* msg) {
return *msg->exp_param_;
}
const ::opencv_caffe::FlattenParameter&
LayerParameter::_Internal::flatten_param(const LayerParameter* msg) {
return *msg->flatten_param_;
}
const ::opencv_caffe::HDF5DataParameter&
LayerParameter::_Internal::hdf5_data_param(const LayerParameter* msg) {
return *msg->hdf5_data_param_;
}
const ::opencv_caffe::HDF5OutputParameter&
LayerParameter::_Internal::hdf5_output_param(const LayerParameter* msg) {
return *msg->hdf5_output_param_;
}
const ::opencv_caffe::HingeLossParameter&
LayerParameter::_Internal::hinge_loss_param(const LayerParameter* msg) {
return *msg->hinge_loss_param_;
}
const ::opencv_caffe::ImageDataParameter&
LayerParameter::_Internal::image_data_param(const LayerParameter* msg) {
return *msg->image_data_param_;
}
const ::opencv_caffe::InfogainLossParameter&
LayerParameter::_Internal::infogain_loss_param(const LayerParameter* msg) {
return *msg->infogain_loss_param_;
}
const ::opencv_caffe::InnerProductParameter&
LayerParameter::_Internal::inner_product_param(const LayerParameter* msg) {
return *msg->inner_product_param_;
}
const ::opencv_caffe::InputParameter&
LayerParameter::_Internal::input_param(const LayerParameter* msg) {
return *msg->input_param_;
}
const ::opencv_caffe::LogParameter&
LayerParameter::_Internal::log_param(const LayerParameter* msg) {
return *msg->log_param_;
}
const ::opencv_caffe::LRNParameter&
LayerParameter::_Internal::lrn_param(const LayerParameter* msg) {
return *msg->lrn_param_;
}
const ::opencv_caffe::MemoryDataParameter&
LayerParameter::_Internal::memory_data_param(const LayerParameter* msg) {
return *msg->memory_data_param_;
}
const ::opencv_caffe::MVNParameter&
LayerParameter::_Internal::mvn_param(const LayerParameter* msg) {
return *msg->mvn_param_;
}
const ::opencv_caffe::NormalizeBBoxParameter&
LayerParameter::_Internal::norm_param(const LayerParameter* msg) {
return *msg->norm_param_;
}
const ::opencv_caffe::PermuteParameter&
LayerParameter::_Internal::permute_param(const LayerParameter* msg) {
return *msg->permute_param_;
}
const ::opencv_caffe::ParameterParameter&
LayerParameter::_Internal::parameter_param(const LayerParameter* msg) {
return *msg->parameter_param_;
}
const ::opencv_caffe::PoolingParameter&
LayerParameter::_Internal::pooling_param(const LayerParameter* msg) {
return *msg->pooling_param_;
}
const ::opencv_caffe::PowerParameter&
LayerParameter::_Internal::power_param(const LayerParameter* msg) {
return *msg->power_param_;
}
const ::opencv_caffe::PReLUParameter&
LayerParameter::_Internal::prelu_param(const LayerParameter* msg) {
return *msg->prelu_param_;
}
const ::opencv_caffe::PriorBoxParameter&
LayerParameter::_Internal::prior_box_param(const LayerParameter* msg) {
return *msg->prior_box_param_;
}
const ::opencv_caffe::ProposalParameter&
LayerParameter::_Internal::proposal_param(const LayerParameter* msg) {
return *msg->proposal_param_;
}
const ::opencv_caffe::PSROIPoolingParameter&
LayerParameter::_Internal::psroi_pooling_param(const LayerParameter* msg) {
return *msg->psroi_pooling_param_;
}
const ::opencv_caffe::PythonParameter&
LayerParameter::_Internal::python_param(const LayerParameter* msg) {
return *msg->python_param_;
}
const ::opencv_caffe::RecurrentParameter&
LayerParameter::_Internal::recurrent_param(const LayerParameter* msg) {
return *msg->recurrent_param_;
}
const ::opencv_caffe::ReductionParameter&
LayerParameter::_Internal::reduction_param(const LayerParameter* msg) {
return *msg->reduction_param_;
}
const ::opencv_caffe::ReLUParameter&
LayerParameter::_Internal::relu_param(const LayerParameter* msg) {
return *msg->relu_param_;
}
const ::opencv_caffe::ReshapeParameter&
LayerParameter::_Internal::reshape_param(const LayerParameter* msg) {
return *msg->reshape_param_;
}
const ::opencv_caffe::ROIPoolingParameter&
LayerParameter::_Internal::roi_pooling_param(const LayerParameter* msg) {
return *msg->roi_pooling_param_;
}
const ::opencv_caffe::ScaleParameter&
LayerParameter::_Internal::scale_param(const LayerParameter* msg) {
return *msg->scale_param_;
}
const ::opencv_caffe::SigmoidParameter&
LayerParameter::_Internal::sigmoid_param(const LayerParameter* msg) {
return *msg->sigmoid_param_;
}
const ::opencv_caffe::SoftmaxParameter&
LayerParameter::_Internal::softmax_param(const LayerParameter* msg) {
return *msg->softmax_param_;
}
const ::opencv_caffe::SPPParameter&
LayerParameter::_Internal::spp_param(const LayerParameter* msg) {
return *msg->spp_param_;
}
const ::opencv_caffe::SliceParameter&
LayerParameter::_Internal::slice_param(const LayerParameter* msg) {
return *msg->slice_param_;
}
const ::opencv_caffe::TanHParameter&
LayerParameter::_Internal::tanh_param(const LayerParameter* msg) {
return *msg->tanh_param_;
}
const ::opencv_caffe::ThresholdParameter&
LayerParameter::_Internal::threshold_param(const LayerParameter* msg) {
return *msg->threshold_param_;
}
const ::opencv_caffe::TileParameter&
LayerParameter::_Internal::tile_param(const LayerParameter* msg) {
return *msg->tile_param_;
}
const ::opencv_caffe::WindowDataParameter&
LayerParameter::_Internal::window_data_param(const LayerParameter* msg) {
return *msg->window_data_param_;
}
LayerParameter::LayerParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
bottom_(arena),
top_(arena),
loss_weight_(arena),
param_(arena),
blobs_(arena),
include_(arena),
exclude_(arena),
propagate_down_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.LayerParameter)
}
LayerParameter::LayerParameter(const LayerParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
bottom_(from.bottom_),
top_(from.top_),
loss_weight_(from.loss_weight_),
param_(from.param_),
blobs_(from.blobs_),
include_(from.include_),
exclude_(from.exclude_),
propagate_down_(from.propagate_down_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_type()) {
type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type(),
GetArenaForAllocation());
}
if (from._internal_has_transform_param()) {
transform_param_ = new ::opencv_caffe::TransformationParameter(*from.transform_param_);
} else {
transform_param_ = nullptr;
}
if (from._internal_has_loss_param()) {
loss_param_ = new ::opencv_caffe::LossParameter(*from.loss_param_);
} else {
loss_param_ = nullptr;
}
if (from._internal_has_accuracy_param()) {
accuracy_param_ = new ::opencv_caffe::AccuracyParameter(*from.accuracy_param_);
} else {
accuracy_param_ = nullptr;
}
if (from._internal_has_argmax_param()) {
argmax_param_ = new ::opencv_caffe::ArgMaxParameter(*from.argmax_param_);
} else {
argmax_param_ = nullptr;
}
if (from._internal_has_concat_param()) {
concat_param_ = new ::opencv_caffe::ConcatParameter(*from.concat_param_);
} else {
concat_param_ = nullptr;
}
if (from._internal_has_contrastive_loss_param()) {
contrastive_loss_param_ = new ::opencv_caffe::ContrastiveLossParameter(*from.contrastive_loss_param_);
} else {
contrastive_loss_param_ = nullptr;
}
if (from._internal_has_convolution_param()) {
convolution_param_ = new ::opencv_caffe::ConvolutionParameter(*from.convolution_param_);
} else {
convolution_param_ = nullptr;
}
if (from._internal_has_data_param()) {
data_param_ = new ::opencv_caffe::DataParameter(*from.data_param_);
} else {
data_param_ = nullptr;
}
if (from._internal_has_dropout_param()) {
dropout_param_ = new ::opencv_caffe::DropoutParameter(*from.dropout_param_);
} else {
dropout_param_ = nullptr;
}
if (from._internal_has_dummy_data_param()) {
dummy_data_param_ = new ::opencv_caffe::DummyDataParameter(*from.dummy_data_param_);
} else {
dummy_data_param_ = nullptr;
}
if (from._internal_has_eltwise_param()) {
eltwise_param_ = new ::opencv_caffe::EltwiseParameter(*from.eltwise_param_);
} else {
eltwise_param_ = nullptr;
}
if (from._internal_has_exp_param()) {
exp_param_ = new ::opencv_caffe::ExpParameter(*from.exp_param_);
} else {
exp_param_ = nullptr;
}
if (from._internal_has_hdf5_data_param()) {
hdf5_data_param_ = new ::opencv_caffe::HDF5DataParameter(*from.hdf5_data_param_);
} else {
hdf5_data_param_ = nullptr;
}
if (from._internal_has_hdf5_output_param()) {
hdf5_output_param_ = new ::opencv_caffe::HDF5OutputParameter(*from.hdf5_output_param_);
} else {
hdf5_output_param_ = nullptr;
}
if (from._internal_has_hinge_loss_param()) {
hinge_loss_param_ = new ::opencv_caffe::HingeLossParameter(*from.hinge_loss_param_);
} else {
hinge_loss_param_ = nullptr;
}
if (from._internal_has_image_data_param()) {
image_data_param_ = new ::opencv_caffe::ImageDataParameter(*from.image_data_param_);
} else {
image_data_param_ = nullptr;
}
if (from._internal_has_infogain_loss_param()) {
infogain_loss_param_ = new ::opencv_caffe::InfogainLossParameter(*from.infogain_loss_param_);
} else {
infogain_loss_param_ = nullptr;
}
if (from._internal_has_inner_product_param()) {
inner_product_param_ = new ::opencv_caffe::InnerProductParameter(*from.inner_product_param_);
} else {
inner_product_param_ = nullptr;
}
if (from._internal_has_lrn_param()) {
lrn_param_ = new ::opencv_caffe::LRNParameter(*from.lrn_param_);
} else {
lrn_param_ = nullptr;
}
if (from._internal_has_memory_data_param()) {
memory_data_param_ = new ::opencv_caffe::MemoryDataParameter(*from.memory_data_param_);
} else {
memory_data_param_ = nullptr;
}
if (from._internal_has_mvn_param()) {
mvn_param_ = new ::opencv_caffe::MVNParameter(*from.mvn_param_);
} else {
mvn_param_ = nullptr;
}
if (from._internal_has_pooling_param()) {
pooling_param_ = new ::opencv_caffe::PoolingParameter(*from.pooling_param_);
} else {
pooling_param_ = nullptr;
}
if (from._internal_has_power_param()) {
power_param_ = new ::opencv_caffe::PowerParameter(*from.power_param_);
} else {
power_param_ = nullptr;
}
if (from._internal_has_relu_param()) {
relu_param_ = new ::opencv_caffe::ReLUParameter(*from.relu_param_);
} else {
relu_param_ = nullptr;
}
if (from._internal_has_sigmoid_param()) {
sigmoid_param_ = new ::opencv_caffe::SigmoidParameter(*from.sigmoid_param_);
} else {
sigmoid_param_ = nullptr;
}
if (from._internal_has_softmax_param()) {
softmax_param_ = new ::opencv_caffe::SoftmaxParameter(*from.softmax_param_);
} else {
softmax_param_ = nullptr;
}
if (from._internal_has_slice_param()) {
slice_param_ = new ::opencv_caffe::SliceParameter(*from.slice_param_);
} else {
slice_param_ = nullptr;
}
if (from._internal_has_tanh_param()) {
tanh_param_ = new ::opencv_caffe::TanHParameter(*from.tanh_param_);
} else {
tanh_param_ = nullptr;
}
if (from._internal_has_threshold_param()) {
threshold_param_ = new ::opencv_caffe::ThresholdParameter(*from.threshold_param_);
} else {
threshold_param_ = nullptr;
}
if (from._internal_has_window_data_param()) {
window_data_param_ = new ::opencv_caffe::WindowDataParameter(*from.window_data_param_);
} else {
window_data_param_ = nullptr;
}
if (from._internal_has_python_param()) {
python_param_ = new ::opencv_caffe::PythonParameter(*from.python_param_);
} else {
python_param_ = nullptr;
}
if (from._internal_has_prelu_param()) {
prelu_param_ = new ::opencv_caffe::PReLUParameter(*from.prelu_param_);
} else {
prelu_param_ = nullptr;
}
if (from._internal_has_spp_param()) {
spp_param_ = new ::opencv_caffe::SPPParameter(*from.spp_param_);
} else {
spp_param_ = nullptr;
}
if (from._internal_has_reshape_param()) {
reshape_param_ = new ::opencv_caffe::ReshapeParameter(*from.reshape_param_);
} else {
reshape_param_ = nullptr;
}
if (from._internal_has_log_param()) {
log_param_ = new ::opencv_caffe::LogParameter(*from.log_param_);
} else {
log_param_ = nullptr;
}
if (from._internal_has_flatten_param()) {
flatten_param_ = new ::opencv_caffe::FlattenParameter(*from.flatten_param_);
} else {
flatten_param_ = nullptr;
}
if (from._internal_has_reduction_param()) {
reduction_param_ = new ::opencv_caffe::ReductionParameter(*from.reduction_param_);
} else {
reduction_param_ = nullptr;
}
if (from._internal_has_embed_param()) {
embed_param_ = new ::opencv_caffe::EmbedParameter(*from.embed_param_);
} else {
embed_param_ = nullptr;
}
if (from._internal_has_tile_param()) {
tile_param_ = new ::opencv_caffe::TileParameter(*from.tile_param_);
} else {
tile_param_ = nullptr;
}
if (from._internal_has_batch_norm_param()) {
batch_norm_param_ = new ::opencv_caffe::BatchNormParameter(*from.batch_norm_param_);
} else {
batch_norm_param_ = nullptr;
}
if (from._internal_has_elu_param()) {
elu_param_ = new ::opencv_caffe::ELUParameter(*from.elu_param_);
} else {
elu_param_ = nullptr;
}
if (from._internal_has_bias_param()) {
bias_param_ = new ::opencv_caffe::BiasParameter(*from.bias_param_);
} else {
bias_param_ = nullptr;
}
if (from._internal_has_scale_param()) {
scale_param_ = new ::opencv_caffe::ScaleParameter(*from.scale_param_);
} else {
scale_param_ = nullptr;
}
if (from._internal_has_input_param()) {
input_param_ = new ::opencv_caffe::InputParameter(*from.input_param_);
} else {
input_param_ = nullptr;
}
if (from._internal_has_crop_param()) {
crop_param_ = new ::opencv_caffe::CropParameter(*from.crop_param_);
} else {
crop_param_ = nullptr;
}
if (from._internal_has_parameter_param()) {
parameter_param_ = new ::opencv_caffe::ParameterParameter(*from.parameter_param_);
} else {
parameter_param_ = nullptr;
}
if (from._internal_has_recurrent_param()) {
recurrent_param_ = new ::opencv_caffe::RecurrentParameter(*from.recurrent_param_);
} else {
recurrent_param_ = nullptr;
}
if (from._internal_has_detection_output_param()) {
detection_output_param_ = new ::opencv_caffe::DetectionOutputParameter(*from.detection_output_param_);
} else {
detection_output_param_ = nullptr;
}
if (from._internal_has_permute_param()) {
permute_param_ = new ::opencv_caffe::PermuteParameter(*from.permute_param_);
} else {
permute_param_ = nullptr;
}
if (from._internal_has_norm_param()) {
norm_param_ = new ::opencv_caffe::NormalizeBBoxParameter(*from.norm_param_);
} else {
norm_param_ = nullptr;
}
if (from._internal_has_prior_box_param()) {
prior_box_param_ = new ::opencv_caffe::PriorBoxParameter(*from.prior_box_param_);
} else {
prior_box_param_ = nullptr;
}
if (from._internal_has_proposal_param()) {
proposal_param_ = new ::opencv_caffe::ProposalParameter(*from.proposal_param_);
} else {
proposal_param_ = nullptr;
}
if (from._internal_has_psroi_pooling_param()) {
psroi_pooling_param_ = new ::opencv_caffe::PSROIPoolingParameter(*from.psroi_pooling_param_);
} else {
psroi_pooling_param_ = nullptr;
}
if (from._internal_has_roi_pooling_param()) {
roi_pooling_param_ = new ::opencv_caffe::ROIPoolingParameter(*from.roi_pooling_param_);
} else {
roi_pooling_param_ = nullptr;
}
phase_ = from.phase_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.LayerParameter)
}
inline void LayerParameter::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&transform_param_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&phase_) -
reinterpret_cast<char*>(&transform_param_)) + sizeof(phase_));
}
LayerParameter::~LayerParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.LayerParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void LayerParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete transform_param_;
if (this != internal_default_instance()) delete loss_param_;
if (this != internal_default_instance()) delete accuracy_param_;
if (this != internal_default_instance()) delete argmax_param_;
if (this != internal_default_instance()) delete concat_param_;
if (this != internal_default_instance()) delete contrastive_loss_param_;
if (this != internal_default_instance()) delete convolution_param_;
if (this != internal_default_instance()) delete data_param_;
if (this != internal_default_instance()) delete dropout_param_;
if (this != internal_default_instance()) delete dummy_data_param_;
if (this != internal_default_instance()) delete eltwise_param_;
if (this != internal_default_instance()) delete exp_param_;
if (this != internal_default_instance()) delete hdf5_data_param_;
if (this != internal_default_instance()) delete hdf5_output_param_;
if (this != internal_default_instance()) delete hinge_loss_param_;
if (this != internal_default_instance()) delete image_data_param_;
if (this != internal_default_instance()) delete infogain_loss_param_;
if (this != internal_default_instance()) delete inner_product_param_;
if (this != internal_default_instance()) delete lrn_param_;
if (this != internal_default_instance()) delete memory_data_param_;
if (this != internal_default_instance()) delete mvn_param_;
if (this != internal_default_instance()) delete pooling_param_;
if (this != internal_default_instance()) delete power_param_;
if (this != internal_default_instance()) delete relu_param_;
if (this != internal_default_instance()) delete sigmoid_param_;
if (this != internal_default_instance()) delete softmax_param_;
if (this != internal_default_instance()) delete slice_param_;
if (this != internal_default_instance()) delete tanh_param_;
if (this != internal_default_instance()) delete threshold_param_;
if (this != internal_default_instance()) delete window_data_param_;
if (this != internal_default_instance()) delete python_param_;
if (this != internal_default_instance()) delete prelu_param_;
if (this != internal_default_instance()) delete spp_param_;
if (this != internal_default_instance()) delete reshape_param_;
if (this != internal_default_instance()) delete log_param_;
if (this != internal_default_instance()) delete flatten_param_;
if (this != internal_default_instance()) delete reduction_param_;
if (this != internal_default_instance()) delete embed_param_;
if (this != internal_default_instance()) delete tile_param_;
if (this != internal_default_instance()) delete batch_norm_param_;
if (this != internal_default_instance()) delete elu_param_;
if (this != internal_default_instance()) delete bias_param_;
if (this != internal_default_instance()) delete scale_param_;
if (this != internal_default_instance()) delete input_param_;
if (this != internal_default_instance()) delete crop_param_;
if (this != internal_default_instance()) delete parameter_param_;
if (this != internal_default_instance()) delete recurrent_param_;
if (this != internal_default_instance()) delete detection_output_param_;
if (this != internal_default_instance()) delete permute_param_;
if (this != internal_default_instance()) delete norm_param_;
if (this != internal_default_instance()) delete prior_box_param_;
if (this != internal_default_instance()) delete proposal_param_;
if (this != internal_default_instance()) delete psroi_pooling_param_;
if (this != internal_default_instance()) delete roi_pooling_param_;
}
void LayerParameter::ArenaDtor(void* object) {
LayerParameter* _this = reinterpret_cast< LayerParameter* >(object);
(void)_this;
}
void LayerParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LayerParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void LayerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.LayerParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
bottom_.Clear();
top_.Clear();
loss_weight_.Clear();
param_.Clear();
blobs_.Clear();
include_.Clear();
exclude_.Clear();
propagate_down_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
type_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(transform_param_ != nullptr);
transform_param_->Clear();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(loss_param_ != nullptr);
loss_param_->Clear();
}
if (cached_has_bits & 0x00000010u) {
GOOGLE_DCHECK(accuracy_param_ != nullptr);
accuracy_param_->Clear();
}
if (cached_has_bits & 0x00000020u) {
GOOGLE_DCHECK(argmax_param_ != nullptr);
argmax_param_->Clear();
}
if (cached_has_bits & 0x00000040u) {
GOOGLE_DCHECK(concat_param_ != nullptr);
concat_param_->Clear();
}
if (cached_has_bits & 0x00000080u) {
GOOGLE_DCHECK(contrastive_loss_param_ != nullptr);
contrastive_loss_param_->Clear();
}
}
if (cached_has_bits & 0x0000ff00u) {
if (cached_has_bits & 0x00000100u) {
GOOGLE_DCHECK(convolution_param_ != nullptr);
convolution_param_->Clear();
}
if (cached_has_bits & 0x00000200u) {
GOOGLE_DCHECK(data_param_ != nullptr);
data_param_->Clear();
}
if (cached_has_bits & 0x00000400u) {
GOOGLE_DCHECK(dropout_param_ != nullptr);
dropout_param_->Clear();
}
if (cached_has_bits & 0x00000800u) {
GOOGLE_DCHECK(dummy_data_param_ != nullptr);
dummy_data_param_->Clear();
}
if (cached_has_bits & 0x00001000u) {
GOOGLE_DCHECK(eltwise_param_ != nullptr);
eltwise_param_->Clear();
}
if (cached_has_bits & 0x00002000u) {
GOOGLE_DCHECK(exp_param_ != nullptr);
exp_param_->Clear();
}
if (cached_has_bits & 0x00004000u) {
GOOGLE_DCHECK(hdf5_data_param_ != nullptr);
hdf5_data_param_->Clear();
}
if (cached_has_bits & 0x00008000u) {
GOOGLE_DCHECK(hdf5_output_param_ != nullptr);
hdf5_output_param_->Clear();
}
}
if (cached_has_bits & 0x00ff0000u) {
if (cached_has_bits & 0x00010000u) {
GOOGLE_DCHECK(hinge_loss_param_ != nullptr);
hinge_loss_param_->Clear();
}
if (cached_has_bits & 0x00020000u) {
GOOGLE_DCHECK(image_data_param_ != nullptr);
image_data_param_->Clear();
}
if (cached_has_bits & 0x00040000u) {
GOOGLE_DCHECK(infogain_loss_param_ != nullptr);
infogain_loss_param_->Clear();
}
if (cached_has_bits & 0x00080000u) {
GOOGLE_DCHECK(inner_product_param_ != nullptr);
inner_product_param_->Clear();
}
if (cached_has_bits & 0x00100000u) {
GOOGLE_DCHECK(lrn_param_ != nullptr);
lrn_param_->Clear();
}
if (cached_has_bits & 0x00200000u) {
GOOGLE_DCHECK(memory_data_param_ != nullptr);
memory_data_param_->Clear();
}
if (cached_has_bits & 0x00400000u) {
GOOGLE_DCHECK(mvn_param_ != nullptr);
mvn_param_->Clear();
}
if (cached_has_bits & 0x00800000u) {
GOOGLE_DCHECK(pooling_param_ != nullptr);
pooling_param_->Clear();
}
}
if (cached_has_bits & 0xff000000u) {
if (cached_has_bits & 0x01000000u) {
GOOGLE_DCHECK(power_param_ != nullptr);
power_param_->Clear();
}
if (cached_has_bits & 0x02000000u) {
GOOGLE_DCHECK(relu_param_ != nullptr);
relu_param_->Clear();
}
if (cached_has_bits & 0x04000000u) {
GOOGLE_DCHECK(sigmoid_param_ != nullptr);
sigmoid_param_->Clear();
}
if (cached_has_bits & 0x08000000u) {
GOOGLE_DCHECK(softmax_param_ != nullptr);
softmax_param_->Clear();
}
if (cached_has_bits & 0x10000000u) {
GOOGLE_DCHECK(slice_param_ != nullptr);
slice_param_->Clear();
}
if (cached_has_bits & 0x20000000u) {
GOOGLE_DCHECK(tanh_param_ != nullptr);
tanh_param_->Clear();
}
if (cached_has_bits & 0x40000000u) {
GOOGLE_DCHECK(threshold_param_ != nullptr);
threshold_param_->Clear();
}
if (cached_has_bits & 0x80000000u) {
GOOGLE_DCHECK(window_data_param_ != nullptr);
window_data_param_->Clear();
}
}
cached_has_bits = _has_bits_[1];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(python_param_ != nullptr);
python_param_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(prelu_param_ != nullptr);
prelu_param_->Clear();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(spp_param_ != nullptr);
spp_param_->Clear();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(reshape_param_ != nullptr);
reshape_param_->Clear();
}
if (cached_has_bits & 0x00000010u) {
GOOGLE_DCHECK(log_param_ != nullptr);
log_param_->Clear();
}
if (cached_has_bits & 0x00000020u) {
GOOGLE_DCHECK(flatten_param_ != nullptr);
flatten_param_->Clear();
}
if (cached_has_bits & 0x00000040u) {
GOOGLE_DCHECK(reduction_param_ != nullptr);
reduction_param_->Clear();
}
if (cached_has_bits & 0x00000080u) {
GOOGLE_DCHECK(embed_param_ != nullptr);
embed_param_->Clear();
}
}
if (cached_has_bits & 0x0000ff00u) {
if (cached_has_bits & 0x00000100u) {
GOOGLE_DCHECK(tile_param_ != nullptr);
tile_param_->Clear();
}
if (cached_has_bits & 0x00000200u) {
GOOGLE_DCHECK(batch_norm_param_ != nullptr);
batch_norm_param_->Clear();
}
if (cached_has_bits & 0x00000400u) {
GOOGLE_DCHECK(elu_param_ != nullptr);
elu_param_->Clear();
}
if (cached_has_bits & 0x00000800u) {
GOOGLE_DCHECK(bias_param_ != nullptr);
bias_param_->Clear();
}
if (cached_has_bits & 0x00001000u) {
GOOGLE_DCHECK(scale_param_ != nullptr);
scale_param_->Clear();
}
if (cached_has_bits & 0x00002000u) {
GOOGLE_DCHECK(input_param_ != nullptr);
input_param_->Clear();
}
if (cached_has_bits & 0x00004000u) {
GOOGLE_DCHECK(crop_param_ != nullptr);
crop_param_->Clear();
}
if (cached_has_bits & 0x00008000u) {
GOOGLE_DCHECK(parameter_param_ != nullptr);
parameter_param_->Clear();
}
}
if (cached_has_bits & 0x00ff0000u) {
if (cached_has_bits & 0x00010000u) {
GOOGLE_DCHECK(recurrent_param_ != nullptr);
recurrent_param_->Clear();
}
if (cached_has_bits & 0x00020000u) {
GOOGLE_DCHECK(detection_output_param_ != nullptr);
detection_output_param_->Clear();
}
if (cached_has_bits & 0x00040000u) {
GOOGLE_DCHECK(permute_param_ != nullptr);
permute_param_->Clear();
}
if (cached_has_bits & 0x00080000u) {
GOOGLE_DCHECK(norm_param_ != nullptr);
norm_param_->Clear();
}
if (cached_has_bits & 0x00100000u) {
GOOGLE_DCHECK(prior_box_param_ != nullptr);
prior_box_param_->Clear();
}
if (cached_has_bits & 0x00200000u) {
GOOGLE_DCHECK(proposal_param_ != nullptr);
proposal_param_->Clear();
}
if (cached_has_bits & 0x00400000u) {
GOOGLE_DCHECK(psroi_pooling_param_ != nullptr);
psroi_pooling_param_->Clear();
}
if (cached_has_bits & 0x00800000u) {
GOOGLE_DCHECK(roi_pooling_param_ != nullptr);
roi_pooling_param_->Clear();
}
}
phase_ = 0;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* LayerParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.LayerParameter.name");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string type = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_type();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.LayerParameter.type");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated string bottom = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_bottom();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.LayerParameter.bottom");
#endif // !NDEBUG
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
// repeated string top = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_top();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.LayerParameter.top");
#endif // !NDEBUG
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
} else
goto handle_unusual;
continue;
// repeated float loss_weight = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_loss_weight(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<45>(ptr));
} else if (static_cast<uint8_t>(tag) == 42) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_loss_weight(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.ParamSpec param = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_param(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.BlobProto blobs = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_blobs(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.NetStateRule include = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_include(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.NetStateRule exclude = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_exclude(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.Phase phase = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::Phase_IsValid(val))) {
_internal_set_phase(static_cast<::opencv_caffe::Phase>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(10, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// repeated bool propagate_down = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_propagate_down(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<88>(ptr));
} else if (static_cast<uint8_t>(tag) == 90) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedBoolParser(_internal_mutable_propagate_down(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.TransformationParameter transform_param = 100;
case 100:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_transform_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.LossParameter loss_param = 101;
case 101:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_loss_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.AccuracyParameter accuracy_param = 102;
case 102:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr = ctx->ParseMessage(_internal_mutable_accuracy_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ArgMaxParameter argmax_param = 103;
case 103:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr = ctx->ParseMessage(_internal_mutable_argmax_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ConcatParameter concat_param = 104;
case 104:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr = ctx->ParseMessage(_internal_mutable_concat_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 105;
case 105:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr = ctx->ParseMessage(_internal_mutable_contrastive_loss_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ConvolutionParameter convolution_param = 106;
case 106:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
ptr = ctx->ParseMessage(_internal_mutable_convolution_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.DataParameter data_param = 107;
case 107:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
ptr = ctx->ParseMessage(_internal_mutable_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.DropoutParameter dropout_param = 108;
case 108:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
ptr = ctx->ParseMessage(_internal_mutable_dropout_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.DummyDataParameter dummy_data_param = 109;
case 109:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
ptr = ctx->ParseMessage(_internal_mutable_dummy_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.EltwiseParameter eltwise_param = 110;
case 110:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
ptr = ctx->ParseMessage(_internal_mutable_eltwise_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ExpParameter exp_param = 111;
case 111:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
ptr = ctx->ParseMessage(_internal_mutable_exp_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 112;
case 112:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
ptr = ctx->ParseMessage(_internal_mutable_hdf5_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 113;
case 113:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138)) {
ptr = ctx->ParseMessage(_internal_mutable_hdf5_output_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.HingeLossParameter hinge_loss_param = 114;
case 114:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
ptr = ctx->ParseMessage(_internal_mutable_hinge_loss_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ImageDataParameter image_data_param = 115;
case 115:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 154)) {
ptr = ctx->ParseMessage(_internal_mutable_image_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 116;
case 116:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
ptr = ctx->ParseMessage(_internal_mutable_infogain_loss_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.InnerProductParameter inner_product_param = 117;
case 117:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
ptr = ctx->ParseMessage(_internal_mutable_inner_product_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.LRNParameter lrn_param = 118;
case 118:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 178)) {
ptr = ctx->ParseMessage(_internal_mutable_lrn_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.MemoryDataParameter memory_data_param = 119;
case 119:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 186)) {
ptr = ctx->ParseMessage(_internal_mutable_memory_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.MVNParameter mvn_param = 120;
case 120:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 194)) {
ptr = ctx->ParseMessage(_internal_mutable_mvn_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PoolingParameter pooling_param = 121;
case 121:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 202)) {
ptr = ctx->ParseMessage(_internal_mutable_pooling_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PowerParameter power_param = 122;
case 122:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 210)) {
ptr = ctx->ParseMessage(_internal_mutable_power_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ReLUParameter relu_param = 123;
case 123:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 218)) {
ptr = ctx->ParseMessage(_internal_mutable_relu_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SigmoidParameter sigmoid_param = 124;
case 124:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 226)) {
ptr = ctx->ParseMessage(_internal_mutable_sigmoid_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SoftmaxParameter softmax_param = 125;
case 125:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 234)) {
ptr = ctx->ParseMessage(_internal_mutable_softmax_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SliceParameter slice_param = 126;
case 126:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 242)) {
ptr = ctx->ParseMessage(_internal_mutable_slice_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.TanHParameter tanh_param = 127;
case 127:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 250)) {
ptr = ctx->ParseMessage(_internal_mutable_tanh_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ThresholdParameter threshold_param = 128;
case 128:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 2)) {
ptr = ctx->ParseMessage(_internal_mutable_threshold_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.WindowDataParameter window_data_param = 129;
case 129:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_window_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PythonParameter python_param = 130;
case 130:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_python_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PReLUParameter prelu_param = 131;
case 131:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_prelu_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SPPParameter spp_param = 132;
case 132:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_spp_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ReshapeParameter reshape_param = 133;
case 133:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_reshape_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.LogParameter log_param = 134;
case 134:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr = ctx->ParseMessage(_internal_mutable_log_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FlattenParameter flatten_param = 135;
case 135:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr = ctx->ParseMessage(_internal_mutable_flatten_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ReductionParameter reduction_param = 136;
case 136:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr = ctx->ParseMessage(_internal_mutable_reduction_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.EmbedParameter embed_param = 137;
case 137:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr = ctx->ParseMessage(_internal_mutable_embed_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.TileParameter tile_param = 138;
case 138:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
ptr = ctx->ParseMessage(_internal_mutable_tile_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.BatchNormParameter batch_norm_param = 139;
case 139:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
ptr = ctx->ParseMessage(_internal_mutable_batch_norm_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ELUParameter elu_param = 140;
case 140:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
ptr = ctx->ParseMessage(_internal_mutable_elu_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.BiasParameter bias_param = 141;
case 141:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
ptr = ctx->ParseMessage(_internal_mutable_bias_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ScaleParameter scale_param = 142;
case 142:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
ptr = ctx->ParseMessage(_internal_mutable_scale_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.InputParameter input_param = 143;
case 143:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
ptr = ctx->ParseMessage(_internal_mutable_input_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.CropParameter crop_param = 144;
case 144:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
ptr = ctx->ParseMessage(_internal_mutable_crop_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ParameterParameter parameter_param = 145;
case 145:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138)) {
ptr = ctx->ParseMessage(_internal_mutable_parameter_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.RecurrentParameter recurrent_param = 146;
case 146:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
ptr = ctx->ParseMessage(_internal_mutable_recurrent_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.DetectionOutputParameter detection_output_param = 147;
case 147:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 154)) {
ptr = ctx->ParseMessage(_internal_mutable_detection_output_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PermuteParameter permute_param = 148;
case 148:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
ptr = ctx->ParseMessage(_internal_mutable_permute_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.NormalizeBBoxParameter norm_param = 149;
case 149:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
ptr = ctx->ParseMessage(_internal_mutable_norm_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PriorBoxParameter prior_box_param = 150;
case 150:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 178)) {
ptr = ctx->ParseMessage(_internal_mutable_prior_box_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ProposalParameter proposal_param = 201;
case 201:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr = ctx->ParseMessage(_internal_mutable_proposal_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PSROIPoolingParameter psroi_pooling_param = 10002;
case 10002:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
ptr = ctx->ParseMessage(_internal_mutable_psroi_pooling_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ROIPoolingParameter roi_pooling_param = 8266711;
case 8266711:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 186)) {
ptr = ctx->ParseMessage(_internal_mutable_roi_pooling_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* LayerParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.LayerParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.LayerParameter.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// optional string type = 2;
if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_type().data(), static_cast<int>(this->_internal_type().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.LayerParameter.type");
target = stream->WriteStringMaybeAliased(
2, this->_internal_type(), target);
}
// repeated string bottom = 3;
for (int i = 0, n = this->_internal_bottom_size(); i < n; i++) {
const auto& s = this->_internal_bottom(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.LayerParameter.bottom");
target = stream->WriteString(3, s, target);
}
// repeated string top = 4;
for (int i = 0, n = this->_internal_top_size(); i < n; i++) {
const auto& s = this->_internal_top(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.LayerParameter.top");
target = stream->WriteString(4, s, target);
}
// repeated float loss_weight = 5;
for (int i = 0, n = this->_internal_loss_weight_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_loss_weight(i), target);
}
// repeated .opencv_caffe.ParamSpec param = 6;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_param_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(6, this->_internal_param(i), target, stream);
}
// repeated .opencv_caffe.BlobProto blobs = 7;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_blobs_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(7, this->_internal_blobs(i), target, stream);
}
// repeated .opencv_caffe.NetStateRule include = 8;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_include_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(8, this->_internal_include(i), target, stream);
}
// repeated .opencv_caffe.NetStateRule exclude = 9;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_exclude_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(9, this->_internal_exclude(i), target, stream);
}
cached_has_bits = _has_bits_[1];
// optional .opencv_caffe.Phase phase = 10;
if (cached_has_bits & 0x01000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
10, this->_internal_phase(), target);
}
// repeated bool propagate_down = 11;
for (int i = 0, n = this->_internal_propagate_down_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_propagate_down(i), target);
}
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.TransformationParameter transform_param = 100;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
100, _Internal::transform_param(this), target, stream);
}
// optional .opencv_caffe.LossParameter loss_param = 101;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
101, _Internal::loss_param(this), target, stream);
}
// optional .opencv_caffe.AccuracyParameter accuracy_param = 102;
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
102, _Internal::accuracy_param(this), target, stream);
}
// optional .opencv_caffe.ArgMaxParameter argmax_param = 103;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
103, _Internal::argmax_param(this), target, stream);
}
// optional .opencv_caffe.ConcatParameter concat_param = 104;
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
104, _Internal::concat_param(this), target, stream);
}
// optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 105;
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
105, _Internal::contrastive_loss_param(this), target, stream);
}
// optional .opencv_caffe.ConvolutionParameter convolution_param = 106;
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
106, _Internal::convolution_param(this), target, stream);
}
// optional .opencv_caffe.DataParameter data_param = 107;
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
107, _Internal::data_param(this), target, stream);
}
// optional .opencv_caffe.DropoutParameter dropout_param = 108;
if (cached_has_bits & 0x00000400u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
108, _Internal::dropout_param(this), target, stream);
}
// optional .opencv_caffe.DummyDataParameter dummy_data_param = 109;
if (cached_has_bits & 0x00000800u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
109, _Internal::dummy_data_param(this), target, stream);
}
// optional .opencv_caffe.EltwiseParameter eltwise_param = 110;
if (cached_has_bits & 0x00001000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
110, _Internal::eltwise_param(this), target, stream);
}
// optional .opencv_caffe.ExpParameter exp_param = 111;
if (cached_has_bits & 0x00002000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
111, _Internal::exp_param(this), target, stream);
}
// optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 112;
if (cached_has_bits & 0x00004000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
112, _Internal::hdf5_data_param(this), target, stream);
}
// optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 113;
if (cached_has_bits & 0x00008000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
113, _Internal::hdf5_output_param(this), target, stream);
}
// optional .opencv_caffe.HingeLossParameter hinge_loss_param = 114;
if (cached_has_bits & 0x00010000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
114, _Internal::hinge_loss_param(this), target, stream);
}
// optional .opencv_caffe.ImageDataParameter image_data_param = 115;
if (cached_has_bits & 0x00020000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
115, _Internal::image_data_param(this), target, stream);
}
// optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 116;
if (cached_has_bits & 0x00040000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
116, _Internal::infogain_loss_param(this), target, stream);
}
// optional .opencv_caffe.InnerProductParameter inner_product_param = 117;
if (cached_has_bits & 0x00080000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
117, _Internal::inner_product_param(this), target, stream);
}
// optional .opencv_caffe.LRNParameter lrn_param = 118;
if (cached_has_bits & 0x00100000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
118, _Internal::lrn_param(this), target, stream);
}
// optional .opencv_caffe.MemoryDataParameter memory_data_param = 119;
if (cached_has_bits & 0x00200000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
119, _Internal::memory_data_param(this), target, stream);
}
// optional .opencv_caffe.MVNParameter mvn_param = 120;
if (cached_has_bits & 0x00400000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
120, _Internal::mvn_param(this), target, stream);
}
// optional .opencv_caffe.PoolingParameter pooling_param = 121;
if (cached_has_bits & 0x00800000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
121, _Internal::pooling_param(this), target, stream);
}
// optional .opencv_caffe.PowerParameter power_param = 122;
if (cached_has_bits & 0x01000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
122, _Internal::power_param(this), target, stream);
}
// optional .opencv_caffe.ReLUParameter relu_param = 123;
if (cached_has_bits & 0x02000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
123, _Internal::relu_param(this), target, stream);
}
// optional .opencv_caffe.SigmoidParameter sigmoid_param = 124;
if (cached_has_bits & 0x04000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
124, _Internal::sigmoid_param(this), target, stream);
}
// optional .opencv_caffe.SoftmaxParameter softmax_param = 125;
if (cached_has_bits & 0x08000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
125, _Internal::softmax_param(this), target, stream);
}
// optional .opencv_caffe.SliceParameter slice_param = 126;
if (cached_has_bits & 0x10000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
126, _Internal::slice_param(this), target, stream);
}
// optional .opencv_caffe.TanHParameter tanh_param = 127;
if (cached_has_bits & 0x20000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
127, _Internal::tanh_param(this), target, stream);
}
// optional .opencv_caffe.ThresholdParameter threshold_param = 128;
if (cached_has_bits & 0x40000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
128, _Internal::threshold_param(this), target, stream);
}
// optional .opencv_caffe.WindowDataParameter window_data_param = 129;
if (cached_has_bits & 0x80000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
129, _Internal::window_data_param(this), target, stream);
}
cached_has_bits = _has_bits_[1];
// optional .opencv_caffe.PythonParameter python_param = 130;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
130, _Internal::python_param(this), target, stream);
}
// optional .opencv_caffe.PReLUParameter prelu_param = 131;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
131, _Internal::prelu_param(this), target, stream);
}
// optional .opencv_caffe.SPPParameter spp_param = 132;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
132, _Internal::spp_param(this), target, stream);
}
// optional .opencv_caffe.ReshapeParameter reshape_param = 133;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
133, _Internal::reshape_param(this), target, stream);
}
// optional .opencv_caffe.LogParameter log_param = 134;
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
134, _Internal::log_param(this), target, stream);
}
// optional .opencv_caffe.FlattenParameter flatten_param = 135;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
135, _Internal::flatten_param(this), target, stream);
}
// optional .opencv_caffe.ReductionParameter reduction_param = 136;
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
136, _Internal::reduction_param(this), target, stream);
}
// optional .opencv_caffe.EmbedParameter embed_param = 137;
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
137, _Internal::embed_param(this), target, stream);
}
// optional .opencv_caffe.TileParameter tile_param = 138;
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
138, _Internal::tile_param(this), target, stream);
}
// optional .opencv_caffe.BatchNormParameter batch_norm_param = 139;
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
139, _Internal::batch_norm_param(this), target, stream);
}
// optional .opencv_caffe.ELUParameter elu_param = 140;
if (cached_has_bits & 0x00000400u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
140, _Internal::elu_param(this), target, stream);
}
// optional .opencv_caffe.BiasParameter bias_param = 141;
if (cached_has_bits & 0x00000800u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
141, _Internal::bias_param(this), target, stream);
}
// optional .opencv_caffe.ScaleParameter scale_param = 142;
if (cached_has_bits & 0x00001000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
142, _Internal::scale_param(this), target, stream);
}
// optional .opencv_caffe.InputParameter input_param = 143;
if (cached_has_bits & 0x00002000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
143, _Internal::input_param(this), target, stream);
}
// optional .opencv_caffe.CropParameter crop_param = 144;
if (cached_has_bits & 0x00004000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
144, _Internal::crop_param(this), target, stream);
}
// optional .opencv_caffe.ParameterParameter parameter_param = 145;
if (cached_has_bits & 0x00008000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
145, _Internal::parameter_param(this), target, stream);
}
// optional .opencv_caffe.RecurrentParameter recurrent_param = 146;
if (cached_has_bits & 0x00010000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
146, _Internal::recurrent_param(this), target, stream);
}
// optional .opencv_caffe.DetectionOutputParameter detection_output_param = 147;
if (cached_has_bits & 0x00020000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
147, _Internal::detection_output_param(this), target, stream);
}
// optional .opencv_caffe.PermuteParameter permute_param = 148;
if (cached_has_bits & 0x00040000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
148, _Internal::permute_param(this), target, stream);
}
// optional .opencv_caffe.NormalizeBBoxParameter norm_param = 149;
if (cached_has_bits & 0x00080000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
149, _Internal::norm_param(this), target, stream);
}
// optional .opencv_caffe.PriorBoxParameter prior_box_param = 150;
if (cached_has_bits & 0x00100000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
150, _Internal::prior_box_param(this), target, stream);
}
// optional .opencv_caffe.ProposalParameter proposal_param = 201;
if (cached_has_bits & 0x00200000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
201, _Internal::proposal_param(this), target, stream);
}
// optional .opencv_caffe.PSROIPoolingParameter psroi_pooling_param = 10002;
if (cached_has_bits & 0x00400000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
10002, _Internal::psroi_pooling_param(this), target, stream);
}
// optional .opencv_caffe.ROIPoolingParameter roi_pooling_param = 8266711;
if (cached_has_bits & 0x00800000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
8266711, _Internal::roi_pooling_param(this), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.LayerParameter)
return target;
}
size_t LayerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.LayerParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string bottom = 3;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(bottom_.size());
for (int i = 0, n = bottom_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
bottom_.Get(i));
}
// repeated string top = 4;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(top_.size());
for (int i = 0, n = top_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
top_.Get(i));
}
// repeated float loss_weight = 5;
{
unsigned int count = static_cast<unsigned int>(this->_internal_loss_weight_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_loss_weight_size());
total_size += data_size;
}
// repeated .opencv_caffe.ParamSpec param = 6;
total_size += 1UL * this->_internal_param_size();
for (const auto& msg : this->param_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .opencv_caffe.BlobProto blobs = 7;
total_size += 1UL * this->_internal_blobs_size();
for (const auto& msg : this->blobs_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .opencv_caffe.NetStateRule include = 8;
total_size += 1UL * this->_internal_include_size();
for (const auto& msg : this->include_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .opencv_caffe.NetStateRule exclude = 9;
total_size += 1UL * this->_internal_exclude_size();
for (const auto& msg : this->exclude_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated bool propagate_down = 11;
{
unsigned int count = static_cast<unsigned int>(this->_internal_propagate_down_size());
size_t data_size = 1UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_propagate_down_size());
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// optional string type = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_type());
}
// optional .opencv_caffe.TransformationParameter transform_param = 100;
if (cached_has_bits & 0x00000004u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*transform_param_);
}
// optional .opencv_caffe.LossParameter loss_param = 101;
if (cached_has_bits & 0x00000008u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*loss_param_);
}
// optional .opencv_caffe.AccuracyParameter accuracy_param = 102;
if (cached_has_bits & 0x00000010u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*accuracy_param_);
}
// optional .opencv_caffe.ArgMaxParameter argmax_param = 103;
if (cached_has_bits & 0x00000020u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*argmax_param_);
}
// optional .opencv_caffe.ConcatParameter concat_param = 104;
if (cached_has_bits & 0x00000040u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*concat_param_);
}
// optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 105;
if (cached_has_bits & 0x00000080u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*contrastive_loss_param_);
}
}
if (cached_has_bits & 0x0000ff00u) {
// optional .opencv_caffe.ConvolutionParameter convolution_param = 106;
if (cached_has_bits & 0x00000100u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*convolution_param_);
}
// optional .opencv_caffe.DataParameter data_param = 107;
if (cached_has_bits & 0x00000200u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*data_param_);
}
// optional .opencv_caffe.DropoutParameter dropout_param = 108;
if (cached_has_bits & 0x00000400u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*dropout_param_);
}
// optional .opencv_caffe.DummyDataParameter dummy_data_param = 109;
if (cached_has_bits & 0x00000800u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*dummy_data_param_);
}
// optional .opencv_caffe.EltwiseParameter eltwise_param = 110;
if (cached_has_bits & 0x00001000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*eltwise_param_);
}
// optional .opencv_caffe.ExpParameter exp_param = 111;
if (cached_has_bits & 0x00002000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*exp_param_);
}
// optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 112;
if (cached_has_bits & 0x00004000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*hdf5_data_param_);
}
// optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 113;
if (cached_has_bits & 0x00008000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*hdf5_output_param_);
}
}
if (cached_has_bits & 0x00ff0000u) {
// optional .opencv_caffe.HingeLossParameter hinge_loss_param = 114;
if (cached_has_bits & 0x00010000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*hinge_loss_param_);
}
// optional .opencv_caffe.ImageDataParameter image_data_param = 115;
if (cached_has_bits & 0x00020000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*image_data_param_);
}
// optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 116;
if (cached_has_bits & 0x00040000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*infogain_loss_param_);
}
// optional .opencv_caffe.InnerProductParameter inner_product_param = 117;
if (cached_has_bits & 0x00080000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*inner_product_param_);
}
// optional .opencv_caffe.LRNParameter lrn_param = 118;
if (cached_has_bits & 0x00100000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*lrn_param_);
}
// optional .opencv_caffe.MemoryDataParameter memory_data_param = 119;
if (cached_has_bits & 0x00200000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*memory_data_param_);
}
// optional .opencv_caffe.MVNParameter mvn_param = 120;
if (cached_has_bits & 0x00400000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*mvn_param_);
}
// optional .opencv_caffe.PoolingParameter pooling_param = 121;
if (cached_has_bits & 0x00800000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*pooling_param_);
}
}
if (cached_has_bits & 0xff000000u) {
// optional .opencv_caffe.PowerParameter power_param = 122;
if (cached_has_bits & 0x01000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*power_param_);
}
// optional .opencv_caffe.ReLUParameter relu_param = 123;
if (cached_has_bits & 0x02000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*relu_param_);
}
// optional .opencv_caffe.SigmoidParameter sigmoid_param = 124;
if (cached_has_bits & 0x04000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*sigmoid_param_);
}
// optional .opencv_caffe.SoftmaxParameter softmax_param = 125;
if (cached_has_bits & 0x08000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*softmax_param_);
}
// optional .opencv_caffe.SliceParameter slice_param = 126;
if (cached_has_bits & 0x10000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*slice_param_);
}
// optional .opencv_caffe.TanHParameter tanh_param = 127;
if (cached_has_bits & 0x20000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*tanh_param_);
}
// optional .opencv_caffe.ThresholdParameter threshold_param = 128;
if (cached_has_bits & 0x40000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*threshold_param_);
}
// optional .opencv_caffe.WindowDataParameter window_data_param = 129;
if (cached_has_bits & 0x80000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*window_data_param_);
}
}
cached_has_bits = _has_bits_[1];
if (cached_has_bits & 0x000000ffu) {
// optional .opencv_caffe.PythonParameter python_param = 130;
if (cached_has_bits & 0x00000001u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*python_param_);
}
// optional .opencv_caffe.PReLUParameter prelu_param = 131;
if (cached_has_bits & 0x00000002u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*prelu_param_);
}
// optional .opencv_caffe.SPPParameter spp_param = 132;
if (cached_has_bits & 0x00000004u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*spp_param_);
}
// optional .opencv_caffe.ReshapeParameter reshape_param = 133;
if (cached_has_bits & 0x00000008u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*reshape_param_);
}
// optional .opencv_caffe.LogParameter log_param = 134;
if (cached_has_bits & 0x00000010u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*log_param_);
}
// optional .opencv_caffe.FlattenParameter flatten_param = 135;
if (cached_has_bits & 0x00000020u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*flatten_param_);
}
// optional .opencv_caffe.ReductionParameter reduction_param = 136;
if (cached_has_bits & 0x00000040u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*reduction_param_);
}
// optional .opencv_caffe.EmbedParameter embed_param = 137;
if (cached_has_bits & 0x00000080u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*embed_param_);
}
}
if (cached_has_bits & 0x0000ff00u) {
// optional .opencv_caffe.TileParameter tile_param = 138;
if (cached_has_bits & 0x00000100u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*tile_param_);
}
// optional .opencv_caffe.BatchNormParameter batch_norm_param = 139;
if (cached_has_bits & 0x00000200u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*batch_norm_param_);
}
// optional .opencv_caffe.ELUParameter elu_param = 140;
if (cached_has_bits & 0x00000400u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*elu_param_);
}
// optional .opencv_caffe.BiasParameter bias_param = 141;
if (cached_has_bits & 0x00000800u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*bias_param_);
}
// optional .opencv_caffe.ScaleParameter scale_param = 142;
if (cached_has_bits & 0x00001000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*scale_param_);
}
// optional .opencv_caffe.InputParameter input_param = 143;
if (cached_has_bits & 0x00002000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*input_param_);
}
// optional .opencv_caffe.CropParameter crop_param = 144;
if (cached_has_bits & 0x00004000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*crop_param_);
}
// optional .opencv_caffe.ParameterParameter parameter_param = 145;
if (cached_has_bits & 0x00008000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*parameter_param_);
}
}
if (cached_has_bits & 0x00ff0000u) {
// optional .opencv_caffe.RecurrentParameter recurrent_param = 146;
if (cached_has_bits & 0x00010000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*recurrent_param_);
}
// optional .opencv_caffe.DetectionOutputParameter detection_output_param = 147;
if (cached_has_bits & 0x00020000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*detection_output_param_);
}
// optional .opencv_caffe.PermuteParameter permute_param = 148;
if (cached_has_bits & 0x00040000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*permute_param_);
}
// optional .opencv_caffe.NormalizeBBoxParameter norm_param = 149;
if (cached_has_bits & 0x00080000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*norm_param_);
}
// optional .opencv_caffe.PriorBoxParameter prior_box_param = 150;
if (cached_has_bits & 0x00100000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*prior_box_param_);
}
// optional .opencv_caffe.ProposalParameter proposal_param = 201;
if (cached_has_bits & 0x00200000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*proposal_param_);
}
// optional .opencv_caffe.PSROIPoolingParameter psroi_pooling_param = 10002;
if (cached_has_bits & 0x00400000u) {
total_size += 3 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*psroi_pooling_param_);
}
// optional .opencv_caffe.ROIPoolingParameter roi_pooling_param = 8266711;
if (cached_has_bits & 0x00800000u) {
total_size += 4 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*roi_pooling_param_);
}
}
// optional .opencv_caffe.Phase phase = 10;
if (cached_has_bits & 0x01000000u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_phase());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LayerParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
LayerParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LayerParameter::GetClassData() const { return &_class_data_; }
void LayerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<LayerParameter *>(to)->MergeFrom(
static_cast<const LayerParameter &>(from));
}
void LayerParameter::MergeFrom(const LayerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.LayerParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
bottom_.MergeFrom(from.bottom_);
top_.MergeFrom(from.top_);
loss_weight_.MergeFrom(from.loss_weight_);
param_.MergeFrom(from.param_);
blobs_.MergeFrom(from.blobs_);
include_.MergeFrom(from.include_);
exclude_.MergeFrom(from.exclude_);
propagate_down_.MergeFrom(from.propagate_down_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
_internal_set_type(from._internal_type());
}
if (cached_has_bits & 0x00000004u) {
_internal_mutable_transform_param()->::opencv_caffe::TransformationParameter::MergeFrom(from._internal_transform_param());
}
if (cached_has_bits & 0x00000008u) {
_internal_mutable_loss_param()->::opencv_caffe::LossParameter::MergeFrom(from._internal_loss_param());
}
if (cached_has_bits & 0x00000010u) {
_internal_mutable_accuracy_param()->::opencv_caffe::AccuracyParameter::MergeFrom(from._internal_accuracy_param());
}
if (cached_has_bits & 0x00000020u) {
_internal_mutable_argmax_param()->::opencv_caffe::ArgMaxParameter::MergeFrom(from._internal_argmax_param());
}
if (cached_has_bits & 0x00000040u) {
_internal_mutable_concat_param()->::opencv_caffe::ConcatParameter::MergeFrom(from._internal_concat_param());
}
if (cached_has_bits & 0x00000080u) {
_internal_mutable_contrastive_loss_param()->::opencv_caffe::ContrastiveLossParameter::MergeFrom(from._internal_contrastive_loss_param());
}
}
if (cached_has_bits & 0x0000ff00u) {
if (cached_has_bits & 0x00000100u) {
_internal_mutable_convolution_param()->::opencv_caffe::ConvolutionParameter::MergeFrom(from._internal_convolution_param());
}
if (cached_has_bits & 0x00000200u) {
_internal_mutable_data_param()->::opencv_caffe::DataParameter::MergeFrom(from._internal_data_param());
}
if (cached_has_bits & 0x00000400u) {
_internal_mutable_dropout_param()->::opencv_caffe::DropoutParameter::MergeFrom(from._internal_dropout_param());
}
if (cached_has_bits & 0x00000800u) {
_internal_mutable_dummy_data_param()->::opencv_caffe::DummyDataParameter::MergeFrom(from._internal_dummy_data_param());
}
if (cached_has_bits & 0x00001000u) {
_internal_mutable_eltwise_param()->::opencv_caffe::EltwiseParameter::MergeFrom(from._internal_eltwise_param());
}
if (cached_has_bits & 0x00002000u) {
_internal_mutable_exp_param()->::opencv_caffe::ExpParameter::MergeFrom(from._internal_exp_param());
}
if (cached_has_bits & 0x00004000u) {
_internal_mutable_hdf5_data_param()->::opencv_caffe::HDF5DataParameter::MergeFrom(from._internal_hdf5_data_param());
}
if (cached_has_bits & 0x00008000u) {
_internal_mutable_hdf5_output_param()->::opencv_caffe::HDF5OutputParameter::MergeFrom(from._internal_hdf5_output_param());
}
}
if (cached_has_bits & 0x00ff0000u) {
if (cached_has_bits & 0x00010000u) {
_internal_mutable_hinge_loss_param()->::opencv_caffe::HingeLossParameter::MergeFrom(from._internal_hinge_loss_param());
}
if (cached_has_bits & 0x00020000u) {
_internal_mutable_image_data_param()->::opencv_caffe::ImageDataParameter::MergeFrom(from._internal_image_data_param());
}
if (cached_has_bits & 0x00040000u) {
_internal_mutable_infogain_loss_param()->::opencv_caffe::InfogainLossParameter::MergeFrom(from._internal_infogain_loss_param());
}
if (cached_has_bits & 0x00080000u) {
_internal_mutable_inner_product_param()->::opencv_caffe::InnerProductParameter::MergeFrom(from._internal_inner_product_param());
}
if (cached_has_bits & 0x00100000u) {
_internal_mutable_lrn_param()->::opencv_caffe::LRNParameter::MergeFrom(from._internal_lrn_param());
}
if (cached_has_bits & 0x00200000u) {
_internal_mutable_memory_data_param()->::opencv_caffe::MemoryDataParameter::MergeFrom(from._internal_memory_data_param());
}
if (cached_has_bits & 0x00400000u) {
_internal_mutable_mvn_param()->::opencv_caffe::MVNParameter::MergeFrom(from._internal_mvn_param());
}
if (cached_has_bits & 0x00800000u) {
_internal_mutable_pooling_param()->::opencv_caffe::PoolingParameter::MergeFrom(from._internal_pooling_param());
}
}
if (cached_has_bits & 0xff000000u) {
if (cached_has_bits & 0x01000000u) {
_internal_mutable_power_param()->::opencv_caffe::PowerParameter::MergeFrom(from._internal_power_param());
}
if (cached_has_bits & 0x02000000u) {
_internal_mutable_relu_param()->::opencv_caffe::ReLUParameter::MergeFrom(from._internal_relu_param());
}
if (cached_has_bits & 0x04000000u) {
_internal_mutable_sigmoid_param()->::opencv_caffe::SigmoidParameter::MergeFrom(from._internal_sigmoid_param());
}
if (cached_has_bits & 0x08000000u) {
_internal_mutable_softmax_param()->::opencv_caffe::SoftmaxParameter::MergeFrom(from._internal_softmax_param());
}
if (cached_has_bits & 0x10000000u) {
_internal_mutable_slice_param()->::opencv_caffe::SliceParameter::MergeFrom(from._internal_slice_param());
}
if (cached_has_bits & 0x20000000u) {
_internal_mutable_tanh_param()->::opencv_caffe::TanHParameter::MergeFrom(from._internal_tanh_param());
}
if (cached_has_bits & 0x40000000u) {
_internal_mutable_threshold_param()->::opencv_caffe::ThresholdParameter::MergeFrom(from._internal_threshold_param());
}
if (cached_has_bits & 0x80000000u) {
_internal_mutable_window_data_param()->::opencv_caffe::WindowDataParameter::MergeFrom(from._internal_window_data_param());
}
}
cached_has_bits = from._has_bits_[1];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_python_param()->::opencv_caffe::PythonParameter::MergeFrom(from._internal_python_param());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_prelu_param()->::opencv_caffe::PReLUParameter::MergeFrom(from._internal_prelu_param());
}
if (cached_has_bits & 0x00000004u) {
_internal_mutable_spp_param()->::opencv_caffe::SPPParameter::MergeFrom(from._internal_spp_param());
}
if (cached_has_bits & 0x00000008u) {
_internal_mutable_reshape_param()->::opencv_caffe::ReshapeParameter::MergeFrom(from._internal_reshape_param());
}
if (cached_has_bits & 0x00000010u) {
_internal_mutable_log_param()->::opencv_caffe::LogParameter::MergeFrom(from._internal_log_param());
}
if (cached_has_bits & 0x00000020u) {
_internal_mutable_flatten_param()->::opencv_caffe::FlattenParameter::MergeFrom(from._internal_flatten_param());
}
if (cached_has_bits & 0x00000040u) {
_internal_mutable_reduction_param()->::opencv_caffe::ReductionParameter::MergeFrom(from._internal_reduction_param());
}
if (cached_has_bits & 0x00000080u) {
_internal_mutable_embed_param()->::opencv_caffe::EmbedParameter::MergeFrom(from._internal_embed_param());
}
}
if (cached_has_bits & 0x0000ff00u) {
if (cached_has_bits & 0x00000100u) {
_internal_mutable_tile_param()->::opencv_caffe::TileParameter::MergeFrom(from._internal_tile_param());
}
if (cached_has_bits & 0x00000200u) {
_internal_mutable_batch_norm_param()->::opencv_caffe::BatchNormParameter::MergeFrom(from._internal_batch_norm_param());
}
if (cached_has_bits & 0x00000400u) {
_internal_mutable_elu_param()->::opencv_caffe::ELUParameter::MergeFrom(from._internal_elu_param());
}
if (cached_has_bits & 0x00000800u) {
_internal_mutable_bias_param()->::opencv_caffe::BiasParameter::MergeFrom(from._internal_bias_param());
}
if (cached_has_bits & 0x00001000u) {
_internal_mutable_scale_param()->::opencv_caffe::ScaleParameter::MergeFrom(from._internal_scale_param());
}
if (cached_has_bits & 0x00002000u) {
_internal_mutable_input_param()->::opencv_caffe::InputParameter::MergeFrom(from._internal_input_param());
}
if (cached_has_bits & 0x00004000u) {
_internal_mutable_crop_param()->::opencv_caffe::CropParameter::MergeFrom(from._internal_crop_param());
}
if (cached_has_bits & 0x00008000u) {
_internal_mutable_parameter_param()->::opencv_caffe::ParameterParameter::MergeFrom(from._internal_parameter_param());
}
}
if (cached_has_bits & 0x00ff0000u) {
if (cached_has_bits & 0x00010000u) {
_internal_mutable_recurrent_param()->::opencv_caffe::RecurrentParameter::MergeFrom(from._internal_recurrent_param());
}
if (cached_has_bits & 0x00020000u) {
_internal_mutable_detection_output_param()->::opencv_caffe::DetectionOutputParameter::MergeFrom(from._internal_detection_output_param());
}
if (cached_has_bits & 0x00040000u) {
_internal_mutable_permute_param()->::opencv_caffe::PermuteParameter::MergeFrom(from._internal_permute_param());
}
if (cached_has_bits & 0x00080000u) {
_internal_mutable_norm_param()->::opencv_caffe::NormalizeBBoxParameter::MergeFrom(from._internal_norm_param());
}
if (cached_has_bits & 0x00100000u) {
_internal_mutable_prior_box_param()->::opencv_caffe::PriorBoxParameter::MergeFrom(from._internal_prior_box_param());
}
if (cached_has_bits & 0x00200000u) {
_internal_mutable_proposal_param()->::opencv_caffe::ProposalParameter::MergeFrom(from._internal_proposal_param());
}
if (cached_has_bits & 0x00400000u) {
_internal_mutable_psroi_pooling_param()->::opencv_caffe::PSROIPoolingParameter::MergeFrom(from._internal_psroi_pooling_param());
}
if (cached_has_bits & 0x00800000u) {
_internal_mutable_roi_pooling_param()->::opencv_caffe::ROIPoolingParameter::MergeFrom(from._internal_roi_pooling_param());
}
}
if (cached_has_bits & 0x01000000u) {
_internal_set_phase(from._internal_phase());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void LayerParameter::CopyFrom(const LayerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.LayerParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool LayerParameter::IsInitialized() const {
if (_internal_has_psroi_pooling_param()) {
if (!psroi_pooling_param_->IsInitialized()) return false;
}
return true;
}
void LayerParameter::InternalSwap(LayerParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(_has_bits_[1], other->_has_bits_[1]);
bottom_.InternalSwap(&other->bottom_);
top_.InternalSwap(&other->top_);
loss_weight_.InternalSwap(&other->loss_weight_);
param_.InternalSwap(&other->param_);
blobs_.InternalSwap(&other->blobs_);
include_.InternalSwap(&other->include_);
exclude_.InternalSwap(&other->exclude_);
propagate_down_.InternalSwap(&other->propagate_down_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, lhs_arena,
&other->name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&type_, lhs_arena,
&other->type_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(LayerParameter, phase_)
+ sizeof(LayerParameter::phase_)
- PROTOBUF_FIELD_OFFSET(LayerParameter, transform_param_)>(
reinterpret_cast<char*>(&transform_param_),
reinterpret_cast<char*>(&other->transform_param_));
}
::PROTOBUF_NAMESPACE_ID::Metadata LayerParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[15]);
}
// ===================================================================
class TransformationParameter::_Internal {
public:
using HasBits = decltype(std::declval<TransformationParameter>()._has_bits_);
static void set_has_scale(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_mirror(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_crop_size(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_mean_file(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_force_color(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_force_gray(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
};
TransformationParameter::TransformationParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
mean_value_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.TransformationParameter)
}
TransformationParameter::TransformationParameter(const TransformationParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
mean_value_(from.mean_value_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_mean_file()) {
mean_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_mean_file(),
GetArenaForAllocation());
}
::memcpy(&crop_size_, &from.crop_size_,
static_cast<size_t>(reinterpret_cast<char*>(&scale_) -
reinterpret_cast<char*>(&crop_size_)) + sizeof(scale_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.TransformationParameter)
}
inline void TransformationParameter::SharedCtor() {
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&crop_size_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&force_gray_) -
reinterpret_cast<char*>(&crop_size_)) + sizeof(force_gray_));
scale_ = 1;
}
TransformationParameter::~TransformationParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.TransformationParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void TransformationParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
mean_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void TransformationParameter::ArenaDtor(void* object) {
TransformationParameter* _this = reinterpret_cast< TransformationParameter* >(object);
(void)_this;
}
void TransformationParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TransformationParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void TransformationParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.TransformationParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
mean_value_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
mean_file_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x0000003eu) {
::memset(&crop_size_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&force_gray_) -
reinterpret_cast<char*>(&crop_size_)) + sizeof(force_gray_));
scale_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* TransformationParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float scale = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_scale(&has_bits);
scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional bool mirror = 2 [default = false];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_mirror(&has_bits);
mirror_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 crop_size = 3 [default = 0];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_crop_size(&has_bits);
crop_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string mean_file = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_mean_file();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.TransformationParameter.mean_file");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float mean_value = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_mean_value(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<45>(ptr));
} else if (static_cast<uint8_t>(tag) == 42) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_mean_value(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool force_color = 6 [default = false];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_force_color(&has_bits);
force_color_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool force_gray = 7 [default = false];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_force_gray(&has_bits);
force_gray_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* TransformationParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.TransformationParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float scale = 1 [default = 1];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_scale(), target);
}
// optional bool mirror = 2 [default = false];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_mirror(), target);
}
// optional uint32 crop_size = 3 [default = 0];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_crop_size(), target);
}
// optional string mean_file = 4;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_mean_file().data(), static_cast<int>(this->_internal_mean_file().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.TransformationParameter.mean_file");
target = stream->WriteStringMaybeAliased(
4, this->_internal_mean_file(), target);
}
// repeated float mean_value = 5;
for (int i = 0, n = this->_internal_mean_value_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_mean_value(i), target);
}
// optional bool force_color = 6 [default = false];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_force_color(), target);
}
// optional bool force_gray = 7 [default = false];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_force_gray(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.TransformationParameter)
return target;
}
size_t TransformationParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.TransformationParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated float mean_value = 5;
{
unsigned int count = static_cast<unsigned int>(this->_internal_mean_value_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_mean_value_size());
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional string mean_file = 4;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_mean_file());
}
// optional uint32 crop_size = 3 [default = 0];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_size());
}
// optional bool mirror = 2 [default = false];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 1;
}
// optional bool force_color = 6 [default = false];
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 1;
}
// optional bool force_gray = 7 [default = false];
if (cached_has_bits & 0x00000010u) {
total_size += 1 + 1;
}
// optional float scale = 1 [default = 1];
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TransformationParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
TransformationParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TransformationParameter::GetClassData() const { return &_class_data_; }
void TransformationParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<TransformationParameter *>(to)->MergeFrom(
static_cast<const TransformationParameter &>(from));
}
void TransformationParameter::MergeFrom(const TransformationParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.TransformationParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
mean_value_.MergeFrom(from.mean_value_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_mean_file(from._internal_mean_file());
}
if (cached_has_bits & 0x00000002u) {
crop_size_ = from.crop_size_;
}
if (cached_has_bits & 0x00000004u) {
mirror_ = from.mirror_;
}
if (cached_has_bits & 0x00000008u) {
force_color_ = from.force_color_;
}
if (cached_has_bits & 0x00000010u) {
force_gray_ = from.force_gray_;
}
if (cached_has_bits & 0x00000020u) {
scale_ = from.scale_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void TransformationParameter::CopyFrom(const TransformationParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.TransformationParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TransformationParameter::IsInitialized() const {
return true;
}
void TransformationParameter::InternalSwap(TransformationParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
mean_value_.InternalSwap(&other->mean_value_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&mean_file_, lhs_arena,
&other->mean_file_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(TransformationParameter, force_gray_)
+ sizeof(TransformationParameter::force_gray_)
- PROTOBUF_FIELD_OFFSET(TransformationParameter, crop_size_)>(
reinterpret_cast<char*>(&crop_size_),
reinterpret_cast<char*>(&other->crop_size_));
swap(scale_, other->scale_);
}
::PROTOBUF_NAMESPACE_ID::Metadata TransformationParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[16]);
}
// ===================================================================
class LossParameter::_Internal {
public:
using HasBits = decltype(std::declval<LossParameter>()._has_bits_);
static void set_has_ignore_label(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_normalization(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_normalize(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
LossParameter::LossParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.LossParameter)
}
LossParameter::LossParameter(const LossParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&ignore_label_, &from.ignore_label_,
static_cast<size_t>(reinterpret_cast<char*>(&normalization_) -
reinterpret_cast<char*>(&ignore_label_)) + sizeof(normalization_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.LossParameter)
}
inline void LossParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&ignore_label_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&normalize_) -
reinterpret_cast<char*>(&ignore_label_)) + sizeof(normalize_));
normalization_ = 1;
}
LossParameter::~LossParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.LossParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void LossParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void LossParameter::ArenaDtor(void* object) {
LossParameter* _this = reinterpret_cast< LossParameter* >(object);
(void)_this;
}
void LossParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LossParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void LossParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.LossParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
::memset(&ignore_label_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&normalize_) -
reinterpret_cast<char*>(&ignore_label_)) + sizeof(normalize_));
normalization_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* LossParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 ignore_label = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_ignore_label(&has_bits);
ignore_label_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool normalize = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_normalize(&has_bits);
normalize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::LossParameter_NormalizationMode_IsValid(val))) {
_internal_set_normalization(static_cast<::opencv_caffe::LossParameter_NormalizationMode>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* LossParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.LossParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int32 ignore_label = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_ignore_label(), target);
}
// optional bool normalize = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_normalize(), target);
}
// optional .opencv_caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
3, this->_internal_normalization(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.LossParameter)
return target;
}
size_t LossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.LossParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional int32 ignore_label = 1;
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_ignore_label());
}
// optional bool normalize = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 1;
}
// optional .opencv_caffe.LossParameter.NormalizationMode normalization = 3 [default = VALID];
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_normalization());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LossParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
LossParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LossParameter::GetClassData() const { return &_class_data_; }
void LossParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<LossParameter *>(to)->MergeFrom(
static_cast<const LossParameter &>(from));
}
void LossParameter::MergeFrom(const LossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.LossParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
ignore_label_ = from.ignore_label_;
}
if (cached_has_bits & 0x00000002u) {
normalize_ = from.normalize_;
}
if (cached_has_bits & 0x00000004u) {
normalization_ = from.normalization_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void LossParameter::CopyFrom(const LossParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.LossParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool LossParameter::IsInitialized() const {
return true;
}
void LossParameter::InternalSwap(LossParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(LossParameter, normalize_)
+ sizeof(LossParameter::normalize_)
- PROTOBUF_FIELD_OFFSET(LossParameter, ignore_label_)>(
reinterpret_cast<char*>(&ignore_label_),
reinterpret_cast<char*>(&other->ignore_label_));
swap(normalization_, other->normalization_);
}
::PROTOBUF_NAMESPACE_ID::Metadata LossParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[17]);
}
// ===================================================================
class AccuracyParameter::_Internal {
public:
using HasBits = decltype(std::declval<AccuracyParameter>()._has_bits_);
static void set_has_top_k(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_ignore_label(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
AccuracyParameter::AccuracyParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.AccuracyParameter)
}
AccuracyParameter::AccuracyParameter(const AccuracyParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&ignore_label_, &from.ignore_label_,
static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
reinterpret_cast<char*>(&ignore_label_)) + sizeof(axis_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.AccuracyParameter)
}
inline void AccuracyParameter::SharedCtor() {
ignore_label_ = 0;
top_k_ = 1u;
axis_ = 1;
}
AccuracyParameter::~AccuracyParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.AccuracyParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void AccuracyParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void AccuracyParameter::ArenaDtor(void* object) {
AccuracyParameter* _this = reinterpret_cast< AccuracyParameter* >(object);
(void)_this;
}
void AccuracyParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void AccuracyParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void AccuracyParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.AccuracyParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
ignore_label_ = 0;
top_k_ = 1u;
axis_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* AccuracyParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 top_k = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_top_k(&has_bits);
top_k_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 axis = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 ignore_label = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_ignore_label(&has_bits);
ignore_label_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* AccuracyParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.AccuracyParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 top_k = 1 [default = 1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_top_k(), target);
}
// optional int32 axis = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), target);
}
// optional int32 ignore_label = 3;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_ignore_label(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.AccuracyParameter)
return target;
}
size_t AccuracyParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.AccuracyParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional int32 ignore_label = 3;
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_ignore_label());
}
// optional uint32 top_k = 1 [default = 1];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_top_k());
}
// optional int32 axis = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData AccuracyParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
AccuracyParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*AccuracyParameter::GetClassData() const { return &_class_data_; }
void AccuracyParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<AccuracyParameter *>(to)->MergeFrom(
static_cast<const AccuracyParameter &>(from));
}
void AccuracyParameter::MergeFrom(const AccuracyParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.AccuracyParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
ignore_label_ = from.ignore_label_;
}
if (cached_has_bits & 0x00000002u) {
top_k_ = from.top_k_;
}
if (cached_has_bits & 0x00000004u) {
axis_ = from.axis_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void AccuracyParameter::CopyFrom(const AccuracyParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.AccuracyParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool AccuracyParameter::IsInitialized() const {
return true;
}
void AccuracyParameter::InternalSwap(AccuracyParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(ignore_label_, other->ignore_label_);
swap(top_k_, other->top_k_);
swap(axis_, other->axis_);
}
::PROTOBUF_NAMESPACE_ID::Metadata AccuracyParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[18]);
}
// ===================================================================
class ArgMaxParameter::_Internal {
public:
using HasBits = decltype(std::declval<ArgMaxParameter>()._has_bits_);
static void set_has_out_max_val(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_top_k(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
ArgMaxParameter::ArgMaxParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ArgMaxParameter)
}
ArgMaxParameter::ArgMaxParameter(const ArgMaxParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&out_max_val_, &from.out_max_val_,
static_cast<size_t>(reinterpret_cast<char*>(&top_k_) -
reinterpret_cast<char*>(&out_max_val_)) + sizeof(top_k_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ArgMaxParameter)
}
inline void ArgMaxParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&out_max_val_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
reinterpret_cast<char*>(&out_max_val_)) + sizeof(axis_));
top_k_ = 1u;
}
ArgMaxParameter::~ArgMaxParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ArgMaxParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ArgMaxParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ArgMaxParameter::ArenaDtor(void* object) {
ArgMaxParameter* _this = reinterpret_cast< ArgMaxParameter* >(object);
(void)_this;
}
void ArgMaxParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ArgMaxParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ArgMaxParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ArgMaxParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
::memset(&out_max_val_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&axis_) -
reinterpret_cast<char*>(&out_max_val_)) + sizeof(axis_));
top_k_ = 1u;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ArgMaxParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional bool out_max_val = 1 [default = false];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_out_max_val(&has_bits);
out_max_val_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 top_k = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_top_k(&has_bits);
top_k_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 axis = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ArgMaxParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ArgMaxParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional bool out_max_val = 1 [default = false];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_out_max_val(), target);
}
// optional uint32 top_k = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_top_k(), target);
}
// optional int32 axis = 3;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_axis(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ArgMaxParameter)
return target;
}
size_t ArgMaxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ArgMaxParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional bool out_max_val = 1 [default = false];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 1;
}
// optional int32 axis = 3;
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
// optional uint32 top_k = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_top_k());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ArgMaxParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ArgMaxParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ArgMaxParameter::GetClassData() const { return &_class_data_; }
void ArgMaxParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ArgMaxParameter *>(to)->MergeFrom(
static_cast<const ArgMaxParameter &>(from));
}
void ArgMaxParameter::MergeFrom(const ArgMaxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ArgMaxParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
out_max_val_ = from.out_max_val_;
}
if (cached_has_bits & 0x00000002u) {
axis_ = from.axis_;
}
if (cached_has_bits & 0x00000004u) {
top_k_ = from.top_k_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ArgMaxParameter::CopyFrom(const ArgMaxParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ArgMaxParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ArgMaxParameter::IsInitialized() const {
return true;
}
void ArgMaxParameter::InternalSwap(ArgMaxParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ArgMaxParameter, axis_)
+ sizeof(ArgMaxParameter::axis_)
- PROTOBUF_FIELD_OFFSET(ArgMaxParameter, out_max_val_)>(
reinterpret_cast<char*>(&out_max_val_),
reinterpret_cast<char*>(&other->out_max_val_));
swap(top_k_, other->top_k_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ArgMaxParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[19]);
}
// ===================================================================
class ConcatParameter::_Internal {
public:
using HasBits = decltype(std::declval<ConcatParameter>()._has_bits_);
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_concat_dim(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
ConcatParameter::ConcatParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ConcatParameter)
}
ConcatParameter::ConcatParameter(const ConcatParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&concat_dim_, &from.concat_dim_,
static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
reinterpret_cast<char*>(&concat_dim_)) + sizeof(axis_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ConcatParameter)
}
inline void ConcatParameter::SharedCtor() {
concat_dim_ = 1u;
axis_ = 1;
}
ConcatParameter::~ConcatParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ConcatParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ConcatParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ConcatParameter::ArenaDtor(void* object) {
ConcatParameter* _this = reinterpret_cast< ConcatParameter* >(object);
(void)_this;
}
void ConcatParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ConcatParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ConcatParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ConcatParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
concat_dim_ = 1u;
axis_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ConcatParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 concat_dim = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_concat_dim(&has_bits);
concat_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 axis = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ConcatParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ConcatParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 concat_dim = 1 [default = 1];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_concat_dim(), target);
}
// optional int32 axis = 2 [default = 1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ConcatParameter)
return target;
}
size_t ConcatParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ConcatParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional uint32 concat_dim = 1 [default = 1];
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_concat_dim());
}
// optional int32 axis = 2 [default = 1];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ConcatParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ConcatParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ConcatParameter::GetClassData() const { return &_class_data_; }
void ConcatParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ConcatParameter *>(to)->MergeFrom(
static_cast<const ConcatParameter &>(from));
}
void ConcatParameter::MergeFrom(const ConcatParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ConcatParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
concat_dim_ = from.concat_dim_;
}
if (cached_has_bits & 0x00000002u) {
axis_ = from.axis_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ConcatParameter::CopyFrom(const ConcatParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ConcatParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ConcatParameter::IsInitialized() const {
return true;
}
void ConcatParameter::InternalSwap(ConcatParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(concat_dim_, other->concat_dim_);
swap(axis_, other->axis_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ConcatParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[20]);
}
// ===================================================================
class BatchNormParameter::_Internal {
public:
using HasBits = decltype(std::declval<BatchNormParameter>()._has_bits_);
static void set_has_use_global_stats(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_moving_average_fraction(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_eps(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_scale_bias(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
BatchNormParameter::BatchNormParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.BatchNormParameter)
}
BatchNormParameter::BatchNormParameter(const BatchNormParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&use_global_stats_, &from.use_global_stats_,
static_cast<size_t>(reinterpret_cast<char*>(&eps_) -
reinterpret_cast<char*>(&use_global_stats_)) + sizeof(eps_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.BatchNormParameter)
}
inline void BatchNormParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&use_global_stats_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&scale_bias_) -
reinterpret_cast<char*>(&use_global_stats_)) + sizeof(scale_bias_));
moving_average_fraction_ = 0.999f;
eps_ = 1e-05f;
}
BatchNormParameter::~BatchNormParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.BatchNormParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void BatchNormParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void BatchNormParameter::ArenaDtor(void* object) {
BatchNormParameter* _this = reinterpret_cast< BatchNormParameter* >(object);
(void)_this;
}
void BatchNormParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BatchNormParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void BatchNormParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.BatchNormParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
::memset(&use_global_stats_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&scale_bias_) -
reinterpret_cast<char*>(&use_global_stats_)) + sizeof(scale_bias_));
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000cu) {
moving_average_fraction_ = 0.999f;
eps_ = 1e-05f;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* BatchNormParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional bool use_global_stats = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_use_global_stats(&has_bits);
use_global_stats_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float moving_average_fraction = 2 [default = 0.999];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
_Internal::set_has_moving_average_fraction(&has_bits);
moving_average_fraction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float eps = 3 [default = 1e-05];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_eps(&has_bits);
eps_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional bool scale_bias = 7 [default = false];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_scale_bias(&has_bits);
scale_bias_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* BatchNormParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.BatchNormParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional bool use_global_stats = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_use_global_stats(), target);
}
// optional float moving_average_fraction = 2 [default = 0.999];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_moving_average_fraction(), target);
}
// optional float eps = 3 [default = 1e-05];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_eps(), target);
}
// optional bool scale_bias = 7 [default = false];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_scale_bias(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.BatchNormParameter)
return target;
}
size_t BatchNormParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.BatchNormParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
// optional bool use_global_stats = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 1;
}
// optional bool scale_bias = 7 [default = false];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 1;
}
// optional float moving_average_fraction = 2 [default = 0.999];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
// optional float eps = 3 [default = 1e-05];
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BatchNormParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
BatchNormParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BatchNormParameter::GetClassData() const { return &_class_data_; }
void BatchNormParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<BatchNormParameter *>(to)->MergeFrom(
static_cast<const BatchNormParameter &>(from));
}
void BatchNormParameter::MergeFrom(const BatchNormParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.BatchNormParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
use_global_stats_ = from.use_global_stats_;
}
if (cached_has_bits & 0x00000002u) {
scale_bias_ = from.scale_bias_;
}
if (cached_has_bits & 0x00000004u) {
moving_average_fraction_ = from.moving_average_fraction_;
}
if (cached_has_bits & 0x00000008u) {
eps_ = from.eps_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void BatchNormParameter::CopyFrom(const BatchNormParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.BatchNormParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool BatchNormParameter::IsInitialized() const {
return true;
}
void BatchNormParameter::InternalSwap(BatchNormParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(BatchNormParameter, scale_bias_)
+ sizeof(BatchNormParameter::scale_bias_)
- PROTOBUF_FIELD_OFFSET(BatchNormParameter, use_global_stats_)>(
reinterpret_cast<char*>(&use_global_stats_),
reinterpret_cast<char*>(&other->use_global_stats_));
swap(moving_average_fraction_, other->moving_average_fraction_);
swap(eps_, other->eps_);
}
::PROTOBUF_NAMESPACE_ID::Metadata BatchNormParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[21]);
}
// ===================================================================
class BiasParameter::_Internal {
public:
using HasBits = decltype(std::declval<BiasParameter>()._has_bits_);
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_num_axes(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static const ::opencv_caffe::FillerParameter& filler(const BiasParameter* msg);
static void set_has_filler(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
const ::opencv_caffe::FillerParameter&
BiasParameter::_Internal::filler(const BiasParameter* msg) {
return *msg->filler_;
}
BiasParameter::BiasParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.BiasParameter)
}
BiasParameter::BiasParameter(const BiasParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_filler()) {
filler_ = new ::opencv_caffe::FillerParameter(*from.filler_);
} else {
filler_ = nullptr;
}
::memcpy(&axis_, &from.axis_,
static_cast<size_t>(reinterpret_cast<char*>(&num_axes_) -
reinterpret_cast<char*>(&axis_)) + sizeof(num_axes_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.BiasParameter)
}
inline void BiasParameter::SharedCtor() {
filler_ = nullptr;
axis_ = 1;
num_axes_ = 1;
}
BiasParameter::~BiasParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.BiasParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void BiasParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete filler_;
}
void BiasParameter::ArenaDtor(void* object) {
BiasParameter* _this = reinterpret_cast< BiasParameter* >(object);
(void)_this;
}
void BiasParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void BiasParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void BiasParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.BiasParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(filler_ != nullptr);
filler_->Clear();
}
axis_ = 1;
num_axes_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* BiasParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 axis = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 num_axes = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_num_axes(&has_bits);
num_axes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter filler = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* BiasParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.BiasParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int32 axis = 1 [default = 1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
}
// optional int32 num_axes = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_axes(), target);
}
// optional .opencv_caffe.FillerParameter filler = 3;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
3, _Internal::filler(this), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.BiasParameter)
return target;
}
size_t BiasParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.BiasParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional .opencv_caffe.FillerParameter filler = 3;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*filler_);
}
// optional int32 axis = 1 [default = 1];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
// optional int32 num_axes = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_axes());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BiasParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
BiasParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BiasParameter::GetClassData() const { return &_class_data_; }
void BiasParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<BiasParameter *>(to)->MergeFrom(
static_cast<const BiasParameter &>(from));
}
void BiasParameter::MergeFrom(const BiasParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.BiasParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_filler());
}
if (cached_has_bits & 0x00000002u) {
axis_ = from.axis_;
}
if (cached_has_bits & 0x00000004u) {
num_axes_ = from.num_axes_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void BiasParameter::CopyFrom(const BiasParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.BiasParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool BiasParameter::IsInitialized() const {
return true;
}
void BiasParameter::InternalSwap(BiasParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(filler_, other->filler_);
swap(axis_, other->axis_);
swap(num_axes_, other->num_axes_);
}
::PROTOBUF_NAMESPACE_ID::Metadata BiasParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[22]);
}
// ===================================================================
class ContrastiveLossParameter::_Internal {
public:
using HasBits = decltype(std::declval<ContrastiveLossParameter>()._has_bits_);
static void set_has_margin(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_legacy_version(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
ContrastiveLossParameter::ContrastiveLossParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ContrastiveLossParameter)
}
ContrastiveLossParameter::ContrastiveLossParameter(const ContrastiveLossParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&legacy_version_, &from.legacy_version_,
static_cast<size_t>(reinterpret_cast<char*>(&margin_) -
reinterpret_cast<char*>(&legacy_version_)) + sizeof(margin_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ContrastiveLossParameter)
}
inline void ContrastiveLossParameter::SharedCtor() {
legacy_version_ = false;
margin_ = 1;
}
ContrastiveLossParameter::~ContrastiveLossParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ContrastiveLossParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ContrastiveLossParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ContrastiveLossParameter::ArenaDtor(void* object) {
ContrastiveLossParameter* _this = reinterpret_cast< ContrastiveLossParameter* >(object);
(void)_this;
}
void ContrastiveLossParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ContrastiveLossParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ContrastiveLossParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ContrastiveLossParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
legacy_version_ = false;
margin_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ContrastiveLossParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float margin = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_margin(&has_bits);
margin_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional bool legacy_version = 2 [default = false];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_legacy_version(&has_bits);
legacy_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ContrastiveLossParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ContrastiveLossParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float margin = 1 [default = 1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_margin(), target);
}
// optional bool legacy_version = 2 [default = false];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_legacy_version(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ContrastiveLossParameter)
return target;
}
size_t ContrastiveLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ContrastiveLossParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional bool legacy_version = 2 [default = false];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 1;
}
// optional float margin = 1 [default = 1];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ContrastiveLossParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ContrastiveLossParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ContrastiveLossParameter::GetClassData() const { return &_class_data_; }
void ContrastiveLossParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ContrastiveLossParameter *>(to)->MergeFrom(
static_cast<const ContrastiveLossParameter &>(from));
}
void ContrastiveLossParameter::MergeFrom(const ContrastiveLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ContrastiveLossParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
legacy_version_ = from.legacy_version_;
}
if (cached_has_bits & 0x00000002u) {
margin_ = from.margin_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ContrastiveLossParameter::CopyFrom(const ContrastiveLossParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ContrastiveLossParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ContrastiveLossParameter::IsInitialized() const {
return true;
}
void ContrastiveLossParameter::InternalSwap(ContrastiveLossParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(legacy_version_, other->legacy_version_);
swap(margin_, other->margin_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ContrastiveLossParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[23]);
}
// ===================================================================
class ConvolutionParameter::_Internal {
public:
using HasBits = decltype(std::declval<ConvolutionParameter>()._has_bits_);
static void set_has_num_output(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_bias_term(HasBits* has_bits) {
(*has_bits)[0] |= 4096u;
}
static void set_has_pad_h(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_pad_w(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_kernel_h(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_kernel_w(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_stride_h(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static void set_has_stride_w(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
static void set_has_group(HasBits* has_bits) {
(*has_bits)[0] |= 8192u;
}
static const ::opencv_caffe::FillerParameter& weight_filler(const ConvolutionParameter* msg);
static void set_has_weight_filler(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static const ::opencv_caffe::FillerParameter& bias_filler(const ConvolutionParameter* msg);
static void set_has_bias_filler(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_engine(HasBits* has_bits) {
(*has_bits)[0] |= 512u;
}
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 2048u;
}
static void set_has_force_nd_im2col(HasBits* has_bits) {
(*has_bits)[0] |= 1024u;
}
};
const ::opencv_caffe::FillerParameter&
ConvolutionParameter::_Internal::weight_filler(const ConvolutionParameter* msg) {
return *msg->weight_filler_;
}
const ::opencv_caffe::FillerParameter&
ConvolutionParameter::_Internal::bias_filler(const ConvolutionParameter* msg) {
return *msg->bias_filler_;
}
ConvolutionParameter::ConvolutionParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
pad_(arena),
kernel_size_(arena),
stride_(arena),
dilation_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ConvolutionParameter)
}
ConvolutionParameter::ConvolutionParameter(const ConvolutionParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
pad_(from.pad_),
kernel_size_(from.kernel_size_),
stride_(from.stride_),
dilation_(from.dilation_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_weight_filler()) {
weight_filler_ = new ::opencv_caffe::FillerParameter(*from.weight_filler_);
} else {
weight_filler_ = nullptr;
}
if (from._internal_has_bias_filler()) {
bias_filler_ = new ::opencv_caffe::FillerParameter(*from.bias_filler_);
} else {
bias_filler_ = nullptr;
}
::memcpy(&num_output_, &from.num_output_,
static_cast<size_t>(reinterpret_cast<char*>(&group_) -
reinterpret_cast<char*>(&num_output_)) + sizeof(group_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ConvolutionParameter)
}
inline void ConvolutionParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&force_nd_im2col_) -
reinterpret_cast<char*>(&weight_filler_)) + sizeof(force_nd_im2col_));
axis_ = 1;
bias_term_ = true;
group_ = 1u;
}
ConvolutionParameter::~ConvolutionParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ConvolutionParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ConvolutionParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete weight_filler_;
if (this != internal_default_instance()) delete bias_filler_;
}
void ConvolutionParameter::ArenaDtor(void* object) {
ConvolutionParameter* _this = reinterpret_cast< ConvolutionParameter* >(object);
(void)_this;
}
void ConvolutionParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ConvolutionParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ConvolutionParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ConvolutionParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
pad_.Clear();
kernel_size_.Clear();
stride_.Clear();
dilation_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(weight_filler_ != nullptr);
weight_filler_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(bias_filler_ != nullptr);
bias_filler_->Clear();
}
}
if (cached_has_bits & 0x000000fcu) {
::memset(&num_output_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&stride_h_) -
reinterpret_cast<char*>(&num_output_)) + sizeof(stride_h_));
}
if (cached_has_bits & 0x00003f00u) {
::memset(&stride_w_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&force_nd_im2col_) -
reinterpret_cast<char*>(&stride_w_)) + sizeof(force_nd_im2col_));
axis_ = 1;
bias_term_ = true;
group_ = 1u;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ConvolutionParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 num_output = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_num_output(&has_bits);
num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool bias_term = 2 [default = true];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_bias_term(&has_bits);
bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated uint32 pad = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_pad(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
} else if (static_cast<uint8_t>(tag) == 26) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_pad(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated uint32 kernel_size = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_kernel_size(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
} else if (static_cast<uint8_t>(tag) == 34) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_kernel_size(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 group = 5 [default = 1];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_group(&has_bits);
group_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated uint32 stride = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_stride(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<48>(ptr));
} else if (static_cast<uint8_t>(tag) == 50) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_stride(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter weight_filler = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter bias_filler = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 pad_h = 9 [default = 0];
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
_Internal::set_has_pad_h(&has_bits);
pad_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 pad_w = 10 [default = 0];
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_pad_w(&has_bits);
pad_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 kernel_h = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
_Internal::set_has_kernel_h(&has_bits);
kernel_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 kernel_w = 12;
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
_Internal::set_has_kernel_w(&has_bits);
kernel_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 stride_h = 13;
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
_Internal::set_has_stride_h(&has_bits);
stride_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 stride_w = 14;
case 14:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
_Internal::set_has_stride_w(&has_bits);
stride_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
case 15:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::ConvolutionParameter_Engine_IsValid(val))) {
_internal_set_engine(static_cast<::opencv_caffe::ConvolutionParameter_Engine>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(15, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional int32 axis = 16 [default = 1];
case 16:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool force_nd_im2col = 17 [default = false];
case 17:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
_Internal::set_has_force_nd_im2col(&has_bits);
force_nd_im2col_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated uint32 dilation = 18;
case 18:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
ptr -= 2;
do {
ptr += 2;
_internal_add_dilation(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<144>(ptr));
} else if (static_cast<uint8_t>(tag) == 146) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_dilation(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ConvolutionParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ConvolutionParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 num_output = 1;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
}
// optional bool bias_term = 2 [default = true];
if (cached_has_bits & 0x00001000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_bias_term(), target);
}
// repeated uint32 pad = 3;
for (int i = 0, n = this->_internal_pad_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_pad(i), target);
}
// repeated uint32 kernel_size = 4;
for (int i = 0, n = this->_internal_kernel_size_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_kernel_size(i), target);
}
// optional uint32 group = 5 [default = 1];
if (cached_has_bits & 0x00002000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_group(), target);
}
// repeated uint32 stride = 6;
for (int i = 0, n = this->_internal_stride_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_stride(i), target);
}
// optional .opencv_caffe.FillerParameter weight_filler = 7;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
7, _Internal::weight_filler(this), target, stream);
}
// optional .opencv_caffe.FillerParameter bias_filler = 8;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
8, _Internal::bias_filler(this), target, stream);
}
// optional uint32 pad_h = 9 [default = 0];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(9, this->_internal_pad_h(), target);
}
// optional uint32 pad_w = 10 [default = 0];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_pad_w(), target);
}
// optional uint32 kernel_h = 11;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(11, this->_internal_kernel_h(), target);
}
// optional uint32 kernel_w = 12;
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(12, this->_internal_kernel_w(), target);
}
// optional uint32 stride_h = 13;
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(13, this->_internal_stride_h(), target);
}
// optional uint32 stride_w = 14;
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(14, this->_internal_stride_w(), target);
}
// optional .opencv_caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
15, this->_internal_engine(), target);
}
// optional int32 axis = 16 [default = 1];
if (cached_has_bits & 0x00000800u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(16, this->_internal_axis(), target);
}
// optional bool force_nd_im2col = 17 [default = false];
if (cached_has_bits & 0x00000400u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(17, this->_internal_force_nd_im2col(), target);
}
// repeated uint32 dilation = 18;
for (int i = 0, n = this->_internal_dilation_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(18, this->_internal_dilation(i), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ConvolutionParameter)
return target;
}
size_t ConvolutionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ConvolutionParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated uint32 pad = 3;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->pad_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_pad_size());
total_size += data_size;
}
// repeated uint32 kernel_size = 4;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->kernel_size_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_kernel_size_size());
total_size += data_size;
}
// repeated uint32 stride = 6;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->stride_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_stride_size());
total_size += data_size;
}
// repeated uint32 dilation = 18;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->dilation_);
total_size += 2 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_dilation_size());
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional .opencv_caffe.FillerParameter weight_filler = 7;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*weight_filler_);
}
// optional .opencv_caffe.FillerParameter bias_filler = 8;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*bias_filler_);
}
// optional uint32 num_output = 1;
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
}
// optional uint32 pad_h = 9 [default = 0];
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_h());
}
// optional uint32 pad_w = 10 [default = 0];
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_w());
}
// optional uint32 kernel_h = 11;
if (cached_has_bits & 0x00000020u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_h());
}
// optional uint32 kernel_w = 12;
if (cached_has_bits & 0x00000040u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_w());
}
// optional uint32 stride_h = 13;
if (cached_has_bits & 0x00000080u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_h());
}
}
if (cached_has_bits & 0x00003f00u) {
// optional uint32 stride_w = 14;
if (cached_has_bits & 0x00000100u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_w());
}
// optional .opencv_caffe.ConvolutionParameter.Engine engine = 15 [default = DEFAULT];
if (cached_has_bits & 0x00000200u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
}
// optional bool force_nd_im2col = 17 [default = false];
if (cached_has_bits & 0x00000400u) {
total_size += 2 + 1;
}
// optional int32 axis = 16 [default = 1];
if (cached_has_bits & 0x00000800u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_axis());
}
// optional bool bias_term = 2 [default = true];
if (cached_has_bits & 0x00001000u) {
total_size += 1 + 1;
}
// optional uint32 group = 5 [default = 1];
if (cached_has_bits & 0x00002000u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_group());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ConvolutionParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ConvolutionParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ConvolutionParameter::GetClassData() const { return &_class_data_; }
void ConvolutionParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ConvolutionParameter *>(to)->MergeFrom(
static_cast<const ConvolutionParameter &>(from));
}
void ConvolutionParameter::MergeFrom(const ConvolutionParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ConvolutionParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
pad_.MergeFrom(from.pad_);
kernel_size_.MergeFrom(from.kernel_size_);
stride_.MergeFrom(from.stride_);
dilation_.MergeFrom(from.dilation_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_weight_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
}
if (cached_has_bits & 0x00000004u) {
num_output_ = from.num_output_;
}
if (cached_has_bits & 0x00000008u) {
pad_h_ = from.pad_h_;
}
if (cached_has_bits & 0x00000010u) {
pad_w_ = from.pad_w_;
}
if (cached_has_bits & 0x00000020u) {
kernel_h_ = from.kernel_h_;
}
if (cached_has_bits & 0x00000040u) {
kernel_w_ = from.kernel_w_;
}
if (cached_has_bits & 0x00000080u) {
stride_h_ = from.stride_h_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00003f00u) {
if (cached_has_bits & 0x00000100u) {
stride_w_ = from.stride_w_;
}
if (cached_has_bits & 0x00000200u) {
engine_ = from.engine_;
}
if (cached_has_bits & 0x00000400u) {
force_nd_im2col_ = from.force_nd_im2col_;
}
if (cached_has_bits & 0x00000800u) {
axis_ = from.axis_;
}
if (cached_has_bits & 0x00001000u) {
bias_term_ = from.bias_term_;
}
if (cached_has_bits & 0x00002000u) {
group_ = from.group_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ConvolutionParameter::CopyFrom(const ConvolutionParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ConvolutionParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ConvolutionParameter::IsInitialized() const {
return true;
}
void ConvolutionParameter::InternalSwap(ConvolutionParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
pad_.InternalSwap(&other->pad_);
kernel_size_.InternalSwap(&other->kernel_size_);
stride_.InternalSwap(&other->stride_);
dilation_.InternalSwap(&other->dilation_);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ConvolutionParameter, force_nd_im2col_)
+ sizeof(ConvolutionParameter::force_nd_im2col_)
- PROTOBUF_FIELD_OFFSET(ConvolutionParameter, weight_filler_)>(
reinterpret_cast<char*>(&weight_filler_),
reinterpret_cast<char*>(&other->weight_filler_));
swap(axis_, other->axis_);
swap(bias_term_, other->bias_term_);
swap(group_, other->group_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ConvolutionParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[24]);
}
// ===================================================================
class CropParameter::_Internal {
public:
using HasBits = decltype(std::declval<CropParameter>()._has_bits_);
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
CropParameter::CropParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
offset_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.CropParameter)
}
CropParameter::CropParameter(const CropParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
offset_(from.offset_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
axis_ = from.axis_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.CropParameter)
}
inline void CropParameter::SharedCtor() {
axis_ = 2;
}
CropParameter::~CropParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.CropParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void CropParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void CropParameter::ArenaDtor(void* object) {
CropParameter* _this = reinterpret_cast< CropParameter* >(object);
(void)_this;
}
void CropParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void CropParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void CropParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.CropParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
offset_.Clear();
axis_ = 2;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* CropParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 axis = 1 [default = 2];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated uint32 offset = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_offset(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
} else if (static_cast<uint8_t>(tag) == 18) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_offset(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* CropParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.CropParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int32 axis = 1 [default = 2];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
}
// repeated uint32 offset = 2;
for (int i = 0, n = this->_internal_offset_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_offset(i), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.CropParameter)
return target;
}
size_t CropParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.CropParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated uint32 offset = 2;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->offset_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_offset_size());
total_size += data_size;
}
// optional int32 axis = 1 [default = 2];
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CropParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
CropParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CropParameter::GetClassData() const { return &_class_data_; }
void CropParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<CropParameter *>(to)->MergeFrom(
static_cast<const CropParameter &>(from));
}
void CropParameter::MergeFrom(const CropParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.CropParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
offset_.MergeFrom(from.offset_);
if (from._internal_has_axis()) {
_internal_set_axis(from._internal_axis());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void CropParameter::CopyFrom(const CropParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.CropParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool CropParameter::IsInitialized() const {
return true;
}
void CropParameter::InternalSwap(CropParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
offset_.InternalSwap(&other->offset_);
swap(axis_, other->axis_);
}
::PROTOBUF_NAMESPACE_ID::Metadata CropParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[25]);
}
// ===================================================================
class DataParameter::_Internal {
public:
using HasBits = decltype(std::declval<DataParameter>()._has_bits_);
static void set_has_source(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_batch_size(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_rand_skip(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_backend(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static void set_has_scale(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
static void set_has_mean_file(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_crop_size(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_mirror(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_force_encoded_color(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_prefetch(HasBits* has_bits) {
(*has_bits)[0] |= 512u;
}
};
DataParameter::DataParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.DataParameter)
}
DataParameter::DataParameter(const DataParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_source()) {
source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(),
GetArenaForAllocation());
}
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_mean_file()) {
mean_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_mean_file(),
GetArenaForAllocation());
}
::memcpy(&batch_size_, &from.batch_size_,
static_cast<size_t>(reinterpret_cast<char*>(&prefetch_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(prefetch_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.DataParameter)
}
inline void DataParameter::SharedCtor() {
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&batch_size_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&backend_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(backend_));
scale_ = 1;
prefetch_ = 4u;
}
DataParameter::~DataParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.DataParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void DataParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
mean_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void DataParameter::ArenaDtor(void* object) {
DataParameter* _this = reinterpret_cast< DataParameter* >(object);
(void)_this;
}
void DataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DataParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void DataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.DataParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
source_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
mean_file_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x000000fcu) {
::memset(&batch_size_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&backend_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(backend_));
}
if (cached_has_bits & 0x00000300u) {
scale_ = 1;
prefetch_ = 4u;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* DataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string source = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_source();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.DataParameter.source");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float scale = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
_Internal::set_has_scale(&has_bits);
scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional string mean_file = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_mean_file();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.DataParameter.mean_file");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 batch_size = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_batch_size(&has_bits);
batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 crop_size = 5 [default = 0];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_crop_size(&has_bits);
crop_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool mirror = 6 [default = false];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_mirror(&has_bits);
mirror_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 rand_skip = 7 [default = 0];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_rand_skip(&has_bits);
rand_skip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.DataParameter.DB backend = 8 [default = LEVELDB];
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::DataParameter_DB_IsValid(val))) {
_internal_set_backend(static_cast<::opencv_caffe::DataParameter_DB>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(8, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional bool force_encoded_color = 9 [default = false];
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
_Internal::set_has_force_encoded_color(&has_bits);
force_encoded_color_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 prefetch = 10 [default = 4];
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_prefetch(&has_bits);
prefetch_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* DataParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.DataParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string source = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.DataParameter.source");
target = stream->WriteStringMaybeAliased(
1, this->_internal_source(), target);
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_scale(), target);
}
// optional string mean_file = 3;
if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_mean_file().data(), static_cast<int>(this->_internal_mean_file().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.DataParameter.mean_file");
target = stream->WriteStringMaybeAliased(
3, this->_internal_mean_file(), target);
}
// optional uint32 batch_size = 4;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_batch_size(), target);
}
// optional uint32 crop_size = 5 [default = 0];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_crop_size(), target);
}
// optional bool mirror = 6 [default = false];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_mirror(), target);
}
// optional uint32 rand_skip = 7 [default = 0];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_rand_skip(), target);
}
// optional .opencv_caffe.DataParameter.DB backend = 8 [default = LEVELDB];
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
8, this->_internal_backend(), target);
}
// optional bool force_encoded_color = 9 [default = false];
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(9, this->_internal_force_encoded_color(), target);
}
// optional uint32 prefetch = 10 [default = 4];
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_prefetch(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.DataParameter)
return target;
}
size_t DataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.DataParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string source = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_source());
}
// optional string mean_file = 3;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_mean_file());
}
// optional uint32 batch_size = 4;
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
}
// optional uint32 crop_size = 5 [default = 0];
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_size());
}
// optional uint32 rand_skip = 7 [default = 0];
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_rand_skip());
}
// optional bool mirror = 6 [default = false];
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 1;
}
// optional bool force_encoded_color = 9 [default = false];
if (cached_has_bits & 0x00000040u) {
total_size += 1 + 1;
}
// optional .opencv_caffe.DataParameter.DB backend = 8 [default = LEVELDB];
if (cached_has_bits & 0x00000080u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_backend());
}
}
if (cached_has_bits & 0x00000300u) {
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000100u) {
total_size += 1 + 4;
}
// optional uint32 prefetch = 10 [default = 4];
if (cached_has_bits & 0x00000200u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_prefetch());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DataParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
DataParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DataParameter::GetClassData() const { return &_class_data_; }
void DataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<DataParameter *>(to)->MergeFrom(
static_cast<const DataParameter &>(from));
}
void DataParameter::MergeFrom(const DataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.DataParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_source(from._internal_source());
}
if (cached_has_bits & 0x00000002u) {
_internal_set_mean_file(from._internal_mean_file());
}
if (cached_has_bits & 0x00000004u) {
batch_size_ = from.batch_size_;
}
if (cached_has_bits & 0x00000008u) {
crop_size_ = from.crop_size_;
}
if (cached_has_bits & 0x00000010u) {
rand_skip_ = from.rand_skip_;
}
if (cached_has_bits & 0x00000020u) {
mirror_ = from.mirror_;
}
if (cached_has_bits & 0x00000040u) {
force_encoded_color_ = from.force_encoded_color_;
}
if (cached_has_bits & 0x00000080u) {
backend_ = from.backend_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00000300u) {
if (cached_has_bits & 0x00000100u) {
scale_ = from.scale_;
}
if (cached_has_bits & 0x00000200u) {
prefetch_ = from.prefetch_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void DataParameter::CopyFrom(const DataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.DataParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DataParameter::IsInitialized() const {
return true;
}
void DataParameter::InternalSwap(DataParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&source_, lhs_arena,
&other->source_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&mean_file_, lhs_arena,
&other->mean_file_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(DataParameter, backend_)
+ sizeof(DataParameter::backend_)
- PROTOBUF_FIELD_OFFSET(DataParameter, batch_size_)>(
reinterpret_cast<char*>(&batch_size_),
reinterpret_cast<char*>(&other->batch_size_));
swap(scale_, other->scale_);
swap(prefetch_, other->prefetch_);
}
::PROTOBUF_NAMESPACE_ID::Metadata DataParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[26]);
}
// ===================================================================
class NonMaximumSuppressionParameter::_Internal {
public:
using HasBits = decltype(std::declval<NonMaximumSuppressionParameter>()._has_bits_);
static void set_has_nms_threshold(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_top_k(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_eta(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
NonMaximumSuppressionParameter::NonMaximumSuppressionParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.NonMaximumSuppressionParameter)
}
NonMaximumSuppressionParameter::NonMaximumSuppressionParameter(const NonMaximumSuppressionParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&top_k_, &from.top_k_,
static_cast<size_t>(reinterpret_cast<char*>(&eta_) -
reinterpret_cast<char*>(&top_k_)) + sizeof(eta_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.NonMaximumSuppressionParameter)
}
inline void NonMaximumSuppressionParameter::SharedCtor() {
top_k_ = 0;
nms_threshold_ = 0.3f;
eta_ = 1;
}
NonMaximumSuppressionParameter::~NonMaximumSuppressionParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.NonMaximumSuppressionParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void NonMaximumSuppressionParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void NonMaximumSuppressionParameter::ArenaDtor(void* object) {
NonMaximumSuppressionParameter* _this = reinterpret_cast< NonMaximumSuppressionParameter* >(object);
(void)_this;
}
void NonMaximumSuppressionParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NonMaximumSuppressionParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void NonMaximumSuppressionParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.NonMaximumSuppressionParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
top_k_ = 0;
nms_threshold_ = 0.3f;
eta_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* NonMaximumSuppressionParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float nms_threshold = 1 [default = 0.3];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_nms_threshold(&has_bits);
nms_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional int32 top_k = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_top_k(&has_bits);
top_k_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float eta = 3 [default = 1];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_eta(&has_bits);
eta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* NonMaximumSuppressionParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NonMaximumSuppressionParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float nms_threshold = 1 [default = 0.3];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_nms_threshold(), target);
}
// optional int32 top_k = 2;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_top_k(), target);
}
// optional float eta = 3 [default = 1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_eta(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.NonMaximumSuppressionParameter)
return target;
}
size_t NonMaximumSuppressionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NonMaximumSuppressionParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional int32 top_k = 2;
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_top_k());
}
// optional float nms_threshold = 1 [default = 0.3];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 4;
}
// optional float eta = 3 [default = 1];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NonMaximumSuppressionParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
NonMaximumSuppressionParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NonMaximumSuppressionParameter::GetClassData() const { return &_class_data_; }
void NonMaximumSuppressionParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<NonMaximumSuppressionParameter *>(to)->MergeFrom(
static_cast<const NonMaximumSuppressionParameter &>(from));
}
void NonMaximumSuppressionParameter::MergeFrom(const NonMaximumSuppressionParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.NonMaximumSuppressionParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
top_k_ = from.top_k_;
}
if (cached_has_bits & 0x00000002u) {
nms_threshold_ = from.nms_threshold_;
}
if (cached_has_bits & 0x00000004u) {
eta_ = from.eta_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void NonMaximumSuppressionParameter::CopyFrom(const NonMaximumSuppressionParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.NonMaximumSuppressionParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NonMaximumSuppressionParameter::IsInitialized() const {
return true;
}
void NonMaximumSuppressionParameter::InternalSwap(NonMaximumSuppressionParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(top_k_, other->top_k_);
swap(nms_threshold_, other->nms_threshold_);
swap(eta_, other->eta_);
}
::PROTOBUF_NAMESPACE_ID::Metadata NonMaximumSuppressionParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[27]);
}
// ===================================================================
class SaveOutputParameter::_Internal {
public:
using HasBits = decltype(std::declval<SaveOutputParameter>()._has_bits_);
static void set_has_output_directory(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_output_name_prefix(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_output_format(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_label_map_file(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_name_size_file(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_num_test_image(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
};
SaveOutputParameter::SaveOutputParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.SaveOutputParameter)
}
SaveOutputParameter::SaveOutputParameter(const SaveOutputParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
output_directory_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_directory_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_output_directory()) {
output_directory_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_output_directory(),
GetArenaForAllocation());
}
output_name_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_name_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_output_name_prefix()) {
output_name_prefix_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_output_name_prefix(),
GetArenaForAllocation());
}
output_format_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_format_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_output_format()) {
output_format_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_output_format(),
GetArenaForAllocation());
}
label_map_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
label_map_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_label_map_file()) {
label_map_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_label_map_file(),
GetArenaForAllocation());
}
name_size_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_size_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name_size_file()) {
name_size_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name_size_file(),
GetArenaForAllocation());
}
num_test_image_ = from.num_test_image_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.SaveOutputParameter)
}
inline void SaveOutputParameter::SharedCtor() {
output_directory_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_directory_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_name_prefix_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_name_prefix_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_format_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
output_format_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
label_map_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
label_map_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_size_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_size_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
num_test_image_ = 0u;
}
SaveOutputParameter::~SaveOutputParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.SaveOutputParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void SaveOutputParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
output_directory_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
output_name_prefix_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
output_format_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
label_map_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
name_size_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void SaveOutputParameter::ArenaDtor(void* object) {
SaveOutputParameter* _this = reinterpret_cast< SaveOutputParameter* >(object);
(void)_this;
}
void SaveOutputParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SaveOutputParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void SaveOutputParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.SaveOutputParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
if (cached_has_bits & 0x00000001u) {
output_directory_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
output_name_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
output_format_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
label_map_file_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000010u) {
name_size_file_.ClearNonDefaultToEmpty();
}
}
num_test_image_ = 0u;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* SaveOutputParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string output_directory = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_output_directory();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SaveOutputParameter.output_directory");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string output_name_prefix = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_output_name_prefix();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SaveOutputParameter.output_name_prefix");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string output_format = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_output_format();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SaveOutputParameter.output_format");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string label_map_file = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_label_map_file();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SaveOutputParameter.label_map_file");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string name_size_file = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
auto str = _internal_mutable_name_size_file();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.SaveOutputParameter.name_size_file");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 num_test_image = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_num_test_image(&has_bits);
num_test_image_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* SaveOutputParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SaveOutputParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string output_directory = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_output_directory().data(), static_cast<int>(this->_internal_output_directory().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SaveOutputParameter.output_directory");
target = stream->WriteStringMaybeAliased(
1, this->_internal_output_directory(), target);
}
// optional string output_name_prefix = 2;
if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_output_name_prefix().data(), static_cast<int>(this->_internal_output_name_prefix().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SaveOutputParameter.output_name_prefix");
target = stream->WriteStringMaybeAliased(
2, this->_internal_output_name_prefix(), target);
}
// optional string output_format = 3;
if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_output_format().data(), static_cast<int>(this->_internal_output_format().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SaveOutputParameter.output_format");
target = stream->WriteStringMaybeAliased(
3, this->_internal_output_format(), target);
}
// optional string label_map_file = 4;
if (cached_has_bits & 0x00000008u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_label_map_file().data(), static_cast<int>(this->_internal_label_map_file().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SaveOutputParameter.label_map_file");
target = stream->WriteStringMaybeAliased(
4, this->_internal_label_map_file(), target);
}
// optional string name_size_file = 5;
if (cached_has_bits & 0x00000010u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name_size_file().data(), static_cast<int>(this->_internal_name_size_file().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.SaveOutputParameter.name_size_file");
target = stream->WriteStringMaybeAliased(
5, this->_internal_name_size_file(), target);
}
// optional uint32 num_test_image = 6;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_num_test_image(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.SaveOutputParameter)
return target;
}
size_t SaveOutputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SaveOutputParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional string output_directory = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_output_directory());
}
// optional string output_name_prefix = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_output_name_prefix());
}
// optional string output_format = 3;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_output_format());
}
// optional string label_map_file = 4;
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_label_map_file());
}
// optional string name_size_file = 5;
if (cached_has_bits & 0x00000010u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name_size_file());
}
// optional uint32 num_test_image = 6;
if (cached_has_bits & 0x00000020u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_test_image());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SaveOutputParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
SaveOutputParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SaveOutputParameter::GetClassData() const { return &_class_data_; }
void SaveOutputParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<SaveOutputParameter *>(to)->MergeFrom(
static_cast<const SaveOutputParameter &>(from));
}
void SaveOutputParameter::MergeFrom(const SaveOutputParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.SaveOutputParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_output_directory(from._internal_output_directory());
}
if (cached_has_bits & 0x00000002u) {
_internal_set_output_name_prefix(from._internal_output_name_prefix());
}
if (cached_has_bits & 0x00000004u) {
_internal_set_output_format(from._internal_output_format());
}
if (cached_has_bits & 0x00000008u) {
_internal_set_label_map_file(from._internal_label_map_file());
}
if (cached_has_bits & 0x00000010u) {
_internal_set_name_size_file(from._internal_name_size_file());
}
if (cached_has_bits & 0x00000020u) {
num_test_image_ = from.num_test_image_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void SaveOutputParameter::CopyFrom(const SaveOutputParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.SaveOutputParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SaveOutputParameter::IsInitialized() const {
return true;
}
void SaveOutputParameter::InternalSwap(SaveOutputParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&output_directory_, lhs_arena,
&other->output_directory_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&output_name_prefix_, lhs_arena,
&other->output_name_prefix_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&output_format_, lhs_arena,
&other->output_format_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&label_map_file_, lhs_arena,
&other->label_map_file_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_size_file_, lhs_arena,
&other->name_size_file_, rhs_arena
);
swap(num_test_image_, other->num_test_image_);
}
::PROTOBUF_NAMESPACE_ID::Metadata SaveOutputParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[28]);
}
// ===================================================================
class DropoutParameter::_Internal {
public:
using HasBits = decltype(std::declval<DropoutParameter>()._has_bits_);
static void set_has_dropout_ratio(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_scale_train(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
DropoutParameter::DropoutParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.DropoutParameter)
}
DropoutParameter::DropoutParameter(const DropoutParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&dropout_ratio_, &from.dropout_ratio_,
static_cast<size_t>(reinterpret_cast<char*>(&scale_train_) -
reinterpret_cast<char*>(&dropout_ratio_)) + sizeof(scale_train_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.DropoutParameter)
}
inline void DropoutParameter::SharedCtor() {
dropout_ratio_ = 0.5f;
scale_train_ = true;
}
DropoutParameter::~DropoutParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.DropoutParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void DropoutParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void DropoutParameter::ArenaDtor(void* object) {
DropoutParameter* _this = reinterpret_cast< DropoutParameter* >(object);
(void)_this;
}
void DropoutParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DropoutParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void DropoutParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.DropoutParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
dropout_ratio_ = 0.5f;
scale_train_ = true;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* DropoutParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float dropout_ratio = 1 [default = 0.5];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_dropout_ratio(&has_bits);
dropout_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional bool scale_train = 2 [default = true];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_scale_train(&has_bits);
scale_train_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* DropoutParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.DropoutParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float dropout_ratio = 1 [default = 0.5];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_dropout_ratio(), target);
}
// optional bool scale_train = 2 [default = true];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_scale_train(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.DropoutParameter)
return target;
}
size_t DropoutParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.DropoutParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional float dropout_ratio = 1 [default = 0.5];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 4;
}
// optional bool scale_train = 2 [default = true];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DropoutParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
DropoutParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DropoutParameter::GetClassData() const { return &_class_data_; }
void DropoutParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<DropoutParameter *>(to)->MergeFrom(
static_cast<const DropoutParameter &>(from));
}
void DropoutParameter::MergeFrom(const DropoutParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.DropoutParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
dropout_ratio_ = from.dropout_ratio_;
}
if (cached_has_bits & 0x00000002u) {
scale_train_ = from.scale_train_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void DropoutParameter::CopyFrom(const DropoutParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.DropoutParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DropoutParameter::IsInitialized() const {
return true;
}
void DropoutParameter::InternalSwap(DropoutParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(dropout_ratio_, other->dropout_ratio_);
swap(scale_train_, other->scale_train_);
}
::PROTOBUF_NAMESPACE_ID::Metadata DropoutParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[29]);
}
// ===================================================================
class DummyDataParameter::_Internal {
public:
};
DummyDataParameter::DummyDataParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
data_filler_(arena),
num_(arena),
channels_(arena),
height_(arena),
width_(arena),
shape_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.DummyDataParameter)
}
DummyDataParameter::DummyDataParameter(const DummyDataParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
data_filler_(from.data_filler_),
num_(from.num_),
channels_(from.channels_),
height_(from.height_),
width_(from.width_),
shape_(from.shape_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:opencv_caffe.DummyDataParameter)
}
inline void DummyDataParameter::SharedCtor() {
}
DummyDataParameter::~DummyDataParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.DummyDataParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void DummyDataParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void DummyDataParameter::ArenaDtor(void* object) {
DummyDataParameter* _this = reinterpret_cast< DummyDataParameter* >(object);
(void)_this;
}
void DummyDataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void DummyDataParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void DummyDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.DummyDataParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
data_filler_.Clear();
num_.Clear();
channels_.Clear();
height_.Clear();
width_.Clear();
shape_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* DummyDataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .opencv_caffe.FillerParameter data_filler = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_data_filler(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
} else
goto handle_unusual;
continue;
// repeated uint32 num = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_num(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
} else if (static_cast<uint8_t>(tag) == 18) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_num(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated uint32 channels = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_channels(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<24>(ptr));
} else if (static_cast<uint8_t>(tag) == 26) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_channels(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated uint32 height = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_height(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<32>(ptr));
} else if (static_cast<uint8_t>(tag) == 34) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_height(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated uint32 width = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_width(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<40>(ptr));
} else if (static_cast<uint8_t>(tag) == 42) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_width(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.BlobShape shape = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_shape(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* DummyDataParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.DummyDataParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .opencv_caffe.FillerParameter data_filler = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_data_filler_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, this->_internal_data_filler(i), target, stream);
}
// repeated uint32 num = 2;
for (int i = 0, n = this->_internal_num_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_num(i), target);
}
// repeated uint32 channels = 3;
for (int i = 0, n = this->_internal_channels_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_channels(i), target);
}
// repeated uint32 height = 4;
for (int i = 0, n = this->_internal_height_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_height(i), target);
}
// repeated uint32 width = 5;
for (int i = 0, n = this->_internal_width_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_width(i), target);
}
// repeated .opencv_caffe.BlobShape shape = 6;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_shape_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(6, this->_internal_shape(i), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.DummyDataParameter)
return target;
}
size_t DummyDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.DummyDataParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .opencv_caffe.FillerParameter data_filler = 1;
total_size += 1UL * this->_internal_data_filler_size();
for (const auto& msg : this->data_filler_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated uint32 num = 2;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->num_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_num_size());
total_size += data_size;
}
// repeated uint32 channels = 3;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->channels_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_channels_size());
total_size += data_size;
}
// repeated uint32 height = 4;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->height_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_height_size());
total_size += data_size;
}
// repeated uint32 width = 5;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->width_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_width_size());
total_size += data_size;
}
// repeated .opencv_caffe.BlobShape shape = 6;
total_size += 1UL * this->_internal_shape_size();
for (const auto& msg : this->shape_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData DummyDataParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
DummyDataParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*DummyDataParameter::GetClassData() const { return &_class_data_; }
void DummyDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<DummyDataParameter *>(to)->MergeFrom(
static_cast<const DummyDataParameter &>(from));
}
void DummyDataParameter::MergeFrom(const DummyDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.DummyDataParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
data_filler_.MergeFrom(from.data_filler_);
num_.MergeFrom(from.num_);
channels_.MergeFrom(from.channels_);
height_.MergeFrom(from.height_);
width_.MergeFrom(from.width_);
shape_.MergeFrom(from.shape_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void DummyDataParameter::CopyFrom(const DummyDataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.DummyDataParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool DummyDataParameter::IsInitialized() const {
return true;
}
void DummyDataParameter::InternalSwap(DummyDataParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
data_filler_.InternalSwap(&other->data_filler_);
num_.InternalSwap(&other->num_);
channels_.InternalSwap(&other->channels_);
height_.InternalSwap(&other->height_);
width_.InternalSwap(&other->width_);
shape_.InternalSwap(&other->shape_);
}
::PROTOBUF_NAMESPACE_ID::Metadata DummyDataParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[30]);
}
// ===================================================================
class EltwiseParameter::_Internal {
public:
using HasBits = decltype(std::declval<EltwiseParameter>()._has_bits_);
static void set_has_operation(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_stable_prod_grad(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
EltwiseParameter::EltwiseParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
coeff_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.EltwiseParameter)
}
EltwiseParameter::EltwiseParameter(const EltwiseParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
coeff_(from.coeff_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&operation_, &from.operation_,
static_cast<size_t>(reinterpret_cast<char*>(&stable_prod_grad_) -
reinterpret_cast<char*>(&operation_)) + sizeof(stable_prod_grad_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.EltwiseParameter)
}
inline void EltwiseParameter::SharedCtor() {
operation_ = 1;
stable_prod_grad_ = true;
}
EltwiseParameter::~EltwiseParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.EltwiseParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void EltwiseParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void EltwiseParameter::ArenaDtor(void* object) {
EltwiseParameter* _this = reinterpret_cast< EltwiseParameter* >(object);
(void)_this;
}
void EltwiseParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void EltwiseParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void EltwiseParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.EltwiseParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
coeff_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
operation_ = 1;
stable_prod_grad_ = true;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* EltwiseParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::EltwiseParameter_EltwiseOp_IsValid(val))) {
_internal_set_operation(static_cast<::opencv_caffe::EltwiseParameter_EltwiseOp>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// repeated float coeff = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_coeff(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<21>(ptr));
} else if (static_cast<uint8_t>(tag) == 18) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_coeff(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool stable_prod_grad = 3 [default = true];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_stable_prod_grad(&has_bits);
stable_prod_grad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* EltwiseParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.EltwiseParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_operation(), target);
}
// repeated float coeff = 2;
for (int i = 0, n = this->_internal_coeff_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_coeff(i), target);
}
// optional bool stable_prod_grad = 3 [default = true];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_stable_prod_grad(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.EltwiseParameter)
return target;
}
size_t EltwiseParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.EltwiseParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated float coeff = 2;
{
unsigned int count = static_cast<unsigned int>(this->_internal_coeff_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_coeff_size());
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional .opencv_caffe.EltwiseParameter.EltwiseOp operation = 1 [default = SUM];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_operation());
}
// optional bool stable_prod_grad = 3 [default = true];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EltwiseParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
EltwiseParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EltwiseParameter::GetClassData() const { return &_class_data_; }
void EltwiseParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<EltwiseParameter *>(to)->MergeFrom(
static_cast<const EltwiseParameter &>(from));
}
void EltwiseParameter::MergeFrom(const EltwiseParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.EltwiseParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
coeff_.MergeFrom(from.coeff_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
operation_ = from.operation_;
}
if (cached_has_bits & 0x00000002u) {
stable_prod_grad_ = from.stable_prod_grad_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void EltwiseParameter::CopyFrom(const EltwiseParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.EltwiseParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool EltwiseParameter::IsInitialized() const {
return true;
}
void EltwiseParameter::InternalSwap(EltwiseParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
coeff_.InternalSwap(&other->coeff_);
swap(operation_, other->operation_);
swap(stable_prod_grad_, other->stable_prod_grad_);
}
::PROTOBUF_NAMESPACE_ID::Metadata EltwiseParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[31]);
}
// ===================================================================
class ELUParameter::_Internal {
public:
using HasBits = decltype(std::declval<ELUParameter>()._has_bits_);
static void set_has_alpha(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
ELUParameter::ELUParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ELUParameter)
}
ELUParameter::ELUParameter(const ELUParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
alpha_ = from.alpha_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ELUParameter)
}
inline void ELUParameter::SharedCtor() {
alpha_ = 1;
}
ELUParameter::~ELUParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ELUParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ELUParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ELUParameter::ArenaDtor(void* object) {
ELUParameter* _this = reinterpret_cast< ELUParameter* >(object);
(void)_this;
}
void ELUParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ELUParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ELUParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ELUParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
alpha_ = 1;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ELUParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float alpha = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_alpha(&has_bits);
alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ELUParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ELUParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float alpha = 1 [default = 1];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_alpha(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ELUParameter)
return target;
}
size_t ELUParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ELUParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// optional float alpha = 1 [default = 1];
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 4;
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ELUParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ELUParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ELUParameter::GetClassData() const { return &_class_data_; }
void ELUParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ELUParameter *>(to)->MergeFrom(
static_cast<const ELUParameter &>(from));
}
void ELUParameter::MergeFrom(const ELUParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ELUParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_alpha()) {
_internal_set_alpha(from._internal_alpha());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ELUParameter::CopyFrom(const ELUParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ELUParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ELUParameter::IsInitialized() const {
return true;
}
void ELUParameter::InternalSwap(ELUParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(alpha_, other->alpha_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ELUParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[32]);
}
// ===================================================================
class EmbedParameter::_Internal {
public:
using HasBits = decltype(std::declval<EmbedParameter>()._has_bits_);
static void set_has_num_output(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_input_dim(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_bias_term(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static const ::opencv_caffe::FillerParameter& weight_filler(const EmbedParameter* msg);
static void set_has_weight_filler(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static const ::opencv_caffe::FillerParameter& bias_filler(const EmbedParameter* msg);
static void set_has_bias_filler(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
const ::opencv_caffe::FillerParameter&
EmbedParameter::_Internal::weight_filler(const EmbedParameter* msg) {
return *msg->weight_filler_;
}
const ::opencv_caffe::FillerParameter&
EmbedParameter::_Internal::bias_filler(const EmbedParameter* msg) {
return *msg->bias_filler_;
}
EmbedParameter::EmbedParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.EmbedParameter)
}
EmbedParameter::EmbedParameter(const EmbedParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_weight_filler()) {
weight_filler_ = new ::opencv_caffe::FillerParameter(*from.weight_filler_);
} else {
weight_filler_ = nullptr;
}
if (from._internal_has_bias_filler()) {
bias_filler_ = new ::opencv_caffe::FillerParameter(*from.bias_filler_);
} else {
bias_filler_ = nullptr;
}
::memcpy(&num_output_, &from.num_output_,
static_cast<size_t>(reinterpret_cast<char*>(&bias_term_) -
reinterpret_cast<char*>(&num_output_)) + sizeof(bias_term_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.EmbedParameter)
}
inline void EmbedParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&input_dim_) -
reinterpret_cast<char*>(&weight_filler_)) + sizeof(input_dim_));
bias_term_ = true;
}
EmbedParameter::~EmbedParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.EmbedParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void EmbedParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete weight_filler_;
if (this != internal_default_instance()) delete bias_filler_;
}
void EmbedParameter::ArenaDtor(void* object) {
EmbedParameter* _this = reinterpret_cast< EmbedParameter* >(object);
(void)_this;
}
void EmbedParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void EmbedParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void EmbedParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.EmbedParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(weight_filler_ != nullptr);
weight_filler_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(bias_filler_ != nullptr);
bias_filler_->Clear();
}
}
if (cached_has_bits & 0x0000001cu) {
::memset(&num_output_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&input_dim_) -
reinterpret_cast<char*>(&num_output_)) + sizeof(input_dim_));
bias_term_ = true;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* EmbedParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 num_output = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_num_output(&has_bits);
num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 input_dim = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_input_dim(&has_bits);
input_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool bias_term = 3 [default = true];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_bias_term(&has_bits);
bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter weight_filler = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter bias_filler = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* EmbedParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.EmbedParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 num_output = 1;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
}
// optional uint32 input_dim = 2;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_input_dim(), target);
}
// optional bool bias_term = 3 [default = true];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_bias_term(), target);
}
// optional .opencv_caffe.FillerParameter weight_filler = 4;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
4, _Internal::weight_filler(this), target, stream);
}
// optional .opencv_caffe.FillerParameter bias_filler = 5;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
5, _Internal::bias_filler(this), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.EmbedParameter)
return target;
}
size_t EmbedParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.EmbedParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
// optional .opencv_caffe.FillerParameter weight_filler = 4;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*weight_filler_);
}
// optional .opencv_caffe.FillerParameter bias_filler = 5;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*bias_filler_);
}
// optional uint32 num_output = 1;
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
}
// optional uint32 input_dim = 2;
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_input_dim());
}
// optional bool bias_term = 3 [default = true];
if (cached_has_bits & 0x00000010u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EmbedParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
EmbedParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EmbedParameter::GetClassData() const { return &_class_data_; }
void EmbedParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<EmbedParameter *>(to)->MergeFrom(
static_cast<const EmbedParameter &>(from));
}
void EmbedParameter::MergeFrom(const EmbedParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.EmbedParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_weight_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
}
if (cached_has_bits & 0x00000004u) {
num_output_ = from.num_output_;
}
if (cached_has_bits & 0x00000008u) {
input_dim_ = from.input_dim_;
}
if (cached_has_bits & 0x00000010u) {
bias_term_ = from.bias_term_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void EmbedParameter::CopyFrom(const EmbedParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.EmbedParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool EmbedParameter::IsInitialized() const {
return true;
}
void EmbedParameter::InternalSwap(EmbedParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(EmbedParameter, input_dim_)
+ sizeof(EmbedParameter::input_dim_)
- PROTOBUF_FIELD_OFFSET(EmbedParameter, weight_filler_)>(
reinterpret_cast<char*>(&weight_filler_),
reinterpret_cast<char*>(&other->weight_filler_));
swap(bias_term_, other->bias_term_);
}
::PROTOBUF_NAMESPACE_ID::Metadata EmbedParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[33]);
}
// ===================================================================
class ExpParameter::_Internal {
public:
using HasBits = decltype(std::declval<ExpParameter>()._has_bits_);
static void set_has_base(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_scale(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_shift(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
ExpParameter::ExpParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ExpParameter)
}
ExpParameter::ExpParameter(const ExpParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&shift_, &from.shift_,
static_cast<size_t>(reinterpret_cast<char*>(&scale_) -
reinterpret_cast<char*>(&shift_)) + sizeof(scale_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ExpParameter)
}
inline void ExpParameter::SharedCtor() {
shift_ = 0;
base_ = -1;
scale_ = 1;
}
ExpParameter::~ExpParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ExpParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ExpParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ExpParameter::ArenaDtor(void* object) {
ExpParameter* _this = reinterpret_cast< ExpParameter* >(object);
(void)_this;
}
void ExpParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ExpParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ExpParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ExpParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
shift_ = 0;
base_ = -1;
scale_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ExpParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float base = 1 [default = -1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_base(&has_bits);
base_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float scale = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
_Internal::set_has_scale(&has_bits);
scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float shift = 3 [default = 0];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_shift(&has_bits);
shift_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ExpParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ExpParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float base = 1 [default = -1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_base(), target);
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_scale(), target);
}
// optional float shift = 3 [default = 0];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_shift(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ExpParameter)
return target;
}
size_t ExpParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ExpParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional float shift = 3 [default = 0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 4;
}
// optional float base = 1 [default = -1];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 4;
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ExpParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ExpParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ExpParameter::GetClassData() const { return &_class_data_; }
void ExpParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ExpParameter *>(to)->MergeFrom(
static_cast<const ExpParameter &>(from));
}
void ExpParameter::MergeFrom(const ExpParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ExpParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
shift_ = from.shift_;
}
if (cached_has_bits & 0x00000002u) {
base_ = from.base_;
}
if (cached_has_bits & 0x00000004u) {
scale_ = from.scale_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ExpParameter::CopyFrom(const ExpParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ExpParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ExpParameter::IsInitialized() const {
return true;
}
void ExpParameter::InternalSwap(ExpParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(shift_, other->shift_);
swap(base_, other->base_);
swap(scale_, other->scale_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ExpParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[34]);
}
// ===================================================================
class FlattenParameter::_Internal {
public:
using HasBits = decltype(std::declval<FlattenParameter>()._has_bits_);
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_end_axis(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
FlattenParameter::FlattenParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.FlattenParameter)
}
FlattenParameter::FlattenParameter(const FlattenParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&axis_, &from.axis_,
static_cast<size_t>(reinterpret_cast<char*>(&end_axis_) -
reinterpret_cast<char*>(&axis_)) + sizeof(end_axis_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.FlattenParameter)
}
inline void FlattenParameter::SharedCtor() {
axis_ = 1;
end_axis_ = -1;
}
FlattenParameter::~FlattenParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.FlattenParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void FlattenParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void FlattenParameter::ArenaDtor(void* object) {
FlattenParameter* _this = reinterpret_cast< FlattenParameter* >(object);
(void)_this;
}
void FlattenParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void FlattenParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void FlattenParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.FlattenParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
axis_ = 1;
end_axis_ = -1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* FlattenParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 axis = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 end_axis = 2 [default = -1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_end_axis(&has_bits);
end_axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* FlattenParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.FlattenParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int32 axis = 1 [default = 1];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
}
// optional int32 end_axis = 2 [default = -1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_end_axis(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.FlattenParameter)
return target;
}
size_t FlattenParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.FlattenParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional int32 axis = 1 [default = 1];
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
// optional int32 end_axis = 2 [default = -1];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_end_axis());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FlattenParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
FlattenParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FlattenParameter::GetClassData() const { return &_class_data_; }
void FlattenParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<FlattenParameter *>(to)->MergeFrom(
static_cast<const FlattenParameter &>(from));
}
void FlattenParameter::MergeFrom(const FlattenParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.FlattenParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
axis_ = from.axis_;
}
if (cached_has_bits & 0x00000002u) {
end_axis_ = from.end_axis_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void FlattenParameter::CopyFrom(const FlattenParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.FlattenParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool FlattenParameter::IsInitialized() const {
return true;
}
void FlattenParameter::InternalSwap(FlattenParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(axis_, other->axis_);
swap(end_axis_, other->end_axis_);
}
::PROTOBUF_NAMESPACE_ID::Metadata FlattenParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[35]);
}
// ===================================================================
class HDF5DataParameter::_Internal {
public:
using HasBits = decltype(std::declval<HDF5DataParameter>()._has_bits_);
static void set_has_source(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_batch_size(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_shuffle(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
HDF5DataParameter::HDF5DataParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.HDF5DataParameter)
}
HDF5DataParameter::HDF5DataParameter(const HDF5DataParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_source()) {
source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(),
GetArenaForAllocation());
}
::memcpy(&batch_size_, &from.batch_size_,
static_cast<size_t>(reinterpret_cast<char*>(&shuffle_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(shuffle_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.HDF5DataParameter)
}
inline void HDF5DataParameter::SharedCtor() {
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&batch_size_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&shuffle_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(shuffle_));
}
HDF5DataParameter::~HDF5DataParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.HDF5DataParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void HDF5DataParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void HDF5DataParameter::ArenaDtor(void* object) {
HDF5DataParameter* _this = reinterpret_cast< HDF5DataParameter* >(object);
(void)_this;
}
void HDF5DataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void HDF5DataParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void HDF5DataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.HDF5DataParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
source_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000006u) {
::memset(&batch_size_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&shuffle_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(shuffle_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* HDF5DataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string source = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_source();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.HDF5DataParameter.source");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 batch_size = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_batch_size(&has_bits);
batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool shuffle = 3 [default = false];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_shuffle(&has_bits);
shuffle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* HDF5DataParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.HDF5DataParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string source = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.HDF5DataParameter.source");
target = stream->WriteStringMaybeAliased(
1, this->_internal_source(), target);
}
// optional uint32 batch_size = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_batch_size(), target);
}
// optional bool shuffle = 3 [default = false];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(3, this->_internal_shuffle(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.HDF5DataParameter)
return target;
}
size_t HDF5DataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.HDF5DataParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional string source = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_source());
}
// optional uint32 batch_size = 2;
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
}
// optional bool shuffle = 3 [default = false];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HDF5DataParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
HDF5DataParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HDF5DataParameter::GetClassData() const { return &_class_data_; }
void HDF5DataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<HDF5DataParameter *>(to)->MergeFrom(
static_cast<const HDF5DataParameter &>(from));
}
void HDF5DataParameter::MergeFrom(const HDF5DataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.HDF5DataParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
_internal_set_source(from._internal_source());
}
if (cached_has_bits & 0x00000002u) {
batch_size_ = from.batch_size_;
}
if (cached_has_bits & 0x00000004u) {
shuffle_ = from.shuffle_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void HDF5DataParameter::CopyFrom(const HDF5DataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.HDF5DataParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool HDF5DataParameter::IsInitialized() const {
return true;
}
void HDF5DataParameter::InternalSwap(HDF5DataParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&source_, lhs_arena,
&other->source_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(HDF5DataParameter, shuffle_)
+ sizeof(HDF5DataParameter::shuffle_)
- PROTOBUF_FIELD_OFFSET(HDF5DataParameter, batch_size_)>(
reinterpret_cast<char*>(&batch_size_),
reinterpret_cast<char*>(&other->batch_size_));
}
::PROTOBUF_NAMESPACE_ID::Metadata HDF5DataParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[36]);
}
// ===================================================================
class HDF5OutputParameter::_Internal {
public:
using HasBits = decltype(std::declval<HDF5OutputParameter>()._has_bits_);
static void set_has_file_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
HDF5OutputParameter::HDF5OutputParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.HDF5OutputParameter)
}
HDF5OutputParameter::HDF5OutputParameter(const HDF5OutputParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_file_name()) {
file_name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_file_name(),
GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:opencv_caffe.HDF5OutputParameter)
}
inline void HDF5OutputParameter::SharedCtor() {
file_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
file_name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
HDF5OutputParameter::~HDF5OutputParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.HDF5OutputParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void HDF5OutputParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
file_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void HDF5OutputParameter::ArenaDtor(void* object) {
HDF5OutputParameter* _this = reinterpret_cast< HDF5OutputParameter* >(object);
(void)_this;
}
void HDF5OutputParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void HDF5OutputParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void HDF5OutputParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.HDF5OutputParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
file_name_.ClearNonDefaultToEmpty();
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* HDF5OutputParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string file_name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_file_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.HDF5OutputParameter.file_name");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* HDF5OutputParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.HDF5OutputParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string file_name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_file_name().data(), static_cast<int>(this->_internal_file_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.HDF5OutputParameter.file_name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_file_name(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.HDF5OutputParameter)
return target;
}
size_t HDF5OutputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.HDF5OutputParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// optional string file_name = 1;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_file_name());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HDF5OutputParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
HDF5OutputParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HDF5OutputParameter::GetClassData() const { return &_class_data_; }
void HDF5OutputParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<HDF5OutputParameter *>(to)->MergeFrom(
static_cast<const HDF5OutputParameter &>(from));
}
void HDF5OutputParameter::MergeFrom(const HDF5OutputParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.HDF5OutputParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_file_name()) {
_internal_set_file_name(from._internal_file_name());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void HDF5OutputParameter::CopyFrom(const HDF5OutputParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.HDF5OutputParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool HDF5OutputParameter::IsInitialized() const {
return true;
}
void HDF5OutputParameter::InternalSwap(HDF5OutputParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&file_name_, lhs_arena,
&other->file_name_, rhs_arena
);
}
::PROTOBUF_NAMESPACE_ID::Metadata HDF5OutputParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[37]);
}
// ===================================================================
class HingeLossParameter::_Internal {
public:
using HasBits = decltype(std::declval<HingeLossParameter>()._has_bits_);
static void set_has_norm(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
HingeLossParameter::HingeLossParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.HingeLossParameter)
}
HingeLossParameter::HingeLossParameter(const HingeLossParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
norm_ = from.norm_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.HingeLossParameter)
}
inline void HingeLossParameter::SharedCtor() {
norm_ = 1;
}
HingeLossParameter::~HingeLossParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.HingeLossParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void HingeLossParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void HingeLossParameter::ArenaDtor(void* object) {
HingeLossParameter* _this = reinterpret_cast< HingeLossParameter* >(object);
(void)_this;
}
void HingeLossParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void HingeLossParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void HingeLossParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.HingeLossParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
norm_ = 1;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* HingeLossParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.HingeLossParameter.Norm norm = 1 [default = L1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::HingeLossParameter_Norm_IsValid(val))) {
_internal_set_norm(static_cast<::opencv_caffe::HingeLossParameter_Norm>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* HingeLossParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.HingeLossParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.HingeLossParameter.Norm norm = 1 [default = L1];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_norm(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.HingeLossParameter)
return target;
}
size_t HingeLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.HingeLossParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// optional .opencv_caffe.HingeLossParameter.Norm norm = 1 [default = L1];
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_norm());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HingeLossParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
HingeLossParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HingeLossParameter::GetClassData() const { return &_class_data_; }
void HingeLossParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<HingeLossParameter *>(to)->MergeFrom(
static_cast<const HingeLossParameter &>(from));
}
void HingeLossParameter::MergeFrom(const HingeLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.HingeLossParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_norm()) {
_internal_set_norm(from._internal_norm());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void HingeLossParameter::CopyFrom(const HingeLossParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.HingeLossParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool HingeLossParameter::IsInitialized() const {
return true;
}
void HingeLossParameter::InternalSwap(HingeLossParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(norm_, other->norm_);
}
::PROTOBUF_NAMESPACE_ID::Metadata HingeLossParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[38]);
}
// ===================================================================
class ImageDataParameter::_Internal {
public:
using HasBits = decltype(std::declval<ImageDataParameter>()._has_bits_);
static void set_has_source(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_batch_size(HasBits* has_bits) {
(*has_bits)[0] |= 2048u;
}
static void set_has_rand_skip(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_shuffle(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_new_height(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static void set_has_new_width(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
static void set_has_is_color(HasBits* has_bits) {
(*has_bits)[0] |= 512u;
}
static void set_has_scale(HasBits* has_bits) {
(*has_bits)[0] |= 1024u;
}
static void set_has_mean_file(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_crop_size(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_mirror(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_root_folder(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
ImageDataParameter::ImageDataParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ImageDataParameter)
}
ImageDataParameter::ImageDataParameter(const ImageDataParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_source()) {
source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(),
GetArenaForAllocation());
}
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_mean_file()) {
mean_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_mean_file(),
GetArenaForAllocation());
}
root_folder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
root_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_root_folder()) {
root_folder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_root_folder(),
GetArenaForAllocation());
}
::memcpy(&crop_size_, &from.crop_size_,
static_cast<size_t>(reinterpret_cast<char*>(&batch_size_) -
reinterpret_cast<char*>(&crop_size_)) + sizeof(batch_size_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ImageDataParameter)
}
inline void ImageDataParameter::SharedCtor() {
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
root_folder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
root_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&crop_size_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&new_width_) -
reinterpret_cast<char*>(&crop_size_)) + sizeof(new_width_));
is_color_ = true;
scale_ = 1;
batch_size_ = 1u;
}
ImageDataParameter::~ImageDataParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ImageDataParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ImageDataParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
mean_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
root_folder_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void ImageDataParameter::ArenaDtor(void* object) {
ImageDataParameter* _this = reinterpret_cast< ImageDataParameter* >(object);
(void)_this;
}
void ImageDataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ImageDataParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ImageDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ImageDataParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
source_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
mean_file_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
root_folder_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x000000f8u) {
::memset(&crop_size_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&new_height_) -
reinterpret_cast<char*>(&crop_size_)) + sizeof(new_height_));
}
if (cached_has_bits & 0x00000f00u) {
new_width_ = 0u;
is_color_ = true;
scale_ = 1;
batch_size_ = 1u;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ImageDataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string source = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_source();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.ImageDataParameter.source");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float scale = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
_Internal::set_has_scale(&has_bits);
scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional string mean_file = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_mean_file();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.ImageDataParameter.mean_file");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 batch_size = 4 [default = 1];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_batch_size(&has_bits);
batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 crop_size = 5 [default = 0];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_crop_size(&has_bits);
crop_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool mirror = 6 [default = false];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_mirror(&has_bits);
mirror_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 rand_skip = 7 [default = 0];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_rand_skip(&has_bits);
rand_skip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool shuffle = 8 [default = false];
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
_Internal::set_has_shuffle(&has_bits);
shuffle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 new_height = 9 [default = 0];
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
_Internal::set_has_new_height(&has_bits);
new_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 new_width = 10 [default = 0];
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_new_width(&has_bits);
new_width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool is_color = 11 [default = true];
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
_Internal::set_has_is_color(&has_bits);
is_color_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string root_folder = 12 [default = ""];
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
auto str = _internal_mutable_root_folder();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.ImageDataParameter.root_folder");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ImageDataParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ImageDataParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string source = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.ImageDataParameter.source");
target = stream->WriteStringMaybeAliased(
1, this->_internal_source(), target);
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000400u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_scale(), target);
}
// optional string mean_file = 3;
if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_mean_file().data(), static_cast<int>(this->_internal_mean_file().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.ImageDataParameter.mean_file");
target = stream->WriteStringMaybeAliased(
3, this->_internal_mean_file(), target);
}
// optional uint32 batch_size = 4 [default = 1];
if (cached_has_bits & 0x00000800u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_batch_size(), target);
}
// optional uint32 crop_size = 5 [default = 0];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_crop_size(), target);
}
// optional bool mirror = 6 [default = false];
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_mirror(), target);
}
// optional uint32 rand_skip = 7 [default = 0];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_rand_skip(), target);
}
// optional bool shuffle = 8 [default = false];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(8, this->_internal_shuffle(), target);
}
// optional uint32 new_height = 9 [default = 0];
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(9, this->_internal_new_height(), target);
}
// optional uint32 new_width = 10 [default = 0];
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_new_width(), target);
}
// optional bool is_color = 11 [default = true];
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(11, this->_internal_is_color(), target);
}
// optional string root_folder = 12 [default = ""];
if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_root_folder().data(), static_cast<int>(this->_internal_root_folder().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.ImageDataParameter.root_folder");
target = stream->WriteStringMaybeAliased(
12, this->_internal_root_folder(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ImageDataParameter)
return target;
}
size_t ImageDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ImageDataParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string source = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_source());
}
// optional string mean_file = 3;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_mean_file());
}
// optional string root_folder = 12 [default = ""];
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_root_folder());
}
// optional uint32 crop_size = 5 [default = 0];
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_size());
}
// optional uint32 rand_skip = 7 [default = 0];
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_rand_skip());
}
// optional bool shuffle = 8 [default = false];
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 1;
}
// optional bool mirror = 6 [default = false];
if (cached_has_bits & 0x00000040u) {
total_size += 1 + 1;
}
// optional uint32 new_height = 9 [default = 0];
if (cached_has_bits & 0x00000080u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_new_height());
}
}
if (cached_has_bits & 0x00000f00u) {
// optional uint32 new_width = 10 [default = 0];
if (cached_has_bits & 0x00000100u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_new_width());
}
// optional bool is_color = 11 [default = true];
if (cached_has_bits & 0x00000200u) {
total_size += 1 + 1;
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000400u) {
total_size += 1 + 4;
}
// optional uint32 batch_size = 4 [default = 1];
if (cached_has_bits & 0x00000800u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ImageDataParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ImageDataParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ImageDataParameter::GetClassData() const { return &_class_data_; }
void ImageDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ImageDataParameter *>(to)->MergeFrom(
static_cast<const ImageDataParameter &>(from));
}
void ImageDataParameter::MergeFrom(const ImageDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ImageDataParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_source(from._internal_source());
}
if (cached_has_bits & 0x00000002u) {
_internal_set_mean_file(from._internal_mean_file());
}
if (cached_has_bits & 0x00000004u) {
_internal_set_root_folder(from._internal_root_folder());
}
if (cached_has_bits & 0x00000008u) {
crop_size_ = from.crop_size_;
}
if (cached_has_bits & 0x00000010u) {
rand_skip_ = from.rand_skip_;
}
if (cached_has_bits & 0x00000020u) {
shuffle_ = from.shuffle_;
}
if (cached_has_bits & 0x00000040u) {
mirror_ = from.mirror_;
}
if (cached_has_bits & 0x00000080u) {
new_height_ = from.new_height_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00000f00u) {
if (cached_has_bits & 0x00000100u) {
new_width_ = from.new_width_;
}
if (cached_has_bits & 0x00000200u) {
is_color_ = from.is_color_;
}
if (cached_has_bits & 0x00000400u) {
scale_ = from.scale_;
}
if (cached_has_bits & 0x00000800u) {
batch_size_ = from.batch_size_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ImageDataParameter::CopyFrom(const ImageDataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ImageDataParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ImageDataParameter::IsInitialized() const {
return true;
}
void ImageDataParameter::InternalSwap(ImageDataParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&source_, lhs_arena,
&other->source_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&mean_file_, lhs_arena,
&other->mean_file_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&root_folder_, lhs_arena,
&other->root_folder_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ImageDataParameter, new_width_)
+ sizeof(ImageDataParameter::new_width_)
- PROTOBUF_FIELD_OFFSET(ImageDataParameter, crop_size_)>(
reinterpret_cast<char*>(&crop_size_),
reinterpret_cast<char*>(&other->crop_size_));
swap(is_color_, other->is_color_);
swap(scale_, other->scale_);
swap(batch_size_, other->batch_size_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ImageDataParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[39]);
}
// ===================================================================
class InfogainLossParameter::_Internal {
public:
using HasBits = decltype(std::declval<InfogainLossParameter>()._has_bits_);
static void set_has_source(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
InfogainLossParameter::InfogainLossParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.InfogainLossParameter)
}
InfogainLossParameter::InfogainLossParameter(const InfogainLossParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_source()) {
source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(),
GetArenaForAllocation());
}
// @@protoc_insertion_point(copy_constructor:opencv_caffe.InfogainLossParameter)
}
inline void InfogainLossParameter::SharedCtor() {
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
InfogainLossParameter::~InfogainLossParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.InfogainLossParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void InfogainLossParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void InfogainLossParameter::ArenaDtor(void* object) {
InfogainLossParameter* _this = reinterpret_cast< InfogainLossParameter* >(object);
(void)_this;
}
void InfogainLossParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void InfogainLossParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void InfogainLossParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.InfogainLossParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
source_.ClearNonDefaultToEmpty();
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* InfogainLossParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string source = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_source();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.InfogainLossParameter.source");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* InfogainLossParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.InfogainLossParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string source = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.InfogainLossParameter.source");
target = stream->WriteStringMaybeAliased(
1, this->_internal_source(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.InfogainLossParameter)
return target;
}
size_t InfogainLossParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.InfogainLossParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// optional string source = 1;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_source());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InfogainLossParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
InfogainLossParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InfogainLossParameter::GetClassData() const { return &_class_data_; }
void InfogainLossParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<InfogainLossParameter *>(to)->MergeFrom(
static_cast<const InfogainLossParameter &>(from));
}
void InfogainLossParameter::MergeFrom(const InfogainLossParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.InfogainLossParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_source()) {
_internal_set_source(from._internal_source());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void InfogainLossParameter::CopyFrom(const InfogainLossParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.InfogainLossParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool InfogainLossParameter::IsInitialized() const {
return true;
}
void InfogainLossParameter::InternalSwap(InfogainLossParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&source_, lhs_arena,
&other->source_, rhs_arena
);
}
::PROTOBUF_NAMESPACE_ID::Metadata InfogainLossParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[40]);
}
// ===================================================================
class InnerProductParameter::_Internal {
public:
using HasBits = decltype(std::declval<InnerProductParameter>()._has_bits_);
static void set_has_num_output(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_bias_term(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static const ::opencv_caffe::FillerParameter& weight_filler(const InnerProductParameter* msg);
static void set_has_weight_filler(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static const ::opencv_caffe::FillerParameter& bias_filler(const InnerProductParameter* msg);
static void set_has_bias_filler(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_transpose(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
};
const ::opencv_caffe::FillerParameter&
InnerProductParameter::_Internal::weight_filler(const InnerProductParameter* msg) {
return *msg->weight_filler_;
}
const ::opencv_caffe::FillerParameter&
InnerProductParameter::_Internal::bias_filler(const InnerProductParameter* msg) {
return *msg->bias_filler_;
}
InnerProductParameter::InnerProductParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.InnerProductParameter)
}
InnerProductParameter::InnerProductParameter(const InnerProductParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_weight_filler()) {
weight_filler_ = new ::opencv_caffe::FillerParameter(*from.weight_filler_);
} else {
weight_filler_ = nullptr;
}
if (from._internal_has_bias_filler()) {
bias_filler_ = new ::opencv_caffe::FillerParameter(*from.bias_filler_);
} else {
bias_filler_ = nullptr;
}
::memcpy(&num_output_, &from.num_output_,
static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
reinterpret_cast<char*>(&num_output_)) + sizeof(axis_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.InnerProductParameter)
}
inline void InnerProductParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&transpose_) -
reinterpret_cast<char*>(&weight_filler_)) + sizeof(transpose_));
bias_term_ = true;
axis_ = 1;
}
InnerProductParameter::~InnerProductParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.InnerProductParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void InnerProductParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete weight_filler_;
if (this != internal_default_instance()) delete bias_filler_;
}
void InnerProductParameter::ArenaDtor(void* object) {
InnerProductParameter* _this = reinterpret_cast< InnerProductParameter* >(object);
(void)_this;
}
void InnerProductParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void InnerProductParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void InnerProductParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.InnerProductParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(weight_filler_ != nullptr);
weight_filler_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(bias_filler_ != nullptr);
bias_filler_->Clear();
}
}
if (cached_has_bits & 0x0000003cu) {
::memset(&num_output_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&transpose_) -
reinterpret_cast<char*>(&num_output_)) + sizeof(transpose_));
bias_term_ = true;
axis_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* InnerProductParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 num_output = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_num_output(&has_bits);
num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool bias_term = 2 [default = true];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_bias_term(&has_bits);
bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter weight_filler = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter bias_filler = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 axis = 5 [default = 1];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool transpose = 6 [default = false];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_transpose(&has_bits);
transpose_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* InnerProductParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.InnerProductParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 num_output = 1;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
}
// optional bool bias_term = 2 [default = true];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_bias_term(), target);
}
// optional .opencv_caffe.FillerParameter weight_filler = 3;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
3, _Internal::weight_filler(this), target, stream);
}
// optional .opencv_caffe.FillerParameter bias_filler = 4;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
4, _Internal::bias_filler(this), target, stream);
}
// optional int32 axis = 5 [default = 1];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_axis(), target);
}
// optional bool transpose = 6 [default = false];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_transpose(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.InnerProductParameter)
return target;
}
size_t InnerProductParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.InnerProductParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional .opencv_caffe.FillerParameter weight_filler = 3;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*weight_filler_);
}
// optional .opencv_caffe.FillerParameter bias_filler = 4;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*bias_filler_);
}
// optional uint32 num_output = 1;
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
}
// optional bool transpose = 6 [default = false];
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 1;
}
// optional bool bias_term = 2 [default = true];
if (cached_has_bits & 0x00000010u) {
total_size += 1 + 1;
}
// optional int32 axis = 5 [default = 1];
if (cached_has_bits & 0x00000020u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InnerProductParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
InnerProductParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InnerProductParameter::GetClassData() const { return &_class_data_; }
void InnerProductParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<InnerProductParameter *>(to)->MergeFrom(
static_cast<const InnerProductParameter &>(from));
}
void InnerProductParameter::MergeFrom(const InnerProductParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.InnerProductParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_weight_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
}
if (cached_has_bits & 0x00000004u) {
num_output_ = from.num_output_;
}
if (cached_has_bits & 0x00000008u) {
transpose_ = from.transpose_;
}
if (cached_has_bits & 0x00000010u) {
bias_term_ = from.bias_term_;
}
if (cached_has_bits & 0x00000020u) {
axis_ = from.axis_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void InnerProductParameter::CopyFrom(const InnerProductParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.InnerProductParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool InnerProductParameter::IsInitialized() const {
return true;
}
void InnerProductParameter::InternalSwap(InnerProductParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(InnerProductParameter, transpose_)
+ sizeof(InnerProductParameter::transpose_)
- PROTOBUF_FIELD_OFFSET(InnerProductParameter, weight_filler_)>(
reinterpret_cast<char*>(&weight_filler_),
reinterpret_cast<char*>(&other->weight_filler_));
swap(bias_term_, other->bias_term_);
swap(axis_, other->axis_);
}
::PROTOBUF_NAMESPACE_ID::Metadata InnerProductParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[41]);
}
// ===================================================================
class InputParameter::_Internal {
public:
};
InputParameter::InputParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
shape_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.InputParameter)
}
InputParameter::InputParameter(const InputParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
shape_(from.shape_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
// @@protoc_insertion_point(copy_constructor:opencv_caffe.InputParameter)
}
inline void InputParameter::SharedCtor() {
}
InputParameter::~InputParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.InputParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void InputParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void InputParameter::ArenaDtor(void* object) {
InputParameter* _this = reinterpret_cast< InputParameter* >(object);
(void)_this;
}
void InputParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void InputParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void InputParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.InputParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
shape_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* InputParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// repeated .opencv_caffe.BlobShape shape = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_shape(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* InputParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.InputParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
// repeated .opencv_caffe.BlobShape shape = 1;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_shape_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(1, this->_internal_shape(i), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.InputParameter)
return target;
}
size_t InputParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.InputParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .opencv_caffe.BlobShape shape = 1;
total_size += 1UL * this->_internal_shape_size();
for (const auto& msg : this->shape_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData InputParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
InputParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*InputParameter::GetClassData() const { return &_class_data_; }
void InputParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<InputParameter *>(to)->MergeFrom(
static_cast<const InputParameter &>(from));
}
void InputParameter::MergeFrom(const InputParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.InputParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
shape_.MergeFrom(from.shape_);
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void InputParameter::CopyFrom(const InputParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.InputParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool InputParameter::IsInitialized() const {
return true;
}
void InputParameter::InternalSwap(InputParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
shape_.InternalSwap(&other->shape_);
}
::PROTOBUF_NAMESPACE_ID::Metadata InputParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[42]);
}
// ===================================================================
class LogParameter::_Internal {
public:
using HasBits = decltype(std::declval<LogParameter>()._has_bits_);
static void set_has_base(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_scale(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_shift(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
LogParameter::LogParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.LogParameter)
}
LogParameter::LogParameter(const LogParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&shift_, &from.shift_,
static_cast<size_t>(reinterpret_cast<char*>(&scale_) -
reinterpret_cast<char*>(&shift_)) + sizeof(scale_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.LogParameter)
}
inline void LogParameter::SharedCtor() {
shift_ = 0;
base_ = -1;
scale_ = 1;
}
LogParameter::~LogParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.LogParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void LogParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void LogParameter::ArenaDtor(void* object) {
LogParameter* _this = reinterpret_cast< LogParameter* >(object);
(void)_this;
}
void LogParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LogParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void LogParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.LogParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
shift_ = 0;
base_ = -1;
scale_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* LogParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float base = 1 [default = -1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_base(&has_bits);
base_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float scale = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
_Internal::set_has_scale(&has_bits);
scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float shift = 3 [default = 0];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_shift(&has_bits);
shift_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* LogParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.LogParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float base = 1 [default = -1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_base(), target);
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_scale(), target);
}
// optional float shift = 3 [default = 0];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_shift(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.LogParameter)
return target;
}
size_t LogParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.LogParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional float shift = 3 [default = 0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 4;
}
// optional float base = 1 [default = -1];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 4;
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LogParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
LogParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LogParameter::GetClassData() const { return &_class_data_; }
void LogParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<LogParameter *>(to)->MergeFrom(
static_cast<const LogParameter &>(from));
}
void LogParameter::MergeFrom(const LogParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.LogParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
shift_ = from.shift_;
}
if (cached_has_bits & 0x00000002u) {
base_ = from.base_;
}
if (cached_has_bits & 0x00000004u) {
scale_ = from.scale_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void LogParameter::CopyFrom(const LogParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.LogParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool LogParameter::IsInitialized() const {
return true;
}
void LogParameter::InternalSwap(LogParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(shift_, other->shift_);
swap(base_, other->base_);
swap(scale_, other->scale_);
}
::PROTOBUF_NAMESPACE_ID::Metadata LogParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[43]);
}
// ===================================================================
class LRNParameter::_Internal {
public:
using HasBits = decltype(std::declval<LRNParameter>()._has_bits_);
static void set_has_local_size(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_alpha(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_beta(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_norm_region(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_k(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_engine(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
LRNParameter::LRNParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.LRNParameter)
}
LRNParameter::LRNParameter(const LRNParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&norm_region_, &from.norm_region_,
static_cast<size_t>(reinterpret_cast<char*>(&k_) -
reinterpret_cast<char*>(&norm_region_)) + sizeof(k_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.LRNParameter)
}
inline void LRNParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&norm_region_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&engine_) -
reinterpret_cast<char*>(&norm_region_)) + sizeof(engine_));
local_size_ = 5u;
alpha_ = 1;
beta_ = 0.75f;
k_ = 1;
}
LRNParameter::~LRNParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.LRNParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void LRNParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void LRNParameter::ArenaDtor(void* object) {
LRNParameter* _this = reinterpret_cast< LRNParameter* >(object);
(void)_this;
}
void LRNParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void LRNParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void LRNParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.LRNParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
::memset(&norm_region_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&engine_) -
reinterpret_cast<char*>(&norm_region_)) + sizeof(engine_));
local_size_ = 5u;
alpha_ = 1;
beta_ = 0.75f;
k_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* LRNParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 local_size = 1 [default = 5];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_local_size(&has_bits);
local_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float alpha = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
_Internal::set_has_alpha(&has_bits);
alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float beta = 3 [default = 0.75];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_beta(&has_bits);
beta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::LRNParameter_NormRegion_IsValid(val))) {
_internal_set_norm_region(static_cast<::opencv_caffe::LRNParameter_NormRegion>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional float k = 5 [default = 1];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
_Internal::set_has_k(&has_bits);
k_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.LRNParameter.Engine engine = 6 [default = DEFAULT];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::LRNParameter_Engine_IsValid(val))) {
_internal_set_engine(static_cast<::opencv_caffe::LRNParameter_Engine>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* LRNParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.LRNParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 local_size = 1 [default = 5];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_local_size(), target);
}
// optional float alpha = 2 [default = 1];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_alpha(), target);
}
// optional float beta = 3 [default = 0.75];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_beta(), target);
}
// optional .opencv_caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
4, this->_internal_norm_region(), target);
}
// optional float k = 5 [default = 1];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_k(), target);
}
// optional .opencv_caffe.LRNParameter.Engine engine = 6 [default = DEFAULT];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
6, this->_internal_engine(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.LRNParameter)
return target;
}
size_t LRNParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.LRNParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional .opencv_caffe.LRNParameter.NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_norm_region());
}
// optional .opencv_caffe.LRNParameter.Engine engine = 6 [default = DEFAULT];
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
}
// optional uint32 local_size = 1 [default = 5];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_local_size());
}
// optional float alpha = 2 [default = 1];
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 4;
}
// optional float beta = 3 [default = 0.75];
if (cached_has_bits & 0x00000010u) {
total_size += 1 + 4;
}
// optional float k = 5 [default = 1];
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData LRNParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
LRNParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*LRNParameter::GetClassData() const { return &_class_data_; }
void LRNParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<LRNParameter *>(to)->MergeFrom(
static_cast<const LRNParameter &>(from));
}
void LRNParameter::MergeFrom(const LRNParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.LRNParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
if (cached_has_bits & 0x00000001u) {
norm_region_ = from.norm_region_;
}
if (cached_has_bits & 0x00000002u) {
engine_ = from.engine_;
}
if (cached_has_bits & 0x00000004u) {
local_size_ = from.local_size_;
}
if (cached_has_bits & 0x00000008u) {
alpha_ = from.alpha_;
}
if (cached_has_bits & 0x00000010u) {
beta_ = from.beta_;
}
if (cached_has_bits & 0x00000020u) {
k_ = from.k_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void LRNParameter::CopyFrom(const LRNParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.LRNParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool LRNParameter::IsInitialized() const {
return true;
}
void LRNParameter::InternalSwap(LRNParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(LRNParameter, engine_)
+ sizeof(LRNParameter::engine_)
- PROTOBUF_FIELD_OFFSET(LRNParameter, norm_region_)>(
reinterpret_cast<char*>(&norm_region_),
reinterpret_cast<char*>(&other->norm_region_));
swap(local_size_, other->local_size_);
swap(alpha_, other->alpha_);
swap(beta_, other->beta_);
swap(k_, other->k_);
}
::PROTOBUF_NAMESPACE_ID::Metadata LRNParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[44]);
}
// ===================================================================
class MemoryDataParameter::_Internal {
public:
using HasBits = decltype(std::declval<MemoryDataParameter>()._has_bits_);
static void set_has_batch_size(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_channels(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_height(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_width(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
};
MemoryDataParameter::MemoryDataParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.MemoryDataParameter)
}
MemoryDataParameter::MemoryDataParameter(const MemoryDataParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&batch_size_, &from.batch_size_,
static_cast<size_t>(reinterpret_cast<char*>(&width_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(width_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.MemoryDataParameter)
}
inline void MemoryDataParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&batch_size_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&width_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(width_));
}
MemoryDataParameter::~MemoryDataParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.MemoryDataParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void MemoryDataParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void MemoryDataParameter::ArenaDtor(void* object) {
MemoryDataParameter* _this = reinterpret_cast< MemoryDataParameter* >(object);
(void)_this;
}
void MemoryDataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void MemoryDataParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void MemoryDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.MemoryDataParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
::memset(&batch_size_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&width_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(width_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* MemoryDataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 batch_size = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_batch_size(&has_bits);
batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 channels = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_channels(&has_bits);
channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 height = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_height(&has_bits);
height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 width = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_width(&has_bits);
width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* MemoryDataParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.MemoryDataParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 batch_size = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_batch_size(), target);
}
// optional uint32 channels = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_channels(), target);
}
// optional uint32 height = 3;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_height(), target);
}
// optional uint32 width = 4;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_width(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.MemoryDataParameter)
return target;
}
size_t MemoryDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.MemoryDataParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
// optional uint32 batch_size = 1;
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
}
// optional uint32 channels = 2;
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_channels());
}
// optional uint32 height = 3;
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_height());
}
// optional uint32 width = 4;
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_width());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MemoryDataParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
MemoryDataParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MemoryDataParameter::GetClassData() const { return &_class_data_; }
void MemoryDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<MemoryDataParameter *>(to)->MergeFrom(
static_cast<const MemoryDataParameter &>(from));
}
void MemoryDataParameter::MergeFrom(const MemoryDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.MemoryDataParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
batch_size_ = from.batch_size_;
}
if (cached_has_bits & 0x00000002u) {
channels_ = from.channels_;
}
if (cached_has_bits & 0x00000004u) {
height_ = from.height_;
}
if (cached_has_bits & 0x00000008u) {
width_ = from.width_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void MemoryDataParameter::CopyFrom(const MemoryDataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.MemoryDataParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool MemoryDataParameter::IsInitialized() const {
return true;
}
void MemoryDataParameter::InternalSwap(MemoryDataParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(MemoryDataParameter, width_)
+ sizeof(MemoryDataParameter::width_)
- PROTOBUF_FIELD_OFFSET(MemoryDataParameter, batch_size_)>(
reinterpret_cast<char*>(&batch_size_),
reinterpret_cast<char*>(&other->batch_size_));
}
::PROTOBUF_NAMESPACE_ID::Metadata MemoryDataParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[45]);
}
// ===================================================================
class MVNParameter::_Internal {
public:
using HasBits = decltype(std::declval<MVNParameter>()._has_bits_);
static void set_has_normalize_variance(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_across_channels(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_eps(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
MVNParameter::MVNParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.MVNParameter)
}
MVNParameter::MVNParameter(const MVNParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&across_channels_, &from.across_channels_,
static_cast<size_t>(reinterpret_cast<char*>(&eps_) -
reinterpret_cast<char*>(&across_channels_)) + sizeof(eps_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.MVNParameter)
}
inline void MVNParameter::SharedCtor() {
across_channels_ = false;
normalize_variance_ = true;
eps_ = 1e-09f;
}
MVNParameter::~MVNParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.MVNParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void MVNParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void MVNParameter::ArenaDtor(void* object) {
MVNParameter* _this = reinterpret_cast< MVNParameter* >(object);
(void)_this;
}
void MVNParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void MVNParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void MVNParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.MVNParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
across_channels_ = false;
normalize_variance_ = true;
eps_ = 1e-09f;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* MVNParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional bool normalize_variance = 1 [default = true];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_normalize_variance(&has_bits);
normalize_variance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool across_channels = 2 [default = false];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_across_channels(&has_bits);
across_channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float eps = 3 [default = 1e-09];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_eps(&has_bits);
eps_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* MVNParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.MVNParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional bool normalize_variance = 1 [default = true];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(1, this->_internal_normalize_variance(), target);
}
// optional bool across_channels = 2 [default = false];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_across_channels(), target);
}
// optional float eps = 3 [default = 1e-09];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_eps(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.MVNParameter)
return target;
}
size_t MVNParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.MVNParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional bool across_channels = 2 [default = false];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 1;
}
// optional bool normalize_variance = 1 [default = true];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 1;
}
// optional float eps = 3 [default = 1e-09];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MVNParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
MVNParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MVNParameter::GetClassData() const { return &_class_data_; }
void MVNParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<MVNParameter *>(to)->MergeFrom(
static_cast<const MVNParameter &>(from));
}
void MVNParameter::MergeFrom(const MVNParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.MVNParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
across_channels_ = from.across_channels_;
}
if (cached_has_bits & 0x00000002u) {
normalize_variance_ = from.normalize_variance_;
}
if (cached_has_bits & 0x00000004u) {
eps_ = from.eps_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void MVNParameter::CopyFrom(const MVNParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.MVNParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool MVNParameter::IsInitialized() const {
return true;
}
void MVNParameter::InternalSwap(MVNParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(across_channels_, other->across_channels_);
swap(normalize_variance_, other->normalize_variance_);
swap(eps_, other->eps_);
}
::PROTOBUF_NAMESPACE_ID::Metadata MVNParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[46]);
}
// ===================================================================
class ParameterParameter::_Internal {
public:
using HasBits = decltype(std::declval<ParameterParameter>()._has_bits_);
static const ::opencv_caffe::BlobShape& shape(const ParameterParameter* msg);
static void set_has_shape(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
const ::opencv_caffe::BlobShape&
ParameterParameter::_Internal::shape(const ParameterParameter* msg) {
return *msg->shape_;
}
ParameterParameter::ParameterParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ParameterParameter)
}
ParameterParameter::ParameterParameter(const ParameterParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_shape()) {
shape_ = new ::opencv_caffe::BlobShape(*from.shape_);
} else {
shape_ = nullptr;
}
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ParameterParameter)
}
inline void ParameterParameter::SharedCtor() {
shape_ = nullptr;
}
ParameterParameter::~ParameterParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ParameterParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ParameterParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete shape_;
}
void ParameterParameter::ArenaDtor(void* object) {
ParameterParameter* _this = reinterpret_cast< ParameterParameter* >(object);
(void)_this;
}
void ParameterParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ParameterParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ParameterParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ParameterParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(shape_ != nullptr);
shape_->Clear();
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ParameterParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.BlobShape shape = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ParameterParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ParameterParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.BlobShape shape = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
1, _Internal::shape(this), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ParameterParameter)
return target;
}
size_t ParameterParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ParameterParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// optional .opencv_caffe.BlobShape shape = 1;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*shape_);
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ParameterParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ParameterParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ParameterParameter::GetClassData() const { return &_class_data_; }
void ParameterParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ParameterParameter *>(to)->MergeFrom(
static_cast<const ParameterParameter &>(from));
}
void ParameterParameter::MergeFrom(const ParameterParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ParameterParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_shape()) {
_internal_mutable_shape()->::opencv_caffe::BlobShape::MergeFrom(from._internal_shape());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ParameterParameter::CopyFrom(const ParameterParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ParameterParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ParameterParameter::IsInitialized() const {
return true;
}
void ParameterParameter::InternalSwap(ParameterParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(shape_, other->shape_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ParameterParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[47]);
}
// ===================================================================
class PoolingParameter::_Internal {
public:
using HasBits = decltype(std::declval<PoolingParameter>()._has_bits_);
static void set_has_pool(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_pad(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_pad_h(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static void set_has_pad_w(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
static void set_has_kernel_size(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_kernel_h(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_kernel_w(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_stride(HasBits* has_bits) {
(*has_bits)[0] |= 2048u;
}
static void set_has_stride_h(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_stride_w(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_engine(HasBits* has_bits) {
(*has_bits)[0] |= 512u;
}
static void set_has_global_pooling(HasBits* has_bits) {
(*has_bits)[0] |= 1024u;
}
static void set_has_ceil_mode(HasBits* has_bits) {
(*has_bits)[0] |= 4096u;
}
};
PoolingParameter::PoolingParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.PoolingParameter)
}
PoolingParameter::PoolingParameter(const PoolingParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&pool_, &from.pool_,
static_cast<size_t>(reinterpret_cast<char*>(&ceil_mode_) -
reinterpret_cast<char*>(&pool_)) + sizeof(ceil_mode_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.PoolingParameter)
}
inline void PoolingParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&pool_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&global_pooling_) -
reinterpret_cast<char*>(&pool_)) + sizeof(global_pooling_));
stride_ = 1u;
ceil_mode_ = true;
}
PoolingParameter::~PoolingParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.PoolingParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void PoolingParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void PoolingParameter::ArenaDtor(void* object) {
PoolingParameter* _this = reinterpret_cast< PoolingParameter* >(object);
(void)_this;
}
void PoolingParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PoolingParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void PoolingParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.PoolingParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
::memset(&pool_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&pad_h_) -
reinterpret_cast<char*>(&pool_)) + sizeof(pad_h_));
}
if (cached_has_bits & 0x00001f00u) {
::memset(&pad_w_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&global_pooling_) -
reinterpret_cast<char*>(&pad_w_)) + sizeof(global_pooling_));
stride_ = 1u;
ceil_mode_ = true;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* PoolingParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::PoolingParameter_PoolMethod_IsValid(val))) {
_internal_set_pool(static_cast<::opencv_caffe::PoolingParameter_PoolMethod>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional uint32 kernel_size = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_kernel_size(&has_bits);
kernel_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 stride = 3 [default = 1];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_stride(&has_bits);
stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 pad = 4 [default = 0];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_pad(&has_bits);
pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 kernel_h = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_kernel_h(&has_bits);
kernel_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 kernel_w = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_kernel_w(&has_bits);
kernel_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 stride_h = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_stride_h(&has_bits);
stride_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 stride_w = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
_Internal::set_has_stride_w(&has_bits);
stride_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 pad_h = 9 [default = 0];
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
_Internal::set_has_pad_h(&has_bits);
pad_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 pad_w = 10 [default = 0];
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_pad_w(&has_bits);
pad_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::PoolingParameter_Engine_IsValid(val))) {
_internal_set_engine(static_cast<::opencv_caffe::PoolingParameter_Engine>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(11, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional bool global_pooling = 12 [default = false];
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
_Internal::set_has_global_pooling(&has_bits);
global_pooling_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool ceil_mode = 13 [default = true];
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
_Internal::set_has_ceil_mode(&has_bits);
ceil_mode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* PoolingParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PoolingParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_pool(), target);
}
// optional uint32 kernel_size = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_kernel_size(), target);
}
// optional uint32 stride = 3 [default = 1];
if (cached_has_bits & 0x00000800u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_stride(), target);
}
// optional uint32 pad = 4 [default = 0];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_pad(), target);
}
// optional uint32 kernel_h = 5;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_kernel_h(), target);
}
// optional uint32 kernel_w = 6;
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_kernel_w(), target);
}
// optional uint32 stride_h = 7;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_stride_h(), target);
}
// optional uint32 stride_w = 8;
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(8, this->_internal_stride_w(), target);
}
// optional uint32 pad_h = 9 [default = 0];
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(9, this->_internal_pad_h(), target);
}
// optional uint32 pad_w = 10 [default = 0];
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_pad_w(), target);
}
// optional .opencv_caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
11, this->_internal_engine(), target);
}
// optional bool global_pooling = 12 [default = false];
if (cached_has_bits & 0x00000400u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_global_pooling(), target);
}
// optional bool ceil_mode = 13 [default = true];
if (cached_has_bits & 0x00001000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(13, this->_internal_ceil_mode(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.PoolingParameter)
return target;
}
size_t PoolingParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PoolingParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional .opencv_caffe.PoolingParameter.PoolMethod pool = 1 [default = MAX];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_pool());
}
// optional uint32 kernel_size = 2;
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_size());
}
// optional uint32 pad = 4 [default = 0];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad());
}
// optional uint32 kernel_h = 5;
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_h());
}
// optional uint32 kernel_w = 6;
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernel_w());
}
// optional uint32 stride_h = 7;
if (cached_has_bits & 0x00000020u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_h());
}
// optional uint32 stride_w = 8;
if (cached_has_bits & 0x00000040u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride_w());
}
// optional uint32 pad_h = 9 [default = 0];
if (cached_has_bits & 0x00000080u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_h());
}
}
if (cached_has_bits & 0x00001f00u) {
// optional uint32 pad_w = 10 [default = 0];
if (cached_has_bits & 0x00000100u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad_w());
}
// optional .opencv_caffe.PoolingParameter.Engine engine = 11 [default = DEFAULT];
if (cached_has_bits & 0x00000200u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
}
// optional bool global_pooling = 12 [default = false];
if (cached_has_bits & 0x00000400u) {
total_size += 1 + 1;
}
// optional uint32 stride = 3 [default = 1];
if (cached_has_bits & 0x00000800u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride());
}
// optional bool ceil_mode = 13 [default = true];
if (cached_has_bits & 0x00001000u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PoolingParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
PoolingParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PoolingParameter::GetClassData() const { return &_class_data_; }
void PoolingParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<PoolingParameter *>(to)->MergeFrom(
static_cast<const PoolingParameter &>(from));
}
void PoolingParameter::MergeFrom(const PoolingParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PoolingParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
pool_ = from.pool_;
}
if (cached_has_bits & 0x00000002u) {
kernel_size_ = from.kernel_size_;
}
if (cached_has_bits & 0x00000004u) {
pad_ = from.pad_;
}
if (cached_has_bits & 0x00000008u) {
kernel_h_ = from.kernel_h_;
}
if (cached_has_bits & 0x00000010u) {
kernel_w_ = from.kernel_w_;
}
if (cached_has_bits & 0x00000020u) {
stride_h_ = from.stride_h_;
}
if (cached_has_bits & 0x00000040u) {
stride_w_ = from.stride_w_;
}
if (cached_has_bits & 0x00000080u) {
pad_h_ = from.pad_h_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00001f00u) {
if (cached_has_bits & 0x00000100u) {
pad_w_ = from.pad_w_;
}
if (cached_has_bits & 0x00000200u) {
engine_ = from.engine_;
}
if (cached_has_bits & 0x00000400u) {
global_pooling_ = from.global_pooling_;
}
if (cached_has_bits & 0x00000800u) {
stride_ = from.stride_;
}
if (cached_has_bits & 0x00001000u) {
ceil_mode_ = from.ceil_mode_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void PoolingParameter::CopyFrom(const PoolingParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.PoolingParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool PoolingParameter::IsInitialized() const {
return true;
}
void PoolingParameter::InternalSwap(PoolingParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(PoolingParameter, global_pooling_)
+ sizeof(PoolingParameter::global_pooling_)
- PROTOBUF_FIELD_OFFSET(PoolingParameter, pool_)>(
reinterpret_cast<char*>(&pool_),
reinterpret_cast<char*>(&other->pool_));
swap(stride_, other->stride_);
swap(ceil_mode_, other->ceil_mode_);
}
::PROTOBUF_NAMESPACE_ID::Metadata PoolingParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[48]);
}
// ===================================================================
class PowerParameter::_Internal {
public:
using HasBits = decltype(std::declval<PowerParameter>()._has_bits_);
static void set_has_power(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_scale(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_shift(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
PowerParameter::PowerParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.PowerParameter)
}
PowerParameter::PowerParameter(const PowerParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&shift_, &from.shift_,
static_cast<size_t>(reinterpret_cast<char*>(&scale_) -
reinterpret_cast<char*>(&shift_)) + sizeof(scale_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.PowerParameter)
}
inline void PowerParameter::SharedCtor() {
shift_ = 0;
power_ = 1;
scale_ = 1;
}
PowerParameter::~PowerParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.PowerParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void PowerParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void PowerParameter::ArenaDtor(void* object) {
PowerParameter* _this = reinterpret_cast< PowerParameter* >(object);
(void)_this;
}
void PowerParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PowerParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void PowerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.PowerParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
shift_ = 0;
power_ = 1;
scale_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* PowerParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float power = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_power(&has_bits);
power_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float scale = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
_Internal::set_has_scale(&has_bits);
scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float shift = 3 [default = 0];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_shift(&has_bits);
shift_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* PowerParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PowerParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float power = 1 [default = 1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_power(), target);
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_scale(), target);
}
// optional float shift = 3 [default = 0];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_shift(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.PowerParameter)
return target;
}
size_t PowerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PowerParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional float shift = 3 [default = 0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 4;
}
// optional float power = 1 [default = 1];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 4;
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PowerParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
PowerParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PowerParameter::GetClassData() const { return &_class_data_; }
void PowerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<PowerParameter *>(to)->MergeFrom(
static_cast<const PowerParameter &>(from));
}
void PowerParameter::MergeFrom(const PowerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PowerParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
shift_ = from.shift_;
}
if (cached_has_bits & 0x00000002u) {
power_ = from.power_;
}
if (cached_has_bits & 0x00000004u) {
scale_ = from.scale_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void PowerParameter::CopyFrom(const PowerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.PowerParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool PowerParameter::IsInitialized() const {
return true;
}
void PowerParameter::InternalSwap(PowerParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(shift_, other->shift_);
swap(power_, other->power_);
swap(scale_, other->scale_);
}
::PROTOBUF_NAMESPACE_ID::Metadata PowerParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[49]);
}
// ===================================================================
class PythonParameter::_Internal {
public:
using HasBits = decltype(std::declval<PythonParameter>()._has_bits_);
static void set_has_module(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_layer(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_param_str(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_share_in_parallel(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
};
PythonParameter::PythonParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.PythonParameter)
}
PythonParameter::PythonParameter(const PythonParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
module_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
module_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_module()) {
module_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_module(),
GetArenaForAllocation());
}
layer_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
layer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_layer()) {
layer_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_layer(),
GetArenaForAllocation());
}
param_str_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
param_str_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_param_str()) {
param_str_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_param_str(),
GetArenaForAllocation());
}
share_in_parallel_ = from.share_in_parallel_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.PythonParameter)
}
inline void PythonParameter::SharedCtor() {
module_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
module_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
layer_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
layer_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
param_str_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
param_str_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
share_in_parallel_ = false;
}
PythonParameter::~PythonParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.PythonParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void PythonParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
module_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
layer_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
param_str_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void PythonParameter::ArenaDtor(void* object) {
PythonParameter* _this = reinterpret_cast< PythonParameter* >(object);
(void)_this;
}
void PythonParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PythonParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void PythonParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.PythonParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
module_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
layer_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
param_str_.ClearNonDefaultToEmpty();
}
}
share_in_parallel_ = false;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* PythonParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string module = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_module();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.PythonParameter.module");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string layer = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_layer();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.PythonParameter.layer");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string param_str = 3 [default = ""];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_param_str();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.PythonParameter.param_str");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool share_in_parallel = 4 [default = false];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_share_in_parallel(&has_bits);
share_in_parallel_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* PythonParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PythonParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string module = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_module().data(), static_cast<int>(this->_internal_module().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.PythonParameter.module");
target = stream->WriteStringMaybeAliased(
1, this->_internal_module(), target);
}
// optional string layer = 2;
if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_layer().data(), static_cast<int>(this->_internal_layer().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.PythonParameter.layer");
target = stream->WriteStringMaybeAliased(
2, this->_internal_layer(), target);
}
// optional string param_str = 3 [default = ""];
if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_param_str().data(), static_cast<int>(this->_internal_param_str().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.PythonParameter.param_str");
target = stream->WriteStringMaybeAliased(
3, this->_internal_param_str(), target);
}
// optional bool share_in_parallel = 4 [default = false];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_share_in_parallel(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.PythonParameter)
return target;
}
size_t PythonParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PythonParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
// optional string module = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_module());
}
// optional string layer = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_layer());
}
// optional string param_str = 3 [default = ""];
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_param_str());
}
// optional bool share_in_parallel = 4 [default = false];
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PythonParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
PythonParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PythonParameter::GetClassData() const { return &_class_data_; }
void PythonParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<PythonParameter *>(to)->MergeFrom(
static_cast<const PythonParameter &>(from));
}
void PythonParameter::MergeFrom(const PythonParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PythonParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_module(from._internal_module());
}
if (cached_has_bits & 0x00000002u) {
_internal_set_layer(from._internal_layer());
}
if (cached_has_bits & 0x00000004u) {
_internal_set_param_str(from._internal_param_str());
}
if (cached_has_bits & 0x00000008u) {
share_in_parallel_ = from.share_in_parallel_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void PythonParameter::CopyFrom(const PythonParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.PythonParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool PythonParameter::IsInitialized() const {
return true;
}
void PythonParameter::InternalSwap(PythonParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&module_, lhs_arena,
&other->module_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&layer_, lhs_arena,
&other->layer_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&param_str_, lhs_arena,
&other->param_str_, rhs_arena
);
swap(share_in_parallel_, other->share_in_parallel_);
}
::PROTOBUF_NAMESPACE_ID::Metadata PythonParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[50]);
}
// ===================================================================
class RecurrentParameter::_Internal {
public:
using HasBits = decltype(std::declval<RecurrentParameter>()._has_bits_);
static void set_has_num_output(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static const ::opencv_caffe::FillerParameter& weight_filler(const RecurrentParameter* msg);
static void set_has_weight_filler(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static const ::opencv_caffe::FillerParameter& bias_filler(const RecurrentParameter* msg);
static void set_has_bias_filler(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_debug_info(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_expose_hidden(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
};
const ::opencv_caffe::FillerParameter&
RecurrentParameter::_Internal::weight_filler(const RecurrentParameter* msg) {
return *msg->weight_filler_;
}
const ::opencv_caffe::FillerParameter&
RecurrentParameter::_Internal::bias_filler(const RecurrentParameter* msg) {
return *msg->bias_filler_;
}
RecurrentParameter::RecurrentParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.RecurrentParameter)
}
RecurrentParameter::RecurrentParameter(const RecurrentParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_weight_filler()) {
weight_filler_ = new ::opencv_caffe::FillerParameter(*from.weight_filler_);
} else {
weight_filler_ = nullptr;
}
if (from._internal_has_bias_filler()) {
bias_filler_ = new ::opencv_caffe::FillerParameter(*from.bias_filler_);
} else {
bias_filler_ = nullptr;
}
::memcpy(&num_output_, &from.num_output_,
static_cast<size_t>(reinterpret_cast<char*>(&expose_hidden_) -
reinterpret_cast<char*>(&num_output_)) + sizeof(expose_hidden_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.RecurrentParameter)
}
inline void RecurrentParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&expose_hidden_) -
reinterpret_cast<char*>(&weight_filler_)) + sizeof(expose_hidden_));
}
RecurrentParameter::~RecurrentParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.RecurrentParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void RecurrentParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete weight_filler_;
if (this != internal_default_instance()) delete bias_filler_;
}
void RecurrentParameter::ArenaDtor(void* object) {
RecurrentParameter* _this = reinterpret_cast< RecurrentParameter* >(object);
(void)_this;
}
void RecurrentParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void RecurrentParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void RecurrentParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.RecurrentParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(weight_filler_ != nullptr);
weight_filler_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(bias_filler_ != nullptr);
bias_filler_->Clear();
}
}
if (cached_has_bits & 0x0000001cu) {
::memset(&num_output_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&expose_hidden_) -
reinterpret_cast<char*>(&num_output_)) + sizeof(expose_hidden_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* RecurrentParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 num_output = 1 [default = 0];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_num_output(&has_bits);
num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter weight_filler = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter bias_filler = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool debug_info = 4 [default = false];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_debug_info(&has_bits);
debug_info_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool expose_hidden = 5 [default = false];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_expose_hidden(&has_bits);
expose_hidden_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* RecurrentParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.RecurrentParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 num_output = 1 [default = 0];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_num_output(), target);
}
// optional .opencv_caffe.FillerParameter weight_filler = 2;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
2, _Internal::weight_filler(this), target, stream);
}
// optional .opencv_caffe.FillerParameter bias_filler = 3;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
3, _Internal::bias_filler(this), target, stream);
}
// optional bool debug_info = 4 [default = false];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_debug_info(), target);
}
// optional bool expose_hidden = 5 [default = false];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_expose_hidden(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.RecurrentParameter)
return target;
}
size_t RecurrentParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.RecurrentParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
// optional .opencv_caffe.FillerParameter weight_filler = 2;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*weight_filler_);
}
// optional .opencv_caffe.FillerParameter bias_filler = 3;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*bias_filler_);
}
// optional uint32 num_output = 1 [default = 0];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
}
// optional bool debug_info = 4 [default = false];
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 1;
}
// optional bool expose_hidden = 5 [default = false];
if (cached_has_bits & 0x00000010u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RecurrentParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
RecurrentParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RecurrentParameter::GetClassData() const { return &_class_data_; }
void RecurrentParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<RecurrentParameter *>(to)->MergeFrom(
static_cast<const RecurrentParameter &>(from));
}
void RecurrentParameter::MergeFrom(const RecurrentParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.RecurrentParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_weight_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
}
if (cached_has_bits & 0x00000004u) {
num_output_ = from.num_output_;
}
if (cached_has_bits & 0x00000008u) {
debug_info_ = from.debug_info_;
}
if (cached_has_bits & 0x00000010u) {
expose_hidden_ = from.expose_hidden_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void RecurrentParameter::CopyFrom(const RecurrentParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.RecurrentParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool RecurrentParameter::IsInitialized() const {
return true;
}
void RecurrentParameter::InternalSwap(RecurrentParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(RecurrentParameter, expose_hidden_)
+ sizeof(RecurrentParameter::expose_hidden_)
- PROTOBUF_FIELD_OFFSET(RecurrentParameter, weight_filler_)>(
reinterpret_cast<char*>(&weight_filler_),
reinterpret_cast<char*>(&other->weight_filler_));
}
::PROTOBUF_NAMESPACE_ID::Metadata RecurrentParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[51]);
}
// ===================================================================
class ReductionParameter::_Internal {
public:
using HasBits = decltype(std::declval<ReductionParameter>()._has_bits_);
static void set_has_operation(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_coeff(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
ReductionParameter::ReductionParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ReductionParameter)
}
ReductionParameter::ReductionParameter(const ReductionParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&axis_, &from.axis_,
static_cast<size_t>(reinterpret_cast<char*>(&coeff_) -
reinterpret_cast<char*>(&axis_)) + sizeof(coeff_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ReductionParameter)
}
inline void ReductionParameter::SharedCtor() {
axis_ = 0;
operation_ = 1;
coeff_ = 1;
}
ReductionParameter::~ReductionParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ReductionParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ReductionParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ReductionParameter::ArenaDtor(void* object) {
ReductionParameter* _this = reinterpret_cast< ReductionParameter* >(object);
(void)_this;
}
void ReductionParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ReductionParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ReductionParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ReductionParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
axis_ = 0;
operation_ = 1;
coeff_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ReductionParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::ReductionParameter_ReductionOp_IsValid(val))) {
_internal_set_operation(static_cast<::opencv_caffe::ReductionParameter_ReductionOp>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional int32 axis = 2 [default = 0];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float coeff = 3 [default = 1];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_coeff(&has_bits);
coeff_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ReductionParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ReductionParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_operation(), target);
}
// optional int32 axis = 2 [default = 0];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), target);
}
// optional float coeff = 3 [default = 1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_coeff(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ReductionParameter)
return target;
}
size_t ReductionParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ReductionParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional int32 axis = 2 [default = 0];
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
// optional .opencv_caffe.ReductionParameter.ReductionOp operation = 1 [default = SUM];
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_operation());
}
// optional float coeff = 3 [default = 1];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReductionParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ReductionParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReductionParameter::GetClassData() const { return &_class_data_; }
void ReductionParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ReductionParameter *>(to)->MergeFrom(
static_cast<const ReductionParameter &>(from));
}
void ReductionParameter::MergeFrom(const ReductionParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ReductionParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
axis_ = from.axis_;
}
if (cached_has_bits & 0x00000002u) {
operation_ = from.operation_;
}
if (cached_has_bits & 0x00000004u) {
coeff_ = from.coeff_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ReductionParameter::CopyFrom(const ReductionParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ReductionParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ReductionParameter::IsInitialized() const {
return true;
}
void ReductionParameter::InternalSwap(ReductionParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(axis_, other->axis_);
swap(operation_, other->operation_);
swap(coeff_, other->coeff_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ReductionParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[52]);
}
// ===================================================================
class ReLUParameter::_Internal {
public:
using HasBits = decltype(std::declval<ReLUParameter>()._has_bits_);
static void set_has_negative_slope(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_engine(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
ReLUParameter::ReLUParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ReLUParameter)
}
ReLUParameter::ReLUParameter(const ReLUParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&negative_slope_, &from.negative_slope_,
static_cast<size_t>(reinterpret_cast<char*>(&engine_) -
reinterpret_cast<char*>(&negative_slope_)) + sizeof(engine_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ReLUParameter)
}
inline void ReLUParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&negative_slope_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&engine_) -
reinterpret_cast<char*>(&negative_slope_)) + sizeof(engine_));
}
ReLUParameter::~ReLUParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ReLUParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ReLUParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ReLUParameter::ArenaDtor(void* object) {
ReLUParameter* _this = reinterpret_cast< ReLUParameter* >(object);
(void)_this;
}
void ReLUParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ReLUParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ReLUParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ReLUParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
::memset(&negative_slope_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&engine_) -
reinterpret_cast<char*>(&negative_slope_)) + sizeof(engine_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ReLUParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float negative_slope = 1 [default = 0];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_negative_slope(&has_bits);
negative_slope_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::ReLUParameter_Engine_IsValid(val))) {
_internal_set_engine(static_cast<::opencv_caffe::ReLUParameter_Engine>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ReLUParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ReLUParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float negative_slope = 1 [default = 0];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_negative_slope(), target);
}
// optional .opencv_caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
2, this->_internal_engine(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ReLUParameter)
return target;
}
size_t ReLUParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ReLUParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional float negative_slope = 1 [default = 0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 4;
}
// optional .opencv_caffe.ReLUParameter.Engine engine = 2 [default = DEFAULT];
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReLUParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ReLUParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReLUParameter::GetClassData() const { return &_class_data_; }
void ReLUParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ReLUParameter *>(to)->MergeFrom(
static_cast<const ReLUParameter &>(from));
}
void ReLUParameter::MergeFrom(const ReLUParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ReLUParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
negative_slope_ = from.negative_slope_;
}
if (cached_has_bits & 0x00000002u) {
engine_ = from.engine_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ReLUParameter::CopyFrom(const ReLUParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ReLUParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ReLUParameter::IsInitialized() const {
return true;
}
void ReLUParameter::InternalSwap(ReLUParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ReLUParameter, engine_)
+ sizeof(ReLUParameter::engine_)
- PROTOBUF_FIELD_OFFSET(ReLUParameter, negative_slope_)>(
reinterpret_cast<char*>(&negative_slope_),
reinterpret_cast<char*>(&other->negative_slope_));
}
::PROTOBUF_NAMESPACE_ID::Metadata ReLUParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[53]);
}
// ===================================================================
class ReshapeParameter::_Internal {
public:
using HasBits = decltype(std::declval<ReshapeParameter>()._has_bits_);
static const ::opencv_caffe::BlobShape& shape(const ReshapeParameter* msg);
static void set_has_shape(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_num_axes(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
const ::opencv_caffe::BlobShape&
ReshapeParameter::_Internal::shape(const ReshapeParameter* msg) {
return *msg->shape_;
}
ReshapeParameter::ReshapeParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ReshapeParameter)
}
ReshapeParameter::ReshapeParameter(const ReshapeParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_shape()) {
shape_ = new ::opencv_caffe::BlobShape(*from.shape_);
} else {
shape_ = nullptr;
}
::memcpy(&axis_, &from.axis_,
static_cast<size_t>(reinterpret_cast<char*>(&num_axes_) -
reinterpret_cast<char*>(&axis_)) + sizeof(num_axes_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ReshapeParameter)
}
inline void ReshapeParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&shape_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
reinterpret_cast<char*>(&shape_)) + sizeof(axis_));
num_axes_ = -1;
}
ReshapeParameter::~ReshapeParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ReshapeParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ReshapeParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete shape_;
}
void ReshapeParameter::ArenaDtor(void* object) {
ReshapeParameter* _this = reinterpret_cast< ReshapeParameter* >(object);
(void)_this;
}
void ReshapeParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ReshapeParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ReshapeParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ReshapeParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(shape_ != nullptr);
shape_->Clear();
}
if (cached_has_bits & 0x00000006u) {
axis_ = 0;
num_axes_ = -1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ReshapeParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.BlobShape shape = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_shape(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 axis = 2 [default = 0];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 num_axes = 3 [default = -1];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_num_axes(&has_bits);
num_axes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ReshapeParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ReshapeParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.BlobShape shape = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
1, _Internal::shape(this), target, stream);
}
// optional int32 axis = 2 [default = 0];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), target);
}
// optional int32 num_axes = 3 [default = -1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_axes(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ReshapeParameter)
return target;
}
size_t ReshapeParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ReshapeParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional .opencv_caffe.BlobShape shape = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*shape_);
}
// optional int32 axis = 2 [default = 0];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
// optional int32 num_axes = 3 [default = -1];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_axes());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ReshapeParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ReshapeParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ReshapeParameter::GetClassData() const { return &_class_data_; }
void ReshapeParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ReshapeParameter *>(to)->MergeFrom(
static_cast<const ReshapeParameter &>(from));
}
void ReshapeParameter::MergeFrom(const ReshapeParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ReshapeParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_shape()->::opencv_caffe::BlobShape::MergeFrom(from._internal_shape());
}
if (cached_has_bits & 0x00000002u) {
axis_ = from.axis_;
}
if (cached_has_bits & 0x00000004u) {
num_axes_ = from.num_axes_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ReshapeParameter::CopyFrom(const ReshapeParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ReshapeParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ReshapeParameter::IsInitialized() const {
return true;
}
void ReshapeParameter::InternalSwap(ReshapeParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ReshapeParameter, axis_)
+ sizeof(ReshapeParameter::axis_)
- PROTOBUF_FIELD_OFFSET(ReshapeParameter, shape_)>(
reinterpret_cast<char*>(&shape_),
reinterpret_cast<char*>(&other->shape_));
swap(num_axes_, other->num_axes_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ReshapeParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[54]);
}
// ===================================================================
class ScaleParameter::_Internal {
public:
using HasBits = decltype(std::declval<ScaleParameter>()._has_bits_);
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_num_axes(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static const ::opencv_caffe::FillerParameter& filler(const ScaleParameter* msg);
static void set_has_filler(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_bias_term(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static const ::opencv_caffe::FillerParameter& bias_filler(const ScaleParameter* msg);
static void set_has_bias_filler(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
const ::opencv_caffe::FillerParameter&
ScaleParameter::_Internal::filler(const ScaleParameter* msg) {
return *msg->filler_;
}
const ::opencv_caffe::FillerParameter&
ScaleParameter::_Internal::bias_filler(const ScaleParameter* msg) {
return *msg->bias_filler_;
}
ScaleParameter::ScaleParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ScaleParameter)
}
ScaleParameter::ScaleParameter(const ScaleParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_filler()) {
filler_ = new ::opencv_caffe::FillerParameter(*from.filler_);
} else {
filler_ = nullptr;
}
if (from._internal_has_bias_filler()) {
bias_filler_ = new ::opencv_caffe::FillerParameter(*from.bias_filler_);
} else {
bias_filler_ = nullptr;
}
::memcpy(&bias_term_, &from.bias_term_,
static_cast<size_t>(reinterpret_cast<char*>(&num_axes_) -
reinterpret_cast<char*>(&bias_term_)) + sizeof(num_axes_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ScaleParameter)
}
inline void ScaleParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&filler_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&bias_term_) -
reinterpret_cast<char*>(&filler_)) + sizeof(bias_term_));
axis_ = 1;
num_axes_ = 1;
}
ScaleParameter::~ScaleParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ScaleParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ScaleParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete filler_;
if (this != internal_default_instance()) delete bias_filler_;
}
void ScaleParameter::ArenaDtor(void* object) {
ScaleParameter* _this = reinterpret_cast< ScaleParameter* >(object);
(void)_this;
}
void ScaleParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ScaleParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ScaleParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ScaleParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(filler_ != nullptr);
filler_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(bias_filler_ != nullptr);
bias_filler_->Clear();
}
}
if (cached_has_bits & 0x0000001cu) {
bias_term_ = false;
axis_ = 1;
num_axes_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ScaleParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 axis = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 num_axes = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_num_axes(&has_bits);
num_axes_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter filler = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool bias_term = 4 [default = false];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_bias_term(&has_bits);
bias_term_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter bias_filler = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ScaleParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ScaleParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int32 axis = 1 [default = 1];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
}
// optional int32 num_axes = 2 [default = 1];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_axes(), target);
}
// optional .opencv_caffe.FillerParameter filler = 3;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
3, _Internal::filler(this), target, stream);
}
// optional bool bias_term = 4 [default = false];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_bias_term(), target);
}
// optional .opencv_caffe.FillerParameter bias_filler = 5;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
5, _Internal::bias_filler(this), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ScaleParameter)
return target;
}
size_t ScaleParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ScaleParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
// optional .opencv_caffe.FillerParameter filler = 3;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*filler_);
}
// optional .opencv_caffe.FillerParameter bias_filler = 5;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*bias_filler_);
}
// optional bool bias_term = 4 [default = false];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 1;
}
// optional int32 axis = 1 [default = 1];
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
// optional int32 num_axes = 2 [default = 1];
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_num_axes());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ScaleParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ScaleParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ScaleParameter::GetClassData() const { return &_class_data_; }
void ScaleParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ScaleParameter *>(to)->MergeFrom(
static_cast<const ScaleParameter &>(from));
}
void ScaleParameter::MergeFrom(const ScaleParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ScaleParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000001fu) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_filler());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
}
if (cached_has_bits & 0x00000004u) {
bias_term_ = from.bias_term_;
}
if (cached_has_bits & 0x00000008u) {
axis_ = from.axis_;
}
if (cached_has_bits & 0x00000010u) {
num_axes_ = from.num_axes_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ScaleParameter::CopyFrom(const ScaleParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ScaleParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ScaleParameter::IsInitialized() const {
return true;
}
void ScaleParameter::InternalSwap(ScaleParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ScaleParameter, bias_term_)
+ sizeof(ScaleParameter::bias_term_)
- PROTOBUF_FIELD_OFFSET(ScaleParameter, filler_)>(
reinterpret_cast<char*>(&filler_),
reinterpret_cast<char*>(&other->filler_));
swap(axis_, other->axis_);
swap(num_axes_, other->num_axes_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ScaleParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[55]);
}
// ===================================================================
class SigmoidParameter::_Internal {
public:
using HasBits = decltype(std::declval<SigmoidParameter>()._has_bits_);
static void set_has_engine(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
SigmoidParameter::SigmoidParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.SigmoidParameter)
}
SigmoidParameter::SigmoidParameter(const SigmoidParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
engine_ = from.engine_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.SigmoidParameter)
}
inline void SigmoidParameter::SharedCtor() {
engine_ = 0;
}
SigmoidParameter::~SigmoidParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.SigmoidParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void SigmoidParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void SigmoidParameter::ArenaDtor(void* object) {
SigmoidParameter* _this = reinterpret_cast< SigmoidParameter* >(object);
(void)_this;
}
void SigmoidParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SigmoidParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void SigmoidParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.SigmoidParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
engine_ = 0;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* SigmoidParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SigmoidParameter_Engine_IsValid(val))) {
_internal_set_engine(static_cast<::opencv_caffe::SigmoidParameter_Engine>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* SigmoidParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SigmoidParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_engine(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.SigmoidParameter)
return target;
}
size_t SigmoidParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SigmoidParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// optional .opencv_caffe.SigmoidParameter.Engine engine = 1 [default = DEFAULT];
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SigmoidParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
SigmoidParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SigmoidParameter::GetClassData() const { return &_class_data_; }
void SigmoidParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<SigmoidParameter *>(to)->MergeFrom(
static_cast<const SigmoidParameter &>(from));
}
void SigmoidParameter::MergeFrom(const SigmoidParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.SigmoidParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_engine()) {
_internal_set_engine(from._internal_engine());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void SigmoidParameter::CopyFrom(const SigmoidParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.SigmoidParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SigmoidParameter::IsInitialized() const {
return true;
}
void SigmoidParameter::InternalSwap(SigmoidParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(engine_, other->engine_);
}
::PROTOBUF_NAMESPACE_ID::Metadata SigmoidParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[56]);
}
// ===================================================================
class SliceParameter::_Internal {
public:
using HasBits = decltype(std::declval<SliceParameter>()._has_bits_);
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_slice_dim(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
SliceParameter::SliceParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
slice_point_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.SliceParameter)
}
SliceParameter::SliceParameter(const SliceParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
slice_point_(from.slice_point_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&slice_dim_, &from.slice_dim_,
static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
reinterpret_cast<char*>(&slice_dim_)) + sizeof(axis_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.SliceParameter)
}
inline void SliceParameter::SharedCtor() {
slice_dim_ = 1u;
axis_ = 1;
}
SliceParameter::~SliceParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.SliceParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void SliceParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void SliceParameter::ArenaDtor(void* object) {
SliceParameter* _this = reinterpret_cast< SliceParameter* >(object);
(void)_this;
}
void SliceParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SliceParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void SliceParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.SliceParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
slice_point_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
slice_dim_ = 1u;
axis_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* SliceParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 slice_dim = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_slice_dim(&has_bits);
slice_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated uint32 slice_point = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_slice_point(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<16>(ptr));
} else if (static_cast<uint8_t>(tag) == 18) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedUInt32Parser(_internal_mutable_slice_point(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 axis = 3 [default = 1];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* SliceParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SliceParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 slice_dim = 1 [default = 1];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_slice_dim(), target);
}
// repeated uint32 slice_point = 2;
for (int i = 0, n = this->_internal_slice_point_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_slice_point(i), target);
}
// optional int32 axis = 3 [default = 1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_axis(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.SliceParameter)
return target;
}
size_t SliceParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SliceParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated uint32 slice_point = 2;
{
size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
UInt32Size(this->slice_point_);
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_slice_point_size());
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional uint32 slice_dim = 1 [default = 1];
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_slice_dim());
}
// optional int32 axis = 3 [default = 1];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SliceParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
SliceParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SliceParameter::GetClassData() const { return &_class_data_; }
void SliceParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<SliceParameter *>(to)->MergeFrom(
static_cast<const SliceParameter &>(from));
}
void SliceParameter::MergeFrom(const SliceParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.SliceParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
slice_point_.MergeFrom(from.slice_point_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
slice_dim_ = from.slice_dim_;
}
if (cached_has_bits & 0x00000002u) {
axis_ = from.axis_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void SliceParameter::CopyFrom(const SliceParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.SliceParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SliceParameter::IsInitialized() const {
return true;
}
void SliceParameter::InternalSwap(SliceParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
slice_point_.InternalSwap(&other->slice_point_);
swap(slice_dim_, other->slice_dim_);
swap(axis_, other->axis_);
}
::PROTOBUF_NAMESPACE_ID::Metadata SliceParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[57]);
}
// ===================================================================
class SoftmaxParameter::_Internal {
public:
using HasBits = decltype(std::declval<SoftmaxParameter>()._has_bits_);
static void set_has_engine(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
SoftmaxParameter::SoftmaxParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.SoftmaxParameter)
}
SoftmaxParameter::SoftmaxParameter(const SoftmaxParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&engine_, &from.engine_,
static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
reinterpret_cast<char*>(&engine_)) + sizeof(axis_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.SoftmaxParameter)
}
inline void SoftmaxParameter::SharedCtor() {
engine_ = 0;
axis_ = 1;
}
SoftmaxParameter::~SoftmaxParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.SoftmaxParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void SoftmaxParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void SoftmaxParameter::ArenaDtor(void* object) {
SoftmaxParameter* _this = reinterpret_cast< SoftmaxParameter* >(object);
(void)_this;
}
void SoftmaxParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SoftmaxParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void SoftmaxParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.SoftmaxParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
engine_ = 0;
axis_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* SoftmaxParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SoftmaxParameter_Engine_IsValid(val))) {
_internal_set_engine(static_cast<::opencv_caffe::SoftmaxParameter_Engine>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional int32 axis = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* SoftmaxParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SoftmaxParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_engine(), target);
}
// optional int32 axis = 2 [default = 1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_axis(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.SoftmaxParameter)
return target;
}
size_t SoftmaxParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SoftmaxParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional .opencv_caffe.SoftmaxParameter.Engine engine = 1 [default = DEFAULT];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
}
// optional int32 axis = 2 [default = 1];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SoftmaxParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
SoftmaxParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SoftmaxParameter::GetClassData() const { return &_class_data_; }
void SoftmaxParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<SoftmaxParameter *>(to)->MergeFrom(
static_cast<const SoftmaxParameter &>(from));
}
void SoftmaxParameter::MergeFrom(const SoftmaxParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.SoftmaxParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
engine_ = from.engine_;
}
if (cached_has_bits & 0x00000002u) {
axis_ = from.axis_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void SoftmaxParameter::CopyFrom(const SoftmaxParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.SoftmaxParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SoftmaxParameter::IsInitialized() const {
return true;
}
void SoftmaxParameter::InternalSwap(SoftmaxParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(engine_, other->engine_);
swap(axis_, other->axis_);
}
::PROTOBUF_NAMESPACE_ID::Metadata SoftmaxParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[58]);
}
// ===================================================================
class TanHParameter::_Internal {
public:
using HasBits = decltype(std::declval<TanHParameter>()._has_bits_);
static void set_has_engine(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
TanHParameter::TanHParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.TanHParameter)
}
TanHParameter::TanHParameter(const TanHParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
engine_ = from.engine_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.TanHParameter)
}
inline void TanHParameter::SharedCtor() {
engine_ = 0;
}
TanHParameter::~TanHParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.TanHParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void TanHParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void TanHParameter::ArenaDtor(void* object) {
TanHParameter* _this = reinterpret_cast< TanHParameter* >(object);
(void)_this;
}
void TanHParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TanHParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void TanHParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.TanHParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
engine_ = 0;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* TanHParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::TanHParameter_Engine_IsValid(val))) {
_internal_set_engine(static_cast<::opencv_caffe::TanHParameter_Engine>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* TanHParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.TanHParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1, this->_internal_engine(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.TanHParameter)
return target;
}
size_t TanHParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.TanHParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// optional .opencv_caffe.TanHParameter.Engine engine = 1 [default = DEFAULT];
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TanHParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
TanHParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TanHParameter::GetClassData() const { return &_class_data_; }
void TanHParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<TanHParameter *>(to)->MergeFrom(
static_cast<const TanHParameter &>(from));
}
void TanHParameter::MergeFrom(const TanHParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.TanHParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_engine()) {
_internal_set_engine(from._internal_engine());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void TanHParameter::CopyFrom(const TanHParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.TanHParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TanHParameter::IsInitialized() const {
return true;
}
void TanHParameter::InternalSwap(TanHParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(engine_, other->engine_);
}
::PROTOBUF_NAMESPACE_ID::Metadata TanHParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[59]);
}
// ===================================================================
class TileParameter::_Internal {
public:
using HasBits = decltype(std::declval<TileParameter>()._has_bits_);
static void set_has_axis(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_tiles(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
TileParameter::TileParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.TileParameter)
}
TileParameter::TileParameter(const TileParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&tiles_, &from.tiles_,
static_cast<size_t>(reinterpret_cast<char*>(&axis_) -
reinterpret_cast<char*>(&tiles_)) + sizeof(axis_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.TileParameter)
}
inline void TileParameter::SharedCtor() {
tiles_ = 0;
axis_ = 1;
}
TileParameter::~TileParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.TileParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void TileParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void TileParameter::ArenaDtor(void* object) {
TileParameter* _this = reinterpret_cast< TileParameter* >(object);
(void)_this;
}
void TileParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void TileParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void TileParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.TileParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
tiles_ = 0;
axis_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* TileParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional int32 axis = 1 [default = 1];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_axis(&has_bits);
axis_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 tiles = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_tiles(&has_bits);
tiles_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* TileParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.TileParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional int32 axis = 1 [default = 1];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_axis(), target);
}
// optional int32 tiles = 2;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_tiles(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.TileParameter)
return target;
}
size_t TileParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.TileParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional int32 tiles = 2;
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_tiles());
}
// optional int32 axis = 1 [default = 1];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_axis());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TileParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
TileParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TileParameter::GetClassData() const { return &_class_data_; }
void TileParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<TileParameter *>(to)->MergeFrom(
static_cast<const TileParameter &>(from));
}
void TileParameter::MergeFrom(const TileParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.TileParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
tiles_ = from.tiles_;
}
if (cached_has_bits & 0x00000002u) {
axis_ = from.axis_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void TileParameter::CopyFrom(const TileParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.TileParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool TileParameter::IsInitialized() const {
return true;
}
void TileParameter::InternalSwap(TileParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(tiles_, other->tiles_);
swap(axis_, other->axis_);
}
::PROTOBUF_NAMESPACE_ID::Metadata TileParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[60]);
}
// ===================================================================
class ThresholdParameter::_Internal {
public:
using HasBits = decltype(std::declval<ThresholdParameter>()._has_bits_);
static void set_has_threshold(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
};
ThresholdParameter::ThresholdParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ThresholdParameter)
}
ThresholdParameter::ThresholdParameter(const ThresholdParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
threshold_ = from.threshold_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ThresholdParameter)
}
inline void ThresholdParameter::SharedCtor() {
threshold_ = 0;
}
ThresholdParameter::~ThresholdParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ThresholdParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ThresholdParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ThresholdParameter::ArenaDtor(void* object) {
ThresholdParameter* _this = reinterpret_cast< ThresholdParameter* >(object);
(void)_this;
}
void ThresholdParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ThresholdParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ThresholdParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ThresholdParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
threshold_ = 0;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ThresholdParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float threshold = 1 [default = 0];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_threshold(&has_bits);
threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ThresholdParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ThresholdParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float threshold = 1 [default = 0];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_threshold(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ThresholdParameter)
return target;
}
size_t ThresholdParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ThresholdParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// optional float threshold = 1 [default = 0];
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 4;
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ThresholdParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ThresholdParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ThresholdParameter::GetClassData() const { return &_class_data_; }
void ThresholdParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ThresholdParameter *>(to)->MergeFrom(
static_cast<const ThresholdParameter &>(from));
}
void ThresholdParameter::MergeFrom(const ThresholdParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ThresholdParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_threshold()) {
_internal_set_threshold(from._internal_threshold());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ThresholdParameter::CopyFrom(const ThresholdParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ThresholdParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ThresholdParameter::IsInitialized() const {
return true;
}
void ThresholdParameter::InternalSwap(ThresholdParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(threshold_, other->threshold_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ThresholdParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[61]);
}
// ===================================================================
class WindowDataParameter::_Internal {
public:
using HasBits = decltype(std::declval<WindowDataParameter>()._has_bits_);
static void set_has_source(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_scale(HasBits* has_bits) {
(*has_bits)[0] |= 512u;
}
static void set_has_mean_file(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_batch_size(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_crop_size(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_mirror(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_fg_threshold(HasBits* has_bits) {
(*has_bits)[0] |= 1024u;
}
static void set_has_bg_threshold(HasBits* has_bits) {
(*has_bits)[0] |= 2048u;
}
static void set_has_fg_fraction(HasBits* has_bits) {
(*has_bits)[0] |= 4096u;
}
static void set_has_context_pad(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
static void set_has_crop_mode(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_cache_images(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static void set_has_root_folder(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
};
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString WindowDataParameter::_i_give_permission_to_break_this_code_default_crop_mode_{{{"warp", 4}}, {nullptr}};
WindowDataParameter::WindowDataParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.WindowDataParameter)
}
WindowDataParameter::WindowDataParameter(const WindowDataParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_source()) {
source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(),
GetArenaForAllocation());
}
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_mean_file()) {
mean_file_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_mean_file(),
GetArenaForAllocation());
}
crop_mode_.UnsafeSetDefault(nullptr);
if (from._internal_has_crop_mode()) {
crop_mode_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_crop_mode(),
GetArenaForAllocation());
}
root_folder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
root_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_root_folder()) {
root_folder_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_root_folder(),
GetArenaForAllocation());
}
::memcpy(&batch_size_, &from.batch_size_,
static_cast<size_t>(reinterpret_cast<char*>(&fg_fraction_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(fg_fraction_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.WindowDataParameter)
}
inline void WindowDataParameter::SharedCtor() {
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
mean_file_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
crop_mode_.UnsafeSetDefault(nullptr);
root_folder_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
root_folder_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&batch_size_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&context_pad_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(context_pad_));
scale_ = 1;
fg_threshold_ = 0.5f;
bg_threshold_ = 0.5f;
fg_fraction_ = 0.25f;
}
WindowDataParameter::~WindowDataParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.WindowDataParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void WindowDataParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
mean_file_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
crop_mode_.DestroyNoArena(nullptr);
root_folder_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}
void WindowDataParameter::ArenaDtor(void* object) {
WindowDataParameter* _this = reinterpret_cast< WindowDataParameter* >(object);
(void)_this;
}
void WindowDataParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void WindowDataParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void WindowDataParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.WindowDataParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
source_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
mean_file_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
crop_mode_.ClearToDefault(::opencv_caffe::WindowDataParameter::_i_give_permission_to_break_this_code_default_crop_mode_, GetArenaForAllocation());
}
if (cached_has_bits & 0x00000008u) {
root_folder_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x000000f0u) {
::memset(&batch_size_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&cache_images_) -
reinterpret_cast<char*>(&batch_size_)) + sizeof(cache_images_));
}
if (cached_has_bits & 0x00001f00u) {
context_pad_ = 0u;
scale_ = 1;
fg_threshold_ = 0.5f;
bg_threshold_ = 0.5f;
fg_fraction_ = 0.25f;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* WindowDataParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string source = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_source();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.WindowDataParameter.source");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float scale = 2 [default = 1];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
_Internal::set_has_scale(&has_bits);
scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional string mean_file = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_mean_file();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.WindowDataParameter.mean_file");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 batch_size = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_batch_size(&has_bits);
batch_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 crop_size = 5 [default = 0];
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_crop_size(&has_bits);
crop_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool mirror = 6 [default = false];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_mirror(&has_bits);
mirror_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float fg_threshold = 7 [default = 0.5];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
_Internal::set_has_fg_threshold(&has_bits);
fg_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float bg_threshold = 8 [default = 0.5];
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
_Internal::set_has_bg_threshold(&has_bits);
bg_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float fg_fraction = 9 [default = 0.25];
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 77)) {
_Internal::set_has_fg_fraction(&has_bits);
fg_fraction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional uint32 context_pad = 10 [default = 0];
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_context_pad(&has_bits);
context_pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string crop_mode = 11 [default = "warp"];
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
auto str = _internal_mutable_crop_mode();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.WindowDataParameter.crop_mode");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool cache_images = 12 [default = false];
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
_Internal::set_has_cache_images(&has_bits);
cache_images_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string root_folder = 13 [default = ""];
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
auto str = _internal_mutable_root_folder();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.WindowDataParameter.root_folder");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* WindowDataParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.WindowDataParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string source = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.WindowDataParameter.source");
target = stream->WriteStringMaybeAliased(
1, this->_internal_source(), target);
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_scale(), target);
}
// optional string mean_file = 3;
if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_mean_file().data(), static_cast<int>(this->_internal_mean_file().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.WindowDataParameter.mean_file");
target = stream->WriteStringMaybeAliased(
3, this->_internal_mean_file(), target);
}
// optional uint32 batch_size = 4;
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(4, this->_internal_batch_size(), target);
}
// optional uint32 crop_size = 5 [default = 0];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(5, this->_internal_crop_size(), target);
}
// optional bool mirror = 6 [default = false];
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_mirror(), target);
}
// optional float fg_threshold = 7 [default = 0.5];
if (cached_has_bits & 0x00000400u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_fg_threshold(), target);
}
// optional float bg_threshold = 8 [default = 0.5];
if (cached_has_bits & 0x00000800u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_bg_threshold(), target);
}
// optional float fg_fraction = 9 [default = 0.25];
if (cached_has_bits & 0x00001000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(9, this->_internal_fg_fraction(), target);
}
// optional uint32 context_pad = 10 [default = 0];
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_context_pad(), target);
}
// optional string crop_mode = 11 [default = "warp"];
if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_crop_mode().data(), static_cast<int>(this->_internal_crop_mode().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.WindowDataParameter.crop_mode");
target = stream->WriteStringMaybeAliased(
11, this->_internal_crop_mode(), target);
}
// optional bool cache_images = 12 [default = false];
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(12, this->_internal_cache_images(), target);
}
// optional string root_folder = 13 [default = ""];
if (cached_has_bits & 0x00000008u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_root_folder().data(), static_cast<int>(this->_internal_root_folder().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.WindowDataParameter.root_folder");
target = stream->WriteStringMaybeAliased(
13, this->_internal_root_folder(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.WindowDataParameter)
return target;
}
size_t WindowDataParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.WindowDataParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string source = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_source());
}
// optional string mean_file = 3;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_mean_file());
}
// optional string crop_mode = 11 [default = "warp"];
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_crop_mode());
}
// optional string root_folder = 13 [default = ""];
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_root_folder());
}
// optional uint32 batch_size = 4;
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_batch_size());
}
// optional uint32 crop_size = 5 [default = 0];
if (cached_has_bits & 0x00000020u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_crop_size());
}
// optional bool mirror = 6 [default = false];
if (cached_has_bits & 0x00000040u) {
total_size += 1 + 1;
}
// optional bool cache_images = 12 [default = false];
if (cached_has_bits & 0x00000080u) {
total_size += 1 + 1;
}
}
if (cached_has_bits & 0x00001f00u) {
// optional uint32 context_pad = 10 [default = 0];
if (cached_has_bits & 0x00000100u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_context_pad());
}
// optional float scale = 2 [default = 1];
if (cached_has_bits & 0x00000200u) {
total_size += 1 + 4;
}
// optional float fg_threshold = 7 [default = 0.5];
if (cached_has_bits & 0x00000400u) {
total_size += 1 + 4;
}
// optional float bg_threshold = 8 [default = 0.5];
if (cached_has_bits & 0x00000800u) {
total_size += 1 + 4;
}
// optional float fg_fraction = 9 [default = 0.25];
if (cached_has_bits & 0x00001000u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData WindowDataParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
WindowDataParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*WindowDataParameter::GetClassData() const { return &_class_data_; }
void WindowDataParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<WindowDataParameter *>(to)->MergeFrom(
static_cast<const WindowDataParameter &>(from));
}
void WindowDataParameter::MergeFrom(const WindowDataParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.WindowDataParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_source(from._internal_source());
}
if (cached_has_bits & 0x00000002u) {
_internal_set_mean_file(from._internal_mean_file());
}
if (cached_has_bits & 0x00000004u) {
_internal_set_crop_mode(from._internal_crop_mode());
}
if (cached_has_bits & 0x00000008u) {
_internal_set_root_folder(from._internal_root_folder());
}
if (cached_has_bits & 0x00000010u) {
batch_size_ = from.batch_size_;
}
if (cached_has_bits & 0x00000020u) {
crop_size_ = from.crop_size_;
}
if (cached_has_bits & 0x00000040u) {
mirror_ = from.mirror_;
}
if (cached_has_bits & 0x00000080u) {
cache_images_ = from.cache_images_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00001f00u) {
if (cached_has_bits & 0x00000100u) {
context_pad_ = from.context_pad_;
}
if (cached_has_bits & 0x00000200u) {
scale_ = from.scale_;
}
if (cached_has_bits & 0x00000400u) {
fg_threshold_ = from.fg_threshold_;
}
if (cached_has_bits & 0x00000800u) {
bg_threshold_ = from.bg_threshold_;
}
if (cached_has_bits & 0x00001000u) {
fg_fraction_ = from.fg_fraction_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void WindowDataParameter::CopyFrom(const WindowDataParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.WindowDataParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool WindowDataParameter::IsInitialized() const {
return true;
}
void WindowDataParameter::InternalSwap(WindowDataParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&source_, lhs_arena,
&other->source_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&mean_file_, lhs_arena,
&other->mean_file_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
nullptr,
&crop_mode_, lhs_arena,
&other->crop_mode_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&root_folder_, lhs_arena,
&other->root_folder_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(WindowDataParameter, context_pad_)
+ sizeof(WindowDataParameter::context_pad_)
- PROTOBUF_FIELD_OFFSET(WindowDataParameter, batch_size_)>(
reinterpret_cast<char*>(&batch_size_),
reinterpret_cast<char*>(&other->batch_size_));
swap(scale_, other->scale_);
swap(fg_threshold_, other->fg_threshold_);
swap(bg_threshold_, other->bg_threshold_);
swap(fg_fraction_, other->fg_fraction_);
}
::PROTOBUF_NAMESPACE_ID::Metadata WindowDataParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[62]);
}
// ===================================================================
class SPPParameter::_Internal {
public:
using HasBits = decltype(std::declval<SPPParameter>()._has_bits_);
static void set_has_pyramid_height(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_pool(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_engine(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
SPPParameter::SPPParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.SPPParameter)
}
SPPParameter::SPPParameter(const SPPParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&pyramid_height_, &from.pyramid_height_,
static_cast<size_t>(reinterpret_cast<char*>(&engine_) -
reinterpret_cast<char*>(&pyramid_height_)) + sizeof(engine_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.SPPParameter)
}
inline void SPPParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&pyramid_height_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&engine_) -
reinterpret_cast<char*>(&pyramid_height_)) + sizeof(engine_));
}
SPPParameter::~SPPParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.SPPParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void SPPParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void SPPParameter::ArenaDtor(void* object) {
SPPParameter* _this = reinterpret_cast< SPPParameter* >(object);
(void)_this;
}
void SPPParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SPPParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void SPPParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.SPPParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
::memset(&pyramid_height_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&engine_) -
reinterpret_cast<char*>(&pyramid_height_)) + sizeof(engine_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* SPPParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 pyramid_height = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_pyramid_height(&has_bits);
pyramid_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SPPParameter_PoolMethod_IsValid(val))) {
_internal_set_pool(static_cast<::opencv_caffe::SPPParameter_PoolMethod>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::SPPParameter_Engine_IsValid(val))) {
_internal_set_engine(static_cast<::opencv_caffe::SPPParameter_Engine>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* SPPParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.SPPParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 pyramid_height = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_pyramid_height(), target);
}
// optional .opencv_caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
2, this->_internal_pool(), target);
}
// optional .opencv_caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
6, this->_internal_engine(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.SPPParameter)
return target;
}
size_t SPPParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.SPPParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional uint32 pyramid_height = 1;
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pyramid_height());
}
// optional .opencv_caffe.SPPParameter.PoolMethod pool = 2 [default = MAX];
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_pool());
}
// optional .opencv_caffe.SPPParameter.Engine engine = 6 [default = DEFAULT];
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_engine());
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SPPParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
SPPParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SPPParameter::GetClassData() const { return &_class_data_; }
void SPPParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<SPPParameter *>(to)->MergeFrom(
static_cast<const SPPParameter &>(from));
}
void SPPParameter::MergeFrom(const SPPParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.SPPParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
pyramid_height_ = from.pyramid_height_;
}
if (cached_has_bits & 0x00000002u) {
pool_ = from.pool_;
}
if (cached_has_bits & 0x00000004u) {
engine_ = from.engine_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void SPPParameter::CopyFrom(const SPPParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.SPPParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool SPPParameter::IsInitialized() const {
return true;
}
void SPPParameter::InternalSwap(SPPParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(SPPParameter, engine_)
+ sizeof(SPPParameter::engine_)
- PROTOBUF_FIELD_OFFSET(SPPParameter, pyramid_height_)>(
reinterpret_cast<char*>(&pyramid_height_),
reinterpret_cast<char*>(&other->pyramid_height_));
}
::PROTOBUF_NAMESPACE_ID::Metadata SPPParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[63]);
}
// ===================================================================
class V1LayerParameter::_Internal {
public:
using HasBits = decltype(std::declval<V1LayerParameter>()._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_type(HasBits* has_bits) {
(*has_bits)[1] |= 1u;
}
static const ::opencv_caffe::AccuracyParameter& accuracy_param(const V1LayerParameter* msg);
static void set_has_accuracy_param(HasBits* has_bits) {
(*has_bits)[0] |= 1048576u;
}
static const ::opencv_caffe::ArgMaxParameter& argmax_param(const V1LayerParameter* msg);
static void set_has_argmax_param(HasBits* has_bits) {
(*has_bits)[0] |= 65536u;
}
static const ::opencv_caffe::ConcatParameter& concat_param(const V1LayerParameter* msg);
static void set_has_concat_param(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static const ::opencv_caffe::ContrastiveLossParameter& contrastive_loss_param(const V1LayerParameter* msg);
static void set_has_contrastive_loss_param(HasBits* has_bits) {
(*has_bits)[0] |= 536870912u;
}
static const ::opencv_caffe::ConvolutionParameter& convolution_param(const V1LayerParameter* msg);
static void set_has_convolution_param(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static const ::opencv_caffe::DataParameter& data_param(const V1LayerParameter* msg);
static void set_has_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static const ::opencv_caffe::DropoutParameter& dropout_param(const V1LayerParameter* msg);
static void set_has_dropout_param(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static const ::opencv_caffe::DummyDataParameter& dummy_data_param(const V1LayerParameter* msg);
static void set_has_dummy_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 524288u;
}
static const ::opencv_caffe::EltwiseParameter& eltwise_param(const V1LayerParameter* msg);
static void set_has_eltwise_param(HasBits* has_bits) {
(*has_bits)[0] |= 131072u;
}
static const ::opencv_caffe::ExpParameter& exp_param(const V1LayerParameter* msg);
static void set_has_exp_param(HasBits* has_bits) {
(*has_bits)[0] |= 1073741824u;
}
static const ::opencv_caffe::HDF5DataParameter& hdf5_data_param(const V1LayerParameter* msg);
static void set_has_hdf5_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static const ::opencv_caffe::HDF5OutputParameter& hdf5_output_param(const V1LayerParameter* msg);
static void set_has_hdf5_output_param(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
static const ::opencv_caffe::HingeLossParameter& hinge_loss_param(const V1LayerParameter* msg);
static void set_has_hinge_loss_param(HasBits* has_bits) {
(*has_bits)[0] |= 2097152u;
}
static const ::opencv_caffe::ImageDataParameter& image_data_param(const V1LayerParameter* msg);
static void set_has_image_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
static const ::opencv_caffe::InfogainLossParameter& infogain_loss_param(const V1LayerParameter* msg);
static void set_has_infogain_loss_param(HasBits* has_bits) {
(*has_bits)[0] |= 512u;
}
static const ::opencv_caffe::InnerProductParameter& inner_product_param(const V1LayerParameter* msg);
static void set_has_inner_product_param(HasBits* has_bits) {
(*has_bits)[0] |= 1024u;
}
static const ::opencv_caffe::LRNParameter& lrn_param(const V1LayerParameter* msg);
static void set_has_lrn_param(HasBits* has_bits) {
(*has_bits)[0] |= 2048u;
}
static const ::opencv_caffe::MemoryDataParameter& memory_data_param(const V1LayerParameter* msg);
static void set_has_memory_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 32768u;
}
static const ::opencv_caffe::MVNParameter& mvn_param(const V1LayerParameter* msg);
static void set_has_mvn_param(HasBits* has_bits) {
(*has_bits)[0] |= 16777216u;
}
static const ::opencv_caffe::PoolingParameter& pooling_param(const V1LayerParameter* msg);
static void set_has_pooling_param(HasBits* has_bits) {
(*has_bits)[0] |= 4096u;
}
static const ::opencv_caffe::PowerParameter& power_param(const V1LayerParameter* msg);
static void set_has_power_param(HasBits* has_bits) {
(*has_bits)[0] |= 16384u;
}
static const ::opencv_caffe::ReLUParameter& relu_param(const V1LayerParameter* msg);
static void set_has_relu_param(HasBits* has_bits) {
(*has_bits)[0] |= 4194304u;
}
static const ::opencv_caffe::SigmoidParameter& sigmoid_param(const V1LayerParameter* msg);
static void set_has_sigmoid_param(HasBits* has_bits) {
(*has_bits)[0] |= 134217728u;
}
static const ::opencv_caffe::SoftmaxParameter& softmax_param(const V1LayerParameter* msg);
static void set_has_softmax_param(HasBits* has_bits) {
(*has_bits)[0] |= 268435456u;
}
static const ::opencv_caffe::SliceParameter& slice_param(const V1LayerParameter* msg);
static void set_has_slice_param(HasBits* has_bits) {
(*has_bits)[0] |= 8388608u;
}
static const ::opencv_caffe::TanHParameter& tanh_param(const V1LayerParameter* msg);
static void set_has_tanh_param(HasBits* has_bits) {
(*has_bits)[0] |= 67108864u;
}
static const ::opencv_caffe::ThresholdParameter& threshold_param(const V1LayerParameter* msg);
static void set_has_threshold_param(HasBits* has_bits) {
(*has_bits)[0] |= 262144u;
}
static const ::opencv_caffe::WindowDataParameter& window_data_param(const V1LayerParameter* msg);
static void set_has_window_data_param(HasBits* has_bits) {
(*has_bits)[0] |= 8192u;
}
static const ::opencv_caffe::TransformationParameter& transform_param(const V1LayerParameter* msg);
static void set_has_transform_param(HasBits* has_bits) {
(*has_bits)[0] |= 33554432u;
}
static const ::opencv_caffe::LossParameter& loss_param(const V1LayerParameter* msg);
static void set_has_loss_param(HasBits* has_bits) {
(*has_bits)[0] |= 2147483648u;
}
static const ::opencv_caffe::V0LayerParameter& layer(const V1LayerParameter* msg);
static void set_has_layer(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
const ::opencv_caffe::AccuracyParameter&
V1LayerParameter::_Internal::accuracy_param(const V1LayerParameter* msg) {
return *msg->accuracy_param_;
}
const ::opencv_caffe::ArgMaxParameter&
V1LayerParameter::_Internal::argmax_param(const V1LayerParameter* msg) {
return *msg->argmax_param_;
}
const ::opencv_caffe::ConcatParameter&
V1LayerParameter::_Internal::concat_param(const V1LayerParameter* msg) {
return *msg->concat_param_;
}
const ::opencv_caffe::ContrastiveLossParameter&
V1LayerParameter::_Internal::contrastive_loss_param(const V1LayerParameter* msg) {
return *msg->contrastive_loss_param_;
}
const ::opencv_caffe::ConvolutionParameter&
V1LayerParameter::_Internal::convolution_param(const V1LayerParameter* msg) {
return *msg->convolution_param_;
}
const ::opencv_caffe::DataParameter&
V1LayerParameter::_Internal::data_param(const V1LayerParameter* msg) {
return *msg->data_param_;
}
const ::opencv_caffe::DropoutParameter&
V1LayerParameter::_Internal::dropout_param(const V1LayerParameter* msg) {
return *msg->dropout_param_;
}
const ::opencv_caffe::DummyDataParameter&
V1LayerParameter::_Internal::dummy_data_param(const V1LayerParameter* msg) {
return *msg->dummy_data_param_;
}
const ::opencv_caffe::EltwiseParameter&
V1LayerParameter::_Internal::eltwise_param(const V1LayerParameter* msg) {
return *msg->eltwise_param_;
}
const ::opencv_caffe::ExpParameter&
V1LayerParameter::_Internal::exp_param(const V1LayerParameter* msg) {
return *msg->exp_param_;
}
const ::opencv_caffe::HDF5DataParameter&
V1LayerParameter::_Internal::hdf5_data_param(const V1LayerParameter* msg) {
return *msg->hdf5_data_param_;
}
const ::opencv_caffe::HDF5OutputParameter&
V1LayerParameter::_Internal::hdf5_output_param(const V1LayerParameter* msg) {
return *msg->hdf5_output_param_;
}
const ::opencv_caffe::HingeLossParameter&
V1LayerParameter::_Internal::hinge_loss_param(const V1LayerParameter* msg) {
return *msg->hinge_loss_param_;
}
const ::opencv_caffe::ImageDataParameter&
V1LayerParameter::_Internal::image_data_param(const V1LayerParameter* msg) {
return *msg->image_data_param_;
}
const ::opencv_caffe::InfogainLossParameter&
V1LayerParameter::_Internal::infogain_loss_param(const V1LayerParameter* msg) {
return *msg->infogain_loss_param_;
}
const ::opencv_caffe::InnerProductParameter&
V1LayerParameter::_Internal::inner_product_param(const V1LayerParameter* msg) {
return *msg->inner_product_param_;
}
const ::opencv_caffe::LRNParameter&
V1LayerParameter::_Internal::lrn_param(const V1LayerParameter* msg) {
return *msg->lrn_param_;
}
const ::opencv_caffe::MemoryDataParameter&
V1LayerParameter::_Internal::memory_data_param(const V1LayerParameter* msg) {
return *msg->memory_data_param_;
}
const ::opencv_caffe::MVNParameter&
V1LayerParameter::_Internal::mvn_param(const V1LayerParameter* msg) {
return *msg->mvn_param_;
}
const ::opencv_caffe::PoolingParameter&
V1LayerParameter::_Internal::pooling_param(const V1LayerParameter* msg) {
return *msg->pooling_param_;
}
const ::opencv_caffe::PowerParameter&
V1LayerParameter::_Internal::power_param(const V1LayerParameter* msg) {
return *msg->power_param_;
}
const ::opencv_caffe::ReLUParameter&
V1LayerParameter::_Internal::relu_param(const V1LayerParameter* msg) {
return *msg->relu_param_;
}
const ::opencv_caffe::SigmoidParameter&
V1LayerParameter::_Internal::sigmoid_param(const V1LayerParameter* msg) {
return *msg->sigmoid_param_;
}
const ::opencv_caffe::SoftmaxParameter&
V1LayerParameter::_Internal::softmax_param(const V1LayerParameter* msg) {
return *msg->softmax_param_;
}
const ::opencv_caffe::SliceParameter&
V1LayerParameter::_Internal::slice_param(const V1LayerParameter* msg) {
return *msg->slice_param_;
}
const ::opencv_caffe::TanHParameter&
V1LayerParameter::_Internal::tanh_param(const V1LayerParameter* msg) {
return *msg->tanh_param_;
}
const ::opencv_caffe::ThresholdParameter&
V1LayerParameter::_Internal::threshold_param(const V1LayerParameter* msg) {
return *msg->threshold_param_;
}
const ::opencv_caffe::WindowDataParameter&
V1LayerParameter::_Internal::window_data_param(const V1LayerParameter* msg) {
return *msg->window_data_param_;
}
const ::opencv_caffe::TransformationParameter&
V1LayerParameter::_Internal::transform_param(const V1LayerParameter* msg) {
return *msg->transform_param_;
}
const ::opencv_caffe::LossParameter&
V1LayerParameter::_Internal::loss_param(const V1LayerParameter* msg) {
return *msg->loss_param_;
}
const ::opencv_caffe::V0LayerParameter&
V1LayerParameter::_Internal::layer(const V1LayerParameter* msg) {
return *msg->layer_;
}
V1LayerParameter::V1LayerParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
bottom_(arena),
top_(arena),
blobs_(arena),
blobs_lr_(arena),
weight_decay_(arena),
include_(arena),
exclude_(arena),
loss_weight_(arena),
param_(arena),
blob_share_mode_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.V1LayerParameter)
}
V1LayerParameter::V1LayerParameter(const V1LayerParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
bottom_(from.bottom_),
top_(from.top_),
blobs_(from.blobs_),
blobs_lr_(from.blobs_lr_),
weight_decay_(from.weight_decay_),
include_(from.include_),
exclude_(from.exclude_),
loss_weight_(from.loss_weight_),
param_(from.param_),
blob_share_mode_(from.blob_share_mode_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
if (from._internal_has_layer()) {
layer_ = new ::opencv_caffe::V0LayerParameter(*from.layer_);
} else {
layer_ = nullptr;
}
if (from._internal_has_concat_param()) {
concat_param_ = new ::opencv_caffe::ConcatParameter(*from.concat_param_);
} else {
concat_param_ = nullptr;
}
if (from._internal_has_convolution_param()) {
convolution_param_ = new ::opencv_caffe::ConvolutionParameter(*from.convolution_param_);
} else {
convolution_param_ = nullptr;
}
if (from._internal_has_data_param()) {
data_param_ = new ::opencv_caffe::DataParameter(*from.data_param_);
} else {
data_param_ = nullptr;
}
if (from._internal_has_dropout_param()) {
dropout_param_ = new ::opencv_caffe::DropoutParameter(*from.dropout_param_);
} else {
dropout_param_ = nullptr;
}
if (from._internal_has_hdf5_data_param()) {
hdf5_data_param_ = new ::opencv_caffe::HDF5DataParameter(*from.hdf5_data_param_);
} else {
hdf5_data_param_ = nullptr;
}
if (from._internal_has_hdf5_output_param()) {
hdf5_output_param_ = new ::opencv_caffe::HDF5OutputParameter(*from.hdf5_output_param_);
} else {
hdf5_output_param_ = nullptr;
}
if (from._internal_has_image_data_param()) {
image_data_param_ = new ::opencv_caffe::ImageDataParameter(*from.image_data_param_);
} else {
image_data_param_ = nullptr;
}
if (from._internal_has_infogain_loss_param()) {
infogain_loss_param_ = new ::opencv_caffe::InfogainLossParameter(*from.infogain_loss_param_);
} else {
infogain_loss_param_ = nullptr;
}
if (from._internal_has_inner_product_param()) {
inner_product_param_ = new ::opencv_caffe::InnerProductParameter(*from.inner_product_param_);
} else {
inner_product_param_ = nullptr;
}
if (from._internal_has_lrn_param()) {
lrn_param_ = new ::opencv_caffe::LRNParameter(*from.lrn_param_);
} else {
lrn_param_ = nullptr;
}
if (from._internal_has_pooling_param()) {
pooling_param_ = new ::opencv_caffe::PoolingParameter(*from.pooling_param_);
} else {
pooling_param_ = nullptr;
}
if (from._internal_has_window_data_param()) {
window_data_param_ = new ::opencv_caffe::WindowDataParameter(*from.window_data_param_);
} else {
window_data_param_ = nullptr;
}
if (from._internal_has_power_param()) {
power_param_ = new ::opencv_caffe::PowerParameter(*from.power_param_);
} else {
power_param_ = nullptr;
}
if (from._internal_has_memory_data_param()) {
memory_data_param_ = new ::opencv_caffe::MemoryDataParameter(*from.memory_data_param_);
} else {
memory_data_param_ = nullptr;
}
if (from._internal_has_argmax_param()) {
argmax_param_ = new ::opencv_caffe::ArgMaxParameter(*from.argmax_param_);
} else {
argmax_param_ = nullptr;
}
if (from._internal_has_eltwise_param()) {
eltwise_param_ = new ::opencv_caffe::EltwiseParameter(*from.eltwise_param_);
} else {
eltwise_param_ = nullptr;
}
if (from._internal_has_threshold_param()) {
threshold_param_ = new ::opencv_caffe::ThresholdParameter(*from.threshold_param_);
} else {
threshold_param_ = nullptr;
}
if (from._internal_has_dummy_data_param()) {
dummy_data_param_ = new ::opencv_caffe::DummyDataParameter(*from.dummy_data_param_);
} else {
dummy_data_param_ = nullptr;
}
if (from._internal_has_accuracy_param()) {
accuracy_param_ = new ::opencv_caffe::AccuracyParameter(*from.accuracy_param_);
} else {
accuracy_param_ = nullptr;
}
if (from._internal_has_hinge_loss_param()) {
hinge_loss_param_ = new ::opencv_caffe::HingeLossParameter(*from.hinge_loss_param_);
} else {
hinge_loss_param_ = nullptr;
}
if (from._internal_has_relu_param()) {
relu_param_ = new ::opencv_caffe::ReLUParameter(*from.relu_param_);
} else {
relu_param_ = nullptr;
}
if (from._internal_has_slice_param()) {
slice_param_ = new ::opencv_caffe::SliceParameter(*from.slice_param_);
} else {
slice_param_ = nullptr;
}
if (from._internal_has_mvn_param()) {
mvn_param_ = new ::opencv_caffe::MVNParameter(*from.mvn_param_);
} else {
mvn_param_ = nullptr;
}
if (from._internal_has_transform_param()) {
transform_param_ = new ::opencv_caffe::TransformationParameter(*from.transform_param_);
} else {
transform_param_ = nullptr;
}
if (from._internal_has_tanh_param()) {
tanh_param_ = new ::opencv_caffe::TanHParameter(*from.tanh_param_);
} else {
tanh_param_ = nullptr;
}
if (from._internal_has_sigmoid_param()) {
sigmoid_param_ = new ::opencv_caffe::SigmoidParameter(*from.sigmoid_param_);
} else {
sigmoid_param_ = nullptr;
}
if (from._internal_has_softmax_param()) {
softmax_param_ = new ::opencv_caffe::SoftmaxParameter(*from.softmax_param_);
} else {
softmax_param_ = nullptr;
}
if (from._internal_has_contrastive_loss_param()) {
contrastive_loss_param_ = new ::opencv_caffe::ContrastiveLossParameter(*from.contrastive_loss_param_);
} else {
contrastive_loss_param_ = nullptr;
}
if (from._internal_has_exp_param()) {
exp_param_ = new ::opencv_caffe::ExpParameter(*from.exp_param_);
} else {
exp_param_ = nullptr;
}
if (from._internal_has_loss_param()) {
loss_param_ = new ::opencv_caffe::LossParameter(*from.loss_param_);
} else {
loss_param_ = nullptr;
}
type_ = from.type_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.V1LayerParameter)
}
inline void V1LayerParameter::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&layer_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&type_) -
reinterpret_cast<char*>(&layer_)) + sizeof(type_));
}
V1LayerParameter::~V1LayerParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.V1LayerParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void V1LayerParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
if (this != internal_default_instance()) delete layer_;
if (this != internal_default_instance()) delete concat_param_;
if (this != internal_default_instance()) delete convolution_param_;
if (this != internal_default_instance()) delete data_param_;
if (this != internal_default_instance()) delete dropout_param_;
if (this != internal_default_instance()) delete hdf5_data_param_;
if (this != internal_default_instance()) delete hdf5_output_param_;
if (this != internal_default_instance()) delete image_data_param_;
if (this != internal_default_instance()) delete infogain_loss_param_;
if (this != internal_default_instance()) delete inner_product_param_;
if (this != internal_default_instance()) delete lrn_param_;
if (this != internal_default_instance()) delete pooling_param_;
if (this != internal_default_instance()) delete window_data_param_;
if (this != internal_default_instance()) delete power_param_;
if (this != internal_default_instance()) delete memory_data_param_;
if (this != internal_default_instance()) delete argmax_param_;
if (this != internal_default_instance()) delete eltwise_param_;
if (this != internal_default_instance()) delete threshold_param_;
if (this != internal_default_instance()) delete dummy_data_param_;
if (this != internal_default_instance()) delete accuracy_param_;
if (this != internal_default_instance()) delete hinge_loss_param_;
if (this != internal_default_instance()) delete relu_param_;
if (this != internal_default_instance()) delete slice_param_;
if (this != internal_default_instance()) delete mvn_param_;
if (this != internal_default_instance()) delete transform_param_;
if (this != internal_default_instance()) delete tanh_param_;
if (this != internal_default_instance()) delete sigmoid_param_;
if (this != internal_default_instance()) delete softmax_param_;
if (this != internal_default_instance()) delete contrastive_loss_param_;
if (this != internal_default_instance()) delete exp_param_;
if (this != internal_default_instance()) delete loss_param_;
}
void V1LayerParameter::ArenaDtor(void* object) {
V1LayerParameter* _this = reinterpret_cast< V1LayerParameter* >(object);
(void)_this;
}
void V1LayerParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void V1LayerParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void V1LayerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.V1LayerParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
bottom_.Clear();
top_.Clear();
blobs_.Clear();
blobs_lr_.Clear();
weight_decay_.Clear();
include_.Clear();
exclude_.Clear();
loss_weight_.Clear();
param_.Clear();
blob_share_mode_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(layer_ != nullptr);
layer_->Clear();
}
if (cached_has_bits & 0x00000004u) {
GOOGLE_DCHECK(concat_param_ != nullptr);
concat_param_->Clear();
}
if (cached_has_bits & 0x00000008u) {
GOOGLE_DCHECK(convolution_param_ != nullptr);
convolution_param_->Clear();
}
if (cached_has_bits & 0x00000010u) {
GOOGLE_DCHECK(data_param_ != nullptr);
data_param_->Clear();
}
if (cached_has_bits & 0x00000020u) {
GOOGLE_DCHECK(dropout_param_ != nullptr);
dropout_param_->Clear();
}
if (cached_has_bits & 0x00000040u) {
GOOGLE_DCHECK(hdf5_data_param_ != nullptr);
hdf5_data_param_->Clear();
}
if (cached_has_bits & 0x00000080u) {
GOOGLE_DCHECK(hdf5_output_param_ != nullptr);
hdf5_output_param_->Clear();
}
}
if (cached_has_bits & 0x0000ff00u) {
if (cached_has_bits & 0x00000100u) {
GOOGLE_DCHECK(image_data_param_ != nullptr);
image_data_param_->Clear();
}
if (cached_has_bits & 0x00000200u) {
GOOGLE_DCHECK(infogain_loss_param_ != nullptr);
infogain_loss_param_->Clear();
}
if (cached_has_bits & 0x00000400u) {
GOOGLE_DCHECK(inner_product_param_ != nullptr);
inner_product_param_->Clear();
}
if (cached_has_bits & 0x00000800u) {
GOOGLE_DCHECK(lrn_param_ != nullptr);
lrn_param_->Clear();
}
if (cached_has_bits & 0x00001000u) {
GOOGLE_DCHECK(pooling_param_ != nullptr);
pooling_param_->Clear();
}
if (cached_has_bits & 0x00002000u) {
GOOGLE_DCHECK(window_data_param_ != nullptr);
window_data_param_->Clear();
}
if (cached_has_bits & 0x00004000u) {
GOOGLE_DCHECK(power_param_ != nullptr);
power_param_->Clear();
}
if (cached_has_bits & 0x00008000u) {
GOOGLE_DCHECK(memory_data_param_ != nullptr);
memory_data_param_->Clear();
}
}
if (cached_has_bits & 0x00ff0000u) {
if (cached_has_bits & 0x00010000u) {
GOOGLE_DCHECK(argmax_param_ != nullptr);
argmax_param_->Clear();
}
if (cached_has_bits & 0x00020000u) {
GOOGLE_DCHECK(eltwise_param_ != nullptr);
eltwise_param_->Clear();
}
if (cached_has_bits & 0x00040000u) {
GOOGLE_DCHECK(threshold_param_ != nullptr);
threshold_param_->Clear();
}
if (cached_has_bits & 0x00080000u) {
GOOGLE_DCHECK(dummy_data_param_ != nullptr);
dummy_data_param_->Clear();
}
if (cached_has_bits & 0x00100000u) {
GOOGLE_DCHECK(accuracy_param_ != nullptr);
accuracy_param_->Clear();
}
if (cached_has_bits & 0x00200000u) {
GOOGLE_DCHECK(hinge_loss_param_ != nullptr);
hinge_loss_param_->Clear();
}
if (cached_has_bits & 0x00400000u) {
GOOGLE_DCHECK(relu_param_ != nullptr);
relu_param_->Clear();
}
if (cached_has_bits & 0x00800000u) {
GOOGLE_DCHECK(slice_param_ != nullptr);
slice_param_->Clear();
}
}
if (cached_has_bits & 0xff000000u) {
if (cached_has_bits & 0x01000000u) {
GOOGLE_DCHECK(mvn_param_ != nullptr);
mvn_param_->Clear();
}
if (cached_has_bits & 0x02000000u) {
GOOGLE_DCHECK(transform_param_ != nullptr);
transform_param_->Clear();
}
if (cached_has_bits & 0x04000000u) {
GOOGLE_DCHECK(tanh_param_ != nullptr);
tanh_param_->Clear();
}
if (cached_has_bits & 0x08000000u) {
GOOGLE_DCHECK(sigmoid_param_ != nullptr);
sigmoid_param_->Clear();
}
if (cached_has_bits & 0x10000000u) {
GOOGLE_DCHECK(softmax_param_ != nullptr);
softmax_param_->Clear();
}
if (cached_has_bits & 0x20000000u) {
GOOGLE_DCHECK(contrastive_loss_param_ != nullptr);
contrastive_loss_param_->Clear();
}
if (cached_has_bits & 0x40000000u) {
GOOGLE_DCHECK(exp_param_ != nullptr);
exp_param_->Clear();
}
if (cached_has_bits & 0x80000000u) {
GOOGLE_DCHECK(loss_param_ != nullptr);
loss_param_->Clear();
}
}
type_ = 0;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* V1LayerParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.V0LayerParameter layer = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_layer(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated string bottom = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_bottom();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.V1LayerParameter.bottom");
#endif // !NDEBUG
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
} else
goto handle_unusual;
continue;
// repeated string top = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr -= 1;
do {
ptr += 1;
auto str = _internal_add_top();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.V1LayerParameter.top");
#endif // !NDEBUG
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
} else
goto handle_unusual;
continue;
// optional string name = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.V1LayerParameter.name");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.V1LayerParameter.LayerType type = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::V1LayerParameter_LayerType_IsValid(val))) {
_internal_set_type(static_cast<::opencv_caffe::V1LayerParameter_LayerType>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.BlobProto blobs = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr -= 1;
do {
ptr += 1;
ptr = ctx->ParseMessage(_internal_add_blobs(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
} else
goto handle_unusual;
continue;
// repeated float blobs_lr = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_blobs_lr(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<61>(ptr));
} else if (static_cast<uint8_t>(tag) == 58) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_blobs_lr(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float weight_decay = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_weight_decay(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<69>(ptr));
} else if (static_cast<uint8_t>(tag) == 66) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_weight_decay(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ConcatParameter concat_param = 9;
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr = ctx->ParseMessage(_internal_mutable_concat_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ConvolutionParameter convolution_param = 10;
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
ptr = ctx->ParseMessage(_internal_mutable_convolution_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.DataParameter data_param = 11;
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 90)) {
ptr = ctx->ParseMessage(_internal_mutable_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.DropoutParameter dropout_param = 12;
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
ptr = ctx->ParseMessage(_internal_mutable_dropout_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 13;
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 106)) {
ptr = ctx->ParseMessage(_internal_mutable_hdf5_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 14;
case 14:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 114)) {
ptr = ctx->ParseMessage(_internal_mutable_hdf5_output_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ImageDataParameter image_data_param = 15;
case 15:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 122)) {
ptr = ctx->ParseMessage(_internal_mutable_image_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 16;
case 16:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
ptr = ctx->ParseMessage(_internal_mutable_infogain_loss_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.InnerProductParameter inner_product_param = 17;
case 17:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 138)) {
ptr = ctx->ParseMessage(_internal_mutable_inner_product_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.LRNParameter lrn_param = 18;
case 18:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
ptr = ctx->ParseMessage(_internal_mutable_lrn_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PoolingParameter pooling_param = 19;
case 19:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 154)) {
ptr = ctx->ParseMessage(_internal_mutable_pooling_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.WindowDataParameter window_data_param = 20;
case 20:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 162)) {
ptr = ctx->ParseMessage(_internal_mutable_window_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.PowerParameter power_param = 21;
case 21:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 170)) {
ptr = ctx->ParseMessage(_internal_mutable_power_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.MemoryDataParameter memory_data_param = 22;
case 22:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 178)) {
ptr = ctx->ParseMessage(_internal_mutable_memory_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ArgMaxParameter argmax_param = 23;
case 23:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 186)) {
ptr = ctx->ParseMessage(_internal_mutable_argmax_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.EltwiseParameter eltwise_param = 24;
case 24:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 194)) {
ptr = ctx->ParseMessage(_internal_mutable_eltwise_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ThresholdParameter threshold_param = 25;
case 25:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 202)) {
ptr = ctx->ParseMessage(_internal_mutable_threshold_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.DummyDataParameter dummy_data_param = 26;
case 26:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 210)) {
ptr = ctx->ParseMessage(_internal_mutable_dummy_data_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.AccuracyParameter accuracy_param = 27;
case 27:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 218)) {
ptr = ctx->ParseMessage(_internal_mutable_accuracy_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.HingeLossParameter hinge_loss_param = 29;
case 29:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 234)) {
ptr = ctx->ParseMessage(_internal_mutable_hinge_loss_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ReLUParameter relu_param = 30;
case 30:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 242)) {
ptr = ctx->ParseMessage(_internal_mutable_relu_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SliceParameter slice_param = 31;
case 31:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 250)) {
ptr = ctx->ParseMessage(_internal_mutable_slice_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.NetStateRule include = 32;
case 32:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 2)) {
ptr -= 2;
do {
ptr += 2;
ptr = ctx->ParseMessage(_internal_add_include(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<258>(ptr));
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.NetStateRule exclude = 33;
case 33:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr -= 2;
do {
ptr += 2;
ptr = ctx->ParseMessage(_internal_add_exclude(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<266>(ptr));
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.MVNParameter mvn_param = 34;
case 34:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_mvn_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float loss_weight = 35;
case 35:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
ptr -= 2;
do {
ptr += 2;
_internal_add_loss_weight(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<285>(ptr));
} else if (static_cast<uint8_t>(tag) == 26) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_loss_weight(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.TransformationParameter transform_param = 36;
case 36:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
ptr = ctx->ParseMessage(_internal_mutable_transform_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.TanHParameter tanh_param = 37;
case 37:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_tanh_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SigmoidParameter sigmoid_param = 38;
case 38:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr = ctx->ParseMessage(_internal_mutable_sigmoid_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.SoftmaxParameter softmax_param = 39;
case 39:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 58)) {
ptr = ctx->ParseMessage(_internal_mutable_softmax_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 40;
case 40:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 66)) {
ptr = ctx->ParseMessage(_internal_mutable_contrastive_loss_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.ExpParameter exp_param = 41;
case 41:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr = ctx->ParseMessage(_internal_mutable_exp_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.LossParameter loss_param = 42;
case 42:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
ptr = ctx->ParseMessage(_internal_mutable_loss_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated string param = 1001;
case 1001:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr -= 2;
do {
ptr += 2;
auto str = _internal_add_param();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.V1LayerParameter.param");
#endif // !NDEBUG
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8010>(ptr));
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
case 1002:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
ptr -= 2;
do {
ptr += 2;
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::V1LayerParameter_DimCheckMode_IsValid(val))) {
_internal_add_blob_share_mode(static_cast<::opencv_caffe::V1LayerParameter_DimCheckMode>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1002, val, mutable_unknown_fields());
}
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<8016>(ptr));
} else if (static_cast<uint8_t>(tag) == 82) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(_internal_mutable_blob_share_mode(), ptr, ctx, ::opencv_caffe::V1LayerParameter_DimCheckMode_IsValid, &_internal_metadata_, 1002);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* V1LayerParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.V1LayerParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.V0LayerParameter layer = 1;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
1, _Internal::layer(this), target, stream);
}
// repeated string bottom = 2;
for (int i = 0, n = this->_internal_bottom_size(); i < n; i++) {
const auto& s = this->_internal_bottom(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.V1LayerParameter.bottom");
target = stream->WriteString(2, s, target);
}
// repeated string top = 3;
for (int i = 0, n = this->_internal_top_size(); i < n; i++) {
const auto& s = this->_internal_top(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.V1LayerParameter.top");
target = stream->WriteString(3, s, target);
}
// optional string name = 4;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.V1LayerParameter.name");
target = stream->WriteStringMaybeAliased(
4, this->_internal_name(), target);
}
cached_has_bits = _has_bits_[1];
// optional .opencv_caffe.V1LayerParameter.LayerType type = 5;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
5, this->_internal_type(), target);
}
// repeated .opencv_caffe.BlobProto blobs = 6;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_blobs_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(6, this->_internal_blobs(i), target, stream);
}
// repeated float blobs_lr = 7;
for (int i = 0, n = this->_internal_blobs_lr_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_blobs_lr(i), target);
}
// repeated float weight_decay = 8;
for (int i = 0, n = this->_internal_weight_decay_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_weight_decay(i), target);
}
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.ConcatParameter concat_param = 9;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
9, _Internal::concat_param(this), target, stream);
}
// optional .opencv_caffe.ConvolutionParameter convolution_param = 10;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
10, _Internal::convolution_param(this), target, stream);
}
// optional .opencv_caffe.DataParameter data_param = 11;
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
11, _Internal::data_param(this), target, stream);
}
// optional .opencv_caffe.DropoutParameter dropout_param = 12;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
12, _Internal::dropout_param(this), target, stream);
}
// optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 13;
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
13, _Internal::hdf5_data_param(this), target, stream);
}
// optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 14;
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
14, _Internal::hdf5_output_param(this), target, stream);
}
// optional .opencv_caffe.ImageDataParameter image_data_param = 15;
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
15, _Internal::image_data_param(this), target, stream);
}
// optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 16;
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
16, _Internal::infogain_loss_param(this), target, stream);
}
// optional .opencv_caffe.InnerProductParameter inner_product_param = 17;
if (cached_has_bits & 0x00000400u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
17, _Internal::inner_product_param(this), target, stream);
}
// optional .opencv_caffe.LRNParameter lrn_param = 18;
if (cached_has_bits & 0x00000800u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
18, _Internal::lrn_param(this), target, stream);
}
// optional .opencv_caffe.PoolingParameter pooling_param = 19;
if (cached_has_bits & 0x00001000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
19, _Internal::pooling_param(this), target, stream);
}
// optional .opencv_caffe.WindowDataParameter window_data_param = 20;
if (cached_has_bits & 0x00002000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
20, _Internal::window_data_param(this), target, stream);
}
// optional .opencv_caffe.PowerParameter power_param = 21;
if (cached_has_bits & 0x00004000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
21, _Internal::power_param(this), target, stream);
}
// optional .opencv_caffe.MemoryDataParameter memory_data_param = 22;
if (cached_has_bits & 0x00008000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
22, _Internal::memory_data_param(this), target, stream);
}
// optional .opencv_caffe.ArgMaxParameter argmax_param = 23;
if (cached_has_bits & 0x00010000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
23, _Internal::argmax_param(this), target, stream);
}
// optional .opencv_caffe.EltwiseParameter eltwise_param = 24;
if (cached_has_bits & 0x00020000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
24, _Internal::eltwise_param(this), target, stream);
}
// optional .opencv_caffe.ThresholdParameter threshold_param = 25;
if (cached_has_bits & 0x00040000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
25, _Internal::threshold_param(this), target, stream);
}
// optional .opencv_caffe.DummyDataParameter dummy_data_param = 26;
if (cached_has_bits & 0x00080000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
26, _Internal::dummy_data_param(this), target, stream);
}
// optional .opencv_caffe.AccuracyParameter accuracy_param = 27;
if (cached_has_bits & 0x00100000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
27, _Internal::accuracy_param(this), target, stream);
}
// optional .opencv_caffe.HingeLossParameter hinge_loss_param = 29;
if (cached_has_bits & 0x00200000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
29, _Internal::hinge_loss_param(this), target, stream);
}
// optional .opencv_caffe.ReLUParameter relu_param = 30;
if (cached_has_bits & 0x00400000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
30, _Internal::relu_param(this), target, stream);
}
// optional .opencv_caffe.SliceParameter slice_param = 31;
if (cached_has_bits & 0x00800000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
31, _Internal::slice_param(this), target, stream);
}
// repeated .opencv_caffe.NetStateRule include = 32;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_include_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(32, this->_internal_include(i), target, stream);
}
// repeated .opencv_caffe.NetStateRule exclude = 33;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_exclude_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(33, this->_internal_exclude(i), target, stream);
}
// optional .opencv_caffe.MVNParameter mvn_param = 34;
if (cached_has_bits & 0x01000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
34, _Internal::mvn_param(this), target, stream);
}
// repeated float loss_weight = 35;
for (int i = 0, n = this->_internal_loss_weight_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(35, this->_internal_loss_weight(i), target);
}
// optional .opencv_caffe.TransformationParameter transform_param = 36;
if (cached_has_bits & 0x02000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
36, _Internal::transform_param(this), target, stream);
}
// optional .opencv_caffe.TanHParameter tanh_param = 37;
if (cached_has_bits & 0x04000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
37, _Internal::tanh_param(this), target, stream);
}
// optional .opencv_caffe.SigmoidParameter sigmoid_param = 38;
if (cached_has_bits & 0x08000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
38, _Internal::sigmoid_param(this), target, stream);
}
// optional .opencv_caffe.SoftmaxParameter softmax_param = 39;
if (cached_has_bits & 0x10000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
39, _Internal::softmax_param(this), target, stream);
}
// optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 40;
if (cached_has_bits & 0x20000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
40, _Internal::contrastive_loss_param(this), target, stream);
}
// optional .opencv_caffe.ExpParameter exp_param = 41;
if (cached_has_bits & 0x40000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
41, _Internal::exp_param(this), target, stream);
}
// optional .opencv_caffe.LossParameter loss_param = 42;
if (cached_has_bits & 0x80000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
42, _Internal::loss_param(this), target, stream);
}
// repeated string param = 1001;
for (int i = 0, n = this->_internal_param_size(); i < n; i++) {
const auto& s = this->_internal_param(i);
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
s.data(), static_cast<int>(s.length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.V1LayerParameter.param");
target = stream->WriteString(1001, s, target);
}
// repeated .opencv_caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
for (int i = 0, n = this->_internal_blob_share_mode_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
1002, this->_internal_blob_share_mode(i), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.V1LayerParameter)
return target;
}
size_t V1LayerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.V1LayerParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated string bottom = 2;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(bottom_.size());
for (int i = 0, n = bottom_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
bottom_.Get(i));
}
// repeated string top = 3;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(top_.size());
for (int i = 0, n = top_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
top_.Get(i));
}
// repeated .opencv_caffe.BlobProto blobs = 6;
total_size += 1UL * this->_internal_blobs_size();
for (const auto& msg : this->blobs_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated float blobs_lr = 7;
{
unsigned int count = static_cast<unsigned int>(this->_internal_blobs_lr_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_blobs_lr_size());
total_size += data_size;
}
// repeated float weight_decay = 8;
{
unsigned int count = static_cast<unsigned int>(this->_internal_weight_decay_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_weight_decay_size());
total_size += data_size;
}
// repeated .opencv_caffe.NetStateRule include = 32;
total_size += 2UL * this->_internal_include_size();
for (const auto& msg : this->include_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated .opencv_caffe.NetStateRule exclude = 33;
total_size += 2UL * this->_internal_exclude_size();
for (const auto& msg : this->exclude_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated float loss_weight = 35;
{
unsigned int count = static_cast<unsigned int>(this->_internal_loss_weight_size());
size_t data_size = 4UL * count;
total_size += 2 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_loss_weight_size());
total_size += data_size;
}
// repeated string param = 1001;
total_size += 2 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(param_.size());
for (int i = 0, n = param_.size(); i < n; i++) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
param_.Get(i));
}
// repeated .opencv_caffe.V1LayerParameter.DimCheckMode blob_share_mode = 1002;
{
size_t data_size = 0;
unsigned int count = static_cast<unsigned int>(this->_internal_blob_share_mode_size());for (unsigned int i = 0; i < count; i++) {
data_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(
this->_internal_blob_share_mode(static_cast<int>(i)));
}
total_size += (2UL * count) + data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string name = 4;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// optional .opencv_caffe.V0LayerParameter layer = 1;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*layer_);
}
// optional .opencv_caffe.ConcatParameter concat_param = 9;
if (cached_has_bits & 0x00000004u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*concat_param_);
}
// optional .opencv_caffe.ConvolutionParameter convolution_param = 10;
if (cached_has_bits & 0x00000008u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*convolution_param_);
}
// optional .opencv_caffe.DataParameter data_param = 11;
if (cached_has_bits & 0x00000010u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*data_param_);
}
// optional .opencv_caffe.DropoutParameter dropout_param = 12;
if (cached_has_bits & 0x00000020u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*dropout_param_);
}
// optional .opencv_caffe.HDF5DataParameter hdf5_data_param = 13;
if (cached_has_bits & 0x00000040u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*hdf5_data_param_);
}
// optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 14;
if (cached_has_bits & 0x00000080u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*hdf5_output_param_);
}
}
if (cached_has_bits & 0x0000ff00u) {
// optional .opencv_caffe.ImageDataParameter image_data_param = 15;
if (cached_has_bits & 0x00000100u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*image_data_param_);
}
// optional .opencv_caffe.InfogainLossParameter infogain_loss_param = 16;
if (cached_has_bits & 0x00000200u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*infogain_loss_param_);
}
// optional .opencv_caffe.InnerProductParameter inner_product_param = 17;
if (cached_has_bits & 0x00000400u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*inner_product_param_);
}
// optional .opencv_caffe.LRNParameter lrn_param = 18;
if (cached_has_bits & 0x00000800u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*lrn_param_);
}
// optional .opencv_caffe.PoolingParameter pooling_param = 19;
if (cached_has_bits & 0x00001000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*pooling_param_);
}
// optional .opencv_caffe.WindowDataParameter window_data_param = 20;
if (cached_has_bits & 0x00002000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*window_data_param_);
}
// optional .opencv_caffe.PowerParameter power_param = 21;
if (cached_has_bits & 0x00004000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*power_param_);
}
// optional .opencv_caffe.MemoryDataParameter memory_data_param = 22;
if (cached_has_bits & 0x00008000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*memory_data_param_);
}
}
if (cached_has_bits & 0x00ff0000u) {
// optional .opencv_caffe.ArgMaxParameter argmax_param = 23;
if (cached_has_bits & 0x00010000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*argmax_param_);
}
// optional .opencv_caffe.EltwiseParameter eltwise_param = 24;
if (cached_has_bits & 0x00020000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*eltwise_param_);
}
// optional .opencv_caffe.ThresholdParameter threshold_param = 25;
if (cached_has_bits & 0x00040000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*threshold_param_);
}
// optional .opencv_caffe.DummyDataParameter dummy_data_param = 26;
if (cached_has_bits & 0x00080000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*dummy_data_param_);
}
// optional .opencv_caffe.AccuracyParameter accuracy_param = 27;
if (cached_has_bits & 0x00100000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*accuracy_param_);
}
// optional .opencv_caffe.HingeLossParameter hinge_loss_param = 29;
if (cached_has_bits & 0x00200000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*hinge_loss_param_);
}
// optional .opencv_caffe.ReLUParameter relu_param = 30;
if (cached_has_bits & 0x00400000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*relu_param_);
}
// optional .opencv_caffe.SliceParameter slice_param = 31;
if (cached_has_bits & 0x00800000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*slice_param_);
}
}
if (cached_has_bits & 0xff000000u) {
// optional .opencv_caffe.MVNParameter mvn_param = 34;
if (cached_has_bits & 0x01000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*mvn_param_);
}
// optional .opencv_caffe.TransformationParameter transform_param = 36;
if (cached_has_bits & 0x02000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*transform_param_);
}
// optional .opencv_caffe.TanHParameter tanh_param = 37;
if (cached_has_bits & 0x04000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*tanh_param_);
}
// optional .opencv_caffe.SigmoidParameter sigmoid_param = 38;
if (cached_has_bits & 0x08000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*sigmoid_param_);
}
// optional .opencv_caffe.SoftmaxParameter softmax_param = 39;
if (cached_has_bits & 0x10000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*softmax_param_);
}
// optional .opencv_caffe.ContrastiveLossParameter contrastive_loss_param = 40;
if (cached_has_bits & 0x20000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*contrastive_loss_param_);
}
// optional .opencv_caffe.ExpParameter exp_param = 41;
if (cached_has_bits & 0x40000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*exp_param_);
}
// optional .opencv_caffe.LossParameter loss_param = 42;
if (cached_has_bits & 0x80000000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*loss_param_);
}
}
// optional .opencv_caffe.V1LayerParameter.LayerType type = 5;
cached_has_bits = _has_bits_[1];
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_type());
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData V1LayerParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
V1LayerParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*V1LayerParameter::GetClassData() const { return &_class_data_; }
void V1LayerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<V1LayerParameter *>(to)->MergeFrom(
static_cast<const V1LayerParameter &>(from));
}
void V1LayerParameter::MergeFrom(const V1LayerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.V1LayerParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
bottom_.MergeFrom(from.bottom_);
top_.MergeFrom(from.top_);
blobs_.MergeFrom(from.blobs_);
blobs_lr_.MergeFrom(from.blobs_lr_);
weight_decay_.MergeFrom(from.weight_decay_);
include_.MergeFrom(from.include_);
exclude_.MergeFrom(from.exclude_);
loss_weight_.MergeFrom(from.loss_weight_);
param_.MergeFrom(from.param_);
blob_share_mode_.MergeFrom(from.blob_share_mode_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
_internal_mutable_layer()->::opencv_caffe::V0LayerParameter::MergeFrom(from._internal_layer());
}
if (cached_has_bits & 0x00000004u) {
_internal_mutable_concat_param()->::opencv_caffe::ConcatParameter::MergeFrom(from._internal_concat_param());
}
if (cached_has_bits & 0x00000008u) {
_internal_mutable_convolution_param()->::opencv_caffe::ConvolutionParameter::MergeFrom(from._internal_convolution_param());
}
if (cached_has_bits & 0x00000010u) {
_internal_mutable_data_param()->::opencv_caffe::DataParameter::MergeFrom(from._internal_data_param());
}
if (cached_has_bits & 0x00000020u) {
_internal_mutable_dropout_param()->::opencv_caffe::DropoutParameter::MergeFrom(from._internal_dropout_param());
}
if (cached_has_bits & 0x00000040u) {
_internal_mutable_hdf5_data_param()->::opencv_caffe::HDF5DataParameter::MergeFrom(from._internal_hdf5_data_param());
}
if (cached_has_bits & 0x00000080u) {
_internal_mutable_hdf5_output_param()->::opencv_caffe::HDF5OutputParameter::MergeFrom(from._internal_hdf5_output_param());
}
}
if (cached_has_bits & 0x0000ff00u) {
if (cached_has_bits & 0x00000100u) {
_internal_mutable_image_data_param()->::opencv_caffe::ImageDataParameter::MergeFrom(from._internal_image_data_param());
}
if (cached_has_bits & 0x00000200u) {
_internal_mutable_infogain_loss_param()->::opencv_caffe::InfogainLossParameter::MergeFrom(from._internal_infogain_loss_param());
}
if (cached_has_bits & 0x00000400u) {
_internal_mutable_inner_product_param()->::opencv_caffe::InnerProductParameter::MergeFrom(from._internal_inner_product_param());
}
if (cached_has_bits & 0x00000800u) {
_internal_mutable_lrn_param()->::opencv_caffe::LRNParameter::MergeFrom(from._internal_lrn_param());
}
if (cached_has_bits & 0x00001000u) {
_internal_mutable_pooling_param()->::opencv_caffe::PoolingParameter::MergeFrom(from._internal_pooling_param());
}
if (cached_has_bits & 0x00002000u) {
_internal_mutable_window_data_param()->::opencv_caffe::WindowDataParameter::MergeFrom(from._internal_window_data_param());
}
if (cached_has_bits & 0x00004000u) {
_internal_mutable_power_param()->::opencv_caffe::PowerParameter::MergeFrom(from._internal_power_param());
}
if (cached_has_bits & 0x00008000u) {
_internal_mutable_memory_data_param()->::opencv_caffe::MemoryDataParameter::MergeFrom(from._internal_memory_data_param());
}
}
if (cached_has_bits & 0x00ff0000u) {
if (cached_has_bits & 0x00010000u) {
_internal_mutable_argmax_param()->::opencv_caffe::ArgMaxParameter::MergeFrom(from._internal_argmax_param());
}
if (cached_has_bits & 0x00020000u) {
_internal_mutable_eltwise_param()->::opencv_caffe::EltwiseParameter::MergeFrom(from._internal_eltwise_param());
}
if (cached_has_bits & 0x00040000u) {
_internal_mutable_threshold_param()->::opencv_caffe::ThresholdParameter::MergeFrom(from._internal_threshold_param());
}
if (cached_has_bits & 0x00080000u) {
_internal_mutable_dummy_data_param()->::opencv_caffe::DummyDataParameter::MergeFrom(from._internal_dummy_data_param());
}
if (cached_has_bits & 0x00100000u) {
_internal_mutable_accuracy_param()->::opencv_caffe::AccuracyParameter::MergeFrom(from._internal_accuracy_param());
}
if (cached_has_bits & 0x00200000u) {
_internal_mutable_hinge_loss_param()->::opencv_caffe::HingeLossParameter::MergeFrom(from._internal_hinge_loss_param());
}
if (cached_has_bits & 0x00400000u) {
_internal_mutable_relu_param()->::opencv_caffe::ReLUParameter::MergeFrom(from._internal_relu_param());
}
if (cached_has_bits & 0x00800000u) {
_internal_mutable_slice_param()->::opencv_caffe::SliceParameter::MergeFrom(from._internal_slice_param());
}
}
if (cached_has_bits & 0xff000000u) {
if (cached_has_bits & 0x01000000u) {
_internal_mutable_mvn_param()->::opencv_caffe::MVNParameter::MergeFrom(from._internal_mvn_param());
}
if (cached_has_bits & 0x02000000u) {
_internal_mutable_transform_param()->::opencv_caffe::TransformationParameter::MergeFrom(from._internal_transform_param());
}
if (cached_has_bits & 0x04000000u) {
_internal_mutable_tanh_param()->::opencv_caffe::TanHParameter::MergeFrom(from._internal_tanh_param());
}
if (cached_has_bits & 0x08000000u) {
_internal_mutable_sigmoid_param()->::opencv_caffe::SigmoidParameter::MergeFrom(from._internal_sigmoid_param());
}
if (cached_has_bits & 0x10000000u) {
_internal_mutable_softmax_param()->::opencv_caffe::SoftmaxParameter::MergeFrom(from._internal_softmax_param());
}
if (cached_has_bits & 0x20000000u) {
_internal_mutable_contrastive_loss_param()->::opencv_caffe::ContrastiveLossParameter::MergeFrom(from._internal_contrastive_loss_param());
}
if (cached_has_bits & 0x40000000u) {
_internal_mutable_exp_param()->::opencv_caffe::ExpParameter::MergeFrom(from._internal_exp_param());
}
if (cached_has_bits & 0x80000000u) {
_internal_mutable_loss_param()->::opencv_caffe::LossParameter::MergeFrom(from._internal_loss_param());
}
}
if (from._internal_has_type()) {
_internal_set_type(from._internal_type());
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void V1LayerParameter::CopyFrom(const V1LayerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.V1LayerParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool V1LayerParameter::IsInitialized() const {
return true;
}
void V1LayerParameter::InternalSwap(V1LayerParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(_has_bits_[1], other->_has_bits_[1]);
bottom_.InternalSwap(&other->bottom_);
top_.InternalSwap(&other->top_);
blobs_.InternalSwap(&other->blobs_);
blobs_lr_.InternalSwap(&other->blobs_lr_);
weight_decay_.InternalSwap(&other->weight_decay_);
include_.InternalSwap(&other->include_);
exclude_.InternalSwap(&other->exclude_);
loss_weight_.InternalSwap(&other->loss_weight_);
param_.InternalSwap(&other->param_);
blob_share_mode_.InternalSwap(&other->blob_share_mode_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, lhs_arena,
&other->name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(V1LayerParameter, type_)
+ sizeof(V1LayerParameter::type_)
- PROTOBUF_FIELD_OFFSET(V1LayerParameter, layer_)>(
reinterpret_cast<char*>(&layer_),
reinterpret_cast<char*>(&other->layer_));
}
::PROTOBUF_NAMESPACE_ID::Metadata V1LayerParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[64]);
}
// ===================================================================
class V0LayerParameter::_Internal {
public:
using HasBits = decltype(std::declval<V0LayerParameter>()._has_bits_);
static void set_has_name(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_type(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_num_output(HasBits* has_bits) {
(*has_bits)[0] |= 256u;
}
static void set_has_biasterm(HasBits* has_bits) {
(*has_bits)[0] |= 8388608u;
}
static const ::opencv_caffe::FillerParameter& weight_filler(const V0LayerParameter* msg);
static void set_has_weight_filler(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static const ::opencv_caffe::FillerParameter& bias_filler(const V0LayerParameter* msg);
static void set_has_bias_filler(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_pad(HasBits* has_bits) {
(*has_bits)[0] |= 512u;
}
static void set_has_kernelsize(HasBits* has_bits) {
(*has_bits)[0] |= 1024u;
}
static void set_has_group(HasBits* has_bits) {
(*has_bits)[0] |= 16777216u;
}
static void set_has_stride(HasBits* has_bits) {
(*has_bits)[0] |= 33554432u;
}
static void set_has_pool(HasBits* has_bits) {
(*has_bits)[0] |= 2048u;
}
static void set_has_dropout_ratio(HasBits* has_bits) {
(*has_bits)[0] |= 67108864u;
}
static void set_has_local_size(HasBits* has_bits) {
(*has_bits)[0] |= 134217728u;
}
static void set_has_alpha(HasBits* has_bits) {
(*has_bits)[0] |= 268435456u;
}
static void set_has_beta(HasBits* has_bits) {
(*has_bits)[0] |= 536870912u;
}
static void set_has_k(HasBits* has_bits) {
(*has_bits)[0] |= 2147483648u;
}
static void set_has_source(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_scale(HasBits* has_bits) {
(*has_bits)[0] |= 1073741824u;
}
static void set_has_meanfile(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_batchsize(HasBits* has_bits) {
(*has_bits)[0] |= 4096u;
}
static void set_has_cropsize(HasBits* has_bits) {
(*has_bits)[0] |= 8192u;
}
static void set_has_mirror(HasBits* has_bits) {
(*has_bits)[0] |= 32768u;
}
static void set_has_rand_skip(HasBits* has_bits) {
(*has_bits)[0] |= 131072u;
}
static void set_has_det_fg_threshold(HasBits* has_bits) {
(*has_bits)[1] |= 1u;
}
static void set_has_det_bg_threshold(HasBits* has_bits) {
(*has_bits)[1] |= 2u;
}
static void set_has_det_fg_fraction(HasBits* has_bits) {
(*has_bits)[1] |= 4u;
}
static void set_has_det_context_pad(HasBits* has_bits) {
(*has_bits)[0] |= 262144u;
}
static void set_has_det_crop_mode(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_new_num(HasBits* has_bits) {
(*has_bits)[0] |= 524288u;
}
static void set_has_new_channels(HasBits* has_bits) {
(*has_bits)[0] |= 1048576u;
}
static void set_has_new_height(HasBits* has_bits) {
(*has_bits)[0] |= 2097152u;
}
static void set_has_new_width(HasBits* has_bits) {
(*has_bits)[0] |= 16384u;
}
static void set_has_shuffle_images(HasBits* has_bits) {
(*has_bits)[0] |= 65536u;
}
static void set_has_concat_dim(HasBits* has_bits) {
(*has_bits)[0] |= 4194304u;
}
static const ::opencv_caffe::HDF5OutputParameter& hdf5_output_param(const V0LayerParameter* msg);
static void set_has_hdf5_output_param(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
};
const ::opencv_caffe::FillerParameter&
V0LayerParameter::_Internal::weight_filler(const V0LayerParameter* msg) {
return *msg->weight_filler_;
}
const ::opencv_caffe::FillerParameter&
V0LayerParameter::_Internal::bias_filler(const V0LayerParameter* msg) {
return *msg->bias_filler_;
}
const ::opencv_caffe::HDF5OutputParameter&
V0LayerParameter::_Internal::hdf5_output_param(const V0LayerParameter* msg) {
return *msg->hdf5_output_param_;
}
const ::PROTOBUF_NAMESPACE_ID::internal::LazyString V0LayerParameter::_i_give_permission_to_break_this_code_default_det_crop_mode_{{{"warp", 4}}, {nullptr}};
V0LayerParameter::V0LayerParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
blobs_(arena),
blobs_lr_(arena),
weight_decay_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.V0LayerParameter)
}
V0LayerParameter::V0LayerParameter(const V0LayerParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
blobs_(from.blobs_),
blobs_lr_(from.blobs_lr_),
weight_decay_(from.weight_decay_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_name()) {
name_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_name(),
GetArenaForAllocation());
}
type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_type()) {
type_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_type(),
GetArenaForAllocation());
}
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_source()) {
source_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_source(),
GetArenaForAllocation());
}
meanfile_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
meanfile_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_meanfile()) {
meanfile_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, from._internal_meanfile(),
GetArenaForAllocation());
}
det_crop_mode_.UnsafeSetDefault(nullptr);
if (from._internal_has_det_crop_mode()) {
det_crop_mode_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::NonEmptyDefault{}, from._internal_det_crop_mode(),
GetArenaForAllocation());
}
if (from._internal_has_weight_filler()) {
weight_filler_ = new ::opencv_caffe::FillerParameter(*from.weight_filler_);
} else {
weight_filler_ = nullptr;
}
if (from._internal_has_bias_filler()) {
bias_filler_ = new ::opencv_caffe::FillerParameter(*from.bias_filler_);
} else {
bias_filler_ = nullptr;
}
if (from._internal_has_hdf5_output_param()) {
hdf5_output_param_ = new ::opencv_caffe::HDF5OutputParameter(*from.hdf5_output_param_);
} else {
hdf5_output_param_ = nullptr;
}
::memcpy(&num_output_, &from.num_output_,
static_cast<size_t>(reinterpret_cast<char*>(&det_fg_fraction_) -
reinterpret_cast<char*>(&num_output_)) + sizeof(det_fg_fraction_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.V0LayerParameter)
}
inline void V0LayerParameter::SharedCtor() {
name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
type_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
source_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
meanfile_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
meanfile_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), "", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
det_crop_mode_.UnsafeSetDefault(nullptr);
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&weight_filler_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&new_height_) -
reinterpret_cast<char*>(&weight_filler_)) + sizeof(new_height_));
concat_dim_ = 1u;
biasterm_ = true;
group_ = 1u;
stride_ = 1u;
dropout_ratio_ = 0.5f;
local_size_ = 5u;
alpha_ = 1;
beta_ = 0.75f;
scale_ = 1;
k_ = 1;
det_fg_threshold_ = 0.5f;
det_bg_threshold_ = 0.5f;
det_fg_fraction_ = 0.25f;
}
V0LayerParameter::~V0LayerParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.V0LayerParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void V0LayerParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
type_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
source_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
meanfile_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
det_crop_mode_.DestroyNoArena(nullptr);
if (this != internal_default_instance()) delete weight_filler_;
if (this != internal_default_instance()) delete bias_filler_;
if (this != internal_default_instance()) delete hdf5_output_param_;
}
void V0LayerParameter::ArenaDtor(void* object) {
V0LayerParameter* _this = reinterpret_cast< V0LayerParameter* >(object);
(void)_this;
}
void V0LayerParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void V0LayerParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void V0LayerParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.V0LayerParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
blobs_.Clear();
blobs_lr_.Clear();
weight_decay_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
name_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
type_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
source_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
meanfile_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000010u) {
det_crop_mode_.ClearToDefault(::opencv_caffe::V0LayerParameter::_i_give_permission_to_break_this_code_default_det_crop_mode_, GetArenaForAllocation());
}
if (cached_has_bits & 0x00000020u) {
GOOGLE_DCHECK(weight_filler_ != nullptr);
weight_filler_->Clear();
}
if (cached_has_bits & 0x00000040u) {
GOOGLE_DCHECK(bias_filler_ != nullptr);
bias_filler_->Clear();
}
if (cached_has_bits & 0x00000080u) {
GOOGLE_DCHECK(hdf5_output_param_ != nullptr);
hdf5_output_param_->Clear();
}
}
if (cached_has_bits & 0x0000ff00u) {
::memset(&num_output_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&mirror_) -
reinterpret_cast<char*>(&num_output_)) + sizeof(mirror_));
}
if (cached_has_bits & 0x00ff0000u) {
::memset(&shuffle_images_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&new_height_) -
reinterpret_cast<char*>(&shuffle_images_)) + sizeof(new_height_));
concat_dim_ = 1u;
biasterm_ = true;
}
if (cached_has_bits & 0xff000000u) {
group_ = 1u;
stride_ = 1u;
dropout_ratio_ = 0.5f;
local_size_ = 5u;
alpha_ = 1;
beta_ = 0.75f;
scale_ = 1;
k_ = 1;
}
cached_has_bits = _has_bits_[1];
if (cached_has_bits & 0x00000007u) {
det_fg_threshold_ = 0.5f;
det_bg_threshold_ = 0.5f;
det_fg_fraction_ = 0.25f;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* V0LayerParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional string name = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
auto str = _internal_mutable_name();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.V0LayerParameter.name");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string type = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_type();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.V0LayerParameter.type");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 num_output = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_num_output(&_has_bits_);
num_output_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool biasterm = 4 [default = true];
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_biasterm(&_has_bits_);
biasterm_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter weight_filler = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 42)) {
ptr = ctx->ParseMessage(_internal_mutable_weight_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.FillerParameter bias_filler = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 50)) {
ptr = ctx->ParseMessage(_internal_mutable_bias_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 pad = 7 [default = 0];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_pad(&_has_bits_);
pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 kernelsize = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
_Internal::set_has_kernelsize(&_has_bits_);
kernelsize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 group = 9 [default = 1];
case 9:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
_Internal::set_has_group(&_has_bits_);
group_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 stride = 10 [default = 1];
case 10:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
_Internal::set_has_stride(&_has_bits_);
stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
case 11:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
if (PROTOBUF_PREDICT_TRUE(::opencv_caffe::V0LayerParameter_PoolMethod_IsValid(val))) {
_internal_set_pool(static_cast<::opencv_caffe::V0LayerParameter_PoolMethod>(val));
} else {
::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(11, val, mutable_unknown_fields());
}
} else
goto handle_unusual;
continue;
// optional float dropout_ratio = 12 [default = 0.5];
case 12:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 101)) {
_Internal::set_has_dropout_ratio(&_has_bits_);
dropout_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional uint32 local_size = 13 [default = 5];
case 13:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
_Internal::set_has_local_size(&_has_bits_);
local_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float alpha = 14 [default = 1];
case 14:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 117)) {
_Internal::set_has_alpha(&_has_bits_);
alpha_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float beta = 15 [default = 0.75];
case 15:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 125)) {
_Internal::set_has_beta(&_has_bits_);
beta_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional string source = 16;
case 16:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 130)) {
auto str = _internal_mutable_source();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.V0LayerParameter.source");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float scale = 17 [default = 1];
case 17:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 141)) {
_Internal::set_has_scale(&_has_bits_);
scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional string meanfile = 18;
case 18:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
auto str = _internal_mutable_meanfile();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.V0LayerParameter.meanfile");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 batchsize = 19;
case 19:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
_Internal::set_has_batchsize(&_has_bits_);
batchsize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 cropsize = 20 [default = 0];
case 20:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
_Internal::set_has_cropsize(&_has_bits_);
cropsize_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool mirror = 21 [default = false];
case 21:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 168)) {
_Internal::set_has_mirror(&_has_bits_);
mirror_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float k = 22 [default = 1];
case 22:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 181)) {
_Internal::set_has_k(&_has_bits_);
k_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// repeated .opencv_caffe.BlobProto blobs = 50;
case 50:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 146)) {
ptr -= 2;
do {
ptr += 2;
ptr = ctx->ParseMessage(_internal_add_blobs(), ptr);
CHK_(ptr);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<402>(ptr));
} else
goto handle_unusual;
continue;
// repeated float blobs_lr = 51;
case 51:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 157)) {
ptr -= 2;
do {
ptr += 2;
_internal_add_blobs_lr(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<413>(ptr));
} else if (static_cast<uint8_t>(tag) == 154) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_blobs_lr(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float weight_decay = 52;
case 52:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 165)) {
ptr -= 2;
do {
ptr += 2;
_internal_add_weight_decay(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<421>(ptr));
} else if (static_cast<uint8_t>(tag) == 162) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_weight_decay(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 rand_skip = 53 [default = 0];
case 53:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 168)) {
_Internal::set_has_rand_skip(&_has_bits_);
rand_skip_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float det_fg_threshold = 54 [default = 0.5];
case 54:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 181)) {
_Internal::set_has_det_fg_threshold(&_has_bits_);
det_fg_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float det_bg_threshold = 55 [default = 0.5];
case 55:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 189)) {
_Internal::set_has_det_bg_threshold(&_has_bits_);
det_bg_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float det_fg_fraction = 56 [default = 0.25];
case 56:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 197)) {
_Internal::set_has_det_fg_fraction(&_has_bits_);
det_fg_fraction_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional uint32 det_context_pad = 58 [default = 0];
case 58:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 208)) {
_Internal::set_has_det_context_pad(&_has_bits_);
det_context_pad_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional string det_crop_mode = 59 [default = "warp"];
case 59:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 218)) {
auto str = _internal_mutable_det_crop_mode();
ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
#ifndef NDEBUG
::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "opencv_caffe.V0LayerParameter.det_crop_mode");
#endif // !NDEBUG
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 new_num = 60 [default = 0];
case 60:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 224)) {
_Internal::set_has_new_num(&_has_bits_);
new_num_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 new_channels = 61 [default = 0];
case 61:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 232)) {
_Internal::set_has_new_channels(&_has_bits_);
new_channels_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 new_height = 62 [default = 0];
case 62:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 240)) {
_Internal::set_has_new_height(&_has_bits_);
new_height_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional int32 new_width = 63 [default = 0];
case 63:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 248)) {
_Internal::set_has_new_width(&_has_bits_);
new_width_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool shuffle_images = 64 [default = false];
case 64:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 0)) {
_Internal::set_has_shuffle_images(&_has_bits_);
shuffle_images_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 concat_dim = 65 [default = 1];
case 65:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_concat_dim(&_has_bits_);
concat_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 1001;
case 1001:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
ptr = ctx->ParseMessage(_internal_mutable_hdf5_output_param(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* V0LayerParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.V0LayerParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_name().data(), static_cast<int>(this->_internal_name().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.V0LayerParameter.name");
target = stream->WriteStringMaybeAliased(
1, this->_internal_name(), target);
}
// optional string type = 2;
if (cached_has_bits & 0x00000002u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_type().data(), static_cast<int>(this->_internal_type().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.V0LayerParameter.type");
target = stream->WriteStringMaybeAliased(
2, this->_internal_type(), target);
}
// optional uint32 num_output = 3;
if (cached_has_bits & 0x00000100u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_num_output(), target);
}
// optional bool biasterm = 4 [default = true];
if (cached_has_bits & 0x00800000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(4, this->_internal_biasterm(), target);
}
// optional .opencv_caffe.FillerParameter weight_filler = 5;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
5, _Internal::weight_filler(this), target, stream);
}
// optional .opencv_caffe.FillerParameter bias_filler = 6;
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
6, _Internal::bias_filler(this), target, stream);
}
// optional uint32 pad = 7 [default = 0];
if (cached_has_bits & 0x00000200u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_pad(), target);
}
// optional uint32 kernelsize = 8;
if (cached_has_bits & 0x00000400u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(8, this->_internal_kernelsize(), target);
}
// optional uint32 group = 9 [default = 1];
if (cached_has_bits & 0x01000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(9, this->_internal_group(), target);
}
// optional uint32 stride = 10 [default = 1];
if (cached_has_bits & 0x02000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(10, this->_internal_stride(), target);
}
// optional .opencv_caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
if (cached_has_bits & 0x00000800u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
11, this->_internal_pool(), target);
}
// optional float dropout_ratio = 12 [default = 0.5];
if (cached_has_bits & 0x04000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(12, this->_internal_dropout_ratio(), target);
}
// optional uint32 local_size = 13 [default = 5];
if (cached_has_bits & 0x08000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(13, this->_internal_local_size(), target);
}
// optional float alpha = 14 [default = 1];
if (cached_has_bits & 0x10000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(14, this->_internal_alpha(), target);
}
// optional float beta = 15 [default = 0.75];
if (cached_has_bits & 0x20000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(15, this->_internal_beta(), target);
}
// optional string source = 16;
if (cached_has_bits & 0x00000004u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_source().data(), static_cast<int>(this->_internal_source().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.V0LayerParameter.source");
target = stream->WriteStringMaybeAliased(
16, this->_internal_source(), target);
}
// optional float scale = 17 [default = 1];
if (cached_has_bits & 0x40000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(17, this->_internal_scale(), target);
}
// optional string meanfile = 18;
if (cached_has_bits & 0x00000008u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_meanfile().data(), static_cast<int>(this->_internal_meanfile().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.V0LayerParameter.meanfile");
target = stream->WriteStringMaybeAliased(
18, this->_internal_meanfile(), target);
}
// optional uint32 batchsize = 19;
if (cached_has_bits & 0x00001000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(19, this->_internal_batchsize(), target);
}
// optional uint32 cropsize = 20 [default = 0];
if (cached_has_bits & 0x00002000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(20, this->_internal_cropsize(), target);
}
// optional bool mirror = 21 [default = false];
if (cached_has_bits & 0x00008000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(21, this->_internal_mirror(), target);
}
// optional float k = 22 [default = 1];
if (cached_has_bits & 0x80000000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(22, this->_internal_k(), target);
}
// repeated .opencv_caffe.BlobProto blobs = 50;
for (unsigned int i = 0,
n = static_cast<unsigned int>(this->_internal_blobs_size()); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(50, this->_internal_blobs(i), target, stream);
}
// repeated float blobs_lr = 51;
for (int i = 0, n = this->_internal_blobs_lr_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(51, this->_internal_blobs_lr(i), target);
}
// repeated float weight_decay = 52;
for (int i = 0, n = this->_internal_weight_decay_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(52, this->_internal_weight_decay(i), target);
}
// optional uint32 rand_skip = 53 [default = 0];
if (cached_has_bits & 0x00020000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(53, this->_internal_rand_skip(), target);
}
cached_has_bits = _has_bits_[1];
// optional float det_fg_threshold = 54 [default = 0.5];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(54, this->_internal_det_fg_threshold(), target);
}
// optional float det_bg_threshold = 55 [default = 0.5];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(55, this->_internal_det_bg_threshold(), target);
}
// optional float det_fg_fraction = 56 [default = 0.25];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(56, this->_internal_det_fg_fraction(), target);
}
cached_has_bits = _has_bits_[0];
// optional uint32 det_context_pad = 58 [default = 0];
if (cached_has_bits & 0x00040000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(58, this->_internal_det_context_pad(), target);
}
// optional string det_crop_mode = 59 [default = "warp"];
if (cached_has_bits & 0x00000010u) {
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField(
this->_internal_det_crop_mode().data(), static_cast<int>(this->_internal_det_crop_mode().length()),
::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE,
"opencv_caffe.V0LayerParameter.det_crop_mode");
target = stream->WriteStringMaybeAliased(
59, this->_internal_det_crop_mode(), target);
}
// optional int32 new_num = 60 [default = 0];
if (cached_has_bits & 0x00080000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(60, this->_internal_new_num(), target);
}
// optional int32 new_channels = 61 [default = 0];
if (cached_has_bits & 0x00100000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(61, this->_internal_new_channels(), target);
}
// optional int32 new_height = 62 [default = 0];
if (cached_has_bits & 0x00200000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(62, this->_internal_new_height(), target);
}
// optional int32 new_width = 63 [default = 0];
if (cached_has_bits & 0x00004000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(63, this->_internal_new_width(), target);
}
// optional bool shuffle_images = 64 [default = false];
if (cached_has_bits & 0x00010000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(64, this->_internal_shuffle_images(), target);
}
// optional uint32 concat_dim = 65 [default = 1];
if (cached_has_bits & 0x00400000u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(65, this->_internal_concat_dim(), target);
}
// optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 1001;
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
1001, _Internal::hdf5_output_param(this), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.V0LayerParameter)
return target;
}
size_t V0LayerParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.V0LayerParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .opencv_caffe.BlobProto blobs = 50;
total_size += 2UL * this->_internal_blobs_size();
for (const auto& msg : this->blobs_) {
total_size +=
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
}
// repeated float blobs_lr = 51;
{
unsigned int count = static_cast<unsigned int>(this->_internal_blobs_lr_size());
size_t data_size = 4UL * count;
total_size += 2 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_blobs_lr_size());
total_size += data_size;
}
// repeated float weight_decay = 52;
{
unsigned int count = static_cast<unsigned int>(this->_internal_weight_decay_size());
size_t data_size = 4UL * count;
total_size += 2 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_weight_decay_size());
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional string name = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_name());
}
// optional string type = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_type());
}
// optional string source = 16;
if (cached_has_bits & 0x00000004u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_source());
}
// optional string meanfile = 18;
if (cached_has_bits & 0x00000008u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_meanfile());
}
// optional string det_crop_mode = 59 [default = "warp"];
if (cached_has_bits & 0x00000010u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_det_crop_mode());
}
// optional .opencv_caffe.FillerParameter weight_filler = 5;
if (cached_has_bits & 0x00000020u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*weight_filler_);
}
// optional .opencv_caffe.FillerParameter bias_filler = 6;
if (cached_has_bits & 0x00000040u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*bias_filler_);
}
// optional .opencv_caffe.HDF5OutputParameter hdf5_output_param = 1001;
if (cached_has_bits & 0x00000080u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*hdf5_output_param_);
}
}
if (cached_has_bits & 0x0000ff00u) {
// optional uint32 num_output = 3;
if (cached_has_bits & 0x00000100u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_num_output());
}
// optional uint32 pad = 7 [default = 0];
if (cached_has_bits & 0x00000200u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pad());
}
// optional uint32 kernelsize = 8;
if (cached_has_bits & 0x00000400u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_kernelsize());
}
// optional .opencv_caffe.V0LayerParameter.PoolMethod pool = 11 [default = MAX];
if (cached_has_bits & 0x00000800u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_pool());
}
// optional uint32 batchsize = 19;
if (cached_has_bits & 0x00001000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
this->_internal_batchsize());
}
// optional uint32 cropsize = 20 [default = 0];
if (cached_has_bits & 0x00002000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
this->_internal_cropsize());
}
// optional int32 new_width = 63 [default = 0];
if (cached_has_bits & 0x00004000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_new_width());
}
// optional bool mirror = 21 [default = false];
if (cached_has_bits & 0x00008000u) {
total_size += 2 + 1;
}
}
if (cached_has_bits & 0x00ff0000u) {
// optional bool shuffle_images = 64 [default = false];
if (cached_has_bits & 0x00010000u) {
total_size += 2 + 1;
}
// optional uint32 rand_skip = 53 [default = 0];
if (cached_has_bits & 0x00020000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
this->_internal_rand_skip());
}
// optional uint32 det_context_pad = 58 [default = 0];
if (cached_has_bits & 0x00040000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
this->_internal_det_context_pad());
}
// optional int32 new_num = 60 [default = 0];
if (cached_has_bits & 0x00080000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_new_num());
}
// optional int32 new_channels = 61 [default = 0];
if (cached_has_bits & 0x00100000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_new_channels());
}
// optional int32 new_height = 62 [default = 0];
if (cached_has_bits & 0x00200000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
this->_internal_new_height());
}
// optional uint32 concat_dim = 65 [default = 1];
if (cached_has_bits & 0x00400000u) {
total_size += 2 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(
this->_internal_concat_dim());
}
// optional bool biasterm = 4 [default = true];
if (cached_has_bits & 0x00800000u) {
total_size += 1 + 1;
}
}
if (cached_has_bits & 0xff000000u) {
// optional uint32 group = 9 [default = 1];
if (cached_has_bits & 0x01000000u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_group());
}
// optional uint32 stride = 10 [default = 1];
if (cached_has_bits & 0x02000000u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_stride());
}
// optional float dropout_ratio = 12 [default = 0.5];
if (cached_has_bits & 0x04000000u) {
total_size += 1 + 4;
}
// optional uint32 local_size = 13 [default = 5];
if (cached_has_bits & 0x08000000u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_local_size());
}
// optional float alpha = 14 [default = 1];
if (cached_has_bits & 0x10000000u) {
total_size += 1 + 4;
}
// optional float beta = 15 [default = 0.75];
if (cached_has_bits & 0x20000000u) {
total_size += 1 + 4;
}
// optional float scale = 17 [default = 1];
if (cached_has_bits & 0x40000000u) {
total_size += 2 + 4;
}
// optional float k = 22 [default = 1];
if (cached_has_bits & 0x80000000u) {
total_size += 2 + 4;
}
}
cached_has_bits = _has_bits_[1];
if (cached_has_bits & 0x00000007u) {
// optional float det_fg_threshold = 54 [default = 0.5];
if (cached_has_bits & 0x00000001u) {
total_size += 2 + 4;
}
// optional float det_bg_threshold = 55 [default = 0.5];
if (cached_has_bits & 0x00000002u) {
total_size += 2 + 4;
}
// optional float det_fg_fraction = 56 [default = 0.25];
if (cached_has_bits & 0x00000004u) {
total_size += 2 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData V0LayerParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
V0LayerParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*V0LayerParameter::GetClassData() const { return &_class_data_; }
void V0LayerParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<V0LayerParameter *>(to)->MergeFrom(
static_cast<const V0LayerParameter &>(from));
}
void V0LayerParameter::MergeFrom(const V0LayerParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.V0LayerParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
blobs_.MergeFrom(from.blobs_);
blobs_lr_.MergeFrom(from.blobs_lr_);
weight_decay_.MergeFrom(from.weight_decay_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_internal_set_name(from._internal_name());
}
if (cached_has_bits & 0x00000002u) {
_internal_set_type(from._internal_type());
}
if (cached_has_bits & 0x00000004u) {
_internal_set_source(from._internal_source());
}
if (cached_has_bits & 0x00000008u) {
_internal_set_meanfile(from._internal_meanfile());
}
if (cached_has_bits & 0x00000010u) {
_internal_set_det_crop_mode(from._internal_det_crop_mode());
}
if (cached_has_bits & 0x00000020u) {
_internal_mutable_weight_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_weight_filler());
}
if (cached_has_bits & 0x00000040u) {
_internal_mutable_bias_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_bias_filler());
}
if (cached_has_bits & 0x00000080u) {
_internal_mutable_hdf5_output_param()->::opencv_caffe::HDF5OutputParameter::MergeFrom(from._internal_hdf5_output_param());
}
}
if (cached_has_bits & 0x0000ff00u) {
if (cached_has_bits & 0x00000100u) {
num_output_ = from.num_output_;
}
if (cached_has_bits & 0x00000200u) {
pad_ = from.pad_;
}
if (cached_has_bits & 0x00000400u) {
kernelsize_ = from.kernelsize_;
}
if (cached_has_bits & 0x00000800u) {
pool_ = from.pool_;
}
if (cached_has_bits & 0x00001000u) {
batchsize_ = from.batchsize_;
}
if (cached_has_bits & 0x00002000u) {
cropsize_ = from.cropsize_;
}
if (cached_has_bits & 0x00004000u) {
new_width_ = from.new_width_;
}
if (cached_has_bits & 0x00008000u) {
mirror_ = from.mirror_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0x00ff0000u) {
if (cached_has_bits & 0x00010000u) {
shuffle_images_ = from.shuffle_images_;
}
if (cached_has_bits & 0x00020000u) {
rand_skip_ = from.rand_skip_;
}
if (cached_has_bits & 0x00040000u) {
det_context_pad_ = from.det_context_pad_;
}
if (cached_has_bits & 0x00080000u) {
new_num_ = from.new_num_;
}
if (cached_has_bits & 0x00100000u) {
new_channels_ = from.new_channels_;
}
if (cached_has_bits & 0x00200000u) {
new_height_ = from.new_height_;
}
if (cached_has_bits & 0x00400000u) {
concat_dim_ = from.concat_dim_;
}
if (cached_has_bits & 0x00800000u) {
biasterm_ = from.biasterm_;
}
_has_bits_[0] |= cached_has_bits;
}
if (cached_has_bits & 0xff000000u) {
if (cached_has_bits & 0x01000000u) {
group_ = from.group_;
}
if (cached_has_bits & 0x02000000u) {
stride_ = from.stride_;
}
if (cached_has_bits & 0x04000000u) {
dropout_ratio_ = from.dropout_ratio_;
}
if (cached_has_bits & 0x08000000u) {
local_size_ = from.local_size_;
}
if (cached_has_bits & 0x10000000u) {
alpha_ = from.alpha_;
}
if (cached_has_bits & 0x20000000u) {
beta_ = from.beta_;
}
if (cached_has_bits & 0x40000000u) {
scale_ = from.scale_;
}
if (cached_has_bits & 0x80000000u) {
k_ = from.k_;
}
_has_bits_[0] |= cached_has_bits;
}
cached_has_bits = from._has_bits_[1];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
det_fg_threshold_ = from.det_fg_threshold_;
}
if (cached_has_bits & 0x00000002u) {
det_bg_threshold_ = from.det_bg_threshold_;
}
if (cached_has_bits & 0x00000004u) {
det_fg_fraction_ = from.det_fg_fraction_;
}
_has_bits_[1] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void V0LayerParameter::CopyFrom(const V0LayerParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.V0LayerParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool V0LayerParameter::IsInitialized() const {
return true;
}
void V0LayerParameter::InternalSwap(V0LayerParameter* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
swap(_has_bits_[1], other->_has_bits_[1]);
blobs_.InternalSwap(&other->blobs_);
blobs_lr_.InternalSwap(&other->blobs_lr_);
weight_decay_.InternalSwap(&other->weight_decay_);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&name_, lhs_arena,
&other->name_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&type_, lhs_arena,
&other->type_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&source_, lhs_arena,
&other->source_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
&meanfile_, lhs_arena,
&other->meanfile_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
nullptr,
&det_crop_mode_, lhs_arena,
&other->det_crop_mode_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(V0LayerParameter, new_height_)
+ sizeof(V0LayerParameter::new_height_)
- PROTOBUF_FIELD_OFFSET(V0LayerParameter, weight_filler_)>(
reinterpret_cast<char*>(&weight_filler_),
reinterpret_cast<char*>(&other->weight_filler_));
swap(concat_dim_, other->concat_dim_);
swap(biasterm_, other->biasterm_);
swap(group_, other->group_);
swap(stride_, other->stride_);
swap(dropout_ratio_, other->dropout_ratio_);
swap(local_size_, other->local_size_);
swap(alpha_, other->alpha_);
swap(beta_, other->beta_);
swap(scale_, other->scale_);
swap(k_, other->k_);
swap(det_fg_threshold_, other->det_fg_threshold_);
swap(det_bg_threshold_, other->det_bg_threshold_);
swap(det_fg_fraction_, other->det_fg_fraction_);
}
::PROTOBUF_NAMESPACE_ID::Metadata V0LayerParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[65]);
}
// ===================================================================
class PReLUParameter::_Internal {
public:
using HasBits = decltype(std::declval<PReLUParameter>()._has_bits_);
static const ::opencv_caffe::FillerParameter& filler(const PReLUParameter* msg);
static void set_has_filler(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_channel_shared(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
};
const ::opencv_caffe::FillerParameter&
PReLUParameter::_Internal::filler(const PReLUParameter* msg) {
return *msg->filler_;
}
PReLUParameter::PReLUParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.PReLUParameter)
}
PReLUParameter::PReLUParameter(const PReLUParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
if (from._internal_has_filler()) {
filler_ = new ::opencv_caffe::FillerParameter(*from.filler_);
} else {
filler_ = nullptr;
}
channel_shared_ = from.channel_shared_;
// @@protoc_insertion_point(copy_constructor:opencv_caffe.PReLUParameter)
}
inline void PReLUParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&filler_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&channel_shared_) -
reinterpret_cast<char*>(&filler_)) + sizeof(channel_shared_));
}
PReLUParameter::~PReLUParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.PReLUParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void PReLUParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete filler_;
}
void PReLUParameter::ArenaDtor(void* object) {
PReLUParameter* _this = reinterpret_cast< PReLUParameter* >(object);
(void)_this;
}
void PReLUParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PReLUParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void PReLUParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.PReLUParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(filler_ != nullptr);
filler_->Clear();
}
channel_shared_ = false;
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* PReLUParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional .opencv_caffe.FillerParameter filler = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
ptr = ctx->ParseMessage(_internal_mutable_filler(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool channel_shared = 2 [default = false];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_channel_shared(&has_bits);
channel_shared_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* PReLUParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PReLUParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional .opencv_caffe.FillerParameter filler = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(
1, _Internal::filler(this), target, stream);
}
// optional bool channel_shared = 2 [default = false];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(2, this->_internal_channel_shared(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.PReLUParameter)
return target;
}
size_t PReLUParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PReLUParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000003u) {
// optional .opencv_caffe.FillerParameter filler = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*filler_);
}
// optional bool channel_shared = 2 [default = false];
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 1;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PReLUParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
PReLUParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PReLUParameter::GetClassData() const { return &_class_data_; }
void PReLUParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<PReLUParameter *>(to)->MergeFrom(
static_cast<const PReLUParameter &>(from));
}
void PReLUParameter::MergeFrom(const PReLUParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PReLUParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_internal_mutable_filler()->::opencv_caffe::FillerParameter::MergeFrom(from._internal_filler());
}
if (cached_has_bits & 0x00000002u) {
channel_shared_ = from.channel_shared_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void PReLUParameter::CopyFrom(const PReLUParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.PReLUParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool PReLUParameter::IsInitialized() const {
return true;
}
void PReLUParameter::InternalSwap(PReLUParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(PReLUParameter, channel_shared_)
+ sizeof(PReLUParameter::channel_shared_)
- PROTOBUF_FIELD_OFFSET(PReLUParameter, filler_)>(
reinterpret_cast<char*>(&filler_),
reinterpret_cast<char*>(&other->filler_));
}
::PROTOBUF_NAMESPACE_ID::Metadata PReLUParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[66]);
}
// ===================================================================
class NormalizedBBox::_Internal {
public:
using HasBits = decltype(std::declval<NormalizedBBox>()._has_bits_);
static void set_has_xmin(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_ymin(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_xmax(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_ymax(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_label(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_difficult(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
static void set_has_score(HasBits* has_bits) {
(*has_bits)[0] |= 64u;
}
static void set_has_size(HasBits* has_bits) {
(*has_bits)[0] |= 128u;
}
};
NormalizedBBox::NormalizedBBox(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.NormalizedBBox)
}
NormalizedBBox::NormalizedBBox(const NormalizedBBox& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&xmin_, &from.xmin_,
static_cast<size_t>(reinterpret_cast<char*>(&size_) -
reinterpret_cast<char*>(&xmin_)) + sizeof(size_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.NormalizedBBox)
}
inline void NormalizedBBox::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&xmin_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&size_) -
reinterpret_cast<char*>(&xmin_)) + sizeof(size_));
}
NormalizedBBox::~NormalizedBBox() {
// @@protoc_insertion_point(destructor:opencv_caffe.NormalizedBBox)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void NormalizedBBox::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void NormalizedBBox::ArenaDtor(void* object) {
NormalizedBBox* _this = reinterpret_cast< NormalizedBBox* >(object);
(void)_this;
}
void NormalizedBBox::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void NormalizedBBox::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void NormalizedBBox::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.NormalizedBBox)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
::memset(&xmin_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&size_) -
reinterpret_cast<char*>(&xmin_)) + sizeof(size_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* NormalizedBBox::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional float xmin = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_xmin(&has_bits);
xmin_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float ymin = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
_Internal::set_has_ymin(&has_bits);
ymin_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float xmax = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_xmax(&has_bits);
xmax_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float ymax = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
_Internal::set_has_ymax(&has_bits);
ymax_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional int32 label = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
_Internal::set_has_label(&has_bits);
label_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional bool difficult = 6;
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_difficult(&has_bits);
difficult_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float score = 7;
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
_Internal::set_has_score(&has_bits);
score_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// optional float size = 8;
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
_Internal::set_has_size(&has_bits);
size_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* NormalizedBBox::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.NormalizedBBox)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional float xmin = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_xmin(), target);
}
// optional float ymin = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(2, this->_internal_ymin(), target);
}
// optional float xmax = 3;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_xmax(), target);
}
// optional float ymax = 4;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_ymax(), target);
}
// optional int32 label = 5;
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(5, this->_internal_label(), target);
}
// optional bool difficult = 6;
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_difficult(), target);
}
// optional float score = 7;
if (cached_has_bits & 0x00000040u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(7, this->_internal_score(), target);
}
// optional float size = 8;
if (cached_has_bits & 0x00000080u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_size(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.NormalizedBBox)
return target;
}
size_t NormalizedBBox::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.NormalizedBBox)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
// optional float xmin = 1;
if (cached_has_bits & 0x00000001u) {
total_size += 1 + 4;
}
// optional float ymin = 2;
if (cached_has_bits & 0x00000002u) {
total_size += 1 + 4;
}
// optional float xmax = 3;
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
// optional float ymax = 4;
if (cached_has_bits & 0x00000008u) {
total_size += 1 + 4;
}
// optional int32 label = 5;
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_label());
}
// optional bool difficult = 6;
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 1;
}
// optional float score = 7;
if (cached_has_bits & 0x00000040u) {
total_size += 1 + 4;
}
// optional float size = 8;
if (cached_has_bits & 0x00000080u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NormalizedBBox::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
NormalizedBBox::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NormalizedBBox::GetClassData() const { return &_class_data_; }
void NormalizedBBox::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<NormalizedBBox *>(to)->MergeFrom(
static_cast<const NormalizedBBox &>(from));
}
void NormalizedBBox::MergeFrom(const NormalizedBBox& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.NormalizedBBox)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
xmin_ = from.xmin_;
}
if (cached_has_bits & 0x00000002u) {
ymin_ = from.ymin_;
}
if (cached_has_bits & 0x00000004u) {
xmax_ = from.xmax_;
}
if (cached_has_bits & 0x00000008u) {
ymax_ = from.ymax_;
}
if (cached_has_bits & 0x00000010u) {
label_ = from.label_;
}
if (cached_has_bits & 0x00000020u) {
difficult_ = from.difficult_;
}
if (cached_has_bits & 0x00000040u) {
score_ = from.score_;
}
if (cached_has_bits & 0x00000080u) {
size_ = from.size_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void NormalizedBBox::CopyFrom(const NormalizedBBox& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.NormalizedBBox)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool NormalizedBBox::IsInitialized() const {
return true;
}
void NormalizedBBox::InternalSwap(NormalizedBBox* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(NormalizedBBox, size_)
+ sizeof(NormalizedBBox::size_)
- PROTOBUF_FIELD_OFFSET(NormalizedBBox, xmin_)>(
reinterpret_cast<char*>(&xmin_),
reinterpret_cast<char*>(&other->xmin_));
}
::PROTOBUF_NAMESPACE_ID::Metadata NormalizedBBox::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[67]);
}
// ===================================================================
class ROIPoolingParameter::_Internal {
public:
using HasBits = decltype(std::declval<ROIPoolingParameter>()._has_bits_);
static void set_has_pooled_h(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_pooled_w(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_spatial_scale(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
};
ROIPoolingParameter::ROIPoolingParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ROIPoolingParameter)
}
ROIPoolingParameter::ROIPoolingParameter(const ROIPoolingParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&pooled_h_, &from.pooled_h_,
static_cast<size_t>(reinterpret_cast<char*>(&spatial_scale_) -
reinterpret_cast<char*>(&pooled_h_)) + sizeof(spatial_scale_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ROIPoolingParameter)
}
inline void ROIPoolingParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&pooled_h_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&pooled_w_) -
reinterpret_cast<char*>(&pooled_h_)) + sizeof(pooled_w_));
spatial_scale_ = 1;
}
ROIPoolingParameter::~ROIPoolingParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ROIPoolingParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ROIPoolingParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ROIPoolingParameter::ArenaDtor(void* object) {
ROIPoolingParameter* _this = reinterpret_cast< ROIPoolingParameter* >(object);
(void)_this;
}
void ROIPoolingParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ROIPoolingParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ROIPoolingParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ROIPoolingParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
::memset(&pooled_h_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&pooled_w_) -
reinterpret_cast<char*>(&pooled_h_)) + sizeof(pooled_w_));
spatial_scale_ = 1;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ROIPoolingParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 pooled_h = 1 [default = 0];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_pooled_h(&has_bits);
pooled_h_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 pooled_w = 2 [default = 0];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_pooled_w(&has_bits);
pooled_w_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float spatial_scale = 3 [default = 1];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
_Internal::set_has_spatial_scale(&has_bits);
spatial_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ROIPoolingParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ROIPoolingParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 pooled_h = 1 [default = 0];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_pooled_h(), target);
}
// optional uint32 pooled_w = 2 [default = 0];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_pooled_w(), target);
}
// optional float spatial_scale = 3 [default = 1];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(3, this->_internal_spatial_scale(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ROIPoolingParameter)
return target;
}
size_t ROIPoolingParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ROIPoolingParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
// optional uint32 pooled_h = 1 [default = 0];
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pooled_h());
}
// optional uint32 pooled_w = 2 [default = 0];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pooled_w());
}
// optional float spatial_scale = 3 [default = 1];
if (cached_has_bits & 0x00000004u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ROIPoolingParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ROIPoolingParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ROIPoolingParameter::GetClassData() const { return &_class_data_; }
void ROIPoolingParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ROIPoolingParameter *>(to)->MergeFrom(
static_cast<const ROIPoolingParameter &>(from));
}
void ROIPoolingParameter::MergeFrom(const ROIPoolingParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ROIPoolingParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
pooled_h_ = from.pooled_h_;
}
if (cached_has_bits & 0x00000002u) {
pooled_w_ = from.pooled_w_;
}
if (cached_has_bits & 0x00000004u) {
spatial_scale_ = from.spatial_scale_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ROIPoolingParameter::CopyFrom(const ROIPoolingParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ROIPoolingParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ROIPoolingParameter::IsInitialized() const {
return true;
}
void ROIPoolingParameter::InternalSwap(ROIPoolingParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(ROIPoolingParameter, pooled_w_)
+ sizeof(ROIPoolingParameter::pooled_w_)
- PROTOBUF_FIELD_OFFSET(ROIPoolingParameter, pooled_h_)>(
reinterpret_cast<char*>(&pooled_h_),
reinterpret_cast<char*>(&other->pooled_h_));
swap(spatial_scale_, other->spatial_scale_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ROIPoolingParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[68]);
}
// ===================================================================
class ProposalParameter::_Internal {
public:
using HasBits = decltype(std::declval<ProposalParameter>()._has_bits_);
static void set_has_feat_stride(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_base_size(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_min_size(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_pre_nms_topn(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static void set_has_post_nms_topn(HasBits* has_bits) {
(*has_bits)[0] |= 16u;
}
static void set_has_nms_thresh(HasBits* has_bits) {
(*has_bits)[0] |= 32u;
}
};
ProposalParameter::ProposalParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned),
ratio_(arena),
scale_(arena) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.ProposalParameter)
}
ProposalParameter::ProposalParameter(const ProposalParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_),
ratio_(from.ratio_),
scale_(from.scale_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&feat_stride_, &from.feat_stride_,
static_cast<size_t>(reinterpret_cast<char*>(&nms_thresh_) -
reinterpret_cast<char*>(&feat_stride_)) + sizeof(nms_thresh_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.ProposalParameter)
}
inline void ProposalParameter::SharedCtor() {
feat_stride_ = 16u;
base_size_ = 16u;
min_size_ = 16u;
pre_nms_topn_ = 6000u;
post_nms_topn_ = 300u;
nms_thresh_ = 0.7f;
}
ProposalParameter::~ProposalParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.ProposalParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void ProposalParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void ProposalParameter::ArenaDtor(void* object) {
ProposalParameter* _this = reinterpret_cast< ProposalParameter* >(object);
(void)_this;
}
void ProposalParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ProposalParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void ProposalParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.ProposalParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
ratio_.Clear();
scale_.Clear();
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
feat_stride_ = 16u;
base_size_ = 16u;
min_size_ = 16u;
pre_nms_topn_ = 6000u;
post_nms_topn_ = 300u;
nms_thresh_ = 0.7f;
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* ProposalParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// optional uint32 feat_stride = 1 [default = 16];
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_feat_stride(&has_bits);
feat_stride_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 base_size = 2 [default = 16];
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_base_size(&has_bits);
base_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 min_size = 3 [default = 16];
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_min_size(&has_bits);
min_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float ratio = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_ratio(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<37>(ptr));
} else if (static_cast<uint8_t>(tag) == 34) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_ratio(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// repeated float scale = 5;
case 5:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 45)) {
ptr -= 1;
do {
ptr += 1;
_internal_add_scale(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
ptr += sizeof(float);
if (!ctx->DataAvailable(ptr)) break;
} while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<45>(ptr));
} else if (static_cast<uint8_t>(tag) == 42) {
ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_scale(), ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 pre_nms_topn = 6 [default = 6000];
case 6:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
_Internal::set_has_pre_nms_topn(&has_bits);
pre_nms_topn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional uint32 post_nms_topn = 7 [default = 300];
case 7:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
_Internal::set_has_post_nms_topn(&has_bits);
post_nms_topn_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// optional float nms_thresh = 8 [default = 0.7];
case 8:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 69)) {
_Internal::set_has_nms_thresh(&has_bits);
nms_thresh_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* ProposalParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.ProposalParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// optional uint32 feat_stride = 1 [default = 16];
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(1, this->_internal_feat_stride(), target);
}
// optional uint32 base_size = 2 [default = 16];
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(2, this->_internal_base_size(), target);
}
// optional uint32 min_size = 3 [default = 16];
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_min_size(), target);
}
// repeated float ratio = 4;
for (int i = 0, n = this->_internal_ratio_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(4, this->_internal_ratio(i), target);
}
// repeated float scale = 5;
for (int i = 0, n = this->_internal_scale_size(); i < n; i++) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(5, this->_internal_scale(i), target);
}
// optional uint32 pre_nms_topn = 6 [default = 6000];
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(6, this->_internal_pre_nms_topn(), target);
}
// optional uint32 post_nms_topn = 7 [default = 300];
if (cached_has_bits & 0x00000010u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(7, this->_internal_post_nms_topn(), target);
}
// optional float nms_thresh = 8 [default = 0.7];
if (cached_has_bits & 0x00000020u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(8, this->_internal_nms_thresh(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.ProposalParameter)
return target;
}
size_t ProposalParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.ProposalParameter)
size_t total_size = 0;
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated float ratio = 4;
{
unsigned int count = static_cast<unsigned int>(this->_internal_ratio_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_ratio_size());
total_size += data_size;
}
// repeated float scale = 5;
{
unsigned int count = static_cast<unsigned int>(this->_internal_scale_size());
size_t data_size = 4UL * count;
total_size += 1 *
::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_scale_size());
total_size += data_size;
}
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
// optional uint32 feat_stride = 1 [default = 16];
if (cached_has_bits & 0x00000001u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_feat_stride());
}
// optional uint32 base_size = 2 [default = 16];
if (cached_has_bits & 0x00000002u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_base_size());
}
// optional uint32 min_size = 3 [default = 16];
if (cached_has_bits & 0x00000004u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_min_size());
}
// optional uint32 pre_nms_topn = 6 [default = 6000];
if (cached_has_bits & 0x00000008u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_pre_nms_topn());
}
// optional uint32 post_nms_topn = 7 [default = 300];
if (cached_has_bits & 0x00000010u) {
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32SizePlusOne(this->_internal_post_nms_topn());
}
// optional float nms_thresh = 8 [default = 0.7];
if (cached_has_bits & 0x00000020u) {
total_size += 1 + 4;
}
}
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ProposalParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
ProposalParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ProposalParameter::GetClassData() const { return &_class_data_; }
void ProposalParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<ProposalParameter *>(to)->MergeFrom(
static_cast<const ProposalParameter &>(from));
}
void ProposalParameter::MergeFrom(const ProposalParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.ProposalParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
ratio_.MergeFrom(from.ratio_);
scale_.MergeFrom(from.scale_);
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x0000003fu) {
if (cached_has_bits & 0x00000001u) {
feat_stride_ = from.feat_stride_;
}
if (cached_has_bits & 0x00000002u) {
base_size_ = from.base_size_;
}
if (cached_has_bits & 0x00000004u) {
min_size_ = from.min_size_;
}
if (cached_has_bits & 0x00000008u) {
pre_nms_topn_ = from.pre_nms_topn_;
}
if (cached_has_bits & 0x00000010u) {
post_nms_topn_ = from.post_nms_topn_;
}
if (cached_has_bits & 0x00000020u) {
nms_thresh_ = from.nms_thresh_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void ProposalParameter::CopyFrom(const ProposalParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.ProposalParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool ProposalParameter::IsInitialized() const {
return true;
}
void ProposalParameter::InternalSwap(ProposalParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
ratio_.InternalSwap(&other->ratio_);
scale_.InternalSwap(&other->scale_);
swap(feat_stride_, other->feat_stride_);
swap(base_size_, other->base_size_);
swap(min_size_, other->min_size_);
swap(pre_nms_topn_, other->pre_nms_topn_);
swap(post_nms_topn_, other->post_nms_topn_);
swap(nms_thresh_, other->nms_thresh_);
}
::PROTOBUF_NAMESPACE_ID::Metadata ProposalParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[69]);
}
// ===================================================================
class PSROIPoolingParameter::_Internal {
public:
using HasBits = decltype(std::declval<PSROIPoolingParameter>()._has_bits_);
static void set_has_spatial_scale(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_output_dim(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_group_size(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000007) ^ 0x00000007) != 0;
}
};
PSROIPoolingParameter::PSROIPoolingParameter(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
SharedCtor();
if (!is_message_owned) {
RegisterArenaDtor(arena);
}
// @@protoc_insertion_point(arena_constructor:opencv_caffe.PSROIPoolingParameter)
}
PSROIPoolingParameter::PSROIPoolingParameter(const PSROIPoolingParameter& from)
: ::PROTOBUF_NAMESPACE_ID::Message(),
_has_bits_(from._has_bits_) {
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
::memcpy(&spatial_scale_, &from.spatial_scale_,
static_cast<size_t>(reinterpret_cast<char*>(&group_size_) -
reinterpret_cast<char*>(&spatial_scale_)) + sizeof(group_size_));
// @@protoc_insertion_point(copy_constructor:opencv_caffe.PSROIPoolingParameter)
}
inline void PSROIPoolingParameter::SharedCtor() {
::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
reinterpret_cast<char*>(&spatial_scale_) - reinterpret_cast<char*>(this)),
0, static_cast<size_t>(reinterpret_cast<char*>(&group_size_) -
reinterpret_cast<char*>(&spatial_scale_)) + sizeof(group_size_));
}
PSROIPoolingParameter::~PSROIPoolingParameter() {
// @@protoc_insertion_point(destructor:opencv_caffe.PSROIPoolingParameter)
if (GetArenaForAllocation() != nullptr) return;
SharedDtor();
_internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
inline void PSROIPoolingParameter::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void PSROIPoolingParameter::ArenaDtor(void* object) {
PSROIPoolingParameter* _this = reinterpret_cast< PSROIPoolingParameter* >(object);
(void)_this;
}
void PSROIPoolingParameter::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void PSROIPoolingParameter::SetCachedSize(int size) const {
_cached_size_.Set(size);
}
void PSROIPoolingParameter::Clear() {
// @@protoc_insertion_point(message_clear_start:opencv_caffe.PSROIPoolingParameter)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
if (cached_has_bits & 0x00000007u) {
::memset(&spatial_scale_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&group_size_) -
reinterpret_cast<char*>(&spatial_scale_)) + sizeof(group_size_));
}
_has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}
const char* PSROIPoolingParameter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
switch (tag >> 3) {
// required float spatial_scale = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 13)) {
_Internal::set_has_spatial_scale(&has_bits);
spatial_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
ptr += sizeof(float);
} else
goto handle_unusual;
continue;
// required int32 output_dim = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
_Internal::set_has_output_dim(&has_bits);
output_dim_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// required int32 group_size = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
_Internal::set_has_group_size(&has_bits);
group_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* PSROIPoolingParameter::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:opencv_caffe.PSROIPoolingParameter)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _has_bits_[0];
// required float spatial_scale = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteFloatToArray(1, this->_internal_spatial_scale(), target);
}
// required int32 output_dim = 2;
if (cached_has_bits & 0x00000002u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_output_dim(), target);
}
// required int32 group_size = 3;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_group_size(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
_internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:opencv_caffe.PSROIPoolingParameter)
return target;
}
size_t PSROIPoolingParameter::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:opencv_caffe.PSROIPoolingParameter)
size_t total_size = 0;
if (_internal_has_spatial_scale()) {
// required float spatial_scale = 1;
total_size += 1 + 4;
}
if (_internal_has_output_dim()) {
// required int32 output_dim = 2;
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_output_dim());
}
if (_internal_has_group_size()) {
// required int32 group_size = 3;
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_group_size());
}
return total_size;
}
size_t PSROIPoolingParameter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:opencv_caffe.PSROIPoolingParameter)
size_t total_size = 0;
if (((_has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
// required float spatial_scale = 1;
total_size += 1 + 4;
// required int32 output_dim = 2;
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_output_dim());
// required int32 group_size = 3;
total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32SizePlusOne(this->_internal_group_size());
} else {
total_size += RequiredFieldsByteSizeFallback();
}
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
}
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PSROIPoolingParameter::_class_data_ = {
::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
PSROIPoolingParameter::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PSROIPoolingParameter::GetClassData() const { return &_class_data_; }
void PSROIPoolingParameter::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
const ::PROTOBUF_NAMESPACE_ID::Message& from) {
static_cast<PSROIPoolingParameter *>(to)->MergeFrom(
static_cast<const PSROIPoolingParameter &>(from));
}
void PSROIPoolingParameter::MergeFrom(const PSROIPoolingParameter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:opencv_caffe.PSROIPoolingParameter)
GOOGLE_DCHECK_NE(&from, this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
spatial_scale_ = from.spatial_scale_;
}
if (cached_has_bits & 0x00000002u) {
output_dim_ = from.output_dim_;
}
if (cached_has_bits & 0x00000004u) {
group_size_ = from.group_size_;
}
_has_bits_[0] |= cached_has_bits;
}
_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}
void PSROIPoolingParameter::CopyFrom(const PSROIPoolingParameter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:opencv_caffe.PSROIPoolingParameter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool PSROIPoolingParameter::IsInitialized() const {
if (_Internal::MissingRequiredFields(_has_bits_)) return false;
return true;
}
void PSROIPoolingParameter::InternalSwap(PSROIPoolingParameter* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_has_bits_[0], other->_has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(PSROIPoolingParameter, group_size_)
+ sizeof(PSROIPoolingParameter::group_size_)
- PROTOBUF_FIELD_OFFSET(PSROIPoolingParameter, spatial_scale_)>(
reinterpret_cast<char*>(&spatial_scale_),
reinterpret_cast<char*>(&other->spatial_scale_));
}
::PROTOBUF_NAMESPACE_ID::Metadata PSROIPoolingParameter::GetMetadata() const {
return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
&descriptor_table_opencv_2dcaffe_2eproto_getter, &descriptor_table_opencv_2dcaffe_2eproto_once,
file_level_metadata_opencv_2dcaffe_2eproto[70]);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace opencv_caffe
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::opencv_caffe::BlobShape* Arena::CreateMaybeMessage< ::opencv_caffe::BlobShape >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::BlobShape >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::BlobProto* Arena::CreateMaybeMessage< ::opencv_caffe::BlobProto >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::BlobProto >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::BlobProtoVector* Arena::CreateMaybeMessage< ::opencv_caffe::BlobProtoVector >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::BlobProtoVector >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PermuteParameter* Arena::CreateMaybeMessage< ::opencv_caffe::PermuteParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::PermuteParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NormalizeBBoxParameter* Arena::CreateMaybeMessage< ::opencv_caffe::NormalizeBBoxParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::NormalizeBBoxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PriorBoxParameter* Arena::CreateMaybeMessage< ::opencv_caffe::PriorBoxParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::PriorBoxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::DetectionOutputParameter* Arena::CreateMaybeMessage< ::opencv_caffe::DetectionOutputParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::DetectionOutputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::Datum* Arena::CreateMaybeMessage< ::opencv_caffe::Datum >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::Datum >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::FillerParameter* Arena::CreateMaybeMessage< ::opencv_caffe::FillerParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::FillerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NetParameter* Arena::CreateMaybeMessage< ::opencv_caffe::NetParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::NetParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SolverParameter* Arena::CreateMaybeMessage< ::opencv_caffe::SolverParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::SolverParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SolverState* Arena::CreateMaybeMessage< ::opencv_caffe::SolverState >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::SolverState >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NetState* Arena::CreateMaybeMessage< ::opencv_caffe::NetState >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::NetState >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NetStateRule* Arena::CreateMaybeMessage< ::opencv_caffe::NetStateRule >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::NetStateRule >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ParamSpec* Arena::CreateMaybeMessage< ::opencv_caffe::ParamSpec >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ParamSpec >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::LayerParameter* Arena::CreateMaybeMessage< ::opencv_caffe::LayerParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::LayerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::TransformationParameter* Arena::CreateMaybeMessage< ::opencv_caffe::TransformationParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::TransformationParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::LossParameter* Arena::CreateMaybeMessage< ::opencv_caffe::LossParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::LossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::AccuracyParameter* Arena::CreateMaybeMessage< ::opencv_caffe::AccuracyParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::AccuracyParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ArgMaxParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ArgMaxParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ArgMaxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ConcatParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ConcatParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ConcatParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::BatchNormParameter* Arena::CreateMaybeMessage< ::opencv_caffe::BatchNormParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::BatchNormParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::BiasParameter* Arena::CreateMaybeMessage< ::opencv_caffe::BiasParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::BiasParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ContrastiveLossParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ContrastiveLossParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ContrastiveLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ConvolutionParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ConvolutionParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ConvolutionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::CropParameter* Arena::CreateMaybeMessage< ::opencv_caffe::CropParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::CropParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::DataParameter* Arena::CreateMaybeMessage< ::opencv_caffe::DataParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::DataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NonMaximumSuppressionParameter* Arena::CreateMaybeMessage< ::opencv_caffe::NonMaximumSuppressionParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::NonMaximumSuppressionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SaveOutputParameter* Arena::CreateMaybeMessage< ::opencv_caffe::SaveOutputParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::SaveOutputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::DropoutParameter* Arena::CreateMaybeMessage< ::opencv_caffe::DropoutParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::DropoutParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::DummyDataParameter* Arena::CreateMaybeMessage< ::opencv_caffe::DummyDataParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::DummyDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::EltwiseParameter* Arena::CreateMaybeMessage< ::opencv_caffe::EltwiseParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::EltwiseParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ELUParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ELUParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ELUParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::EmbedParameter* Arena::CreateMaybeMessage< ::opencv_caffe::EmbedParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::EmbedParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ExpParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ExpParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ExpParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::FlattenParameter* Arena::CreateMaybeMessage< ::opencv_caffe::FlattenParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::FlattenParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::HDF5DataParameter* Arena::CreateMaybeMessage< ::opencv_caffe::HDF5DataParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::HDF5DataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::HDF5OutputParameter* Arena::CreateMaybeMessage< ::opencv_caffe::HDF5OutputParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::HDF5OutputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::HingeLossParameter* Arena::CreateMaybeMessage< ::opencv_caffe::HingeLossParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::HingeLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ImageDataParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ImageDataParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ImageDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::InfogainLossParameter* Arena::CreateMaybeMessage< ::opencv_caffe::InfogainLossParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::InfogainLossParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::InnerProductParameter* Arena::CreateMaybeMessage< ::opencv_caffe::InnerProductParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::InnerProductParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::InputParameter* Arena::CreateMaybeMessage< ::opencv_caffe::InputParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::InputParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::LogParameter* Arena::CreateMaybeMessage< ::opencv_caffe::LogParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::LogParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::LRNParameter* Arena::CreateMaybeMessage< ::opencv_caffe::LRNParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::LRNParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::MemoryDataParameter* Arena::CreateMaybeMessage< ::opencv_caffe::MemoryDataParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::MemoryDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::MVNParameter* Arena::CreateMaybeMessage< ::opencv_caffe::MVNParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::MVNParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ParameterParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ParameterParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ParameterParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PoolingParameter* Arena::CreateMaybeMessage< ::opencv_caffe::PoolingParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::PoolingParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PowerParameter* Arena::CreateMaybeMessage< ::opencv_caffe::PowerParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::PowerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PythonParameter* Arena::CreateMaybeMessage< ::opencv_caffe::PythonParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::PythonParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::RecurrentParameter* Arena::CreateMaybeMessage< ::opencv_caffe::RecurrentParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::RecurrentParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ReductionParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ReductionParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ReductionParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ReLUParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ReLUParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ReLUParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ReshapeParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ReshapeParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ReshapeParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ScaleParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ScaleParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ScaleParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SigmoidParameter* Arena::CreateMaybeMessage< ::opencv_caffe::SigmoidParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::SigmoidParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SliceParameter* Arena::CreateMaybeMessage< ::opencv_caffe::SliceParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::SliceParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SoftmaxParameter* Arena::CreateMaybeMessage< ::opencv_caffe::SoftmaxParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::SoftmaxParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::TanHParameter* Arena::CreateMaybeMessage< ::opencv_caffe::TanHParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::TanHParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::TileParameter* Arena::CreateMaybeMessage< ::opencv_caffe::TileParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::TileParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ThresholdParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ThresholdParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ThresholdParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::WindowDataParameter* Arena::CreateMaybeMessage< ::opencv_caffe::WindowDataParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::WindowDataParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::SPPParameter* Arena::CreateMaybeMessage< ::opencv_caffe::SPPParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::SPPParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::V1LayerParameter* Arena::CreateMaybeMessage< ::opencv_caffe::V1LayerParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::V1LayerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::V0LayerParameter* Arena::CreateMaybeMessage< ::opencv_caffe::V0LayerParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::V0LayerParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PReLUParameter* Arena::CreateMaybeMessage< ::opencv_caffe::PReLUParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::PReLUParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::NormalizedBBox* Arena::CreateMaybeMessage< ::opencv_caffe::NormalizedBBox >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::NormalizedBBox >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ROIPoolingParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ROIPoolingParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ROIPoolingParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::ProposalParameter* Arena::CreateMaybeMessage< ::opencv_caffe::ProposalParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::ProposalParameter >(arena);
}
template<> PROTOBUF_NOINLINE ::opencv_caffe::PSROIPoolingParameter* Arena::CreateMaybeMessage< ::opencv_caffe::PSROIPoolingParameter >(Arena* arena) {
return Arena::CreateMessageInternal< ::opencv_caffe::PSROIPoolingParameter >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>