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
deae83d7
Commit
deae83d7
authored
May 21, 2019
by
Adam Rogowiec
Committed by
arogowie-intel
May 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more doc to ActivationFunction.
parent
714fc13a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
activation_functions.cpp
src/ngraph/op/util/activation_functions.cpp
+1
-0
activation_functions.hpp
src/ngraph/op/util/activation_functions.hpp
+9
-0
No files found.
src/ngraph/op/util/activation_functions.cpp
View file @
deae83d7
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include <cmath>
#include <cmath>
#include <functional>
#include <functional>
#include <iterator>
#include <iterator>
#include <memory>
#include <unordered_map>
#include <unordered_map>
#include "activation_functions.hpp"
#include "activation_functions.hpp"
...
...
src/ngraph/op/util/activation_functions.hpp
View file @
deae83d7
...
@@ -73,6 +73,9 @@ namespace ngraph
...
@@ -73,6 +73,9 @@ namespace ngraph
float
,
float
,
float
);
float
);
///
/// \brief Class representing activation function used in RNN cells.
///
class
ActivationFunction
class
ActivationFunction
{
{
public
:
public
:
...
@@ -80,13 +83,19 @@ namespace ngraph
...
@@ -80,13 +83,19 @@ namespace ngraph
ActivationFunction
(
ActivationFunctionType
f
,
float
alpha
);
ActivationFunction
(
ActivationFunctionType
f
,
float
alpha
);
ActivationFunction
(
ActivationFunctionType
f
);
ActivationFunction
(
ActivationFunctionType
f
);
///
/// \brief Calls stored activation function with provided node argument.
///
std
::
shared_ptr
<
Node
>
operator
()(
const
std
::
shared_ptr
<
Node
>&
arg
)
const
;
std
::
shared_ptr
<
Node
>
operator
()(
const
std
::
shared_ptr
<
Node
>&
arg
)
const
;
void
set_alpha
(
float
alpha
)
{
m_alpha
=
alpha
;
}
void
set_alpha
(
float
alpha
)
{
m_alpha
=
alpha
;
}
void
set_beta
(
float
beta
)
{
m_beta
=
beta
;
}
void
set_beta
(
float
beta
)
{
m_beta
=
beta
;
}
private
:
private
:
/// \brief Activation function wrapper.
ActivationFunctionType
m_function
;
ActivationFunctionType
m_function
;
/// \brief Activation function alpha parameter (may be unused).
float
m_alpha
;
float
m_alpha
;
/// \brief Activation function beta parameter (may be unused).
float
m_beta
;
float
m_beta
;
};
};
...
...
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