You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/07/29 07:59:21 UTC

[GitHub] [incubator-tvm] sleepwalker2017 commented on a change in pull request #6159: [Relay][TF][BugFix] when converting constant nodes with types of int64 or float64

sleepwalker2017 commented on a change in pull request #6159:
URL: https://github.com/apache/incubator-tvm/pull/6159#discussion_r462082512



##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -2835,7 +2835,7 @@ def _parse_param(self, key, value, name, shape):
 
             array_ndim = len(np_array.shape)
             if array_ndim == 0:
-                self._nodes[name] = [tvm.relay.const(np_array)]
+                self._nodes[name] = [tvm.relay.const(np_array, np_array.dtype)]

Review comment:
       For non-scalar cases, it goes to self._params[name] = tvm.nd.array(np_array).
   Seems the tvm.nd.array function doesn't have a default dtype, it always gets dtype from np_array. While tvm.relay.const has a default param dtype set to None.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org