/external/tensorflow/tensorflow/python/kernel_tests/random/ |
D | random_binomial_test.py | 39 self, num, counts, probs, dtype, gen=None, sample_shape=None, seed=None): argument 45 shape=shape, counts=counts, probs=probs, dtype=dtype) 79 sx = self._Sampler(1000, counts=10., probs=0.4, dtype=dt, seed=345) 80 sy = self._Sampler(1000, counts=10., probs=0.4, dtype=dt, seed=345) 90 rnd = rng.binomial(shape=[10], counts=np.float32(2.), probs=np.float32(0.5)) 92 rnd = rng.binomial(shape=[], counts=np.float32(2.), probs=np.float32(0.5)) 99 probs=0.3 * array_ops.ones([10], dtype=np.float32)) 104 probs=0.4 * array_ops.ones([2], dtype=np.float32)) 111 probs=0.8 * array_ops.ones([10], dtype=np.float32)) 118 probs=np.float32(0.9)) [all …]
|
D | multinomial_op_test.py | 116 for probs in [[.5, .5], [.85, .05, .1], rand_probs, rand_probs2]: 117 probs = np.asarray(probs) 118 if len(probs.shape) == 1: 119 probs = probs.reshape(1, probs.size) # singleton batch 121 logits = np.log(probs).astype(np.float32) 126 composed_chi2 = self._chi2(probs, composed_freqs) 127 native_chi2 = self._chi2(probs, native_freqs)
|
/external/xz-java/src/org/tukaani/xz/rangecoder/ |
D | RangeEncoder.java | 99 public void encodeBit(short[] probs, int index, int bit) in encodeBit() argument 101 int prob = probs[index]; in encodeBit() 107 probs[index] = (short)( in encodeBit() 112 probs[index] = (short)(prob - (prob >>> MOVE_BITS)); in encodeBit() 128 public void encodeBitTree(short[] probs, int symbol) throws IOException { in encodeBitTree() argument 130 int mask = probs.length; in encodeBitTree() 135 encodeBit(probs, index, bit); in encodeBitTree() 144 public static int getBitTreePrice(short[] probs, int symbol) { in getBitTreePrice() argument 146 symbol |= probs.length; in getBitTreePrice() 151 price += getBitPrice(probs[symbol], bit); in getBitTreePrice() [all …]
|
D | RangeDecoder.java | 22 public int decodeBit(short[] probs, int index) throws IOException { in decodeBit() argument 25 int prob = probs[index]; in decodeBit() 32 probs[index] = (short)( in decodeBit() 38 probs[index] = (short)(prob - (prob >>> MOVE_BITS)); in decodeBit() 45 public int decodeBitTree(short[] probs) throws IOException { in decodeBitTree() argument 49 symbol = (symbol << 1) | decodeBit(probs, symbol); in decodeBitTree() 50 } while (symbol < probs.length); in decodeBitTree() 52 return symbol - probs.length; in decodeBitTree() 55 public int decodeReverseBitTree(short[] probs) throws IOException { in decodeReverseBitTree() argument 61 int bit = decodeBit(probs, symbol); in decodeReverseBitTree() [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/distributions/ |
D | bernoulli_test.py | 51 return bernoulli.Bernoulli(probs=p, dtype=dtype) 64 dist = bernoulli.Bernoulli(probs=p) 65 self.assertAllClose(p, self.evaluate(dist.probs)) 76 self.assertAllClose(special.expit(logits), self.evaluate(dist.probs)) 79 dist = bernoulli.Bernoulli(probs=p) 87 dist = bernoulli.Bernoulli(probs=p, validate_args=True) 88 self.evaluate(dist.probs) 93 dist = bernoulli.Bernoulli(probs=p, validate_args=True) 94 self.evaluate(dist.probs) 98 dist = bernoulli.Bernoulli(probs=p) [all …]
|
D | multinomial_test.py | 41 dist = multinomial.Multinomial(total_count=1., probs=p) 52 dist = multinomial.Multinomial(total_count=n, probs=p) 63 dist = multinomial.Multinomial(total_count=n, probs=p) 71 dist = multinomial.Multinomial(total_count=3., probs=p) 72 self.assertEqual((1, 3), dist.probs.get_shape()) 74 self.assertAllClose(p, dist.probs.eval()) 82 self.assertEqual((1, 3), multinom.probs.get_shape()) 84 self.assertAllClose(p, multinom.probs.eval()) 100 dist = multinomial.Multinomial(total_count=n, probs=p, validate_args=True) 115 total_count=n, probs=p, validate_args=True) [all …]
|
/external/libvpx/libvpx/vp9/encoder/ |
D | vp9_cost.c | 39 static void cost(int *costs, vpx_tree tree, const vpx_prob *probs, int i, in cost() argument 41 const vpx_prob prob = probs[i / 2]; in cost() 52 cost(costs, tree, probs, ii, cc); in cost() 56 void vp9_cost_tokens(int *costs, const vpx_prob *probs, vpx_tree tree) { in vp9_cost_tokens() argument 57 cost(costs, tree, probs, 0, 0); in vp9_cost_tokens() 60 void vp9_cost_tokens_skip(int *costs, const vpx_prob *probs, vpx_tree tree) { in vp9_cost_tokens_skip() argument 63 costs[-tree[0]] = vp9_cost_bit(probs[0], 0); in vp9_cost_tokens_skip() 64 cost(costs, tree, probs, 2, 0); in vp9_cost_tokens_skip()
|
D | vp9_segmentation.c | 121 static int cost_segmap(int *segcounts, vpx_prob *probs) { in cost_segmap() argument 130 int cost = c0123 * vp9_cost_zero(probs[0]) + c4567 * vp9_cost_one(probs[0]); in cost_segmap() 134 cost += c01 * vp9_cost_zero(probs[1]) + c23 * vp9_cost_one(probs[1]); in cost_segmap() 137 cost += segcounts[0] * vp9_cost_zero(probs[3]) + in cost_segmap() 138 segcounts[1] * vp9_cost_one(probs[3]); in cost_segmap() 140 cost += segcounts[2] * vp9_cost_zero(probs[4]) + in cost_segmap() 141 segcounts[3] * vp9_cost_one(probs[4]); in cost_segmap() 145 cost += c45 * vp9_cost_zero(probs[2]) + c67 * vp9_cost_one(probs[2]); in cost_segmap() 148 cost += segcounts[4] * vp9_cost_zero(probs[5]) + in cost_segmap() 149 segcounts[5] * vp9_cost_one(probs[5]); in cost_segmap() [all …]
|
D | vp9_treewriter.h | 32 const vpx_prob *probs, int bits, int len, in vp9_write_tree() argument 36 vpx_write(w, bit, probs[i >> 1]); in vp9_write_tree() 42 const vpx_prob *probs, in vp9_write_token() argument 44 vp9_write_tree(w, tree, probs, token->value, token->len, 0); in vp9_write_token()
|
D | vp9_cost.h | 37 static INLINE int treed_cost(vpx_tree tree, const vpx_prob *probs, int bits, in treed_cost() argument 44 cost += vp9_cost_bit(probs[i >> 1], bit); in treed_cost() 51 void vp9_cost_tokens(int *costs, const vpx_prob *probs, vpx_tree tree); 52 void vp9_cost_tokens_skip(int *costs, const vpx_prob *probs, vpx_tree tree);
|
/external/u-boot/lib/lzma/ |
D | LzmaDec.c | 30 #define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); } argument 31 #define TREE_DECODE(probs, limit, i) \ argument 32 { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } 37 #define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) argument 39 #define TREE_6_DECODE(probs, i) \ argument 41 TREE_GET_BIT(probs, i); \ 42 TREE_GET_BIT(probs, i); \ 43 TREE_GET_BIT(probs, i); \ 44 TREE_GET_BIT(probs, i); \ 45 TREE_GET_BIT(probs, i); \ [all …]
|
/external/lzma/C/ |
D | LzmaDec.c | 29 #define TREE_GET_BIT(probs, i) { GET_BIT2(probs + i, i, ;, ;); } argument 38 #define TREE_DECODE(probs, limit, i) \ argument 39 { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } 44 #define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) argument 46 #define TREE_6_DECODE(probs, i) \ argument 48 TREE_GET_BIT(probs, i); \ 49 TREE_GET_BIT(probs, i); \ 50 TREE_GET_BIT(probs, i); \ 51 TREE_GET_BIT(probs, i); \ 52 TREE_GET_BIT(probs, i); \ [all …]
|
D | LzmaEnc.c | 692 static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, UInt32 sym) in LitEnc_Encode() argument 700 CLzmaProb *prob = probs + (sym >> 8); in LitEnc_Encode() 709 static void LitEnc_EncodeMatched(CRangeEnc *p, CLzmaProb *probs, UInt32 sym, UInt32 matchByte) in LitEnc_EncodeMatched() argument 721 prob = probs + (offs + (matchByte & offs) + (sym >> 8)); in LitEnc_EncodeMatched() 771 static UInt32 LitEnc_GetPrice(const CLzmaProb *probs, UInt32 sym, const CProbPrice *ProbPrices) in LitEnc_GetPrice() argument 779 price += GET_PRICEa(probs[sym], bit); in LitEnc_GetPrice() 786 static UInt32 LitEnc_Matched_GetPrice(const CLzmaProb *probs, UInt32 sym, UInt32 matchByte, const C… in LitEnc_Matched_GetPrice() argument 794 price += GET_PRICEa(probs[offs + (matchByte & offs) + (sym >> 8)], (sym >> 7) & 1); in LitEnc_Matched_GetPrice() 803 static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, unsigned numBits, unsigned sym) in RcTree_ReverseEncode() argument 813 RC_BIT(rc, probs + m, bit); in RcTree_ReverseEncode() [all …]
|
/external/lzma/Asm/x86/ |
D | LzmaDecOpt.asm | 8 ; CLzmaDec structure, (probs) array layout, input and output of 77 ; r11 probs 110 probs equ r11 define 256 PLOAD prob, probs + 1 * PMULT 257 PLOAD probNext, probs + 1 * PMULT_2 262 PLOAD t0, probs + 1 * PMULT_2 + PMULT 268 PUP_SUB prob, probs + 1 * PMULT, 0 - 1 273 PLOAD probNext, probs + sym_R * PMULT_2 279 PLOAD t0, probs + sym_R * PMULT + PMULT 281 PUP_COD prob, probs + t1_R * PMULT_HALF, 0 - 1 [all …]
|
/external/libvpx/libvpx/vpx_dsp/ |
D | prob.c | 30 vpx_prob *probs) { in tree_merge_probs_impl() argument 34 : tree_merge_probs_impl(l, tree, pre_probs, counts, probs); in tree_merge_probs_impl() 38 : tree_merge_probs_impl(r, tree, pre_probs, counts, probs); in tree_merge_probs_impl() 40 probs[i >> 1] = mode_mv_merge_probs(pre_probs[i >> 1], ct); in tree_merge_probs_impl() 45 const unsigned int *counts, vpx_prob *probs) { in vpx_tree_merge_probs() argument 46 tree_merge_probs_impl(0, tree, pre_probs, counts, probs); in vpx_tree_merge_probs()
|
/external/lzma/Java/SevenZip/Compression/RangeCoder/ |
D | Decoder.java | 54 public int DecodeBit(short []probs, int index) throws IOException in DecodeBit() argument 56 int prob = probs[index]; in DecodeBit() 61 probs[index] = (short)(prob + ((kBitModelTotal - prob) >>> kNumMoveBits)); in DecodeBit() 73 probs[index] = (short)(prob - ((prob) >>> kNumMoveBits)); in DecodeBit() 83 public static void InitBitModels(short []probs) in InitBitModels() argument 85 for (int i = 0; i < probs.length; i++) in InitBitModels() 86 probs[i] = (kBitModelTotal >>> 1); in InitBitModels()
|
D | Encoder.java | 96 public static void InitBitModels(short []probs) in InitBitModels() argument 98 for (int i = 0; i < probs.length; i++) in InitBitModels() 99 probs[i] = (kBitModelTotal >>> 1); in InitBitModels() 102 public void Encode(short []probs, int index, int symbol) throws IOException in Encode() argument 104 int prob = probs[index]; in Encode() 109 probs[index] = (short)(prob + ((kBitModelTotal - prob) >>> kNumMoveBits)); in Encode() 115 probs[index] = (short)(prob - ((prob) >>> kNumMoveBits)); in Encode()
|
/external/tensorflow/tensorflow/python/ops/distributions/ |
D | util.py | 165 probs=None, 193 with ops.name_scope(name, values=[probs, logits]): 194 if (probs is None) == (logits is None): 197 if probs is None: 209 probs = ops.convert_to_tensor(probs, name="probs", dtype=dtype) 210 if not probs.dtype.is_floating: 215 one = constant_op.constant(1., probs.dtype) 216 dependencies = [check_ops.assert_non_negative(probs)] 218 probs = embed_check_categorical_event_shape(probs) 221 math_ops.reduce_sum(probs, -1), [all …]
|
D | bernoulli.py | 53 probs=None, argument 87 probs=probs, 109 def probs(self): member in Bernoulli 128 new_shape, seed=seed, dtype=self.probs.dtype) 129 sample = math_ops.less(uniform, self.probs) 159 return array_ops.identity(self.probs) 162 return self._mean() * (1. - self.probs) 166 return math_ops.cast(self.probs > 0.5, self.dtype)
|
D | categorical.py | 164 probs=None, argument 194 with ops.name_scope(name, values=[logits, probs]) as name: 197 probs=probs, 255 def probs(self): member in Categorical 290 k, probs = _broadcast_cat_event_and_params( 291 k, self.probs, base_dtype=self.dtype.base_dtype) 294 batch_flattened_probs = array_ops.reshape(probs, 319 nn_ops.log_softmax(self.logits) * self.probs, axis=-1)
|
/external/deqp/modules/gles3/stress/ |
D | es3sLongRunningTests.cpp | 79 const Probs probs; in init() member 80 …obs& probs_ = Probs()) : name(name_), desc(desc_), redundantBufferFactor(bufFact), probs(probs_) {} in init() 123 contexts, cases[caseNdx].probs, in init() 151 const Probs probs; in init() member 152 …st Probs& probs_ = Probs()) : name(name_), desc(desc_), numTextures(numTextures_), probs(probs_) {} in init() 191 contexts, cases[caseNdx].probs, in init() 208 const Probs probs; in init() member 210 …: name(name_), desc(desc_), drawCallsPerIteration(calls), numTrisPerDrawCall(tris), probs(probs_) … in init() 241 contexts, cases[caseNdx].probs, in init() 257 const Probs probs; in init() member [all …]
|
/external/deqp/modules/gles2/stress/ |
D | es2sLongRunningTests.cpp | 79 const Probs probs; in init() member 80 …obs& probs_ = Probs()) : name(name_), desc(desc_), redundantBufferFactor(bufFact), probs(probs_) {} in init() 123 contexts, cases[caseNdx].probs, in init() 151 const Probs probs; in init() member 152 …st Probs& probs_ = Probs()) : name(name_), desc(desc_), numTextures(numTextures_), probs(probs_) {} in init() 191 contexts, cases[caseNdx].probs, in init() 208 const Probs probs; in init() member 210 …: name(name_), desc(desc_), drawCallsPerIteration(calls), numTrisPerDrawCall(tris), probs(probs_) … in init() 241 contexts, cases[caseNdx].probs, in init() 257 const Probs probs; in init() member [all …]
|
/external/tensorflow/tensorflow/compiler/tests/ |
D | categorical_op_test.py | 126 for probs in [[.5, .5], [.85, .05, .1], rand_probs, rand_probs2]: 127 probs = np.asarray(probs) 128 if len(probs.shape) == 1: 129 probs = probs.reshape(1, probs.size) # singleton batch 131 logits = np.log(probs).astype(np.float32) 139 chi2 = self._chi2(probs, freqs)
|
/external/tensorflow/tensorflow/lite/tools/evaluation/stages/ |
D | topk_accuracy_eval_stage.cc | 90 auto probs = static_cast<float*>(model_output_); in Run() local 92 probabilities.push_back(probs[i]); in Run() 95 auto probs = static_cast<uint8_t*>(model_output_); in Run() local 97 probabilities.push_back(probs[i]); in Run() 100 auto probs = static_cast<int8_t*>(model_output_); in Run() local 102 probabilities.push_back(probs[i]); in Run()
|
/external/tensorflow/tensorflow/python/data/experimental/kernel_tests/ |
D | directed_interleave_dataset_test.py | 90 for probs in [[.85, .05, .1], rand_probs, [1.]]: 91 probs = np.asarray(probs) 92 classes = len(probs) 93 freqs = self._testSampleFromDatasetsHelper(probs, classes, num_samples) 94 self.assertLess(self._chi2(probs, freqs / num_samples), 1e-2) 97 probs_ds = dataset_ops.Dataset.from_tensors(probs).repeat() 99 self.assertLess(self._chi2(probs, freqs / num_samples), 1e-2)
|