Home
last modified time | relevance | path

Searched refs:rate_a (Results 1 – 7 of 7) sorted by relevance

/third_party/mindspore/tests/ut/python/nn/probability/distribution/
Dtest_exponential.py118 def construct(self, rate_b, rate_a): argument
120 kl2 = self.e2.kl_loss('Exponential', rate_b, rate_a)
129 rate_a = Tensor([0.7], dtype=dtype.float32)
130 ans = net(rate_b, rate_a)
142 def construct(self, rate_b, rate_a): argument
144 h2 = self.e2.cross_entropy('Exponential', rate_b, rate_a)
153 rate_a = Tensor([0.7], dtype=dtype.float32)
154 ans = net(rate_b, rate_a)
Dtest_gamma.py131 def construct(self, concentration_b, rate_b, concentration_a, rate_a): argument
133 kl2 = self.g2.kl_loss('Gamma', concentration_b, rate_b, concentration_a, rate_a)
144 rate_a = Tensor(np.array([3.0]).astype(np.float32), dtype=dtype.float32)
145 ans = net(concentration_b, rate_b, concentration_a, rate_a)
157 def construct(self, concentration_b, rate_b, concentration_a, rate_a): argument
159 h2 = self.g2.cross_entropy('Gamma', concentration_b, rate_b, concentration_a, rate_a)
170 rate_a = Tensor(np.array([3.0]).astype(np.float32), dtype=dtype.float32)
171 ans = net(concentration_b, rate_b, concentration_a, rate_a)
/third_party/mindspore/mindspore/nn/probability/distribution/
Dgamma.py262 def _cross_entropy(self, dist, concentration_b, rate_b, concentration_a=None, rate_a=None): argument
274 return self._entropy(concentration_a, rate_a) +\
275 self._kl_loss(dist, concentration_b, rate_b, concentration_a, rate_a)
314 def _kl_loss(self, dist, concentration_b, rate_b, concentration_a=None, rate_a=None): argument
335 concentration_a, rate_a = self._check_param_type(concentration_a, rate_a)
338 + concentration_b * self.log(rate_a) - concentration_b * self.log(rate_b) \
339 + concentration_a * (rate_b / rate_a - 1.)
Dexponential.py307 rate_a = self._check_param_type(rate)
308 return self.log(rate_a) - self.log(rate_b) + rate_b / rate_a - 1.0
/third_party/mindspore/tests/st/probability/distribution/
Dtest_gamma.py89 rate_a = np.array([4.0]).astype(np.float32)
96 + concentration_b * np.log(rate_a) - concentration_b * np.log(rate_b) \
97 + concentration_a * (rate_b / rate_a - 1.)
314 rate_a = np.array([1.0]).astype(np.float32)
321 + concentration_b * np.log(rate_a) - concentration_b * np.log(rate_b) \
322 + concentration_a * (rate_b / rate_a - 1.)
Dtest_exponential.py87 rate_a = 1.5
89 expect_kl_loss = np.log(rate_a) - np.log(rate_b) + rate_b / rate_a - 1.0
/third_party/pulseaudio/src/pulsecore/
Dresampler.c139 const uint32_t rate_a, in fix_method() argument
142 pa_assert(pa_sample_rate_valid(rate_a)); in fix_method()
147 if (!(flags & PA_RESAMPLER_VARIABLE_RATE) && rate_a == rate_b) { in fix_method()
159 if (rate_a != rate_b) { in fix_method()
178 if (rate_a < rate_b) { in fix_method()