Browse Source

fix the bug of getting const scalar value

tags/v1.1.0
yelihua 5 years ago
parent
commit
489481ebe9
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: if len(fields) != 2:
log.warning("Unexpected const proto <%s>.\n Please check offline.", tensor_proto) log.warning("Unexpected const proto <%s>.\n Please check offline.", tensor_proto)
tensor_value = None 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 tensor_value = field_value
break break
if tensor_value and self.dtype != self._STRING_TYPE: if tensor_value and self.dtype != self._STRING_TYPE:


Loading…
Cancel
Save