MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _TfDeviceCaptureOp

Class _TfDeviceCaptureOp

tensorflow/python/keras/backend.py:569–582  ·  view source on GitHub ↗

Class for capturing the TF device scope.

Source from the content-addressed store, hash-verified

567
568
569class _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
585def _get_current_tf_device():

Callers 1

_get_current_tf_deviceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected