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

Method __getattr__

tensorflow/python/distribute/values.py:825–830  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

823 self._handle_id = self._common_name
824
825 def __getattr__(self, name):
826 if _enclosing_tpu_context() is None:
827 return super(TPUVariableMixin, self).__getattr__(name)
828 else:
829 raise AttributeError(
830 "'{}' not accessible within a TPU context.".format(name))
831
832 def get(self, device=None):
833 if (_enclosing_tpu_context() is None) or (device is not None):

Callers 1

__getattr__Method · 0.45

Calls 2

_enclosing_tpu_contextFunction · 0.70
formatMethod · 0.45

Tested by

no test coverage detected