Get the tensor value from for a debug-dumped tensor. The tensor may be dumped multiple times in the dump root directory, so a list of tensors (`numpy.ndarray`) is returned. Args: node_name: (`str`) name of the node that the tensor is produced by. output_slot: (`int`) output
(self, node_name, output_slot, debug_op, device_name=None)
| 1498 | self._watch_key_to_datum[device_name][watch_key]] |
| 1499 | |
| 1500 | def get_tensors(self, node_name, output_slot, debug_op, device_name=None): |
| 1501 | """Get the tensor value from for a debug-dumped tensor. |
| 1502 | |
| 1503 | The tensor may be dumped multiple times in the dump root directory, so a |
| 1504 | list of tensors (`numpy.ndarray`) is returned. |
| 1505 | |
| 1506 | Args: |
| 1507 | node_name: (`str`) name of the node that the tensor is produced by. |
| 1508 | output_slot: (`int`) output slot index of tensor. |
| 1509 | debug_op: (`str`) name of the debug op. |
| 1510 | device_name: (`str`) name of the device. If there is only one device or if |
| 1511 | the specified debug_watch_key exists on only one device, this argument |
| 1512 | is optional. |
| 1513 | |
| 1514 | Returns: |
| 1515 | List of tensors (`numpy.ndarray`) loaded from the debug-dump file(s). |
| 1516 | |
| 1517 | Raises: |
| 1518 | WatchKeyDoesNotExistInDebugDumpDirError: If the tensor does not exist in |
| 1519 | the debug-dump data. |
| 1520 | """ |
| 1521 | |
| 1522 | watch_key = _get_tensor_watch_key(node_name, output_slot, debug_op) |
| 1523 | try: |
| 1524 | device_name = self._infer_device_name(device_name, node_name) |
| 1525 | return [datum.get_tensor() for datum in |
| 1526 | self._watch_key_to_datum[device_name][watch_key]] |
| 1527 | except (ValueError, KeyError): |
| 1528 | raise WatchKeyDoesNotExistInDebugDumpDirError( |
| 1529 | "Watch key \"%s\" does not exist in the debug dump of device %s" % |
| 1530 | (watch_key, device_name)) |
| 1531 | |
| 1532 | def get_rel_timestamps(self, |
| 1533 | node_name, |