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
3b578db4
Commit
3b578db4
authored
Jul 26, 2018
by
Robert Kimball
Committed by
Scott Cyphers
Jul 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change function to take reference rather than shared_ptr (#1238)
parent
f78133d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
batch_norm.cpp
src/ngraph/op/batch_norm.cpp
+1
-1
get_output_element.cpp
src/ngraph/op/get_output_element.cpp
+3
-3
get_output_element.hpp
src/ngraph/op/get_output_element.hpp
+1
-1
No files found.
src/ngraph/op/batch_norm.cpp
View file @
3b578db4
...
...
@@ -267,7 +267,7 @@ void ngraph::op::BatchNorm::generate_adjoints(autodiff::Adjoints& adjoints,
//Please see `add_output` in `BatchNorm::BatchNorm` for more details
if
(
this
->
get_training_flag
()
&&
get_input_size
()
==
3
)
{
auto
goes
=
op
::
get_output_elements
(
this
->
shared_from_this
()
);
auto
goes
=
op
::
get_output_elements
(
*
this
);
mean
=
goes
.
at
(
1
);
var
=
goes
.
at
(
2
);
}
...
...
src/ngraph/op/get_output_element.cpp
View file @
3b578db4
...
...
@@ -54,11 +54,11 @@ void op::GetOutputElement::generate_adjoints(autodiff::Adjoints& adjoints, const
adjoints
.
add_delta
(
get_inputs
().
at
(
0
).
get_output
().
get_node
(),
delta
,
get_n
());
}
NodeVector
op
::
get_output_elements
(
const
std
::
shared_ptr
<
Node
>
&
mon
)
NodeVector
op
::
get_output_elements
(
const
Node
&
mon
)
{
NodeVector
goes
(
mon
->
get_outputs
().
size
());
NodeVector
goes
(
mon
.
get_outputs
().
size
());
for
(
auto
goe_input
:
mon
->
get_output_inputs
(
0
))
for
(
auto
goe_input
:
mon
.
get_output_inputs
(
0
))
{
auto
goe
=
std
::
dynamic_pointer_cast
<
op
::
GetOutputElement
>
(
goe_input
->
get_node
());
goes
.
at
(
goe
->
get_n
())
=
goe_input
->
get_node
();
...
...
src/ngraph/op/get_output_element.hpp
View file @
3b578db4
...
...
@@ -22,7 +22,7 @@ namespace ngraph
{
namespace
op
{
NodeVector
get_output_elements
(
const
std
::
shared_ptr
<
Node
>
&
mon
);
NodeVector
get_output_elements
(
const
Node
&
mon
);
/// \brief Operation to get an output from a node.
class
GetOutputElement
:
public
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