Home
last modified time | relevance | path

Searched refs:samps (Results 1 – 14 of 14) sorted by relevance

/external/tensorflow/tensorflow/contrib/distributions/python/kernel_tests/
Dmvn_diag_plus_low_rank_test.py179 samps = dist.sample(n, seed=0)
180 sample_mean = math_ops.reduce_mean(samps, 0)
181 x = samps - sample_mean
185 dist.log_prob(samps) - mvn_identity.log_prob(samps), 0)
189 dist.log_prob(samps) - mvn_scaled.log_prob(samps), 0)
193 dist.log_prob(samps) - mvn_diag.log_prob(samps), 0)
197 dist.log_prob(samps) - mvn_chol.log_prob(samps), 0)
205 samps = baseline.sample(n, seed=0)
208 baseline.log_prob(samps) - mvn_identity.log_prob(samps), 0)
213 baseline.log_prob(samps) - mvn_scaled.log_prob(samps), 0)
[all …]
Dvector_laplace_diag_test.py65 samps = dist.sample(5) # Shape [5, 1, 3].
66 self.assertAllEqual([5, 1], dist.log_prob(samps).get_shape())
87 samps = dist.sample(int(1e4), seed=0).eval()
90 self.assertAllClose(mu, samps.mean(axis=0),
92 self.assertAllClose(cov_mat, np.cov(samps.T),
118 samps = dist.sample(n, seed=0).eval()
120 sample_cov = np.matmul(samps.transpose([1, 2, 0]),
121 samps.transpose([1, 0, 2])) / n
123 self.assertAllClose(mu, samps.mean(axis=0),
Dmvn_diag_test.py72 samps = dist.sample(5) # Shape [5, 1, 3].
73 self.assertAllEqual([5, 1], dist.log_prob(samps).get_shape())
103 samps = dist.sample(int(1e3), seed=0).eval()
106 self.assertAllClose(mu, samps.mean(axis=0),
108 self.assertAllClose(cov_mat, np.cov(samps.T),
134 samps = dist.sample(n, seed=0).eval()
136 sample_cov = np.matmul(samps.transpose([1, 2, 0]),
137 samps.transpose([1, 0, 2])) / n
139 self.assertAllClose(mu, samps.mean(axis=0),
235 samps = dist.sample(1000, seed=0).eval()
[all …]
Dvector_exponential_diag_test.py77 samps = dist.sample(int(1e4), seed=0).eval()
80 self.assertAllClose([-2 + 1, 1. - 2], samps.mean(axis=0),
82 self.assertAllClose(cov_mat, np.cov(samps.T),
108 samps = dist.sample(n, seed=0).eval()
109 samps_centered = samps - samps.mean(axis=0)
114 self.assertAllClose(mu + diag, samps.mean(axis=0),
Dquantized_distribution_test.py178 samps = qdist.sample(5000, seed=42)
179 samps_v = samps.eval()
231 samps = qdist.sample((n_samples,), seed=42).eval()
234 self.assertLess(0.5, samps.min())
239 pmf_vals[ii], (samps == x_vals[ii]).mean(), atol=stddev_err_bound)
415 samps = qdist.sample(10, seed=42)
416 self.assertEqual((10,) + batch_shape, samps.get_shape())
417 self.assertAllEqual((10,) + batch_shape, samps.eval().shape)
Dvector_diffeomixture_test.py201 samps = vdm.sample(10000)
202 self.assertAllEqual((10000, 3, 1), samps.shape)
203 samps_ = sess.run(samps).reshape(10000, 3) # Make scalar event shape.
238 samps = vdm.sample(10000)
239 self.assertAllEqual((10000, 3, 1), samps.shape)
240 samps_ = sess.run(samps).reshape(10000, 3) # Make scalar event shape.
Dmvn_tril_test.py352 samps = dist.sample(n, seed=0)
353 sample_mean = math_ops.reduce_mean(samps, 0)
354 x = samps - sample_mean
358 dist.log_prob(samps) - mvn_chol.log_prob(samps), 0)
/external/python/cpython2/Modules/
Daudioop.c1099 PyObject *state, *samps, *str, *rv = NULL, *channel; in audioop_ratecv() local
1171 &d, &PyTuple_Type, &samps)) in audioop_ratecv()
1173 if (PyTuple_Size(samps) != nchannels) { in audioop_ratecv()
1179 channel = PyTuple_GetItem(samps, chan); in audioop_ratecv()
1221 samps = PyTuple_New(nchannels); in audioop_ratecv()
1222 if (samps == NULL) in audioop_ratecv()
1225 PyTuple_SetItem(samps, chan, in audioop_ratecv()
1241 rv = Py_BuildValue("(O(iO))", str, d, samps); in audioop_ratecv()
1242 Py_DECREF(samps); in audioop_ratecv()
/external/python/cpython3/Modules/
Daudioop.c1302 PyObject *samps, *str, *rv = NULL, *channel; in audioop_ratecv_impl() local
1369 &d, &PyTuple_Type, &samps)) in audioop_ratecv_impl()
1371 if (PyTuple_Size(samps) != nchannels) { in audioop_ratecv_impl()
1377 channel = PyTuple_GetItem(samps, chan); in audioop_ratecv_impl()
1422 samps = PyTuple_New(nchannels); in audioop_ratecv_impl()
1423 if (samps == NULL) in audioop_ratecv_impl()
1426 PyTuple_SetItem(samps, chan, in audioop_ratecv_impl()
1441 rv = Py_BuildValue("(O(iO))", str, d, samps); in audioop_ratecv_impl()
1442 Py_DECREF(samps); in audioop_ratecv_impl()
/external/tensorflow/tensorflow/python/kernel_tests/distributions/
Dbernoulli_test.py191 samps = [0, 0.1, 0.8]
193 np.float32(samps) * np.log(np.float32(p)) +
194 (1 - np.float32(samps)) * np.log(1 - np.float32(p)),
196 bernoulli.Bernoulli(probs=p, validate_args=False).log_prob(samps)))
/external/skqp/src/gpu/
DGrPrimitiveProcessor.h232 const Args&... samps) { in IthTextureSampler()
233 return (0 == i) ? samp0 : IthTextureSampler(i - 1, samps...); in IthTextureSampler()
DGrFragmentProcessor.h348 const Args&... samps) { in IthTextureSampler()
349 return (0 == i) ? samp0 : IthTextureSampler(i - 1, samps...); in IthTextureSampler()
/external/skia/src/gpu/
DGrPrimitiveProcessor.h232 const Args&... samps) { in IthTextureSampler()
233 return (0 == i) ? samp0 : IthTextureSampler(i - 1, samps...); in IthTextureSampler()
DGrFragmentProcessor.h354 const Args&... samps) { in IthTextureSampler()
355 return (0 == i) ? samp0 : IthTextureSampler(i - 1, samps...); in IthTextureSampler()