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
eaa85e1c
Commit
eaa85e1c
authored
Oct 17, 2018
by
Matthew Brookhart
Committed by
Scott Cyphers
Oct 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some fixes to speed up RN50 training (#1840)
parent
ab28a4a1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
adjoints.cpp
src/ngraph/autodiff/adjoints.cpp
+10
-2
relu.cpp
src/ngraph/op/relu.cpp
+1
-1
No files found.
src/ngraph/autodiff/adjoints.cpp
View file @
eaa85e1c
...
...
@@ -45,9 +45,17 @@ std::shared_ptr<Node> make_zero(const std::shared_ptr<Node>& node)
NodeVector
make_zeros
(
std
::
shared_ptr
<
Node
>
x
)
{
NodeVector
zeros
;
for
(
size_t
i
=
0
;
i
<
x
->
get_outputs
().
size
();
++
i
)
if
(
x
->
get_outputs
().
size
()
>
1
)
{
zeros
.
push_back
(
make_zero
(
get_output_element
(
x
,
i
)));
auto
goes
=
op
::
get_output_elements
(
x
);
for
(
size_t
i
=
0
;
i
<
goes
.
size
();
++
i
)
{
zeros
.
push_back
(
make_zero
(
goes
.
at
(
i
)));
}
}
else
{
zeros
.
push_back
(
make_zero
(
x
));
}
return
zeros
;
}
...
...
src/ngraph/op/relu.cpp
View file @
eaa85e1c
...
...
@@ -48,6 +48,6 @@ void op::Relu::generate_adjoints(autodiff::Adjoints& adjoints, const NodeVector&
{
auto
delta
=
deltas
.
at
(
0
);
auto
backprop
=
make_shared
<
op
::
ReluBackprop
>
(
get_argument
(
0
),
delta
);
auto
backprop
=
make_shared
<
op
::
ReluBackprop
>
(
shared_from_this
(
),
delta
);
adjoints
.
add_delta
(
get_argument
(
0
),
backprop
);
}
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