Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
6ab593ec
Unverified
Commit
6ab593ec
authored
Aug 28, 2019
by
Da Zheng
Committed by
GitHub
Aug 28, 2019
Browse files
throw an error when using with mxnet < 1.5. (#767)
parent
1c9c0339
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
python/dgl/backend/mxnet/tensor.py
python/dgl/backend/mxnet/tensor.py
+5
-3
No files found.
python/dgl/backend/mxnet/tensor.py
View file @
6ab593ec
...
...
@@ -12,10 +12,12 @@ from ... import kernel as K
from
...function.base
import
TargetCode
MX_VERSION
=
LooseVersion
(
mx
.
__version__
)
if
MX_VERSION
.
version
[
0
]
==
1
and
MX_VERSION
.
version
[
1
]
<
5
:
raise
Exception
(
"DGL has to work with MXNet version >= 1.5"
)
# After MXNet 1.5, empty tensors aren't supprted by default.
# after we turn on the numpy compatible flag, MXNet supports empty NDArray.
if
MX_VERSION
.
version
[
0
]
==
1
and
MX_VERSION
.
version
[
1
]
>=
5
:
mx
.
set_np_shape
(
True
)
# After we turn on the numpy compatible flag, MXNet supports empty NDArray.
mx
.
set_np_shape
(
True
)
def
data_type_dict
():
return
{
'float16'
:
np
.
float16
,
...
...
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