Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
5384d2f0
Commit
5384d2f0
authored
7 years ago
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9880 from dkurt:caffe_ceil_mode
parents
60cbc46d
b903ff89
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
275 additions
and
156 deletions
+275
-156
caffe.pb.cc
modules/dnn/misc/caffe/caffe.pb.cc
+221
-156
caffe.pb.h
modules/dnn/misc/caffe/caffe.pb.h
+34
-0
caffe.proto
modules/dnn/src/caffe/caffe.proto
+3
-0
test_caffe_importer.cpp
modules/dnn/test/test_caffe_importer.cpp
+17
-0
No files found.
modules/dnn/misc/caffe/caffe.pb.cc
View file @
5384d2f0
...
...
@@ -1212,7 +1212,7 @@ void protobuf_AssignDesc_caffe_2eproto() {
sizeof
(
ParameterParameter
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
ParameterParameter
,
_internal_metadata_
));
PoolingParameter_descriptor_
=
file
->
message_type
(
48
);
static
const
int
PoolingParameter_offsets_
[
1
2
]
=
{
static
const
int
PoolingParameter_offsets_
[
1
3
]
=
{
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
PoolingParameter
,
pool_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
PoolingParameter
,
pad_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
PoolingParameter
,
pad_h_
),
...
...
@@ -1225,6 +1225,7 @@ void protobuf_AssignDesc_caffe_2eproto() {
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
PoolingParameter
,
stride_w_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
PoolingParameter
,
engine_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
PoolingParameter
,
global_pooling_
),
GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET
(
PoolingParameter
,
ceil_mode_
),
};
PoolingParameter_reflection_
=
::
google
::
protobuf
::
internal
::
GeneratedMessageReflection
::
NewGeneratedMessageReflection
(
...
...
@@ -2384,7 +2385,7 @@ void protobuf_AddDesc_caffe_2eproto_impl() {
"rameter
\022
\n\022
normalize_variance
\030\001
\001
(
\010
:
\004
tru"
"e
\022\036\n\017
across_channels
\030\002
\001
(
\010
:
\005
false
\022\022\n\003
eps"
"
\030\003
\001
(
\002
:
\005
1e-09
\"
5
\n\022
ParameterParameter
\022\037\n\005
s"
"hape
\030\001
\001
(
\013
2
\020
.caffe.BlobShape
\"\2
42
\003\n\020
Pooling"
"hape
\030\001
\001
(
\013
2
\020
.caffe.BlobShape
\"\2
73
\003\n\020
Pooling"
"Parameter
\022
5
\n\004
pool
\030\001
\001
(
\016
2
\"
.caffe.PoolingP"
"arameter.PoolMethod:
\003
MAX
\022\016\n\003
pad
\030\004
\001
(
\r
:
\001
0"
"
\022\020\n\005
pad_h
\030\t
\001
(
\r
:
\001
0
\022\020\n\005
pad_w
\030\n
\001
(
\r
:
\001
0
\022\023\n\013
"
...
...
@@ -2392,158 +2393,159 @@ void protobuf_AddDesc_caffe_2eproto_impl() {
"ernel_w
\030\006
\001
(
\r\022\021\n\006
stride
\030\003
\001
(
\r
:
\001
1
\022\020\n\010
stri"
"de_h
\030\007
\001
(
\r\022\020\n\010
stride_w
\030\010
\001
(
\r\022
7
\n\006
engine
\030\013
"
"
\001
(
\016
2
\036
.caffe.PoolingParameter.Engine:
\007
DE"
"FAULT
\022\035\n\016
global_pooling
\030\014
\001
(
\010
:
\005
false
\"
.
\n\n
"
"PoolMethod
\022\007\n\003
MAX
\020\000\022\007\n\003
AVE
\020\001\022\016\n\n
STOCHAST"
"IC
\020\002\"
+
\n\006
Engine
\022\013\n\007
DEFAULT
\020\000\022\t\n\005
CAFFE
\020\001\022\t
"
"
\n\005
CUDNN
\020\002\"
F
\n\016
PowerParameter
\022\020\n\005
power
\030\001
\001
"
"(
\002
:
\001
1
\022\020\n\005
scale
\030\002
\001
(
\002
:
\001
1
\022\020\n\005
shift
\030\003
\001
(
\002
:
\001
"
"0
\"
g
\n\017
PythonParameter
\022\016\n\006
module
\030\001
\001
(
\t\022\r\n\005
"
"layer
\030\002
\001
(
\t\022\023\n\t
param_str
\030\003
\001
(
\t
:
\000\022
\n\021
shar"
"e_in_parallel
\030\004
\001
(
\010
:
\005
false
\"\300\001\n\022
Recurrent"
"Parameter
\022\025\n\n
num_output
\030\001
\001
(
\r
:
\001
0
\022
-
\n\r
weig"
"ht_filler
\030\002
\001
(
\013
2
\026
.caffe.FillerParameter
\022
"
"+
\n\013
bias_filler
\030\003
\001
(
\013
2
\026
.caffe.FillerParam"
"eter
\022\031\n\n
debug_info
\030\004
\001
(
\010
:
\005
false
\022\034\n\r
expos"
"e_hidden
\030\005
\001
(
\010
:
\005
false
\"\255\001\n\022
ReductionParam"
"eter
\022
=
\n\t
operation
\030\001
\001
(
\016
2%.caffe.Reductio"
"nParameter.ReductionOp:
\003
SUM
\022\017\n\004
axis
\030\002
\001
("
"
\005
:
\001
0
\022\020\n\005
coeff
\030\003
\001
(
\002
:
\001
1
\"
5
\n\013
ReductionOp
\022\007\n
"
"
\003
SUM
\020\001\022\010\n\004
ASUM
\020\002\022\t\n\005
SUMSQ
\020\003\022\010\n\004
MEAN
\020\004\"\215\001
"
"
\n\r
ReLUParameter
\022\031\n\016
negative_slope
\030\001
\001
(
\002
:"
"
\001
0
\022
4
\n\006
engine
\030\002
\001
(
\016
2
\033
.caffe.ReLUParameter"
".Engine:
\007
DEFAULT
\"
+
\n\006
Engine
\022\013\n\007
DEFAULT
\020\000\022
"
"
\t\n\005
CAFFE
\020\001\022\t\n\005
CUDNN
\020\002\"
Z
\n\020
ReshapeParamete"
"r
\022\037\n\005
shape
\030\001
\001
(
\013
2
\020
.caffe.BlobShape
\022\017\n\004
ax"
"is
\030\002
\001
(
\005
:
\001
0
\022\024\n\010
num_axes
\030\003
\001
(
\005
:
\002
-1
\"\245\001\n\016
Sc"
"aleParameter
\022\017\n\004
axis
\030\001
\001
(
\005
:
\001
1
\022\023\n\010
num_axe"
"s
\030\002
\001
(
\005
:
\001
1
\022
&
\n\006
filler
\030\003
\001
(
\013
2
\026
.caffe.Fille"
"rParameter
\022\030\n\t
bias_term
\030\004
\001
(
\010
:
\005
false
\022
+
\n\013
"
"bias_filler
\030\005
\001
(
\013
2
\026
.caffe.FillerParamete"
"r
\"
x
\n\020
SigmoidParameter
\022
7
\n\006
engine
\030\001
\001
(
\016
2
\036
."
"caffe.SigmoidParameter.Engine:
\007
DEFAULT
\"
+"
"
\n\006
Engine
\022\013\n\007
DEFAULT
\020\000\022\t\n\005
CAFFE
\020\001\022\t\n\005
CUDN"
"N
\020\002\"
L
\n\016
SliceParameter
\022\017\n\004
axis
\030\003
\001
(
\005
:
\001
1
\022\023
"
"
\n\013
slice_point
\030\002
\003
(
\r\022\024\n\t
slice_dim
\030\001
\001
(
\r
:
\001
"
"1
\"\211\001\n\020
SoftmaxParameter
\022
7
\n\006
engine
\030\001
\001
(
\016
2
\036
"
".caffe.SoftmaxParameter.Engine:
\007
DEFAULT
\022
"
"
\017\n\004
axis
\030\002
\001
(
\005
:
\001
1
\"
+
\n\006
Engine
\022\013\n\007
DEFAULT
\020\000\022
"
"
\t\n\005
CAFFE
\020\001\022\t\n\005
CUDNN
\020\002\"
r
\n\r
TanHParameter
\022
4"
"
\n\006
engine
\030\001
\001
(
\016
2
\033
.caffe.TanHParameter.Eng"
"ine:
\007
DEFAULT
\"
+
\n\006
Engine
\022\013\n\007
DEFAULT
\020\000\022\t\n\005
C"
"AFFE
\020\001\022\t\n\005
CUDNN
\020\002\"
/
\n\r
TileParameter
\022\017\n\004
ax"
"is
\030\001
\001
(
\005
:
\001
1
\022\r\n\005
tiles
\030\002
\001
(
\005\"
*
\n\022
ThresholdP"
"arameter
\022\024\n\t
threshold
\030\001
\001
(
\002
:
\001
0
\"\301\002\n\023
Windo"
"wDataParameter
\022\016\n\006
source
\030\001
\001
(
\t\022\020\n\005
scale
\030
"
"
\002
\001
(
\002
:
\001
1
\022\021\n\t
mean_file
\030\003
\001
(
\t\022\022\n\n
batch_siz"
"e
\030\004
\001
(
\r\022\024\n\t
crop_size
\030\005
\001
(
\r
:
\001
0
\022\025\n\006
mirror
\030
"
"
\006
\001
(
\010
:
\005
false
\022\031\n\014
fg_threshold
\030\007
\001
(
\002
:
\003
0.5
\022
"
"
\031\n\014
bg_threshold
\030\010
\001
(
\002
:
\003
0.5
\022\031\n\013
fg_fractio"
"n
\030\t
\001
(
\002
:
\004
0.25
\022\026\n\013
context_pad
\030\n
\001
(
\r
:
\001
0
\022\027\n
"
"
\t
crop_mode
\030\013
\001
(
\t
:
\004
warp
\022\033\n\014
cache_images
\030\014
"
"
\001
(
\010
:
\005
false
\022\025\n\013
root_folder
\030\r
\001
(
\t
:
\000\"\353\001\n\014
S"
"PPParameter
\022\026\n\016
pyramid_height
\030\001
\001
(
\r\022
1
\n\004
p"
"ool
\030\002
\001
(
\016
2
\036
.caffe.SPPParameter.PoolMetho"
"d:
\003
MAX
\022
3
\n\006
engine
\030\006
\001
(
\016
2
\032
.caffe.SPPParame"
"ter.Engine:
\007
DEFAULT
\"
.
\n\n
PoolMethod
\022\007\n\003
MAX"
"
\020\000\022\007\n\003
AVE
\020\001\022\016\n\n
STOCHASTIC
\020\002\"
+
\n\006
Engine
\022\013\n
"
"
\007
DEFAULT
\020\000\022\t\n\005
CAFFE
\020\001\022\t\n\005
CUDNN
\020\002\"\340\023\n\020
V1L"
"ayerParameter
\022\016\n\006
bottom
\030\002
\003
(
\t\022\013\n\003
top
\030\003
\003
"
"(
\t\022\014\n\004
name
\030\004
\001
(
\t\022
$
\n\007
include
\030
\003
(
\013
2
\023
.caff"
"e.NetStateRule
\022
$
\n\007
exclude
\030
!
\003
(
\013
2
\023
.caffe."
"NetStateRule
\022
/
\n\004
type
\030\005
\001
(
\016
2!.caffe.V1Lay"
"erParameter.LayerType
\022\037\n\005
blobs
\030\006
\003
(
\013
2
\020
.c"
"affe.BlobProto
\022\016\n\005
param
\030\351\007
\003
(
\t\022
>
\n\017
blob_s"
"hare_mode
\030\352\007
\003
(
\016
2$.caffe.V1LayerParamete"
"r.DimCheckMode
\022\020\n\010
blobs_lr
\030\007
\003
(
\002\022\024\n\014
weig"
"ht_decay
\030\010
\003
(
\002\022\023\n\013
loss_weight
\030
#
\003
(
\002\022
0
\n\016
a"
"ccuracy_param
\030\033
\001
(
\013
2
\030
.caffe.AccuracyPara"
"meter
\022
,
\n\014
argmax_param
\030\027
\001
(
\013
2
\026
.caffe.ArgM"
"axParameter
\022
,
\n\014
concat_param
\030\t
\001
(
\013
2
\026
.caff"
"e.ConcatParameter
\022
\?
\n\026
contrastive_loss_pa"
"ram
\030
(
\001
(
\013
2
\037
.caffe.ContrastiveLossParamet"
"er
\022
6
\n\021
convolution_param
\030\n
\001
(
\013
2
\033
.caffe.Co"
"nvolutionParameter
\022
(
\n\n
data_param
\030\013
\001
(
\013
2
\024
"
".caffe.DataParameter
\022
.
\n\r
dropout_param
\030\014
"
"
\001
(
\013
2
\027
.caffe.DropoutParameter
\022
3
\n\020
dummy_da"
"ta_param
\030\032
\001
(
\013
2
\031
.caffe.DummyDataParamete"
"r
\022
.
\n\r
eltwise_param
\030\030
\001
(
\013
2
\027
.caffe.Eltwise"
"Parameter
\022
&
\n\t
exp_param
\030
)
\001
(
\013
2
\023
.caffe.Exp"
"Parameter
\022
1
\n\017
hdf5_data_param
\030\r
\001
(
\013
2
\030
.caf"
"fe.HDF5DataParameter
\022
5
\n\021
hdf5_output_para"
"m
\030\016
\001
(
\013
2
\032
.caffe.HDF5OutputParameter
\022
3
\n\020
h"
"inge_loss_param
\030\035
\001
(
\013
2
\031
.caffe.HingeLossP"
"arameter
\022
3
\n\020
image_data_param
\030\017
\001
(
\013
2
\031
.caf"
"fe.ImageDataParameter
\022
9
\n\023
infogain_loss_p"
"aram
\030\020
\001
(
\013
2
\034
.caffe.InfogainLossParameter"
"
\022
9
\n\023
inner_product_param
\030\021
\001
(
\013
2
\034
.caffe.In"
"nerProductParameter
\022
&
\n\t
lrn_param
\030\022
\001
(
\013
2
\023
"
".caffe.LRNParameter
\022
5
\n\021
memory_data_param"
"
\030\026
\001
(
\013
2
\032
.caffe.MemoryDataParameter
\022
&
\n\t
mv"
"n_param
\030\"
\001
(
\013
2
\023
.caffe.MVNParameter
\022
.
\n\r
po"
"oling_param
\030\023
\001
(
\013
2
\027
.caffe.PoolingParamet"
"er
\022
*
\n\013
power_param
\030\025
\001
(
\013
2
\025
.caffe.PowerPar"
"ameter
\022
(
\n\n
relu_param
\030\036
\001
(
\013
2
\024
.caffe.ReLUP"
"arameter
\022
.
\n\r
sigmoid_param
\030
&
\001
(
\013
2
\027
.caffe."
"SigmoidParameter
\022
.
\n\r
softmax_param
\030\'
\001
(
\013
2"
"
\027
.caffe.SoftmaxParameter
\022
*
\n\013
slice_param
\030
"
"
\037
\001
(
\013
2
\025
.caffe.SliceParameter
\022
(
\n\n
tanh_par"
"am
\030
%
\001
(
\013
2
\024
.caffe.TanHParameter
\022
2
\n\017
thresh"
"old_param
\030\031
\001
(
\013
2
\031
.caffe.ThresholdParamet"
"er
\022
5
\n\021
window_data_param
\030\024
\001
(
\013
2
\032
.caffe.Wi"
"ndowDataParameter
\022
7
\n\017
transform_param
\030
$
\001
"
"(
\013
2
\036
.caffe.TransformationParameter
\022
(
\n\n
lo"
"ss_param
\030
*
\001
(
\013
2
\024
.caffe.LossParameter
\022
&
\n\005
"
"layer
\030\001
\001
(
\013
2
\027
.caffe.V0LayerParameter
\"\330\004\n
"
"
\t
LayerType
\022\010\n\004
NONE
\020\000\022\n\n\006
ABSVAL
\020
#
\022\014\n\010
ACCU"
"RACY
\020\001\022\n\n\006
ARGMAX
\020\036\022\010\n\004
BNLL
\020\002\022\n\n\006
CONCAT
\020\003
"
"
\022\024\n\020
CONTRASTIVE_LOSS
\020
%
\022\017\n\013
CONVOLUTION
\020\004\022
"
"
\010\n\004
DATA
\020\005\022\021\n\r
DECONVOLUTION
\020\'\022\013\n\007
DROPOUT
\020
"
"
\006\022\016\n\n
DUMMY_DATA
\020
\022\022\n\016
EUCLIDEAN_LOSS
\020\007\022\013\n
"
"
\007
ELTWISE
\020\031\022\007\n\003
EXP
\020
&
\022\013\n\007
FLATTEN
\020\010\022\r\n\t
HDF5"
"_DATA
\020\t\022\017\n\013
HDF5_OUTPUT
\020\n\022\016\n\n
HINGE_LOSS
\020\034
"
"
\022\n\n\006
IM2COL
\020\013\022\016\n\n
IMAGE_DATA
\020\014\022\021\n\r
INFOGAIN"
"_LOSS
\020\r\022\021\n\r
INNER_PRODUCT
\020\016\022\007\n\003
LRN
\020\017\022\017\n\013
M"
"EMORY_DATA
\020\035\022\035\n\031
MULTINOMIAL_LOGISTIC_LOS"
"S
\020\020\022\007\n\003
MVN
\020\"\022\013\n\007
POOLING
\020\021\022\t\n\005
POWER
\020\032\022\010\n\004
"
"RELU
\020\022\022\013\n\007
SIGMOID
\020\023\022\036\n\032
SIGMOID_CROSS_ENT"
"ROPY_LOSS
\020\033\022\013\n\007
SILENCE
\020
$
\022\013\n\007
SOFTMAX
\020\024\022\020\n
"
"
\014
SOFTMAX_LOSS
\020\025\022\t\n\005
SPLIT
\020\026\022\t\n\005
SLICE
\020
!
\022\010\n
"
"
\004
TANH
\020\027\022\017\n\013
WINDOW_DATA
\020\030\022\r\n\t
THRESHOLD
\020\037\"
"
"*
\n\014
DimCheckMode
\022\n\n\006
STRICT
\020\000\022\016\n\n
PERMISSIV"
"E
\020\001\"\375\007\n\020
V0LayerParameter
\022\014\n\004
name
\030\001
\001
(
\t\022\014
"
"
\n\004
type
\030\002
\001
(
\t\022\022\n\n
num_output
\030\003
\001
(
\r\022\026\n\010
bias"
"term
\030\004
\001
(
\010
:
\004
true
\022
-
\n\r
weight_filler
\030\005
\001
(
\013
2"
"
\026
.caffe.FillerParameter
\022
+
\n\013
bias_filler
\030\006
"
"
\001
(
\013
2
\026
.caffe.FillerParameter
\022\016\n\003
pad
\030\007
\001
("
"
\r
:
\001
0
\022\022\n\n
kernelsize
\030\010
\001
(
\r\022\020\n\005
group
\030\t
\001
(
\r
:"
"
\001
1
\022\021\n\006
stride
\030\n
\001
(
\r
:
\001
1
\022
5
\n\004
pool
\030\013
\001
(
\016
2
\"
.ca"
"ffe.V0LayerParameter.PoolMethod:
\003
MAX
\022\032\n\r
"
"dropout_ratio
\030\014
\001
(
\002
:
\003
0.5
\022\025\n\n
local_size
\030\r
"
"
\001
(
\r
:
\001
5
\022\020\n\005
alpha
\030\016
\001
(
\002
:
\001
1
\022\022\n\004
beta
\030\017
\001
(
\002
:"
"
\004
0.75
\022\014\n\001
k
\030\026
\001
(
\002
:
\001
1
\022\016\n\006
source
\030\020
\001
(
\t\022\020\n\005
s"
"cale
\030\021
\001
(
\002
:
\001
1
\022\020\n\010
meanfile
\030\022
\001
(
\t\022\021\n\t
batch"
"size
\030\023
\001
(
\r\022\023\n\010
cropsize
\030\024
\001
(
\r
:
\001
0
\022\025\n\006
mirro"
"r
\030\025
\001
(
\010
:
\005
false
\022\037\n\005
blobs
\030
2
\003
(
\013
2
\020
.caffe.Bl"
"obProto
\022\020\n\010
blobs_lr
\030
3
\003
(
\002\022\024\n\014
weight_deca"
"y
\030
4
\003
(
\002\022\024\n\t
rand_skip
\030
5
\001
(
\r
:
\001
0
\022\035\n\020
det_fg_"
"threshold
\030
6
\001
(
\002
:
\003
0.5
\022\035\n\020
det_bg_threshold"
"
\030
7
\001
(
\002
:
\003
0.5
\022\035\n\017
det_fg_fraction
\030
8
\001
(
\002
:
\004
0."
"25
\022\032\n\017
det_context_pad
\030
:
\001
(
\r
:
\001
0
\022\033\n\r
det_cr"
"op_mode
\030
;
\001
(
\t
:
\004
warp
\022\022\n\007
new_num
\030
<
\001
(
\005
:
\001
0
\022
"
"
\027\n\014
new_channels
\030
=
\001
(
\005
:
\001
0
\022\025\n\n
new_height
\030
>"
"
\001
(
\005
:
\001
0
\022\024\n\t
new_width
\030
\?
\001
(
\005
:
\001
0
\022\035\n\016
shuffle"
"_images
\030
@
\001
(
\010
:
\005
false
\022\025\n\n
concat_dim
\030
A
\001
(
\r
"
":
\001
1
\022
6
\n\021
hdf5_output_param
\030\351\007
\001
(
\013
2
\032
.caffe."
"HDF5OutputParameter
\"
.
\n\n
PoolMethod
\022\007\n\003
MAX"
"
\020\000\022\007\n\003
AVE
\020\001\022\016\n\n
STOCHASTIC
\020\002\"
W
\n\016
PReLUPara"
"meter
\022
&
\n\006
filler
\030\001
\001
(
\013
2
\026
.caffe.FillerPara"
"meter
\022\035\n\016
channel_shared
\030\002
\001
(
\010
:
\005
false
\"\207\001\n
"
"
\016
NormalizedBBox
\022\014\n\004
xmin
\030\001
\001
(
\002\022\014\n\004
ymin
\030\002
"
"
\001
(
\002\022\014\n\004
xmax
\030\003
\001
(
\002\022\014\n\004
ymax
\030\004
\001
(
\002\022\r\n\005
label"
"
\030\005
\001
(
\005\022\021\n\t
difficult
\030\006
\001
(
\010\022\r\n\005
score
\030\007
\001
(
\002
"
"
\022\014\n\004
size
\030\010
\001
(
\002
*=
\n\004
Type
\022\n\n\006
DOUBLE
\020\000\022\t\n\005
FL"
"OAT
\020\001\022\013\n\007
FLOAT16
\020\002\022\007\n\003
INT
\020\003\022\010\n\004
UINT
\020\004
*
\034\n
"
"
\005
Phase
\022\t\n\005
TRAIN
\020\000\022\010\n\004
TEST
\020\001
"
,
17027
);
"FAULT
\022\035\n\016
global_pooling
\030\014
\001
(
\010
:
\005
false
\022\027\n\t
"
"ceil_mode
\030\r
\001
(
\010
:
\004
true
\"
.
\n\n
PoolMethod
\022\007\n\003
M"
"AX
\020\000\022\007\n\003
AVE
\020\001\022\016\n\n
STOCHASTIC
\020\002\"
+
\n\006
Engine
\022
"
"
\013\n\007
DEFAULT
\020\000\022\t\n\005
CAFFE
\020\001\022\t\n\005
CUDNN
\020\002\"
F
\n\016
Po"
"werParameter
\022\020\n\005
power
\030\001
\001
(
\002
:
\001
1
\022\020\n\005
scale
\030
"
"
\002
\001
(
\002
:
\001
1
\022\020\n\005
shift
\030\003
\001
(
\002
:
\001
0
\"
g
\n\017
PythonPara"
"meter
\022\016\n\006
module
\030\001
\001
(
\t\022\r\n\005
layer
\030\002
\001
(
\t\022\023\n\t
"
"param_str
\030\003
\001
(
\t
:
\000\022
\n\021
share_in_parallel
\030\004
"
"
\001
(
\010
:
\005
false
\"\300\001\n\022
RecurrentParameter
\022\025\n\n
nu"
"m_output
\030\001
\001
(
\r
:
\001
0
\022
-
\n\r
weight_filler
\030\002
\001
(
\013
"
"2
\026
.caffe.FillerParameter
\022
+
\n\013
bias_filler
\030
"
"
\003
\001
(
\013
2
\026
.caffe.FillerParameter
\022\031\n\n
debug_i"
"nfo
\030\004
\001
(
\010
:
\005
false
\022\034\n\r
expose_hidden
\030\005
\001
(
\010
:"
"
\005
false
\"\255\001\n\022
ReductionParameter
\022
=
\n\t
operati"
"on
\030\001
\001
(
\016
2%.caffe.ReductionParameter.Redu"
"ctionOp:
\003
SUM
\022\017\n\004
axis
\030\002
\001
(
\005
:
\001
0
\022\020\n\005
coeff
\030\003
"
"
\001
(
\002
:
\001
1
\"
5
\n\013
ReductionOp
\022\007\n\003
SUM
\020\001\022\010\n\004
ASUM
\020
"
"
\002\022\t\n\005
SUMSQ
\020\003\022\010\n\004
MEAN
\020\004\"\215\001\n\r
ReLUParameter"
"
\022\031\n\016
negative_slope
\030\001
\001
(
\002
:
\001
0
\022
4
\n\006
engine
\030\002
"
"
\001
(
\016
2
\033
.caffe.ReLUParameter.Engine:
\007
DEFAUL"
"T
\"
+
\n\006
Engine
\022\013\n\007
DEFAULT
\020\000\022\t\n\005
CAFFE
\020\001\022\t\n\005
C"
"UDNN
\020\002\"
Z
\n\020
ReshapeParameter
\022\037\n\005
shape
\030\001
\001
("
"
\013
2
\020
.caffe.BlobShape
\022\017\n\004
axis
\030\002
\001
(
\005
:
\001
0
\022\024\n\010
"
"num_axes
\030\003
\001
(
\005
:
\002
-1
\"\245\001\n\016
ScaleParameter
\022\017\n
"
"
\004
axis
\030\001
\001
(
\005
:
\001
1
\022\023\n\010
num_axes
\030\002
\001
(
\005
:
\001
1
\022
&
\n\006
f"
"iller
\030\003
\001
(
\013
2
\026
.caffe.FillerParameter
\022\030\n\t
b"
"ias_term
\030\004
\001
(
\010
:
\005
false
\022
+
\n\013
bias_filler
\030\005
\001
"
"(
\013
2
\026
.caffe.FillerParameter
\"
x
\n\020
SigmoidPar"
"ameter
\022
7
\n\006
engine
\030\001
\001
(
\016
2
\036
.caffe.SigmoidPa"
"rameter.Engine:
\007
DEFAULT
\"
+
\n\006
Engine
\022\013\n\007
DEF"
"AULT
\020\000\022\t\n\005
CAFFE
\020\001\022\t\n\005
CUDNN
\020\002\"
L
\n\016
SlicePar"
"ameter
\022\017\n\004
axis
\030\003
\001
(
\005
:
\001
1
\022\023\n\013
slice_point
\030\002
"
"
\003
(
\r\022\024\n\t
slice_dim
\030\001
\001
(
\r
:
\001
1
\"\211\001\n\020
SoftmaxPa"
"rameter
\022
7
\n\006
engine
\030\001
\001
(
\016
2
\036
.caffe.SoftmaxP"
"arameter.Engine:
\007
DEFAULT
\022\017\n\004
axis
\030\002
\001
(
\005
:
\001
"
"1
\"
+
\n\006
Engine
\022\013\n\007
DEFAULT
\020\000\022\t\n\005
CAFFE
\020\001\022\t\n\005
C"
"UDNN
\020\002\"
r
\n\r
TanHParameter
\022
4
\n\006
engine
\030\001
\001
(
\016
2"
"
\033
.caffe.TanHParameter.Engine:
\007
DEFAULT
\"
+
\n
"
"
\006
Engine
\022\013\n\007
DEFAULT
\020\000\022\t\n\005
CAFFE
\020\001\022\t\n\005
CUDNN"
"
\020\002\"
/
\n\r
TileParameter
\022\017\n\004
axis
\030\001
\001
(
\005
:
\001
1
\022\r\n\005
"
"tiles
\030\002
\001
(
\005\"
*
\n\022
ThresholdParameter
\022\024\n\t
thr"
"eshold
\030\001
\001
(
\002
:
\001
0
\"\301\002\n\023
WindowDataParameter
\022
"
"
\016\n\006
source
\030\001
\001
(
\t\022\020\n\005
scale
\030\002
\001
(
\002
:
\001
1
\022\021\n\t
mea"
"n_file
\030\003
\001
(
\t\022\022\n\n
batch_size
\030\004
\001
(
\r\022\024\n\t
crop"
"_size
\030\005
\001
(
\r
:
\001
0
\022\025\n\006
mirror
\030\006
\001
(
\010
:
\005
false
\022\031\n
"
"
\014
fg_threshold
\030\007
\001
(
\002
:
\003
0.5
\022\031\n\014
bg_threshold"
"
\030\010
\001
(
\002
:
\003
0.5
\022\031\n\013
fg_fraction
\030\t
\001
(
\002
:
\004
0.25
\022\026
"
"
\n\013
context_pad
\030\n
\001
(
\r
:
\001
0
\022\027\n\t
crop_mode
\030\013
\001
("
"
\t
:
\004
warp
\022\033\n\014
cache_images
\030\014
\001
(
\010
:
\005
false
\022\025\n\013
"
"root_folder
\030\r
\001
(
\t
:
\000\"\353\001\n\014
SPPParameter
\022\026\n\016
"
"pyramid_height
\030\001
\001
(
\r\022
1
\n\004
pool
\030\002
\001
(
\016
2
\036
.caf"
"fe.SPPParameter.PoolMethod:
\003
MAX
\022
3
\n\006
engin"
"e
\030\006
\001
(
\016
2
\032
.caffe.SPPParameter.Engine:
\007
DEF"
"AULT
\"
.
\n\n
PoolMethod
\022\007\n\003
MAX
\020\000\022\007\n\003
AVE
\020\001\022\016\n\n
"
"STOCHASTIC
\020\002\"
+
\n\006
Engine
\022\013\n\007
DEFAULT
\020\000\022\t\n\005
C"
"AFFE
\020\001\022\t\n\005
CUDNN
\020\002\"\340\023\n\020
V1LayerParameter
\022\016
"
"
\n\006
bottom
\030\002
\003
(
\t\022\013\n\003
top
\030\003
\003
(
\t\022\014\n\004
name
\030\004
\001
("
"
\t\022
$
\n\007
include
\030
\003
(
\013
2
\023
.caffe.NetStateRule
\022
"
"$
\n\007
exclude
\030
!
\003
(
\013
2
\023
.caffe.NetStateRule
\022
/
\n
"
"
\004
type
\030\005
\001
(
\016
2!.caffe.V1LayerParameter.Lay"
"erType
\022\037\n\005
blobs
\030\006
\003
(
\013
2
\020
.caffe.BlobProto
\022
"
"
\016\n\005
param
\030\351\007
\003
(
\t\022
>
\n\017
blob_share_mode
\030\352\007
\003
("
"
\016
2$.caffe.V1LayerParameter.DimCheckMode
\022
"
"
\020\n\010
blobs_lr
\030\007
\003
(
\002\022\024\n\014
weight_decay
\030\010
\003
(
\002\022
"
"
\023\n\013
loss_weight
\030
#
\003
(
\002\022
0
\n\016
accuracy_param
\030\033
"
"
\001
(
\013
2
\030
.caffe.AccuracyParameter
\022
,
\n\014
argmax"
"_param
\030\027
\001
(
\013
2
\026
.caffe.ArgMaxParameter
\022
,
\n\014
"
"concat_param
\030\t
\001
(
\013
2
\026
.caffe.ConcatParamet"
"er
\022
\?
\n\026
contrastive_loss_param
\030
(
\001
(
\013
2
\037
.caf"
"fe.ContrastiveLossParameter
\022
6
\n\021
convoluti"
"on_param
\030\n
\001
(
\013
2
\033
.caffe.ConvolutionParame"
"ter
\022
(
\n\n
data_param
\030\013
\001
(
\013
2
\024
.caffe.DataPara"
"meter
\022
.
\n\r
dropout_param
\030\014
\001
(
\013
2
\027
.caffe.Dro"
"poutParameter
\022
3
\n\020
dummy_data_param
\030\032
\001
(
\013
2"
"
\031
.caffe.DummyDataParameter
\022
.
\n\r
eltwise_pa"
"ram
\030\030
\001
(
\013
2
\027
.caffe.EltwiseParameter
\022
&
\n\t
ex"
"p_param
\030
)
\001
(
\013
2
\023
.caffe.ExpParameter
\022
1
\n\017
hd"
"f5_data_param
\030\r
\001
(
\013
2
\030
.caffe.HDF5DataPara"
"meter
\022
5
\n\021
hdf5_output_param
\030\016
\001
(
\013
2
\032
.caffe"
".HDF5OutputParameter
\022
3
\n\020
hinge_loss_param"
"
\030\035
\001
(
\013
2
\031
.caffe.HingeLossParameter
\022
3
\n\020
ima"
"ge_data_param
\030\017
\001
(
\013
2
\031
.caffe.ImageDataPar"
"ameter
\022
9
\n\023
infogain_loss_param
\030\020
\001
(
\013
2
\034
.ca"
"ffe.InfogainLossParameter
\022
9
\n\023
inner_produ"
"ct_param
\030\021
\001
(
\013
2
\034
.caffe.InnerProductParam"
"eter
\022
&
\n\t
lrn_param
\030\022
\001
(
\013
2
\023
.caffe.LRNParam"
"eter
\022
5
\n\021
memory_data_param
\030\026
\001
(
\013
2
\032
.caffe."
"MemoryDataParameter
\022
&
\n\t
mvn_param
\030\"
\001
(
\013
2
\023
"
".caffe.MVNParameter
\022
.
\n\r
pooling_param
\030\023
\001
"
"(
\013
2
\027
.caffe.PoolingParameter
\022
*
\n\013
power_par"
"am
\030\025
\001
(
\013
2
\025
.caffe.PowerParameter
\022
(
\n\n
relu_"
"param
\030\036
\001
(
\013
2
\024
.caffe.ReLUParameter
\022
.
\n\r
sig"
"moid_param
\030
&
\001
(
\013
2
\027
.caffe.SigmoidParamete"
"r
\022
.
\n\r
softmax_param
\030\'
\001
(
\013
2
\027
.caffe.Softmax"
"Parameter
\022
*
\n\013
slice_param
\030\037
\001
(
\013
2
\025
.caffe.S"
"liceParameter
\022
(
\n\n
tanh_param
\030
%
\001
(
\013
2
\024
.caff"
"e.TanHParameter
\022
2
\n\017
threshold_param
\030\031
\001
(
\013
"
"2
\031
.caffe.ThresholdParameter
\022
5
\n\021
window_da"
"ta_param
\030\024
\001
(
\013
2
\032
.caffe.WindowDataParamet"
"er
\022
7
\n\017
transform_param
\030
$
\001
(
\013
2
\036
.caffe.Tran"
"sformationParameter
\022
(
\n\n
loss_param
\030
*
\001
(
\013
2"
"
\024
.caffe.LossParameter
\022
&
\n\005
layer
\030\001
\001
(
\013
2
\027
.c"
"affe.V0LayerParameter
\"\330\004\n\t
LayerType
\022\010\n\004
N"
"ONE
\020\000\022\n\n\006
ABSVAL
\020
#
\022\014\n\010
ACCURACY
\020\001\022\n\n\006
ARGMA"
"X
\020\036\022\010\n\004
BNLL
\020\002\022\n\n\006
CONCAT
\020\003\022\024\n\020
CONTRASTIVE"
"_LOSS
\020
%
\022\017\n\013
CONVOLUTION
\020\004\022\010\n\004
DATA
\020\005\022\021\n\r
DE"
"CONVOLUTION
\020\'\022\013\n\007
DROPOUT
\020\006\022\016\n\n
DUMMY_DATA"
"
\020
\022\022\n\016
EUCLIDEAN_LOSS
\020\007\022\013\n\007
ELTWISE
\020\031\022\007\n\003
E"
"XP
\020
&
\022\013\n\007
FLATTEN
\020\010\022\r\n\t
HDF5_DATA
\020\t\022\017\n\013
HDF5"
"_OUTPUT
\020\n\022\016\n\n
HINGE_LOSS
\020\034\022\n\n\006
IM2COL
\020\013\022\016\n
"
"
\n
IMAGE_DATA
\020\014\022\021\n\r
INFOGAIN_LOSS
\020\r\022\021\n\r
INNE"
"R_PRODUCT
\020\016\022\007\n\003
LRN
\020\017\022\017\n\013
MEMORY_DATA
\020\035\022\035\n
"
"
\031
MULTINOMIAL_LOGISTIC_LOSS
\020\020\022\007\n\003
MVN
\020\"\022\013\n
"
"
\007
POOLING
\020\021\022\t\n\005
POWER
\020\032\022\010\n\004
RELU
\020\022\022\013\n\007
SIGMO"
"ID
\020\023\022\036\n\032
SIGMOID_CROSS_ENTROPY_LOSS
\020\033\022\013\n\007
"
"SILENCE
\020
$
\022\013\n\007
SOFTMAX
\020\024\022\020\n\014
SOFTMAX_LOSS
\020\025
"
"
\022\t\n\005
SPLIT
\020\026\022\t\n\005
SLICE
\020
!
\022\010\n\004
TANH
\020\027\022\017\n\013
WIND"
"OW_DATA
\020\030\022\r\n\t
THRESHOLD
\020\037\"
*
\n\014
DimCheckMode"
"
\022\n\n\006
STRICT
\020\000\022\016\n\n
PERMISSIVE
\020\001\"\375\007\n\020
V0Layer"
"Parameter
\022\014\n\004
name
\030\001
\001
(
\t\022\014\n\004
type
\030\002
\001
(
\t\022\022\n
"
"
\n
num_output
\030\003
\001
(
\r\022\026\n\010
biasterm
\030\004
\001
(
\010
:
\004
tru"
"e
\022
-
\n\r
weight_filler
\030\005
\001
(
\013
2
\026
.caffe.FillerP"
"arameter
\022
+
\n\013
bias_filler
\030\006
\001
(
\013
2
\026
.caffe.Fi"
"llerParameter
\022\016\n\003
pad
\030\007
\001
(
\r
:
\001
0
\022\022\n\n
kernels"
"ize
\030\010
\001
(
\r\022\020\n\005
group
\030\t
\001
(
\r
:
\001
1
\022\021\n\006
stride
\030\n
"
"
\001
(
\r
:
\001
1
\022
5
\n\004
pool
\030\013
\001
(
\016
2
\"
.caffe.V0LayerPara"
"meter.PoolMethod:
\003
MAX
\022\032\n\r
dropout_ratio
\030\014
"
"
\001
(
\002
:
\003
0.5
\022\025\n\n
local_size
\030\r
\001
(
\r
:
\001
5
\022\020\n\005
alph"
"a
\030\016
\001
(
\002
:
\001
1
\022\022\n\004
beta
\030\017
\001
(
\002
:
\004
0.75
\022\014\n\001
k
\030\026
\001
("
"
\002
:
\001
1
\022\016\n\006
source
\030\020
\001
(
\t\022\020\n\005
scale
\030\021
\001
(
\002
:
\001
1
\022\020
"
"
\n\010
meanfile
\030\022
\001
(
\t\022\021\n\t
batchsize
\030\023
\001
(
\r\022\023\n\010
c"
"ropsize
\030\024
\001
(
\r
:
\001
0
\022\025\n\006
mirror
\030\025
\001
(
\010
:
\005
false
\022
"
"
\037\n\005
blobs
\030
2
\003
(
\013
2
\020
.caffe.BlobProto
\022\020\n\010
blob"
"s_lr
\030
3
\003
(
\002\022\024\n\014
weight_decay
\030
4
\003
(
\002\022\024\n\t
rand"
"_skip
\030
5
\001
(
\r
:
\001
0
\022\035\n\020
det_fg_threshold
\030
6
\001
(
\002
"
":
\003
0.5
\022\035\n\020
det_bg_threshold
\030
7
\001
(
\002
:
\003
0.5
\022\035\n\017
"
"det_fg_fraction
\030
8
\001
(
\002
:
\004
0.25
\022\032\n\017
det_conte"
"xt_pad
\030
:
\001
(
\r
:
\001
0
\022\033\n\r
det_crop_mode
\030
;
\001
(
\t
:
\004
"
"warp
\022\022\n\007
new_num
\030
<
\001
(
\005
:
\001
0
\022\027\n\014
new_channels"
"
\030
=
\001
(
\005
:
\001
0
\022\025\n\n
new_height
\030
>
\001
(
\005
:
\001
0
\022\024\n\t
new_"
"width
\030
\?
\001
(
\005
:
\001
0
\022\035\n\016
shuffle_images
\030
@
\001
(
\010
:
\005
"
"false
\022\025\n\n
concat_dim
\030
A
\001
(
\r
:
\001
1
\022
6
\n\021
hdf5_out"
"put_param
\030\351\007
\001
(
\013
2
\032
.caffe.HDF5OutputParam"
"eter
\"
.
\n\n
PoolMethod
\022\007\n\003
MAX
\020\000\022\007\n\003
AVE
\020\001\022\016\n\n
"
"STOCHASTIC
\020\002\"
W
\n\016
PReLUParameter
\022
&
\n\006
filler"
"
\030\001
\001
(
\013
2
\026
.caffe.FillerParameter
\022\035\n\016
channe"
"l_shared
\030\002
\001
(
\010
:
\005
false
\"\207\001\n\016
NormalizedBBox"
"
\022\014\n\004
xmin
\030\001
\001
(
\002\022\014\n\004
ymin
\030\002
\001
(
\002\022\014\n\004
xmax
\030\003
\001
"
"(
\002\022\014\n\004
ymax
\030\004
\001
(
\002\022\r\n\005
label
\030\005
\001
(
\005\022\021\n\t
diffi"
"cult
\030\006
\001
(
\010\022\r\n\005
score
\030\007
\001
(
\002\022\014\n\004
size
\030\010
\001
(
\002
*"
"=
\n\004
Type
\022\n\n\006
DOUBLE
\020\000\022\t\n\005
FLOAT
\020\001\022\013\n\007
FLOAT1"
"6
\020\002\022\007\n\003
INT
\020\003\022\010\n\004
UINT
\020\004
*
\034\n\005
Phase
\022\t\n\005
TRAIN"
"
\020\000\022\010\n\004
TEST
\020\001
"
,
17052
);
::
google
::
protobuf
::
MessageFactory
::
InternalRegisterGeneratedFile
(
"caffe.proto"
,
&
protobuf_RegisterTypes
);
::
google
::
protobuf
::
internal
::
OnShutdown
(
&
protobuf_ShutdownFile_caffe_2eproto
);
...
...
@@ -37422,6 +37424,7 @@ const int PoolingParameter::kStrideHFieldNumber;
const
int
PoolingParameter
::
kStrideWFieldNumber
;
const
int
PoolingParameter
::
kEngineFieldNumber
;
const
int
PoolingParameter
::
kGlobalPoolingFieldNumber
;
const
int
PoolingParameter
::
kCeilModeFieldNumber
;
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
PoolingParameter
::
PoolingParameter
()
...
...
@@ -37447,6 +37450,7 @@ void PoolingParameter::SharedCtor() {
::
memset
(
&
pool_
,
0
,
reinterpret_cast
<
char
*>
(
&
global_pooling_
)
-
reinterpret_cast
<
char
*>
(
&
pool_
)
+
sizeof
(
global_pooling_
));
stride_
=
1u
;
ceil_mode_
=
true
;
}
PoolingParameter
::~
PoolingParameter
()
{
...
...
@@ -37504,7 +37508,10 @@ void PoolingParameter::Clear() {
ZR_
(
pool_
,
kernel_w_
);
stride_
=
1u
;
}
ZR_
(
stride_h_
,
global_pooling_
);
if
(
_has_bits_
[
8
/
32
]
&
7936u
)
{
ZR_
(
stride_h_
,
global_pooling_
);
ceil_mode_
=
true
;
}
#undef ZR_HELPER_
#undef ZR_
...
...
@@ -37710,6 +37717,21 @@ bool PoolingParameter::MergePartialFromCodedStream(
}
else
{
goto
handle_unusual
;
}
if
(
input
->
ExpectTag
(
104
))
goto
parse_ceil_mode
;
break
;
}
// optional bool ceil_mode = 13 [default = true];
case
13
:
{
if
(
tag
==
104
)
{
parse_ceil_mode
:
set_has_ceil_mode
();
DO_
((
::
google
::
protobuf
::
internal
::
WireFormatLite
::
ReadPrimitive
<
bool
,
::
google
::
protobuf
::
internal
::
WireFormatLite
::
TYPE_BOOL
>
(
input
,
&
ceil_mode_
)));
}
else
{
goto
handle_unusual
;
}
if
(
input
->
ExpectAtEnd
())
goto
success
;
break
;
}
...
...
@@ -37801,6 +37823,11 @@ void PoolingParameter::SerializeWithCachedSizes(
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteBool
(
12
,
this
->
global_pooling
(),
output
);
}
// optional bool ceil_mode = 13 [default = true];
if
(
has_ceil_mode
())
{
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteBool
(
13
,
this
->
ceil_mode
(),
output
);
}
if
(
_internal_metadata_
.
have_unknown_fields
())
{
::
google
::
protobuf
::
internal
::
WireFormat
::
SerializeUnknownFields
(
unknown_fields
(),
output
);
...
...
@@ -37874,6 +37901,11 @@ void PoolingParameter::SerializeWithCachedSizes(
target
=
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteBoolToArray
(
12
,
this
->
global_pooling
(),
target
);
}
// optional bool ceil_mode = 13 [default = true];
if
(
has_ceil_mode
())
{
target
=
::
google
::
protobuf
::
internal
::
WireFormatLite
::
WriteBoolToArray
(
13
,
this
->
ceil_mode
(),
target
);
}
if
(
_internal_metadata_
.
have_unknown_fields
())
{
target
=
::
google
::
protobuf
::
internal
::
WireFormat
::
SerializeUnknownFieldsToArray
(
unknown_fields
(),
target
);
...
...
@@ -37943,7 +37975,7 @@ size_t PoolingParameter::ByteSizeLong() const {
}
}
if
(
_has_bits_
[
8
/
32
]
&
3840
u
)
{
if
(
_has_bits_
[
8
/
32
]
&
7936
u
)
{
// optional uint32 stride_h = 7;
if
(
has_stride_h
())
{
total_size
+=
1
+
...
...
@@ -37969,6 +38001,11 @@ size_t PoolingParameter::ByteSizeLong() const {
total_size
+=
1
+
1
;
}
// optional bool ceil_mode = 13 [default = true];
if
(
has_ceil_mode
())
{
total_size
+=
1
+
1
;
}
}
if
(
_internal_metadata_
.
have_unknown_fields
())
{
total_size
+=
...
...
@@ -38047,6 +38084,9 @@ void PoolingParameter::UnsafeMergeFrom(const PoolingParameter& from) {
if
(
from
.
has_global_pooling
())
{
set_global_pooling
(
from
.
global_pooling
());
}
if
(
from
.
has_ceil_mode
())
{
set_ceil_mode
(
from
.
ceil_mode
());
}
}
if
(
from
.
_internal_metadata_
.
have_unknown_fields
())
{
::
google
::
protobuf
::
UnknownFieldSet
::
MergeToInternalMetdata
(
...
...
@@ -38090,6 +38130,7 @@ void PoolingParameter::InternalSwap(PoolingParameter* other) {
std
::
swap
(
stride_w_
,
other
->
stride_w_
);
std
::
swap
(
engine_
,
other
->
engine_
);
std
::
swap
(
global_pooling_
,
other
->
global_pooling_
);
std
::
swap
(
ceil_mode_
,
other
->
ceil_mode_
);
std
::
swap
(
_has_bits_
[
0
],
other
->
_has_bits_
[
0
]);
_internal_metadata_
.
Swap
(
&
other
->
_internal_metadata_
);
std
::
swap
(
_cached_size_
,
other
->
_cached_size_
);
...
...
@@ -38396,6 +38437,30 @@ void PoolingParameter::set_global_pooling(bool value) {
// @@protoc_insertion_point(field_set:caffe.PoolingParameter.global_pooling)
}
// optional bool ceil_mode = 13 [default = true];
bool
PoolingParameter
::
has_ceil_mode
()
const
{
return
(
_has_bits_
[
0
]
&
0x00001000u
)
!=
0
;
}
void
PoolingParameter
::
set_has_ceil_mode
()
{
_has_bits_
[
0
]
|=
0x00001000u
;
}
void
PoolingParameter
::
clear_has_ceil_mode
()
{
_has_bits_
[
0
]
&=
~
0x00001000u
;
}
void
PoolingParameter
::
clear_ceil_mode
()
{
ceil_mode_
=
true
;
clear_has_ceil_mode
();
}
bool
PoolingParameter
::
ceil_mode
()
const
{
// @@protoc_insertion_point(field_get:caffe.PoolingParameter.ceil_mode)
return
ceil_mode_
;
}
void
PoolingParameter
::
set_ceil_mode
(
bool
value
)
{
set_has_ceil_mode
();
ceil_mode_
=
value
;
// @@protoc_insertion_point(field_set:caffe.PoolingParameter.ceil_mode)
}
inline
const
PoolingParameter
*
PoolingParameter
::
internal_default_instance
()
{
return
&
PoolingParameter_default_instance_
.
get
();
}
This diff is collapsed.
Click to expand it.
modules/dnn/misc/caffe/caffe.pb.h
View file @
5384d2f0
...
...
@@ -9035,6 +9035,13 @@ class PoolingParameter : public ::google::protobuf::Message /* @@protoc_insertio
bool
global_pooling
()
const
;
void
set_global_pooling
(
bool
value
);
// optional bool ceil_mode = 13 [default = true];
bool
has_ceil_mode
()
const
;
void
clear_ceil_mode
();
static
const
int
kCeilModeFieldNumber
=
13
;
bool
ceil_mode
()
const
;
void
set_ceil_mode
(
bool
value
);
// @@protoc_insertion_point(class_scope:caffe.PoolingParameter)
private
:
inline
void
set_has_pool
();
...
...
@@ -9061,6 +9068,8 @@ class PoolingParameter : public ::google::protobuf::Message /* @@protoc_insertio
inline
void
clear_has_engine
();
inline
void
set_has_global_pooling
();
inline
void
clear_has_global_pooling
();
inline
void
set_has_ceil_mode
();
inline
void
clear_has_ceil_mode
();
::
google
::
protobuf
::
internal
::
InternalMetadataWithArena
_internal_metadata_
;
::
google
::
protobuf
::
internal
::
HasBits
<
1
>
_has_bits_
;
...
...
@@ -9077,6 +9086,7 @@ class PoolingParameter : public ::google::protobuf::Message /* @@protoc_insertio
int
engine_
;
bool
global_pooling_
;
::
google
::
protobuf
::
uint32
stride_
;
bool
ceil_mode_
;
friend
void
protobuf_InitDefaults_caffe_2eproto_impl
();
friend
void
protobuf_AddDesc_caffe_2eproto_impl
();
friend
void
protobuf_AssignDesc_caffe_2eproto
();
...
...
@@ -23544,6 +23554,30 @@ inline void PoolingParameter::set_global_pooling(bool value) {
// @@protoc_insertion_point(field_set:caffe.PoolingParameter.global_pooling)
}
// optional bool ceil_mode = 13 [default = true];
inline
bool
PoolingParameter
::
has_ceil_mode
()
const
{
return
(
_has_bits_
[
0
]
&
0x00001000u
)
!=
0
;
}
inline
void
PoolingParameter
::
set_has_ceil_mode
()
{
_has_bits_
[
0
]
|=
0x00001000u
;
}
inline
void
PoolingParameter
::
clear_has_ceil_mode
()
{
_has_bits_
[
0
]
&=
~
0x00001000u
;
}
inline
void
PoolingParameter
::
clear_ceil_mode
()
{
ceil_mode_
=
true
;
clear_has_ceil_mode
();
}
inline
bool
PoolingParameter
::
ceil_mode
()
const
{
// @@protoc_insertion_point(field_get:caffe.PoolingParameter.ceil_mode)
return
ceil_mode_
;
}
inline
void
PoolingParameter
::
set_ceil_mode
(
bool
value
)
{
set_has_ceil_mode
();
ceil_mode_
=
value
;
// @@protoc_insertion_point(field_set:caffe.PoolingParameter.ceil_mode)
}
inline
const
PoolingParameter
*
PoolingParameter
::
internal_default_instance
()
{
return
&
PoolingParameter_default_instance_
.
get
();
}
This diff is collapsed.
Click to expand it.
modules/dnn/src/caffe/caffe.proto
View file @
5384d2f0
...
...
@@ -1093,6 +1093,9 @@ message PoolingParameter {
// If global_pooling then it will pool over the size of the bottom by doing
// kernel_h = bottom->height and kernel_w = bottom->width
optional
bool
global_pooling
=
12
[
default
=
false
];
// Specify floor/ceil mode
// source: https://github.com/BVLC/caffe/pull/3057
optional
bool
ceil_mode
=
13
[
default
=
true
];
}
message
PowerParameter
{
...
...
This diff is collapsed.
Click to expand it.
modules/dnn/test/test_caffe_importer.cpp
View file @
5384d2f0
...
...
@@ -234,4 +234,21 @@ TEST(Reproducibility_Colorization, Accuracy)
normAssert
(
out
,
ref
,
""
,
l1
,
lInf
);
}
TEST
(
Reproducibility_DenseNet_121
,
Accuracy
)
{
const
string
proto
=
findDataFile
(
"dnn/DenseNet_121.prototxt"
,
false
);
const
string
model
=
findDataFile
(
"dnn/DenseNet_121.caffemodel"
,
false
);
Mat
inp
=
imread
(
_tf
(
"dog416.png"
));
inp
=
blobFromImage
(
inp
,
1.0
/
255
,
Size
(
224
,
224
));
Mat
ref
=
blobFromNPY
(
_tf
(
"densenet_121_output.npy"
));
Net
net
=
readNetFromCaffe
(
proto
,
model
);
net
.
setInput
(
inp
);
Mat
out
=
net
.
forward
();
normAssert
(
out
,
ref
);
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment