/external/tensorflow/tensorflow/contrib/learn/python/learn/estimators/ |
logistic_regressor_test.py | 43 labels = constant_op.constant(iris.target[ids], dtype=dtypes.float32) 44 labels = array_ops.reshape(labels, labels.get_shape().concatenate(1)) 45 return features, labels 48 def _logistic_regression_model_fn(features, labels, mode): 58 loss = losses.sigmoid_cross_entropy(labels, logits)
|
dnn_linear_combined_test.py | 78 self, mode, features, labels=None, train_op_fn=None, logits=None, 82 loss = losses.mean_squared_error(labels, logits) 134 labels = constant_op.constant([[0], [0], [0]], dtype=dtypes.int32) 137 dnn_linear_combined._dnn_linear_combined_model_fn(features, labels, 175 labels = constant_op.constant([[1], [0], [0]], dtype=dtypes.int32) 178 features, labels, model_fn.ModeKeys.TRAIN, params) 323 labels = constant_op.constant([[0.8], [0.], [0.2]], dtype=dtypes.float32) 324 return features, labels 396 labels = array_ops.reshape( 399 return features, labels [all...] |
rnn_common.py | 141 prediction_dict, labels): 153 labels: The label `Tensor`. 163 prediction_dict[prediction_key.PredictionKey.CLASSES], labels, 166 predictions=mask_predictions, labels=mask_labels) 171 labels=labels) 212 def mask_activations_and_labels(activations, labels, sequence_lengths): 217 labels: Label values, shape `[batch_size, padded_length]`. 232 values=[activations, labels, sequence_lengths]): 233 labels_shape = array_ops.shape(labels) [all...] |
/external/tensorflow/tensorflow/examples/tutorials/layers/ |
cnn_mnist.py | 26 def cnn_model_fn(features, labels, mode): 100 loss = tf.losses.sparse_softmax_cross_entropy(labels=labels, logits=logits) 113 labels=labels, predictions=predictions["classes"])} 122 train_labels = np.asarray(mnist.train.labels, dtype=np.int32) 124 eval_labels = np.asarray(mnist.test.labels, dtype=np.int32)
|
/external/autotest/cli/ |
host.py | 93 def _cleanup_labels(self, labels, platform=None): 94 """Removes the platform label from the overall labels""" 96 return [label for label in labels 100 return [label for label in labels 105 return labels 127 help='Only list hosts with all these labels ' 166 label_info = topic_common.item_parse_info(attribute_name='labels', 193 if self.labels: 194 self.label_map = device.convert_to_label_map(self.labels) 209 # TODO(nxia): support filtering on run-time labels and status [all...] |
/external/autotest/scheduler/ |
rdb_hosts.py | 109 self.labels = rdb_utils.LabelIterator(host.labels.all()) 169 host_info['labels'] = self.labels.get_label_names() 207 # We access labels for metrics generation below and it's awkward not 208 # knowing if labels were populated or not. 209 if not hasattr(self, 'labels'): 210 self.labels = () 316 """Get the platform and labels on this host. 321 labels = [label for label in self.labels if label != platform [all...] |
/external/antlr/tool/src/test/java/org/antlr/test/ |
TestTreeWizard.java | 199 public void visit(Object t, Object parent, int childIndex, Map<String, Object> labels) { 217 public void visit(Object t, Object parent, int childIndex, Map<String, Object> labels) { 251 public void visit(Object t, Object parent, int childIndex, Map<String, Object> labels) { 269 public void visit(Object t, Object parent, int childIndex, Map<String, Object> labels) { 272 "["+childIndex+"]"+labels.get("a")+"&"+labels.get("b")); 336 Map<String, Object> labels = new HashMap<String, Object>(); local 337 boolean valid = wiz.parse(t, "(%a:A %b:B %c:C)", labels); 339 assertEquals("A", labels.get("a").toString()); 340 assertEquals("B", labels.get("b").toString()) 347 Map<String, Object> labels = new HashMap<String, Object>(); local 357 Map<String, Object> labels = new HashMap<String, Object>(); local 368 Map<String, Object> labels = new HashMap<String, Object>(); local [all...] |
/external/tensorflow/tensorflow/contrib/losses/python/metric_learning/ |
metric_loss_ops_test.py | 72 labels = np.random.randint(0, 2, size=(num_data,)).astype(np.float32) 78 labels * np.square(dist) + 79 (1.0 - labels) * np.square(np.maximum(margin - dist, 0.0))) 82 labels=ops.convert_to_tensor(labels), 100 labels = np.random.randint( 103 # Reshape labels to compute adjacency matrix. 104 labels_reshaped = np.reshape(labels, (labels.shape[0], 1)) 139 labels=ops.convert_to_tensor(labels) [all...] |
/external/tensorflow/tensorflow/contrib/boosted_trees/estimator_batch/ |
dnn_tree_combined_estimator.py | 68 labels, 94 labels: Labels used to train on. 298 update_op = gbdt_model.train(loss, predictions_dict, labels) 328 labels=labels, 336 labels=labels, 342 labels=labels, [all...] |
estimator.py | 77 labels which are the output of `input_fn` and returns features and 78 labels which will be fed into the model. 107 def loss_fn(labels, logits, weights=None): 109 labels=labels, 175 label_dimension: Number of regression labels per example. This is the size 176 of the last dimension of the labels `Tensor` (typically, this has shape 187 labels which are the output of `input_fn` and returns features and 188 labels which will be fed into the model. 278 labels which are the output of `input_fn` and returns features an [all...] |
/external/tensorflow/tensorflow/contrib/layers/python/layers/ |
target_column.py | 168 def get_eval_ops(self, features, logits, labels, metrics=None): 217 target: either a tensor for labels or in multihead case, a dict of string 243 target: either a tensor for labels or in multihead case, a dict of string 279 def get_eval_ops(self, features, logits, labels, metrics=None): 280 loss = self.loss(logits, labels, features) 285 _run_metrics(predictions, labels, metrics, 318 def get_eval_ops(self, features, logits, labels, metrics=None): 319 loss = self.loss(logits, labels, features) 329 labels_float = math_ops.cast(labels, dtypes.float32) 359 _run_metrics(class_predictions, labels, class_metrics [all...] |
/external/tensorflow/tensorflow/contrib/eager/python/examples/revnet/ |
imagenet_input.py | 93 def set_shapes(self, batch_size, images, labels): 98 labels.set_shape(labels.get_shape().merge_with( 103 labels.set_shape(labels.get_shape().merge_with( 106 return images, labels 131 # Subtract one so that labels are in [0, 1000). 200 lambda images, labels: (tf.transpose(images, [1, 2, 3, 0]), labels), 219 lambda images, labels: (tf.transpose(images, [1, 2, 3, 0]), labels) [all...] |
/external/toolchain-utils/crosperf/ |
experiment_factory_unittest.py | 61 self.assertEqual(len(exp.labels), 2) 62 self.assertEqual(exp.labels[0].chromeos_image, 64 self.assertEqual(exp.labels[0].board, 'x86-alex') 167 self.assertEqual(len(exp.labels), 1) 168 self.assertEqual(exp.labels[0].chromeos_image, 171 self.assertEqual(exp.labels[0].autotest_path, '/tmp/autotest') 172 self.assertEqual(exp.labels[0].board, 'lumpy') 174 # Second test: Remotes listed in labels. 213 self.assertEqual(len(exp.labels), 2) 214 self.assertEqual(exp.labels[1].chromeos_image, 'fake_image_path' [all...] |
/external/antlr/runtime/Java/src/main/java/org/antlr/runtime/tree/ |
TreeWizard.java | 59 public void visit(Object t, Object parent, int childIndex, Map<String, Object> labels); 64 public void visit(Object t, Object parent, int childIndex, Map<String, Object> labels) { 232 public void visit(Object t, Object parent, int childIndex, Map labels) { 250 * version of the general visit(t, pattern) method. The labels arg 291 final Map<String, Object> labels = new HashMap<String, Object>(); // reused for each _parse local 297 labels.clear(); 298 if ( _parse(t, tpattern, labels) ) { 299 visitor.visit(t, parent, childIndex, labels); 305 /** Given a pattern like (ASSIGN %lhs:ID %rhs:.) with optional labels 307 * return true if the pattern matches and fill the labels Map wit [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. 93 labels: Label values, a `Tensor` whose dimensions match `predictions`. 97 Tuple of `predictions` and `labels`, possibly with last dim squeezed. 100 [predictions, labels]): 102 labels = ops.convert_to_tensor(labels) 105 labels_shape = labels.get_shape() 111 labels = array_ops.squeeze(labels, [-1] [all...] |
/external/tensorflow/tensorflow/examples/tf2_showcase/ |
mnist.py | 125 def loss(logits, labels): 128 logits=logits, labels=labels)) 131 def compute_accuracy(logits, labels): 133 labels = tf.cast(labels, tf.int64) 135 tf.cast(tf.equal(predictions, labels), dtype=tf.float32)) 144 for (batch, (images, labels)) in enumerate(dataset): 154 loss_value = loss(logits, labels) 156 tf.contrib.summary.scalar('accuracy', compute_accuracy(logits, labels)) [all...] |
/external/autotest/server/hosts/ |
base_label.py | 18 Decorator for labels that should exist forever once applied. 36 return (self._NAME in info.labels) or exists(self, host) 42 This class contains the scaffolding for the host-specific labels. 52 Return the list of labels generated for the host. 57 @return a list of labels applicable to the host. 66 This method is geared for the type of labels that indicate if the host 78 Return the list of labels. 90 Return all possible labels generated by this label class. 92 @returns a tuple of sets, the first set is for labels that are prefixes 93 like 'os:android'. The second set is for labels that are ful [all...] |
/external/tensorflow/tensorflow/contrib/distributions/python/ops/ |
estimator.py | 54 label_dimension: Number of regression labels per example. This is the size 55 of the last dimension of the labels `Tensor` (typically, this has shape 110 label_dimension: Number of regression labels per example. This is the 111 size of the last dimension of the labels `Tensor` (typically, this has 149 def loss_fn(labels, logits, weights=None): 150 """Returns the loss of using `logits` to predict `labels`.""" 152 labels_batch_shape = labels.shape.with_rank_at_least(1)[:-1] 155 else array_ops.shape(labels)[:-1]) 156 labels = array_ops.reshape( 157 labels, [all...] |
/external/tensorflow/tensorflow/examples/get_started/regression/ |
custom_regression.py | 29 def my_dnn_regression_fn(features, labels, mode, params): 52 average_loss = tf.losses.mean_squared_error(labels, predictions) 56 batch_size = tf.shape(labels)[0] 72 rmse = tf.metrics.root_mean_squared_error(labels, predictions) 89 # Switch the labels to units of thousands for better convergence. 90 def normalize_price(features, labels): 91 return features, labels / PRICE_NORM_FACTOR
|
/external/tensorflow/tensorflow/python/keras/engine/ |
training_gpu_test.py | 77 # Labels for testing 4-class sparse_categorical_crossentropy, 4-class 97 labels = np.moveaxis(labels_channels_first[index], 1, -1) 99 model = prepare_simple_model(inputs, loss_function, labels) 100 loss_channels_last[index] = model.evaluate(x=data, y=labels, 108 labels = labels_channels_first[index] 110 model = prepare_simple_model(inputs, loss_function, labels) 111 loss_channels_first[index] = model.evaluate(x=data, y=labels,
|
/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, 54 labels, predictions, dtype=dtype, weights=weights, 60 labels = np.arange(5, dtype=dtype) 71 self._testConfMatrix(labels=labels, predictions=predictions, truth=truth) 124 labels = np.asarray([4, 5, 6], dtype=dtype) 137 self._testConfMatrix(labels=labels, predictions=predictions, truth=truth) 148 labels = np.asarray([1, 1, 2, 3, 5, 1, 3, 6, 3, 1], dtype=dtype [all...] |
/external/autotest/frontend/client/src/autotest/afe/ |
HostDataSource.java | 48 JSONArray labels = host.get("labels").isArray(); local 50 for (int i = 0; i < labels.size(); i++) { 51 String label = labels.get(i).isString().stringValue();
|
/external/autotest/server/site_tests/hardware_StorageQualCheckSetup/ |
hardware_StorageQualCheckSetup.py | 18 Each of the labels [retention, trim, suspend] is applied to exactly 20 No duplication of the labels, all labels are applied exactly once 37 labels = [label.name for label in host.get_labels()] 40 for label in labels: 49 'labels': labels 87 host_provided_labels = set(host['labels']) & required_set 109 # check that all storage qual labels are accounted for in the pool 113 'Pool %s is missing required labels %s' [all...] |
/external/tensorflow/tensorflow/contrib/metrics/python/ops/ |
metric_ops_large_test.py | 42 labels = math_ops.greater(random_ops.random_uniform(shape, 0.0, 1.0), 0.5) 45 labels=labels, predictions=predictions, num_thresholds=201) 59 # negative labels, hence their sum should be total number of pixels.
|
/external/tensorflow/tensorflow/core/kernels/ |
sparse_xent_op_test.cc | 30 Tensor labels(DT_INT64, TensorShape({batch_size})); 34 auto labels_t = labels.flat<int64>(); 40 test::graph::Constant(g, labels));
|