Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
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
ngraph
Commits
5bfb3cfb
Commit
5bfb3cfb
authored
Oct 29, 2019
by
Mateusz Bencer
Committed by
Scott Cyphers
Oct 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nom_priors in ProrBoxClustered removed (#3804)
parent
ccce8bb1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
15 deletions
+6
-15
prior_box_clustered.cpp
src/ngraph/op/experimental/layers/prior_box_clustered.cpp
+5
-11
prior_box_clustered.hpp
src/ngraph/op/experimental/layers/prior_box_clustered.hpp
+0
-2
type_prop_layers.cpp
test/type_prop_layers.cpp
+1
-2
No files found.
src/ngraph/op/experimental/layers/prior_box_clustered.cpp
View file @
5bfb3cfb
...
...
@@ -57,19 +57,12 @@ void op::PriorBoxClustered::validate_and_infer_types()
image_shape_rank
);
NODE_VALIDATION_CHECK
(
this
,
m_attrs
.
widths
.
size
()
==
m_attrs
.
num_priors
,
"
Num_priors
"
,
m_attrs
.
num_priors
,
m_attrs
.
widths
.
size
()
==
m_attrs
.
heights
.
size
()
,
"
Size of heights vector
"
,
m_attrs
.
widths
.
size
()
,
" doesn't match size of widths vector "
,
m_attrs
.
widths
.
size
());
NODE_VALIDATION_CHECK
(
this
,
m_attrs
.
heights
.
size
()
==
m_attrs
.
num_priors
,
"Num_priors "
,
m_attrs
.
num_priors
,
" doesn't match size of heights vector "
,
m_attrs
.
heights
.
size
());
set_input_is_relevant_to_shape
(
0
);
if
(
auto
const_shape
=
as_type_ptr
<
op
::
Constant
>
(
input_value
(
0
).
get_node_shared_ptr
()))
...
...
@@ -81,8 +74,9 @@ void op::PriorBoxClustered::validate_and_infer_types()
auto
layer_shape
=
const_shape
->
get_shape_val
();
// {Prior boxes, variances-adjusted prior boxes}
const
auto
num_priors
=
m_attrs
.
widths
.
size
();
set_output_type
(
0
,
element
::
f32
,
Shape
{
2
,
4
*
layer_shape
[
0
]
*
layer_shape
[
1
]
*
m_attrs
.
num_priors
});
0
,
element
::
f32
,
Shape
{
2
,
4
*
layer_shape
[
0
]
*
layer_shape
[
1
]
*
num_priors
});
}
else
{
...
...
src/ngraph/op/experimental/layers/prior_box_clustered.hpp
View file @
5bfb3cfb
...
...
@@ -24,7 +24,6 @@ namespace ngraph
{
struct
PriorBoxClusteredAttrs
{
// num_priors Number of prior boxes
// widths Desired widths of prior boxes
// heights Desired heights of prior boxes
// clip Clip output to [0,1]
...
...
@@ -32,7 +31,6 @@ namespace ngraph
// step_heights Distance between prior box centers
// offset Box offset relative to top center of image
// variances Values to adjust prior boxes with
size_t
num_priors
;
std
::
vector
<
float
>
widths
;
std
::
vector
<
float
>
heights
;
bool
clip
=
false
;
...
...
test/type_prop_layers.cpp
View file @
5bfb3cfb
...
...
@@ -113,14 +113,13 @@ TEST(type_prop_layers, prior_box3)
TEST
(
type_prop_layers
,
prior_box_clustered
)
{
op
::
PriorBoxClusteredAttrs
attrs
;
attrs
.
num_priors
=
3
;
attrs
.
widths
=
{
4.0
f
,
2.0
f
,
3.2
f
};
attrs
.
heights
=
{
1.0
f
,
2.0
f
,
1.1
f
};
auto
layer_shape
=
op
::
Constant
::
create
<
int64_t
>
(
element
::
i64
,
Shape
{
2
},
{
19
,
19
});
auto
image_shape
=
op
::
Constant
::
create
<
int64_t
>
(
element
::
i64
,
Shape
{
2
},
{
300
,
300
});
auto
pbc
=
make_shared
<
op
::
PriorBoxClustered
>
(
layer_shape
,
image_shape
,
attrs
);
// Output shape - 4 * 19 * 19 * 3 (
num_priors
)
// Output shape - 4 * 19 * 19 * 3 (
attrs.widths.size()
)
ASSERT_EQ
(
pbc
->
get_shape
(),
(
Shape
{
2
,
4332
}));
}
...
...
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