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
62d079fa
Commit
62d079fa
authored
6 years ago
by
Dmitry Kurtaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Normalize layer for Mac
parent
c9a76ede
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
normalize_bbox_layer.cpp
modules/dnn/src/layers/normalize_bbox_layer.cpp
+6
-10
No files found.
modules/dnn/src/layers/normalize_bbox_layer.cpp
View file @
62d079fa
...
...
@@ -275,13 +275,13 @@ public:
InferenceEngine
::
Blob
::
Ptr
weights
;
if
(
blobs
.
empty
())
{
auto
onesBlob
=
InferenceEngine
::
make_shared_blob
<
float
>
(
InferenceEngine
::
Precision
::
FP32
,
weights
=
InferenceEngine
::
make_shared_blob
<
float
>
(
InferenceEngine
::
Precision
::
FP32
,
InferenceEngine
::
Layout
::
C
,
{(
size_t
)
numChannels
});
onesBlob
->
allocate
();
std
::
vector
<
float
>
ones
(
numChannels
,
1
);
onesBlob
->
set
(
one
s
);
weights
=
onesBlob
;
weights
->
allocate
();
Mat
weightsMat
=
infEngineBlobToMat
(
weights
).
reshape
(
1
,
numChannel
s
);
Mat
(
numChannels
,
1
,
CV_32F
,
Scalar
(
1
)).
copyTo
(
weightsMat
)
;
l
.
getParameters
()[
"channel_shared"
]
=
false
;
}
else
...
...
@@ -290,11 +290,7 @@ public:
weights
=
wrapToInfEngineBlob
(
blobs
[
0
],
{(
size_t
)
numChannels
},
InferenceEngine
::
Layout
::
C
);
l
.
getParameters
()[
"channel_shared"
]
=
blobs
[
0
].
total
()
==
1
;
}
#if INF_ENGINE_VER_MAJOR_GE(INF_ENGINE_RELEASE_2019R1)
l
.
getParameters
()[
"weights"
]
=
weights
;
#else
l
.
addConstantData
(
"weights"
,
weights
);
#endif
addConstantData
(
"weights"
,
weights
,
l
);
l
.
getParameters
()[
"across_spatial"
]
=
acrossSpatial
;
return
Ptr
<
BackendNode
>
(
new
InfEngineBackendNode
(
l
));
}
...
...
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