Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
cd717dea
Commit
cd717dea
authored
Nov 01, 2019
by
Kim
Committed by
Tianqi Chen
Nov 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ Relay ][ Frontend ][ Tensorflow ]add op add_n to relay/frontend/tensorflow.py (#4181)
parent
bafc675c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
docs/frontend/tensorflow.rst
+1
-0
python/tvm/relay/frontend/tensorflow.py
+13
-0
tests/python/frontend/tensorflow/test_forward.py
+0
-0
No files found.
docs/frontend/tensorflow.rst
View file @
cd717dea
...
...
@@ -115,6 +115,7 @@ Supported Ops
- Abs
- Add
- AddN
- All
- Any
- ArgMax
...
...
python/tvm/relay/frontend/tensorflow.py
View file @
cd717dea
...
...
@@ -1318,6 +1318,18 @@ def _size():
return
AttrCvt
(
'ndarray_size'
,
transforms
=
{
'out_type'
:
'dtype'
})(
inputs
,
new_attr
)
return
_impl
def
_add_n
():
def
_impl
(
inputs
,
attr
,
params
):
if
not
isinstance
(
inputs
,
tuple
):
inputs
=
list
(
inputs
)
assert
len
(
inputs
)
>
0
,
"add_n take >=1 inputs, but 0 given."
_res
=
inputs
[
0
]
for
each
in
inputs
[
1
:]:
_res
=
_op
.
add
(
_res
,
each
)
return
_res
return
_impl
# compatible operators that do NOT require any conversion.
_identity_list
=
[]
...
...
@@ -1329,6 +1341,7 @@ _identity_list = []
_convert_map
=
{
'Abs'
:
AttrCvt
(
'abs'
),
'Add'
:
_elemwise
(
'add'
),
'AddN'
:
_add_n
(),
'All'
:
_reduce
(
'all'
),
'Any'
:
_reduce
(
'any'
),
'ArgMax'
:
_argx
(
_op
.
argmax
,
'argmax'
),
...
...
tests/python/frontend/tensorflow/test_forward.py
View file @
cd717dea
This diff is collapsed.
Click to expand it.
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