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
160b91bf
Commit
160b91bf
authored
Nov 29, 2019
by
Michał Karzyński
Committed by
Scott Cyphers
Nov 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Spec] Add 3-input constructor to DetectionOutput (#3966)
* Add 3-input constructor to DetectionOutput * Review comments
parent
f749c9d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
2 deletions
+41
-2
detection_output.cpp
src/ngraph/op/experimental/layers/detection_output.cpp
+30
-2
detection_output.hpp
src/ngraph/op/experimental/layers/detection_output.hpp
+11
-0
No files found.
src/ngraph/op/experimental/layers/detection_output.cpp
View file @
160b91bf
...
...
@@ -33,6 +33,16 @@ op::DetectionOutput::DetectionOutput(const Output<Node>& box_logits,
constructor_validate_and_infer_types
();
}
op
::
DetectionOutput
::
DetectionOutput
(
const
Output
<
Node
>&
box_logits
,
const
Output
<
Node
>&
class_preds
,
const
Output
<
Node
>&
proposals
,
const
DetectionOutputAttrs
&
attrs
)
:
Op
({
box_logits
,
class_preds
,
proposals
})
,
m_attrs
(
attrs
)
{
constructor_validate_and_infer_types
();
}
void
op
::
DetectionOutput
::
validate_and_infer_types
()
{
if
(
get_input_partial_shape
(
0
).
is_static
())
...
...
@@ -50,6 +60,24 @@ void op::DetectionOutput::validate_and_infer_types()
shared_ptr
<
Node
>
op
::
DetectionOutput
::
copy_with_new_args
(
const
NodeVector
&
new_args
)
const
{
check_new_args_count
(
this
,
new_args
);
return
make_shared
<
DetectionOutput
>
(
new_args
.
at
(
0
),
new_args
.
at
(
1
),
new_args
.
at
(
2
),
new_args
.
at
(
3
),
new_args
.
at
(
4
),
m_attrs
);
auto
num_args
=
new_args
.
size
();
NODE_VALIDATION_CHECK
(
this
,
num_args
==
3
||
num_args
==
5
,
"DetectionOutput accepts 3 or 5 inputs."
);
if
(
num_args
==
3
)
{
return
make_shared
<
DetectionOutput
>
(
new_args
.
at
(
0
),
new_args
.
at
(
1
),
new_args
.
at
(
2
),
m_attrs
);
}
else
{
return
make_shared
<
DetectionOutput
>
(
new_args
.
at
(
0
),
new_args
.
at
(
1
),
new_args
.
at
(
2
),
new_args
.
at
(
3
),
new_args
.
at
(
4
),
m_attrs
);
}
}
src/ngraph/op/experimental/layers/detection_output.hpp
View file @
160b91bf
...
...
@@ -67,6 +67,17 @@ namespace ngraph
const
Output
<
Node
>&
aux_box_preds
,
const
DetectionOutputAttrs
&
attrs
);
/// \brief Constructs a DetectionOutput operation
///
/// \param box_logits Box logits
/// \param class_preds Class predictions
/// \param proposals Proposals
/// \param attrs Detection Output attributes
DetectionOutput
(
const
Output
<
Node
>&
box_logits
,
const
Output
<
Node
>&
class_preds
,
const
Output
<
Node
>&
proposals
,
const
DetectionOutputAttrs
&
attrs
);
void
validate_and_infer_types
()
override
;
virtual
std
::
shared_ptr
<
Node
>
...
...
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