From 1e40e0c0c50447ab47d936b018ec217133e71875 Mon Sep 17 00:00:00 2001 From: Alexander Pivovarov <apivovarov@gmail.com> Date: Mon, 10 Dec 2018 22:02:58 -0800 Subject: [PATCH] Allow long type values in shape list (#1806) * Allow long type values in shape list * Update build_module.py --- nnvm/python/nnvm/compiler/build_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nnvm/python/nnvm/compiler/build_module.py b/nnvm/python/nnvm/compiler/build_module.py index 6fab4460b..b04d49478 100644 --- a/nnvm/python/nnvm/compiler/build_module.py +++ b/nnvm/python/nnvm/compiler/build_module.py @@ -251,8 +251,8 @@ def build(graph, target=None, shape=None, dtype="float32", if not isinstance(shape, dict): raise TypeError("require shape to be dict") for value in shape.values(): - if not all(isinstance(x, int) for x in value): - raise TypeError("shape value must be int iterator") + if not all(isinstance(x, tvm._ffi.base.integer_types) for x in value): + raise TypeError("shape value must be Integer types iterator") cfg = BuildConfig.current graph = graph if isinstance(graph, _graph.Graph) else _graph.create(graph) -- GitLab