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
fb3f9e95
Commit
fb3f9e95
authored
Oct 26, 2018
by
Adam Procter
Committed by
Robert Kimball
Oct 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move SigmoidBackprop to BinaryElementwiseArithmetic (#1914)
parent
08483fbd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
sigmoid.cpp
src/ngraph/op/sigmoid.cpp
+3
-12
sigmoid.hpp
src/ngraph/op/sigmoid.hpp
+2
-1
No files found.
src/ngraph/op/sigmoid.cpp
View file @
fb3f9e95
...
...
@@ -28,24 +28,15 @@ shared_ptr<Node> op::Sigmoid::copy_with_new_args(const NodeVector& new_args) con
}
op
::
Sigmoid
::
Sigmoid
(
shared_ptr
<
Node
>
arg
)
:
UnaryElementwiseArithmetic
(
"Sigmoid"
,
{
arg
}
)
:
UnaryElementwiseArithmetic
(
"Sigmoid"
,
arg
)
{
set_output_type
(
0
,
arg
->
get_element_type
(),
arg
->
get_shape
());
constructor_validate_and_infer_types
();
}
op
::
SigmoidBackprop
::
SigmoidBackprop
(
shared_ptr
<
Node
>
arg
,
shared_ptr
<
Node
>
delta
)
:
Op
(
"SigmoidBackprop"
,
check_single_output_args
({
arg
,
delta
})
)
:
BinaryElementwiseArithmetic
(
"SigmoidBackprop"
,
arg
,
delta
)
{
NODE_VALIDATION_ASSERT
(
this
,
arg
->
get_element_type
()
==
delta
->
get_element_type
())
<<
"Argument and delta element types do not match (argument element type: "
<<
arg
->
get_element_type
()
<<
", delta element type: "
<<
delta
->
get_element_type
()
<<
")."
;
NODE_VALIDATION_ASSERT
(
this
,
arg
->
get_shape
()
==
delta
->
get_shape
())
<<
"Argument and delta shapes do not match (argument shape: "
<<
arg
->
get_shape
()
<<
", delta shape: "
<<
delta
->
get_shape
()
<<
")."
;
set_output_type
(
0
,
delta
->
get_element_type
(),
delta
->
get_shape
());
constructor_validate_and_infer_types
();
}
shared_ptr
<
Node
>
op
::
SigmoidBackprop
::
copy_with_new_args
(
const
NodeVector
&
new_args
)
const
...
...
src/ngraph/op/sigmoid.hpp
View file @
fb3f9e95
...
...
@@ -17,6 +17,7 @@
#pragma once
#include "ngraph/op/op.hpp"
#include "ngraph/op/util/binary_elementwise_arithmetic.hpp"
#include "ngraph/op/util/unary_elementwise_arithmetic.hpp"
#include "ngraph/util.hpp"
...
...
@@ -36,7 +37,7 @@ namespace ngraph
/// \brief Elementwise SigmoidBackprop operation.
///
class
SigmoidBackprop
:
public
Op
class
SigmoidBackprop
:
public
util
::
BinaryElementwiseArithmetic
{
public
:
/// \brief Constructs a SigmoidBackprop operation.
...
...
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