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:
[email protected]


Reply via email to