Home
last modified time | relevance | path

Searched refs:weights (Results 1 – 25 of 934) sorted by relevance

12345678910>>...38

/external/tensorflow/tensorflow/python/keras/saving/
Dhdf5_format.py278 weights,
296 def convert_nested_bidirectional(weights): argument
308 num_weights_per_layer = len(weights) // 2
310 layer.forward_layer, weights[:num_weights_per_layer],
313 layer.backward_layer, weights[num_weights_per_layer:],
317 def convert_nested_time_distributed(weights): argument
330 layer.layer, weights, original_keras_version, original_backend)
332 def convert_nested_model(weights): argument
351 weights=weights[:num_weights],
354 weights = weights[num_weights:]
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dweights_broadcast_test.py41 def _test_valid(self, weights, values): argument
43 weights=weights, values=values)
47 weights=weights_placeholder, values=values_placeholder)
51 weights_placeholder: weights,
57 self._test_valid(weights=5, values=_test_values((3, 2, 4)))
62 weights=np.asarray((5,)).reshape((1, 1, 1)),
68 weights=np.asarray((5, 7, 11, 3)).reshape((1, 1, 4)),
74 weights=np.asarray((5, 11)).reshape((1, 2, 1)),
80 weights=np.asarray((5, 7, 11, 3, 2, 13, 7, 5)).reshape((1, 2, 4)),
86 weights=np.asarray((5, 7, 11)).reshape((3, 1, 1)),
[all …]
Dlosses_test.py53 self._predictions, self._predictions, weights=None)
66 weights = 2.3
67 loss = losses.absolute_difference(self._labels, self._predictions, weights)
69 self.assertAlmostEqual(5.5 * weights, self.evaluate(loss), 3)
72 weights = 2.3
74 constant_op.constant(weights))
76 self.assertAlmostEqual(5.5 * weights, self.evaluate(loss), 3)
79 weights = constant_op.constant((1.2, 0.0), shape=(2, 1))
80 loss = losses.absolute_difference(self._labels, self._predictions, weights)
85 weights = constant_op.constant([1.2, 0.0], shape=[2, 1])
[all …]
Dmetrics_test.py243 metrics.mean(values, weights=1.0),
244 metrics.mean(values, weights=np.ones((1, 1, 1))),
245 metrics.mean(values, weights=np.ones((1, 1, 1, 1))),
246 metrics.mean(values, weights=np.ones((1, 1, 1, 1, 1))),
247 metrics.mean(values, weights=np.ones((1, 1, 4))),
248 metrics.mean(values, weights=np.ones((1, 1, 4, 1))),
249 metrics.mean(values, weights=np.ones((1, 2, 1))),
250 metrics.mean(values, weights=np.ones((1, 2, 1, 1))),
251 metrics.mean(values, weights=np.ones((1, 2, 4))),
252 metrics.mean(values, weights=np.ones((1, 2, 4, 1))),
[all …]
/external/tensorflow/tensorflow/python/ops/
Dmetrics_impl.py88 def _remove_squeezable_dimensions(predictions, labels, weights): argument
117 if weights is None:
120 weights = ops.convert_to_tensor(weights)
121 weights_shape = weights.get_shape()
124 return predictions, labels, weights
131 weights = array_ops.squeeze(weights, [-1])
133 weights = array_ops.expand_dims(weights, [-1])
136 weights_rank_tensor = array_ops.rank(weights)
142 lambda: array_ops.expand_dims(weights, [-1]), lambda: weights)
147 maybe_squeeze_weights = lambda: weights
[all …]
Dweights_broadcast_ops.py63 def assert_broadcastable(weights, values): argument
81 with ops.name_scope(None, "assert_broadcastable", (weights, values)) as scope:
82 with ops.name_scope(None, "weights", (weights,)) as weights_scope:
83 weights = ops.convert_to_tensor(weights, name=weights_scope)
84 weights_shape = array_ops.shape(weights, name="shape")
85 weights_rank = array_ops.rank(weights, name="rank")
103 weights_rank_static, values.shape, weights.shape))
123 "weights.shape=", weights.name, weights_shape,
136 def broadcast_weights(weights, values): argument
154 with ops.name_scope(None, "broadcast_weights", (weights, values)) as scope:
[all …]
/external/tensorflow/tensorflow/contrib/metrics/python/ops/
Dmetric_ops.py52 weights=None, argument
88 weights=weights,
98 weights=None, argument
134 weights=weights,
144 weights=None, argument
180 weights=weights,
190 weights=None, argument
225 weights=weights,
233 weights=None, argument
275 weights=weights,
[all …]
/external/tensorflow/tensorflow/contrib/tensor_forest/client/
Deval_metrics.py46 def _accuracy(predictions, targets, weights=None): argument
48 labels=targets, predictions=predictions, weights=weights)
51 def _r2(probabilities, targets, weights=None): argument
59 return metrics.mean(score, weights=weights)
67 def _sigmoid_entropy(probabilities, targets, weights=None): argument
73 weights=weights)
76 def _softmax_entropy(probabilities, targets, weights=None): argument
80 weights=weights)
87 def _class_log_loss(probabilities, targets, weights=None): argument
92 weights=weights)
[all …]
/external/tensorflow/tensorflow/python/ops/losses/
Dlosses_impl.py96 def _num_present(losses, weights, per_batch=False): argument
118 if ((isinstance(weights, float) and weights != 0.0) or
119 (context.executing_eagerly() and weights._rank() == 0 # pylint: disable=protected-access
120 and not math_ops.equal(weights, 0.0))):
122 with ops.name_scope(None, "num_present", (losses, weights)) as scope:
123 weights = math_ops.cast(weights, dtype=dtypes.float32)
125 math_ops.equal(weights, 0.0),
126 array_ops.zeros_like(weights),
127 array_ops.ones_like(weights))
146 losses, weights=1.0, scope=None, loss_collection=ops.GraphKeys.LOSSES, argument
[all …]
/external/tensorflow/tensorflow/contrib/losses/python/losses/
Dloss_ops_test.py49 self._predictions, self._predictions, weights=None)
62 weights = 2.3
64 weights)
66 self.assertAlmostEqual(5.5 * weights, loss.eval(), 3)
69 weights = 2.3
71 constant_op.constant(weights))
73 self.assertAlmostEqual(5.5 * weights, loss.eval(), 3)
76 weights = constant_op.constant([1.2, 0.0], shape=[2,])
78 weights)
83 weights = constant_op.constant([1.2, 0.0], shape=[2, 1])
[all …]
Dloss_ops.py44 def _scale_losses(losses, weights): argument
62 start_index = max(0, weights.get_shape().ndims)
65 reduced_losses = math_ops.multiply(reduced_losses, weights)
85 def compute_weighted_loss(losses, weights=1.0, scope=None): argument
101 with ops.name_scope(scope, "weighted_loss", [losses, weights]):
105 weights = math_ops.cast(ops.convert_to_tensor(weights), dtypes.float32)
109 weights_shape = weights.get_shape()
114 weights = array_ops.squeeze(weights, [-1])
116 total_loss = _scale_losses(losses, weights)
117 num_present = _num_present(losses, weights)
[all …]
/external/tensorflow/tensorflow/tools/api/golden/v1/
Dtensorflow.metrics.pbtxt5 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'metrics_collections\', \'updates_colle…
9 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'num_thresholds\', \'metrics_collection…
13 …argspec: "args=[\'labels\', \'predictions\', \'k\', \'weights\', \'metrics_collections\', \'update…
17 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'metrics_collections\', \'updates_colle…
21 …argspec: "args=[\'labels\', \'predictions\', \'thresholds\', \'weights\', \'metrics_collections\',…
25 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'metrics_collections\', \'updates_colle…
29 …argspec: "args=[\'labels\', \'predictions\', \'thresholds\', \'weights\', \'metrics_collections\',…
33 …argspec: "args=[\'values\', \'weights\', \'metrics_collections\', \'updates_collections\', \'name\…
37 …argspec: "args=[\'labels\', \'predictions\', \'weights\', \'metrics_collections\', \'updates_colle…
41 …argspec: "args=[\'labels\', \'predictions\', \'dim\', \'weights\', \'metrics_collections\', \'upda…
[all …]
/external/freetype/src/base/
Dftlcdfil.c81 FT_LcdFiveTapFilter weights ) in ft_lcd_filter_fir() argument
109 fir[2] = weights[2] * val; in ft_lcd_filter_fir()
110 fir[3] = weights[3] * val; in ft_lcd_filter_fir()
111 fir[4] = weights[4] * val; in ft_lcd_filter_fir()
114 fir[1] = fir[2] + weights[1] * val; in ft_lcd_filter_fir()
115 fir[2] = fir[3] + weights[2] * val; in ft_lcd_filter_fir()
116 fir[3] = fir[4] + weights[3] * val; in ft_lcd_filter_fir()
117 fir[4] = weights[4] * val; in ft_lcd_filter_fir()
122 fir[0] = fir[1] + weights[0] * val; in ft_lcd_filter_fir()
123 fir[1] = fir[2] + weights[1] * val; in ft_lcd_filter_fir()
[all …]
/external/tensorflow/tensorflow/contrib/learn/python/learn/estimators/
Dhead.py559 def _mean_squared_loss(labels, logits, weights=None): argument
572 return _compute_weighted_loss(loss, weights)
575 def _poisson_loss(labels, logits, weights=None): argument
589 return _compute_weighted_loss(loss, weights)
783 def _metrics(self, eval_loss, predictions, labels, weights): argument
785 del predictions, labels, weights # Unused by this head.
792 def _log_loss_with_two_classes(labels, logits, weights=None): argument
803 return _compute_weighted_loss(loss, weights)
918 def _metrics(self, eval_loss, predictions, labels, weights): argument
921 [eval_loss, labels, weights] + list(six.itervalues(predictions)))):
[all …]
/external/tensorflow/tensorflow/contrib/seq2seq/python/kernel_tests/
Dloss_test.py49 weights = [
53 self.weights = array_ops.stack(weights, axis=1)
62 self.logits, self.targets, self.weights,
69 self.logits, self.targets, self.weights,
77 self.logits, self.targets, self.weights,
85 self.logits, self.targets, self.weights,
101 self.targets, self.logits, self.weights)
110 self.targets, self.logits, self.weights)
120 self.targets, self.logits, self.weights)
130 self.targets, self.logits, self.weights)
[all …]
/external/tensorflow/tensorflow/contrib/eager/python/
Dmetrics_impl.py313 def call(self, values, weights=None): argument
326 if weights is None:
332 weights = math_ops.cast(weights, self.dtype)
333 self.denom.assign_add(math_ops.reduce_sum(weights))
334 values = math_ops.cast(values, self.dtype) * weights
336 if weights is None:
338 return values, weights
376 def call(self, labels, predictions, weights=None): argument
399 super(Accuracy, self).call(matches, weights=weights)
400 if weights is None:
[all …]
/external/cldr/tools/scripts/uca/
Dblankweights.sed1 # Blank out non-zero weights.
3 # Most of the collation element weights change with every new version.
4 # "Blanking out" the weights makes files comparable,
5 # for finding changes in sort order and changes in lengths of weights.
9 # protect allkeys 0000 weights
12 # fractional primary weights
16 # fractional secondary weights
19 # fractional tertiary weights
22 # allkeys primary weights
25 # allkeys secondary weights
[all …]
/external/tensorflow/tensorflow/core/lib/random/
Ddistribution_sampler_test.cc34 float TestWeights(const std::vector<float>& weights, int trials_per_bin) { in TestWeights() argument
35 int iters = weights.size() * trials_per_bin; in TestWeights()
36 std::unique_ptr<float[]> counts(new float[weights.size()]); in TestWeights()
37 memset(counts.get(), 0, sizeof(float) * weights.size()); in TestWeights()
38 DistributionSampler sampler(weights); in TestWeights()
43 EXPECT_LT(r, weights.size()); in TestWeights()
48 for (size_t i = 0; i < weights.size(); i++) { in TestWeights()
50 float err = (counts[i] - weights[i]); in TestWeights()
51 chi2 += (err * err) / weights[i]; in TestWeights()
89 std::vector<float> weights(n, 0); in BM_DistributionSampler() local
[all …]
Dweighted_picker_test.cc34 static void TestPickAt(int items, const int32* weights);
103 static const int32 weights[] = {1, 0, 200, 5, 42}; in TEST() local
104 TestPickAt(TF_ARRAYSIZE(weights), weights); in TEST()
132 std::vector<int32> weights(size); in TestPicker() local
134 weights[elem] = 0; in TestPicker()
143 weights[elem] = 10; in TestPicker()
144 picker.SetWeightsFromArray(size, &weights[0]); in TestPicker()
146 weights[elem] = 0; in TestPicker()
171 weights[elem] = weight; in TestPicker()
178 array_picker.SetWeightsFromArray(size, &weights[0]); in TestPicker()
[all …]
/external/libtextclassifier/lang_id/common/flatbuffers/
Dembedding-network-params-from-flatbuffer.h93 const saft_fbs::Matrix *weights = SafeGetLayerWeights(i); in hidden_num_rows() local
94 return SafeGetNumRows(weights); in hidden_num_rows()
98 const saft_fbs::Matrix *weights = SafeGetLayerWeights(i); in hidden_num_cols() local
99 return SafeGetNumCols(weights); in hidden_num_cols()
103 const saft_fbs::Matrix *weights = SafeGetLayerWeights(i); in hidden_weights_quant_type() local
104 return SafeGetQuantizationType(weights); in hidden_weights_quant_type()
108 const saft_fbs::Matrix *weights = SafeGetLayerWeights(i); in hidden_weights() local
109 return SafeGetValuesOfMatrix(weights); in hidden_weights()
132 const saft_fbs::Matrix *weights = SafeGetSoftmaxWeights(); in softmax_num_rows() local
133 return SafeGetNumRows(weights); in softmax_num_rows()
[all …]
/external/tensorflow/tensorflow/contrib/learn/python/learn/
Dmetric_spec.py162 _sentinel=None, labels=None, predictions=None, weights=None): argument
168 if weights is not None:
169 kwargs[weights_arg] = weights
178 _sentinel=None, labels=None, predictions=None, weights=None): argument
183 if weights is None:
185 return metric_fn(labels, predictions, **{weights_arg: weights})
191 _sentinel=None, labels=None, predictions=None, weights=None): argument
196 if weights is not None:
197 kwargs[weights_arg] = weights
204 _sentinel=None, labels=None, predictions=None, weights=None): argument
[all …]
Dmetric_spec_test.py35 def _fn0(predictions, labels, weights=None): argument
38 self.assertEqual("f2_value", weights)
41 def _fn1(predictions, targets, weights=None): argument
44 self.assertEqual("f2_value", weights)
222 def _fn(predictions, labels, weights=None): argument
223 del labels, predictions, weights
238 def _fn(labels, predictions, weights=None): argument
239 del labels, predictions, weights
254 def _fn(predictions, labels, weights=None): argument
257 self.assertEqual("f2_value", weights)
[all …]
/external/tensorflow/tensorflow/contrib/model_pruning/python/
Dpruning_utils_test.py57 def _compare_pooling_methods(self, weights, pooling_kwargs): argument
63 weights,
64 [1, weights.get_shape()[0],
65 weights.get_shape()[1], 1]), **pooling_kwargs),
68 weights, **pooling_kwargs)
84 weights = variable_scope.get_variable("weights", shape=input_shape)
91 self._compare_pooling_methods(weights, pooling_kwargs)
94 weights = variable_scope.get_variable("weights", shape=input_shape)
101 self._compare_pooling_methods(weights, pooling_kwargs)
104 weights = random_ops.random_normal(shape=input_shape)
[all …]
/external/tensorflow/tensorflow/examples/android/jni/object_tracking/
Dframe_pair.cc36 static float weights[kMaxKeypoints]; in AdjustBox() local
38 memset(weights, 0.0f, sizeof(*weights) * kMaxKeypoints); in AdjustBox()
42 FillWeights(resized_box, weights); in AdjustBox()
45 const Point2f translation = GetWeightedMedian(weights, deltas); in AdjustBox()
52 FillScales(old_center, translation, weights, deltas); in AdjustBox()
71 const float scale_factor = GetWeightedMedianScale(weights, deltas); in AdjustBox()
81 float* const weights) const { in FillWeights()
95 weights[i] = 0.0f; in FillWeights()
131 weights[i] = distance_score * intrinsic_score; in FillWeights()
151 float* const weights, in FillScales() argument
[all …]
/external/tensorflow/tensorflow/contrib/boosted_trees/python/utils/
Dlosses.py30 def per_example_squared_hinge_loss(labels, weights, predictions): argument
31 loss = losses.hinge_loss(labels=labels, logits=predictions, weights=weights)
35 def per_example_logistic_loss(labels, weights, predictions): argument
50 return unweighted_loss * weights, control_flow_ops.no_op()
60 def per_example_quantile_regression_loss(labels, weights, predictions, argument
89 if weights is None:
92 return unweighted_loss * weights, control_flow_ops.no_op()
97 def per_example_maxent_loss(labels, weights, logits, num_classes, eps=1e-15): argument
151 if weights is None:
154 return unweighted_loss * weights, control_flow_ops.no_op()
[all …]

12345678910>>...38