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
ba6f194b
Commit
ba6f194b
authored
Apr 29, 2019
by
Jared Roesch
Committed by
Tianqi Chen
Apr 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug in ONNX importer (#3084)
parent
a706ad16
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
python/tvm/relay/frontend/onnx.py
+4
-1
tests/python/frontend/onnx/test_forward.py
+7
-2
No files found.
python/tvm/relay/frontend/onnx.py
View file @
ba6f194b
...
...
@@ -944,7 +944,10 @@ class GraphProto(object):
dtype
=
self
.
_params
[
i_name
]
.
dtype
)
else
:
self
.
_num_input
+=
1
tshape
=
self
.
_shape
[
i_name
]
if
i_name
in
self
.
_shape
else
()
if
i_name
in
self
.
_shape
:
tshape
=
self
.
_shape
[
i_name
]
else
:
raise
ValueError
(
"Must provide an input shape for `{0}`."
.
format
(
i_name
))
if
isinstance
(
self
.
_dtype
,
dict
):
dtype
=
self
.
_dtype
[
i_name
]
if
i_name
in
self
.
_dtype
else
d_type
else
:
...
...
tests/python/frontend/onnx/test_forward.py
View file @
ba6f194b
...
...
@@ -724,10 +724,15 @@ def verify_constantfill(is_shape, input_dim, out_dim, value, dtype, **kwargs):
else
:
fill_node
=
helper
.
make_node
(
"ConstantFill"
,
[
"input_a"
],
[
"out"
],
value
=
value
,
dtype
=
dtype
,
**
kwargs
)
if
is_shape
==
True
:
inputs
=
[]
else
:
inputs
=
[
helper
.
make_tensor_value_info
(
"input_a"
,
TensorProto
.
FLOAT
,
list
(
input_dim
))]
graph
=
helper
.
make_graph
([
fill_node
],
"fill_test"
,
inputs
=
[
helper
.
make_tensor_value_info
(
"input_a"
,
TensorProto
.
FLOAT
,
list
(
input_dim
))],
inputs
,
outputs
=
[
helper
.
make_tensor_value_info
(
"out"
,
TensorProto
.
FLOAT
,
list
(
out
.
shape
))])
...
...
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