Class for capturing the TF device scope.
| 567 | |
| 568 | |
| 569 | class _TfDeviceCaptureOp(object): |
| 570 | """Class for capturing the TF device scope.""" |
| 571 | |
| 572 | def __init__(self): |
| 573 | self.device = None |
| 574 | |
| 575 | def _set_device(self, device): |
| 576 | """This method captures TF's explicit device scope setting.""" |
| 577 | if tfdev.is_device_spec(device): |
| 578 | device = device.to_string() |
| 579 | self.device = device |
| 580 | |
| 581 | def _set_device_from_string(self, device_str): |
| 582 | self.device = device_str |
| 583 | |
| 584 | |
| 585 | def _get_current_tf_device(): |
no outgoing calls
no test coverage detected