def compare(self, other_dump, step, atol=1e-06):
    'Compares two `GraphDump` monitors and returns differences.\n\n    Args:\n      other_dump: Another `GraphDump` monitor.\n      step: `int`, step to compare on.\n      atol: `float`, absolute tolerance in comparison of floating arrays.\n\n    Returns:\n      Returns tuple:\n        matched: `list` of keys that matched.\n        non_matched: `dict` of keys to tuple of 2 mismatched values.\n\n    Raises:\n      ValueError: if a key in `data` is missing from `other_dump` at `step`.\n    '
    non_matched = {}
    matched = []
    this_output = (self.data[step] if (step in self.data) else {})
    other_output = (other_dump.data[step] if (step in other_dump.data) else {})
    for key in this_output:
        if ((not isinstance(key, str)) and (not isinstance(key, unicode))):
            continue
        if (key not in other_output):
            raise ValueError('%s missing at step %s.', (key, step))
        value1 = _extract_output(this_output, key)
        value2 = _extract_output(other_output, key)
        if isinstance(value1, str):
            continue
        if isinstance(value1, np.ndarray):
            if (not np.allclose(value1, value2, atol=atol)):
                non_matched[key] = (value1 - value2)
            else:
                matched.append(key)
        elif (value1 != value2):
            non_matched[key] = (value1, value2)
        else:
            matched.append(key)
    return (matched, non_matched)
Compares two `GraphDump` monitors and returns differences.

Args:
  other_dump: Another `GraphDump` monitor.
  step: `int`, step to compare on.
  atol: `float`, absolute tolerance in comparison of floating arrays.

Returns:
  Returns tuple:
    matched: `list` of keys that matched.
    non_matched: `dict` of keys to tuple of 2 mismatched values.

Raises:
  ValueError: if a key in `data` is missing from `other_dump` at `step`.
def compare(self, other_dump, step, atol=1e-06):
    'Compares two `GraphDump` monitors and returns differences.\n\n    Args:\n      other_dump: Another `GraphDump` monitor.\n      step: `int`, step to compare on.\n      atol: `float`, absolute tolerance in comparison of floating arrays.\n\n    Returns:\n      Returns tuple:\n        matched: `list` of keys that matched.\n        non_matched: `dict` of keys to tuple of 2 mismatched values.\n\n    Raises:\n      ValueError: if a key in `data` is missing from `other_dump` at `step`.\n    '
    non_matched = {}
    matched = []
    this_output = (self.data[step] if (step in self.data) else {})
    other_output = (other_dump.data[step] if (step in other_dump.data) else {})
    for key in this_output:
        if ((not isinstance(key, str)) and (not isinstance(key, unicode))):
            continue
        if (key not in other_output):
            raise ValueError('%s missing at step %s.', (key, step))
        value1 = _extract_output(this_output, key)
        value2 = _extract_output(other_output, key)
        if isinstance(value1, str):
            continue
        if isinstance(value1, np.ndarray):
            if (not np.allclose(value1, value2, atol=atol)):
                non_matched[key] = (value1 - value2)
            else:
                matched.append(key)
        elif (value1 != value2):
            non_matched[key] = (value1, value2)
        else:
            matched.append(key)
    return (matched, non_matched)