HomeSort by relevance Sort by last modified time
    Searched refs:y_pred (Results 1 - 25 of 25) sorted by null

  /external/tensorflow/tensorflow/python/keras/
metrics_functional_test.py 43 y_pred = K.variable(np.random.random((6, 7)))
44 self.assertEqual(K.eval(metric(y_true, y_pred)).shape, (6,))
48 y_pred = K.variable([[0.8, 0.2], [0.6, 0.4], [0.7, 0.3], [0.9, 0.1]])
49 print(K.eval(metric(y_true, y_pred)))
50 self.assertAllEqual(K.eval(metric(y_true, y_pred)), [0., 1., 1., 1.])
54 y_pred = K.variable([[0.8, 0.2], [0.6, 0.4], [0.7, 0.3], [0.9, 0.1]])
55 print(K.eval(metric(y_true, y_pred)))
56 self.assertAllEqual(K.eval(metric(y_true, y_pred)), [0., 1., 1., 1.])
62 y_pred = K.variable(np.random.random((6, 7)))
63 self.assertEqual(K.eval(metric(y_true, y_pred)).shape, (6,)
    [all...]
losses_test.py 59 def __call__(self, y_true, y_pred, sample_weight=None):
60 return (self.mse_fraction * keras.losses.mse(y_true, y_pred) +
61 (1 - self.mse_fraction) * keras.losses.mae(y_true, y_pred))
143 y_pred = keras.backend.variable(np.array([[0.3, 0.2, 0.1],
147 loss = keras.backend.eval(keras.losses.categorical_hinge(y_true, y_pred))
192 y_pred = constant_op.constant([[4., 8.], [12., 3.]])
194 loss = mse_obj(y_true, y_pred, sample_weight=sample_weight)
221 y_pred = constant_op.constant([4, 8, 12, 8, 1, 3],
224 loss = mse_obj(y_true, y_pred)
230 y_pred = constant_op.constant([4, 8, 12, 8, 1, 3]
    [all...]
metrics_confusion_matrix_test.py 58 y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
61 update_op = fp_obj.update_state(y_true, y_pred)
71 y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
74 result = fp_obj(y_true, y_pred, sample_weight=sample_weight)
81 y_pred = constant_op.constant(((0.9, 0.2, 0.8, 0.1), (0.2, 0.9, 0.7, 0.6),
86 update_op = fp_obj.update_state(y_true, y_pred)
95 y_pred = constant_op.constant(((0.9, 0.2, 0.8, 0.1), (0.2, 0.9, 0.7, 0.6),
102 result = fp_obj(y_true, y_pred, sample_weight=sample_weight)
138 y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
141 update_op = fn_obj.update_state(y_true, y_pred)
    [all...]
metrics.py 118 def update_state(self, y_true, y_pred, sample_weight=None):
120 y_pred = tf.cast(y_pred, tf.bool)
122 values = tf.logical_and(tf.equal(y_true, True), tf.equal(y_pred, True))
450 # metric = mean(|y_pred - y_true| / normalizer)
479 def update_state(self, y_true, y_pred, sample_weight=None):
484 y_pred: The predicted values.
493 y_pred = math_ops.cast(y_pred, self._dtype)
494 y_pred, y_true, sample_weight = squeeze_or_expand_dimensions
    [all...]
losses.py 45 * `call()`: Contains the logic for loss calculation using `y_true`, `y_pred`.
50 def call(self, y_true, y_pred):
51 y_pred = ops.convert_to_tensor(y_pred)
52 y_true = math_ops.cast(y_true, y_pred.dtype)
53 return K.mean(math_ops.square(y_pred - y_true), axis=-1)
68 def __call__(self, y_true, y_pred, sample_weight=None):
73 y_pred: The predicted values.
80 the shape of `sample_weight` matches the shape of `y_pred`, then the
81 loss of each measurable element of `y_pred` is scaled by th
    [all...]
metrics_test.py 345 # check y_pred squeeze
470 y_pred = self.l2_norm(self.np_y_pred, axis)
471 self.expected_loss = np.sum(np.multiply(y_true, y_pred), axis=(axis,))
474 self.y_pred = constant_op.constant(self.np_y_pred)
491 loss = cosine_obj(self.y_true, self.y_pred)
502 self.y_pred,
512 loss = cosine_obj(self.y_true, self.y_pred)
535 y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1),
538 update_op = mae_obj.update_state(y_true, y_pred)
548 y_pred = constant_op.constant(((0, 0, 1, 1, 0), (1, 1, 1, 1, 1)
    [all...]
backend.py     [all...]
  /external/tensorflow/tensorflow/python/keras/utils/
losses_utils.py 60 def squeeze_or_expand_dimensions(y_pred, y_true, sample_weight):
63 1. Squeezes last dim of `y_pred` or `y_true` if their rank differs by 1
66 from the new rank of `y_pred`.
73 y_pred: Predicted values, a `Tensor` of arbitrary dimensions.
74 y_true: Optional label `Tensor` whose dimensions match `y_pred`.
76 `y_pred`.
79 Tuple of `y_pred`, `y_true` and `sample_weight`. Each of them possibly has
83 y_pred_shape = y_pred.get_shape()
87 # If sparse matrix is provided as `y_true`, the last dimension in `y_pred`
89 # y_pred = [[.9, .05, .05], [.5, .89, .6], [.05, .01, .94]] (shape=(3, 3)
    [all...]
metrics_utils.py 214 y_pred,
221 For every pair of values in y_true and y_pred:
223 true_positive: y_true == True and y_pred > thresholds
224 false_negatives: y_true == True and y_pred <= thresholds
225 true_negatives: y_true == False and y_pred <= thresholds
226 false_positive: y_true == False and y_pred > thresholds
240 y_true: A `Tensor` whose shape matches `y_pred`. Will be cast to `bool`.
241 y_pred: A floating point `Tensor` of arbitrary shape and whose values are in
257 ValueError: If `y_pred` and `y_true` have mismatched shapes, or if
258 `sample_weight` is not `None` and its shape doesn't match `y_pred`, or i
    [all...]
tf_utils_test.py 137 def custom_loss(y_obs, y_pred):
139 obtained_prediction_box[0] = y_pred
140 return y_pred
  /external/tensorflow/tensorflow/contrib/learn/python/learn/estimators/
_sklearn.py 157 def _accuracy_score(y_true, y_pred):
158 score = y_true == y_pred
162 def _mean_squared_error(y_true, y_pred):
165 if len(y_pred.shape) > 1:
166 y_pred = np.squeeze(y_pred)
167 return np.average((y_true - y_pred)**2)
  /external/tensorflow/tensorflow/python/keras/engine/
training_gpu_test.py 47 loss = lambda y_true, y_pred: K.sparse_categorical_crossentropy( # pylint: disable=g-long-lambda
48 y_true, y_pred, axis=axis)
52 loss = lambda y_true, y_pred: K.categorical_crossentropy( # pylint: disable=g-long-lambda
53 y_true, y_pred, axis=axis)
57 loss = lambda y_true, y_pred: K.binary_crossentropy(y_true, y_pred) # pylint: disable=unnecessary-lambda
training_utils.py 815 def call_metric_function(metric_fn, y_true, y_pred, weights=None, mask=None):
818 return metric_fn(y_true, y_pred, sample_weight=weights)
820 mask = math_ops.cast(mask, y_pred.dtype)
823 return metric_fn(y_true, y_pred, sample_weight=mask)
828 return metric_fn(y_true, y_pred, sample_weight=weights)
    [all...]
training.py     [all...]
base_layer.py     [all...]
  /external/libopus/scripts/
dump_rnn.py 32 def binary_crossentrop2(y_true, y_pred):
33 return K.mean(2*K.abs(y_true-0.5) * K.binary_crossentropy(y_pred, y_true), axis=-1)
rnn_train.py 19 def binary_crossentrop2(y_true, y_pred):
20 return K.mean(2*K.abs(y_true-0.5) * K.binary_crossentropy(y_pred, y_true), axis=-1)
  /external/tensorflow/tensorflow/contrib/seq2seq/python/ops/
loss.py 160 def __call__(self, y_true, y_pred, sample_weight=None):
162 return sequence_loss(y_pred, y_true, sample_weight,
170 def call(self, y_true, y_pred):
  /external/tensorflow/tensorflow/contrib/losses/python/metric_learning/
metric_loss_ops_test.py 428 # y_pred = self._get_cluster_ics(D, medoid_ics)
431 y_pred = cluster_ics
433 if sum(y_pred == cluster_idx) == 0:
439 pdists[medoid_ics[cluster_idx], y_pred == cluster_idx]) +
441 y_gt, y_pred)))
443 pdist_in = pdists[y_pred == cluster_idx, :]
444 pdist_in = pdist_in[:, y_pred == cluster_idx]
448 for i in range(y_pred.size):
449 if y_pred[i] != cluster_idx:
465 y_pred == cluster_idx)[0][max_score_idx
    [all...]
  /external/tensorflow/tensorflow/python/keras/mixed_precision/experimental/
keras_test.py 280 def loss_fn(y_true, y_pred):
282 return math_ops.reduce_mean(y_pred)
358 def loss_fn(y_true, y_pred):
360 self.assertEqual(y_pred.dtype, dtypes.float32)
361 return math_ops.reduce_mean(y_pred)
  /external/tensorflow/tensorflow/python/keras/layers/
local_test.py 359 def xent(y_true, y_pred):
366 logits=y_pred)
  /external/libaom/libaom/av1/encoder/
temporal_filter.c 255 const uint8_t *y_frame1, int y_stride, const uint8_t *y_pred,
279 calculate_squared_errors(y_frame1, y_stride, y_pred, y_buf_stride, y_diff_sse,
288 const int pixel_value = y_pred[i * y_buf_stride + j];
416 const uint16_t *y_pred = CONVERT_TO_SHORTPTR(yp); local
427 highbd_calculate_squared_errors(y_frame1, y_stride, y_pred, y_buf_stride,
436 const int pixel_value = y_pred[i * y_buf_stride + j];
    [all...]
  /external/libvpx/libvpx/vp9/encoder/
vp9_temporal_filter.c 224 const uint8_t *y_frame1, int y_stride, const uint8_t *y_pred,
254 y_frame1[i * (int)y_stride + j] - y_pred[i * (int)block_width + j];
273 const int pixel_value = y_pred[i * y_buf_stride + j];
    [all...]
  /external/tensorflow/tensorflow/contrib/distribute/python/
keras_test.py     [all...]
  /external/tensorflow/tensorflow/python/keras/saving/
hdf5_format_test.py 471 def custom_loss(y_true, y_pred):
472 return keras.losses.mse(y_true, y_pred)
    [all...]

Completed in 1569 milliseconds