/external/tensorflow/tensorflow/contrib/predictor/ |
testing_common.py | 53 predictions = {'sum': math_ops.add(x, y, name='sum'), 58 for k, v in predictions.items()} 62 predictions=predictions, 68 for k, v in predictions.items()} 71 predictions=predictions,
|
/external/tensorflow/tensorflow/contrib/learn/python/learn/estimators/ |
estimators_test.py | 63 predictions = features["transformed_x"] 66 return predictions, loss, update_global_step 72 # predictions = transformed_x (9) 78 "label": metric_spec.MetricSpec(lambda predictions, labels: labels) 103 predictions = features["x"] 106 return predictions, loss, update_global_step 112 # predictions = transformed_x (9) 118 "label": metric_spec.MetricSpec(lambda predictions, labels: labels) 144 predictions = features["x"] 147 return predictions, loss, update_global_ste [all...] |
estimator_input_test.py | 149 mode=mode, predictions=prediction, loss=loss, train_op=train_op) 199 predictions = np.array(list(est2.predict(x=boston_input))) 200 other_score = _sklearn.mean_squared_error(predictions, 215 predictions = np.array(list(est.predict(x=boston.data))) 216 other_score = _sklearn.mean_squared_error(predictions, boston.target) 233 predictions = np.array(list(est.predict(x=boston_input))) 234 other_score = _sklearn.mean_squared_error(predictions, boston.target) 250 predictions = est.predict(x=iris.data) 252 self.assertEqual(predictions['prob'].shape[0], iris.target.shape[0]) 253 self.assertAllClose(predictions['class'], predictions_class [all...] |
/external/tensorflow/tensorflow/contrib/framework/python/framework/ |
tensor_util.py | 84 "labels and predictions have also been switched.") 85 def remove_squeezable_dimensions(predictions, labels, name=None): 86 """Squeeze last dim if ranks of `predictions` and `labels` differ by 1. 92 predictions: Predicted values, a `Tensor` of arbitrary dimensions. 93 labels: Label values, a `Tensor` whose dimensions match `predictions`. 97 Tuple of `predictions` and `labels`, possibly with last dim squeezed. 100 [predictions, labels]): 101 predictions = ops.convert_to_tensor(predictions) 103 predictions_shape = predictions.get_shape( [all...] |
/external/tensorflow/tensorflow/python/kernel_tests/ |
confusion_matrix_test.py | 47 labels=[1, 2, 4], predictions=[2, 2, 4]))) 49 def _testConfMatrix(self, labels, predictions, truth, weights=None, 52 dtype = predictions.dtype 54 labels, predictions, dtype=dtype, weights=weights, 61 predictions = np.arange(5, dtype=dtype) 71 self._testConfMatrix(labels=labels, predictions=predictions, truth=truth) 125 predictions = np.asarray([1, 2, 3], dtype=dtype) 137 self._testConfMatrix(labels=labels, predictions=predictions, truth=truth [all...] |
/external/libtextclassifier/lang_id/ |
lang-id_jni.cc | 48 const std::vector<std::pair<std::string, float>>& predictions = local 49 lang_id_result.predictions; 54 env->NewObjectArray(predictions.size(), result_class.get(), nullptr); 55 for (int i = 0; i < predictions.size(); i++) { 58 env->NewStringUTF(predictions[i].first.c_str()), 59 static_cast<jfloat>(predictions[i].second)));
|
/external/tensorflow/tensorflow/examples/learn/ |
iris_custom_decay_dnn.py | 40 # Compute predictions. 43 predictions = { 47 return tf.estimator.EstimatorSpec(mode, predictions=predictions) 65 labels=labels, predictions=predicted_classes) 86 predictions = classifier.predict(input_fn=test_input_fn) 87 y_predicted = np.array(list(p['class'] for p in predictions))
|
iris_custom_model.py | 41 # Compute predictions. 44 predictions = { 48 return tf.estimator.EstimatorSpec(mode, predictions=predictions) 62 labels=labels, predictions=predicted_classes) 83 predictions = classifier.predict(input_fn=test_input_fn) 84 y_predicted = np.array(list(p['class'] for p in predictions))
|
/cts/tests/tests/gesture/src/android/gesture/cts/ |
GestureStorageTester.java | 73 ArrayList<Prediction> predictions = mFixture.recognize(newLineGesture); local 74 assertEquals(1, predictions.size()); 75 assertEquals(TEST_GESTURE_NAME, predictions.get(0).name);
|
/external/tensorflow/tensorflow/contrib/metrics/python/ops/ |
metric_ops_large_test.py | 40 predictions = random_ops.random_uniform( 45 labels=labels, predictions=predictions, num_thresholds=201)
|
/external/tensorflow/tensorflow/core/kernels/ |
in_topk_op.cc | 56 errors::InvalidArgument("predictions must be 2-dimensional")); 60 errors::InvalidArgument("First dimension of predictions ", 64 const auto& predictions = predictions_in.matrix<T>(); variable 74 const auto num_classes = predictions.dimension(1); 79 T target_prediction = predictions(b, target); 84 T pred = predictions(b, i); 103 .HostMemory("predictions") 110 .HostMemory("predictions") 118 .HostMemory("predictions") 126 .HostMemory("predictions") [all...] |
/external/tensorflow/tensorflow/python/saved_model/ |
signature_def_utils_impl.py | 71 def regression_signature_def(examples, predictions): 72 """Creates regression signature from given examples and predictions. 80 predictions: A float `Tensor`. 92 if predictions is None: 93 raise ValueError('Regression predictions cannot be None.') 100 output_tensor_info = utils.build_tensor_info(predictions) 120 """Creates classification signature from given examples and predictions. 213 inputs, loss, predictions=None, metrics=None): 216 predictions=predictions, metrics=metrics [all...] |
/external/tensorflow/tensorflow/contrib/boosted_trees/estimator_batch/ |
custom_loss_head.py | 43 head_name: name of the head. Predictions, summary, metrics keys are 49 metrics_fn: a function that takes predictions dict, labels and weights and 71 def _metrics(self, eval_loss, predictions, labels, weights): 73 return self._metrics_fn(predictions, labels, weights)
|
/external/tensorflow/tensorflow/python/saved_model/model_utils/ |
export_utils.py | 47 # tensors and output predictions, losses, and/or metrics (depending on the mode) 250 mode, serving_export_outputs=None, predictions=None, loss=None, 262 predictions: A dict of Tensors or single Tensor representing model 263 predictions. This argument is only used if serving_export_outputs is not 284 return get_export_outputs(serving_export_outputs, predictions) 287 loss=loss, predictions=predictions, metrics=metrics)} 290 loss=loss, predictions=predictions, metrics=metrics)} 293 def get_export_outputs(export_outputs, predictions) [all...] |
export_output_test.py | 246 predictions = {u'output1': constant_op.constant(['foo'])} 254 outputter = MockSupervisedOutput(loss, predictions, metrics) 257 outputter.predictions['predictions/output1'], predictions['output1']) 265 loss['my_loss'], predictions['output1'], metrics['metrics']) 268 outputter.predictions, {'predictions': predictions['output1']}) 276 self.assertEqual(outputter.predictions, None [all...] |
/external/tensorflow/tensorflow/contrib/tensor_forest/client/ |
random_forest_test.py | 81 predictions = list(classifier.predict(input_fn=predict_input_fn)) 83 [pred['probabilities'] for pred in predictions]) 104 predictions = list(regressor.predict(input_fn=predict_input_fn)) 105 self.assertAllClose([24.], [pred['scores'] for pred in predictions], atol=1) 134 predictions = list(classifier.predict(input_fn=input_fn)) 136 for pred in predictions: 192 predictions = list(est.predict(input_fn=predict_input_fn)) 194 [pred['probabilities'] for pred in predictions]) 219 predictions = list(regressor.predict(input_fn=predict_input_fn)) 221 [[24.]], [pred['predictions'] for pred in predictions], atol=1 [all...] |
/external/tensorflow/tensorflow/contrib/timeseries/examples/ |
known_anomaly.py | 119 # feature, we should get relatively confident predictions before the indicated 121 # those times) and relatively uncertain predictions after. 122 (predictions,) = tuple(estimator.predict( 130 [evaluation["mean"][0], predictions["mean"]], axis=0)) 132 [evaluation["covariance"][0], predictions["covariance"]], axis=0)) 133 all_times = np.concatenate([times, predictions["times"]], axis=0) 143 anomaly_locations.append(predictions["times"][49])
|
lstm.py | 100 # Transforms LSTM output into mean predictions. 121 def _filtering_step(self, current_times, current_values, state, predictions): 127 predictions. This distinction can be important for probabilistic models, 129 predictions. 136 predictions: The output of the previous `_prediction_step`. 138 A tuple of new state and a predictions dictionary updated to include a 150 predictions["loss"] = tf.reduce_mean( 156 return (new_state_tuple, predictions) 196 # predictions. In this example the features have no extra information, but 229 (predictions,) = tuple(estimator.predict [all...] |
/external/tensorflow/tensorflow/examples/get_started/regression/ |
custom_regression.py | 43 # Reshape the output layer to a 1-dim Tensor to return predictions 44 predictions = tf.squeeze(output_layer, 1) 47 # In `PREDICT` mode we only need to return predictions. 49 mode=mode, predictions={"price": predictions}) 52 average_loss = tf.losses.mean_squared_error(labels, predictions) 72 rmse = tf.metrics.root_mean_squared_error(labels, predictions)
|
/external/tensorflow/tensorflow/examples/tutorials/layers/ |
cnn_mnist.py | 89 predictions = { 90 # Generate predictions (for PREDICT and EVAL mode) 97 return tf.estimator.EstimatorSpec(mode=mode, predictions=predictions) 113 labels=labels, predictions=predictions["classes"])} 130 # Set up logging for predictions
|
/external/tensorflow/tensorflow/python/keras/ |
integration_test.py | 63 predictions = model.predict(x_train) 64 self.assertEqual(predictions.shape, (x_train.shape[0], 2)) 102 predictions = model.predict(x_train) 103 self.assertEqual(predictions.shape, (x_train.shape[0], 2)) 137 predictions = model.predict(x_train) 138 self.assertEqual(predictions.shape, (x_train.shape[0], 2)) 166 predictions = model.predict(x_train) 167 self.assertEqual(predictions.shape, (x_train.shape[0], 2)) 204 predictions = model.predict(x_train) 205 self.assertEqual(predictions.shape, (x_train.shape[0], 2) [all...] |
/external/tensorflow/tensorflow/contrib/layers/python/layers/ |
target_column.py | 283 predictions = self.logits_to_predictions(logits, proba=False) 285 _run_metrics(predictions, labels, metrics, 328 predictions = math_ops.sigmoid(logits) 333 result[metric_name] = metric_op(predictions, labels_float) 362 predictions = self.logits_to_predictions(logits, proba=True) 364 _run_metrics(predictions, labels, proba_metrics, 431 def _run_metrics(predictions, labels, metrics, weights): 433 labels = math_ops.cast(labels, predictions.dtype) 436 result[name] = metric(predictions, labels, weights=weights) 438 result[name] = metric(predictions, labels [all...] |
/external/tensorflow/tensorflow/contrib/boosted_trees/python/utils/ |
losses_test.py | 64 # For positive lables, p oints with predictions 0.7 and larger get minimum 84 predictions = np.array( 89 predictions) 93 np.square(labels[:5] - predictions[:5]), loss[:5], atol=1e-4)
|
/external/tensorflow/tensorflow/examples/speech_commands/ |
label_wav.py | 18 then the predictions from running the model against the audio data will be 61 """Runs the audio data through the graph and prints predictions.""" 64 # predictions will contain a two-dimensional array, where one 66 # predictions per class 68 predictions, = sess.run(softmax_tensor, {input_layer_name: wav_data}) 71 top_k = predictions.argsort()[-num_top_predictions:][::-1] 74 score = predictions[node_id] 81 """Loads the model and labels, and runs the inference to print predictions."""
|
/external/tensorflow/tensorflow/contrib/boosted_trees/python/training/functions/ |
gbdt_batch_test.py | 43 def _squared_loss(label, unused_weights, predictions): 46 math_ops.squared_difference(predictions, label), 1, keepdims=True) 239 predictions = array_ops.constant( 249 "predictions": predictions, 250 "predictions_no_dropout": predictions, 261 _squared_loss(labels, weights, predictions)), 348 predictions = predictions_dict["predictions"] 354 _squared_loss(labels, weights, predictions)), [all...] |