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

Method _prob

tensorflow/python/ops/distributions/uniform.py:177–186  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

175 return self.low + self.range() * samples
176
177 def _prob(self, x):
178 broadcasted_x = x * array_ops.ones(
179 self.batch_shape_tensor(), dtype=x.dtype)
180 return array_ops.where_v2(
181 math_ops.is_nan(broadcasted_x), broadcasted_x,
182 array_ops.where_v2(
183 math_ops.logical_or(broadcasted_x < self.low,
184 broadcasted_x >= self.high),
185 array_ops.zeros_like(broadcasted_x),
186 array_ops.ones_like(broadcasted_x) / self.range()))
187
188 def _cdf(self, x):
189 broadcast_shape = array_ops.broadcast_dynamic_shape(

Callers

nothing calls this directly

Calls 3

rangeMethod · 0.95
onesMethod · 0.80
batch_shape_tensorMethod · 0.45

Tested by

no test coverage detected