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

Method _lookup

tensorflow/python/ops/distributions/bijector_impl.py:1025–1034  ·  view source on GitHub ↗

Helper which retrieves mapping info from forward/inverse dicts.

(self, x=None, y=None, kwargs=None)

Source from the content-addressed store, hash-verified

1023 self._from_y[mapping.y_key] = mapping
1024
1025 def _lookup(self, x=None, y=None, kwargs=None):
1026 """Helper which retrieves mapping info from forward/inverse dicts."""
1027 mapping = _Mapping(x=x, y=y, kwargs=kwargs)
1028 # Since _cache requires both x,y to be set, we only need to do one cache
1029 # lookup since the mapping is always in both or neither.
1030 if mapping.x is not None:
1031 return self._from_x.get(mapping.x_key, mapping)
1032 if mapping.y is not None:
1033 return self._from_y.get(mapping.y_key, mapping)
1034 return mapping
1035
1036 def _reduce_jacobian_det_over_event(
1037 self, y, ildj, min_event_ndims, event_ndims):

Callers 5

_call_forwardMethod · 0.95
_call_inverseMethod · 0.95
_cacheMethod · 0.95

Calls 2

_MappingClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected