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

Method _cdf

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

Source from the content-addressed store, hash-verified

186 array_ops.ones_like(broadcasted_x) / self.range()))
187
188 def _cdf(self, x):
189 broadcast_shape = array_ops.broadcast_dynamic_shape(
190 array_ops.shape(x), self.batch_shape_tensor())
191 zeros = array_ops.zeros(broadcast_shape, dtype=self.dtype)
192 ones = array_ops.ones(broadcast_shape, dtype=self.dtype)
193 broadcasted_x = x * ones
194 result_if_not_big = array_ops.where_v2(
195 x < self.low, zeros, (broadcasted_x - self.low) / self.range())
196 return array_ops.where_v2(x >= self.high, ones, result_if_not_big)
197
198 def _entropy(self):
199 return math_ops.log(self.range())

Callers

nothing calls this directly

Calls 4

rangeMethod · 0.95
onesMethod · 0.80
shapeMethod · 0.45
batch_shape_tensorMethod · 0.45

Tested by

no test coverage detected