Browse Source

!1019 fix the bug when const value is 0

From: @yelihua
Reviewed-by: @lilongfei15,@wenkai_dist
Signed-off-by: @wenkai_dist
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
edcd285d18
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindinsight/debugger/stream_cache/tensor.py

+ 1
- 1
mindinsight/debugger/stream_cache/tensor.py View File

@@ -297,7 +297,7 @@ class ConstTensor(BaseTensor):
if field_obj.name != 'dtype':
tensor_value = field_value
break
if tensor_value and self.dtype != self._STRING_TYPE:
if tensor_value is not None and self.dtype != self._STRING_TYPE:
tensor_value = np.array(tensor_value, dtype=NUMPY_TYPE_MAP.get(self.dtype))
return tensor_value



Loading…
Cancel
Save