diff --git a/mindinsight/debugger/stream_cache/node_type_identifier.py b/mindinsight/debugger/stream_cache/node_type_identifier.py index f20873b4..66bffd1f 100644 --- a/mindinsight/debugger/stream_cache/node_type_identifier.py +++ b/mindinsight/debugger/stream_cache/node_type_identifier.py @@ -123,7 +123,9 @@ def is_gradient_node(node): Returns: bool, if the node is gradient type. """ - if node.name.startswith('Gradients/') and node.type != NodeTypeEnum.PARAMETER.value: + node_name = node.name.lower() + if node_name.startswith('gradients/') and \ + node.type not in [NodeTypeEnum.PARAMETER.value, NodeTypeEnum.CONST.value]: return True return False diff --git a/mindinsight/debugger/stream_cache/tensor.py b/mindinsight/debugger/stream_cache/tensor.py index 53711012..1f31ce2f 100644 --- a/mindinsight/debugger/stream_cache/tensor.py +++ b/mindinsight/debugger/stream_cache/tensor.py @@ -174,6 +174,7 @@ class OpTensor(BaseTensor): res['value'] = tensor_value.tolist() elif isinstance(tensor_value, str): res['value'] = tensor_value + res['statistics'] = TensorUtils.get_overall_statistic_dict(self._stats) return res