Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
2abf45d1
Commit
2abf45d1
authored
May 26, 2017
by
Dmitry Kurtaev
Committed by
Vadim Pisarevsky
May 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made some deep learning layers params are public (#1134)
parent
78fabfe6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
10 deletions
+21
-10
all_layers.hpp
modules/dnn/include/opencv2/dnn/all_layers.hpp
+13
-0
batch_norm_layer.cpp
modules/dnn/src/layers/batch_norm_layer.cpp
+0
-3
blank_layer.cpp
modules/dnn/src/layers/blank_layer.cpp
+4
-1
elementwise_layers.cpp
modules/dnn/src/layers/elementwise_layers.cpp
+4
-0
max_unpooling_layer.cpp
modules/dnn/src/layers/max_unpooling_layer.cpp
+0
-4
scale_layer.cpp
modules/dnn/src/layers/scale_layer.cpp
+0
-2
No files found.
modules/dnn/include/opencv2/dnn/all_layers.hpp
View file @
2abf45d1
...
...
@@ -329,6 +329,8 @@ namespace dnn
class
CV_EXPORTS
ReLULayer
:
public
Layer
{
public
:
float
negativeSlope
;
static
Ptr
<
ReLULayer
>
create
(
const
LayerParams
&
params
);
};
...
...
@@ -365,6 +367,8 @@ namespace dnn
class
CV_EXPORTS
PowerLayer
:
public
Layer
{
public
:
float
power
,
scale
,
shift
;
static
Ptr
<
PowerLayer
>
create
(
const
LayerParams
&
params
);
};
...
...
@@ -395,18 +399,27 @@ namespace dnn
class
CV_EXPORTS
BatchNormLayer
:
public
Layer
{
public
:
bool
hasWeights
,
hasBias
;
float
epsilon
;
static
Ptr
<
BatchNormLayer
>
create
(
const
LayerParams
&
params
);
};
class
CV_EXPORTS
MaxUnpoolLayer
:
public
Layer
{
public
:
Size
poolKernel
;
Size
poolPad
;
Size
poolStride
;
static
Ptr
<
MaxUnpoolLayer
>
create
(
const
LayerParams
&
params
);
};
class
CV_EXPORTS
ScaleLayer
:
public
Layer
{
public
:
bool
hasBias
;
static
Ptr
<
ScaleLayer
>
create
(
const
LayerParams
&
params
);
};
...
...
modules/dnn/src/layers/batch_norm_layer.cpp
View file @
2abf45d1
...
...
@@ -91,9 +91,6 @@ public:
}
return
flops
;
}
bool
hasWeights
,
hasBias
;
float
epsilon
;
};
Ptr
<
BatchNormLayer
>
BatchNormLayer
::
create
(
const
LayerParams
&
params
)
...
...
modules/dnn/src/layers/blank_layer.cpp
View file @
2abf45d1
...
...
@@ -47,7 +47,10 @@ namespace dnn
class
BlankLayerImpl
:
public
BlankLayer
{
public
:
BlankLayerImpl
(
const
LayerParams
&
)
{}
BlankLayerImpl
(
const
LayerParams
&
params
)
{
setParamsFrom
(
params
);
}
bool
getMemoryShapes
(
const
std
::
vector
<
MatShape
>
&
inputs
,
const
int
requiredOutputs
,
...
...
modules/dnn/src/layers/elementwise_layers.cpp
View file @
2abf45d1
...
...
@@ -261,6 +261,7 @@ Ptr<ReLULayer> ReLULayer::create(const LayerParams& params)
float
negativeSlope
=
params
.
get
<
float
>
(
"negative_slope"
,
0.
f
);
Ptr
<
ReLULayer
>
l
(
new
ElementWiseLayer
<
ReLUFunctor
>
(
true
,
ReLUFunctor
(
negativeSlope
)));
l
->
setParamsFrom
(
params
);
l
->
negativeSlope
=
negativeSlope
;
return
l
;
}
...
...
@@ -306,6 +307,9 @@ Ptr<PowerLayer> PowerLayer::create(const LayerParams& params)
(
PowerLayer
*
)(
new
ElementWiseLayer
<
PowerFunctor1
>
(
false
,
PowerFunctor1
(
scale
,
shift
)))
:
(
PowerLayer
*
)(
new
ElementWiseLayer
<
PowerFunctor
>
(
true
,
PowerFunctor
(
power
,
scale
,
shift
))));
l
->
setParamsFrom
(
params
);
l
->
power
=
power
;
l
->
scale
=
scale
;
l
->
shift
=
shift
;
return
l
;
}
...
...
modules/dnn/src/layers/max_unpooling_layer.cpp
View file @
2abf45d1
...
...
@@ -81,10 +81,6 @@ public:
}
}
}
Size
poolKernel
;
Size
poolPad
;
Size
poolStride
;
};
Ptr
<
MaxUnpoolLayer
>
MaxUnpoolLayer
::
create
(
const
LayerParams
&
params
)
...
...
modules/dnn/src/layers/scale_layer.cpp
View file @
2abf45d1
...
...
@@ -67,8 +67,6 @@ public:
}
return
flops
;
}
bool
hasBias
;
};
...
...
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