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
7e5b5390
Commit
7e5b5390
authored
Jan 22, 2020
by
Liubov Batanina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix comments
parent
35c24480
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
all_layers.hpp
modules/dnn/include/opencv2/dnn/all_layers.hpp
+1
-1
tf_importer.cpp
modules/dnn/src/tensorflow/tf_importer.cpp
+3
-3
No files found.
modules/dnn/include/opencv2/dnn/all_layers.hpp
View file @
7e5b5390
...
...
@@ -250,7 +250,7 @@ CV__DNN_EXPERIMENTAL_NS_BEGIN
std
::
vector
<
size_t
>
pads_begin
,
pads_end
;
CV_DEPRECATED_EXTERNAL
Size
kernel
,
stride
,
pad
;
CV_DEPRECATED_EXTERNAL
int
pad_l
,
pad_t
,
pad_r
,
pad_b
;
CV_DEPRECATED_EXTERNAL
bool
globalPooling
;
//!< Flag is true if at least one of the axes is global pooled.
bool
globalPooling
;
//!< Flag is true if at least one of the axes is global pooled.
std
::
vector
<
bool
>
isGlobalPooling
;
bool
computeMaxIdx
;
String
padMode
;
...
...
modules/dnn/src/tensorflow/tf_importer.cpp
View file @
7e5b5390
...
...
@@ -2054,12 +2054,11 @@ void TFImporter::populateNet(Net dstNet)
int
num
=
(
int
)
getLayerAttr
(
layer
,
"N"
).
i
();
CV_Assert
(
layer
.
input_size
()
==
num
);
std
::
string
base_name
=
name
+
"/reshape_"
;
std
::
vector
<
std
::
string
>
reshape_name
s
;
std
::
vector
<
int
>
reshape_id
s
;
for
(
int
i
=
0
;
i
<
num
;
i
++
)
{
std
::
ostringstream
ss
;
ss
<<
i
;
std
::
string
reshape_name
=
base_name
+
ss
.
str
();
reshape_names
.
push_back
(
reshape_name
);
LayerParams
reshapeLP
;
reshapeLP
.
set
(
"axis"
,
dim
);
reshapeLP
.
set
(
"num_axes"
,
1
);
...
...
@@ -2067,6 +2066,7 @@ void TFImporter::populateNet(Net dstNet)
reshapeLP
.
set
(
"dim"
,
DictValue
::
arrayInt
(
&
outShape
[
0
],
2
));
int
id
=
dstNet
.
addLayer
(
reshape_name
,
"Reshape"
,
reshapeLP
);
layer_id
[
reshape_name
]
=
id
;
reshape_ids
.
push_back
(
id
);
connect
(
layer_id
,
dstNet
,
parsePin
(
layer
.
input
(
i
)),
id
,
0
);
}
...
...
@@ -2075,7 +2075,7 @@ void TFImporter::populateNet(Net dstNet)
layer_id
[
name
]
=
id
;
for
(
int
li
=
0
;
li
<
num
;
li
++
)
connect
(
layer_id
,
dstNet
,
Pin
(
reshape_names
[
li
])
,
id
,
li
);
dstNet
.
connect
(
reshape_ids
[
li
],
0
,
id
,
li
);
}
else
if
(
type
==
"ClipByValue"
)
{
...
...
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