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
c2e60c6f
Commit
c2e60c6f
authored
Mar 05, 2019
by
Haichen Shen
Committed by
Leyuan Wang
Mar 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Relay][Frontend][Bugfix] Fix bug in converting slice_axis when axis is negative (#2739)
* bug fix * trigger ci
parent
fe060493
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
python/tvm/relay/frontend/mxnet.py
+3
-0
tests/python/frontend/mxnet/test_forward.py
+2
-2
No files found.
python/tvm/relay/frontend/mxnet.py
View file @
c2e60c6f
...
...
@@ -200,6 +200,9 @@ def _mx_slice_axis(inputs, attrs):
axis
=
attrs
.
get_int
(
"axis"
)
ax_beg
=
attrs
.
get_int
(
"begin"
)
ax_end
=
attrs
.
get_str
(
"end"
)
if
axis
<
0
:
axis
+=
len
(
shape
)
assert
axis
>=
0
and
axis
<
len
(
shape
)
if
ax_end
==
"None"
:
ax_end
=
int
(
shape
[
axis
])
else
:
...
...
tests/python/frontend/mxnet/test_forward.py
View file @
c2e60c6f
...
...
@@ -352,6 +352,7 @@ def test_forward_slice_axis():
verify
((
3
,
4
),
0
,
1
,
None
)
verify
((
3
,
4
),
1
,
0
,
2
)
verify
((
3
,
4
),
1
,
-
3
,
-
1
)
verify
((
3
,
4
),
-
1
,
-
3
,
-
1
)
if
__name__
==
'__main__'
:
...
...
@@ -380,4 +381,4 @@ if __name__ == '__main__':
test_forward_broadcast_ops
()
test_forward_elemwise_ops
()
test_forward_scalar_ops
()
test_forward_slice_axis
()
\ No newline at end of file
test_forward_slice_axis
()
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