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

Class _FakeOperation

tensorflow/python/distribute/device_util.py:77–90  ·  view source on GitHub ↗

A fake Operation object to pass to device functions.

Source from the content-addressed store, hash-verified

75
76
77class _FakeOperation(object):
78 """A fake Operation object to pass to device functions."""
79
80 def __init__(self):
81 self.device = ""
82 self.type = ""
83 self.name = ""
84 self.node_def = _FakeNodeDef()
85
86 def _set_device(self, device):
87 self.device = ops._device_string(device) # pylint: disable=protected-access
88
89 def _set_device_from_string(self, device_str):
90 self.device = device_str
91
92
93def current():

Callers 1

currentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected