Browse Source

!1017 fix the bug about getting wrong const scalar value

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

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

@@ -293,8 +293,8 @@ class ConstTensor(BaseTensor):
if len(fields) != 2:
log.warning("Unexpected const proto <%s>.\n Please check offline.", tensor_proto)
tensor_value = None
for field_name, field_value in fields:
if field_name != 'dtype':
for field_obj, field_value in fields:
if field_obj.name != 'dtype':
tensor_value = field_value
break
if tensor_value and self.dtype != self._STRING_TYPE:


Loading…
Cancel
Save