Browse Source

add tensor statistics even if the tensor value is big

tags/v1.1.0
yelihua 5 years ago
parent
commit
38c16ff7c9
2 changed files with 4 additions and 1 deletions
  1. +3
    -1
      mindinsight/debugger/stream_cache/node_type_identifier.py
  2. +1
    -0
      mindinsight/debugger/stream_cache/tensor.py

+ 3
- 1
mindinsight/debugger/stream_cache/node_type_identifier.py View File

@@ -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



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

@@ -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



Loading…
Cancel
Save