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
83b3a352
Commit
83b3a352
authored
Mar 27, 2018
by
tsocha
Committed by
Scott Cyphers
Mar 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Py] Enable Softmax op (#749)
parent
c60a0e4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
__init__.py
python/ngraph/__init__.py
+1
-0
ops.py
python/ngraph/ops.py
+9
-1
No files found.
python/ngraph/__init__.py
View file @
83b3a352
...
...
@@ -52,6 +52,7 @@ from ngraph.ops import parameter
from
ngraph.ops
import
prod
from
ngraph.ops
import
reshape
from
ngraph.ops
import
slice
from
ngraph.ops
import
softmax
from
ngraph.ops
import
sqrt
from
ngraph.ops
import
subtract
from
ngraph.ops
import
sum
...
...
python/ngraph/ops.py
View file @
83b3a352
...
...
@@ -23,7 +23,7 @@ from ngraph.impl import AxisSet, AxisVector, Coordinate, CoordinateDiff, Node, N
from
ngraph.impl.op
import
Abs
,
Acos
,
Add
,
Asin
,
Atan
,
AvgPool
,
Broadcast
,
Ceiling
,
Concat
,
\
Constant
,
Convert
,
Convolution
,
Divide
,
Dot
,
Equal
,
Exp
,
Floor
,
Greater
,
GreaterEq
,
Less
,
\
LessEq
,
Log
,
Max
,
Maximum
,
MaxPool
,
Min
,
Minimum
,
Multiply
,
Negative
,
Not
,
NotEqual
,
Parameter
,
\
Product
,
Reshape
,
Slice
,
Sqrt
,
Subtract
,
Sum
,
Tanh
Product
,
Reshape
,
Slice
,
S
oftmax
,
S
qrt
,
Subtract
,
Sum
,
Tanh
from
typing
import
Iterable
,
List
...
...
@@ -421,3 +421,11 @@ def concat(nodes, axis): # type: (List[Node], int) -> Node
:return: Return new node that is a concatenation of input nodes.
"""
return
Concat
(
NodeVector
(
nodes
),
axis
)
@nameable_op
def
softmax
(
node
,
axes
):
# type: (Node, Iterable[int]) -> Node
"""Softmax operation on input tensor."""
if
type
(
axes
)
is
not
set
:
axes
=
set
(
axes
)
return
Softmax
(
node
,
AxisSet
(
axes
))
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