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
2b96a485
Commit
2b96a485
authored
Feb 23, 2020
by
ashishiva3@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Darknet_io: Parsing for cost layer added
parent
e48ae883
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
darknet_io.cpp
modules/dnn/src/darknet/darknet_io.cpp
+4
-4
No files found.
modules/dnn/src/darknet/darknet_io.cpp
View file @
2b96a485
...
...
@@ -556,7 +556,7 @@ namespace cv {
const
size_t
layer_type_size
=
line
.
find
(
"]"
)
-
1
;
CV_Assert
(
layer_type_size
<
line
.
size
());
std
::
string
layer_type
=
line
.
substr
(
1
,
layer_type_size
);
net
->
layers_cfg
[
layers_counter
][
"type"
]
=
layer_type
;
net
->
layers_cfg
[
layers_counter
][
"
layer_
type"
]
=
layer_type
;
}
break
;
default
:
...
...
@@ -599,7 +599,7 @@ namespace cv {
for
(
it_type
i
=
net
->
layers_cfg
.
begin
();
i
!=
net
->
layers_cfg
.
end
();
++
i
)
{
++
layers_counter
;
std
::
map
<
std
::
string
,
std
::
string
>
&
layer_params
=
i
->
second
;
std
::
string
layer_type
=
layer_params
[
"type"
];
std
::
string
layer_type
=
layer_params
[
"
layer_
type"
];
if
(
layer_type
==
"convolutional"
)
{
...
...
@@ -682,7 +682,7 @@ namespace cv {
else
setParams
.
setConcat
(
layers_vec
.
size
(),
layers_vec
.
data
());
}
else
if
(
layer_type
==
"dropout"
)
else
if
(
layer_type
==
"dropout"
||
layer_type
==
"cost"
)
{
setParams
.
setIdentity
(
layers_counter
-
1
);
}
...
...
@@ -806,7 +806,7 @@ namespace cv {
++
darknet_layers_counter
;
++
cv_layers_counter
;
std
::
map
<
std
::
string
,
std
::
string
>
&
layer_params
=
i
->
second
;
std
::
string
layer_type
=
layer_params
[
"type"
];
std
::
string
layer_type
=
layer_params
[
"
layer_
type"
];
if
(
layer_type
==
"convolutional"
||
layer_type
==
"connected"
)
{
...
...
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