Home
last modified time | relevance | path

Searched refs:one_hot (Results 1 – 25 of 79) sorted by relevance

1234

/external/tensorflow/tensorflow/core/api_def/base_api/
Dapi_def_OneHot.pbtxt80 [5.0 0.0 0.0] // one_hot(0)
81 [0.0 0.0 5.0] // one_hot(2)
82 [0.0 0.0 0.0] // one_hot(-1)
83 [0.0 5.0 0.0] // one_hot(1)
102 // ^ one_hot(0)
103 // ^ one_hot(2)
104 // ^ one_hot(-1)
105 // ^ one_hot(1)
121 [1.0, 0.0, 0.0] // one_hot(0)
122 [0.0, 0.0, 1.0] // one_hot(2)
[all …]
/external/tensorflow/tensorflow/contrib/learn/python/learn/datasets/
Dmnist.py86 def extract_labels(f, one_hot=False, num_classes=10): argument
109 if one_hot:
128 one_hot=False, argument
146 self.one_hot = one_hot
187 if self.one_hot:
234 one_hot=False, argument
244 [], [], fake_data=True, one_hot=one_hot, dtype=dtype, seed=seed)
267 train_labels = extract_labels(f, one_hot=one_hot)
277 test_labels = extract_labels(f, one_hot=one_hot)
/external/tensorflow/tensorflow/python/keras/utils/
Dnp_utils_test.py40 for label, one_hot, expected_shape in zip(labels,
44 self.assertEqual(one_hot.shape, expected_shape)
46 self.assertTrue(np.all(one_hot.sum(axis=-1) == 1))
49 np.argmax(one_hot, -1).reshape(label.shape) == label))
/external/tensorflow/tensorflow/python/keras/preprocessing/
Dtext.py27 one_hot = text.one_hot variable
33 keras_export('keras.preprocessing.text.one_hot')(one_hot)
Dtext_test.py32 encoded = keras.preprocessing.text.one_hot(text, 5)
39 encoded = keras.preprocessing.text.one_hot(text, 5)
/external/tensorflow/tensorflow/python/ops/
Dctc_ops.py437 initial_state_log_probs = array_ops.one_hot(
443 label_final_state_mask = array_ops.one_hot(
461 one_hot = array_ops.one_hot(labels, depth=num_labels)
462 one_hot = array_ops.expand_dims(one_hot, axis=0)
464 state_log_probs = math_ops.reduce_sum(ilabel_log_probs * one_hot, axis=3)
477 one_hot = array_ops.one_hot(
480 one_hot = array_ops.expand_dims(one_hot, axis=0)
482 label_olabels = math_ops.reduce_logsumexp(label_states + one_hot, axis=2)
936 one_hot = array_ops.one_hot(
939 return math_ops.reduce_logsumexp(states + one_hot, axis=-1)
/external/tensorflow/tensorflow/contrib/gan/python/features/python/
Dconditioning_utils_impl.py79 def _one_hot_to_embedding(one_hot, embedding_size): argument
81 num_tokens = one_hot.shape[1]
82 label_id = math_ops.argmax(one_hot, axis=1)
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Done_hot_op.cc65 xla::XlaOp one_hot; in Compile() local
69 ctx->Input(3), &one_hot)); in Compile()
70 ctx->SetOutput(0, one_hot); in Compile()
/external/tensorflow/tensorflow/lite/kernels/
Done_hot.cc24 namespace one_hot { namespace
191 one_hot::Prepare, in Register_ONE_HOT()
192 one_hot::Eval, in Register_ONE_HOT()
/external/tensorflow/tensorflow/contrib/eager/python/examples/densenet/
Ddensenet_graph_test.py43 one_hot = np.zeros((batch_size, num_classes)).astype(np.float32)
44 one_hot[np.arange(batch_size), labels] = 1.
45 return images, one_hot
Ddensenet_test.py169 one_hot = tf.one_hot(labels, num_classes)
171 return images, one_hot
/external/tensorflow/tensorflow/contrib/layers/python/layers/
Dfeature_column_test.py334 one_hot = fc.one_hot_column(sparse_column)
341 one_hot_output = one_hot._to_dnn_input_layer(
351 one_hot = fc.one_hot_column(weighted_ids)
352 self.assertEqual(one_hot.sparse_id_column.name, "ids_weighted_by_weights")
353 self.assertEqual(one_hot.length, 3)
359 one_hot = fc.one_hot_column(weighted_ids)
360 self.assertEqual(one_hot.sparse_id_column.name, "ids_weighted_by_weights")
361 self.assertEqual(one_hot.length, vocab_size)
369 one_hot = fc.one_hot_column(weighted)
373 one_hot_output = one_hot._to_dnn_input_layer(
[all …]
/external/tensorflow/tensorflow/contrib/eager/python/examples/resnet50/
Dresnet50_graph_test.py46 one_hot = np.zeros((batch_size, num_classes)).astype(np.float32)
47 one_hot[np.arange(batch_size), labels] = 1.
48 return images, one_hot
Dresnet50_test.py48 one_hot = tf.one_hot(labels, num_classes)
50 return images, one_hot
/external/tensorflow/tensorflow/contrib/gan/python/
Dtrain_test.py92 array_ops.one_hot(
104 array_ops.one_hot(
224 one_hot_labels=array_ops.one_hot([0, 1, 2], 10),
225 discriminator_real_classification_logits=array_ops.one_hot([0, 1, 3], 10),
226 discriminator_gen_classification_logits=array_ops.one_hot([0, 1, 4], 10))
232 one_hot_labels=array_ops.one_hot([0, 1, 2], 10),
233 discriminator_real_classification_logits=array_ops.one_hot([0, 1, 3], 10),
234 discriminator_gen_classification_logits=array_ops.one_hot([0, 1, 4], 10))
243 one_hot_labels=array_ops.one_hot([0, 1, 2], 10))
252 one_hot_labels=array_ops.one_hot([0, 1, 2], 10))
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/
Dxla_helpers.cc87 const xla::XlaOp& off_value, xla::XlaOp* one_hot) { in OneHot() argument
101 *one_hot = xla::Select( in OneHot()
Dxla_helpers.h64 const xla::XlaOp& off_value, xla::XlaOp* one_hot);
/external/tensorflow/tensorflow/contrib/keras/api/keras/preprocessing/text/
D__init__.py21 from tensorflow.python.keras.preprocessing.text import one_hot
/external/tensorflow/tensorflow/contrib/distributions/python/ops/
Donehot_categorical.py192 samples = array_ops.one_hot(samples, self.event_size, dtype=self.dtype)
221 ret = array_ops.one_hot(ret, self.event_size, dtype=self.dtype)
/external/tensorflow/tensorflow/contrib/seq2seq/python/ops/
Dbeam_search_decoder.py701 self._finished = array_ops.one_hot(
720 log_probs = array_ops.one_hot( # shape(batch_sz, beam_sz)
885 self._finished = array_ops.one_hot(
895 log_probs = array_ops.one_hot( # shape(batch_sz, beam_sz)
982 lengths_to_add = array_ops.one_hot(
1290 finished_row = array_ops.one_hot(
/external/tensorflow/tensorflow/core/kernels/fuzzing/
DBUILD71 tf_ops_fuzz_target_lib("one_hot")
/external/tensorflow/tensorflow/contrib/eager/python/examples/rnn_colorbot/
Drnn_colorbot_test.py37 chars = tf.one_hot(
/external/tensorflow/tensorflow/contrib/gan/python/estimator/python/
Dstargan_estimator_test.py70 input_data_domain_label = array_ops.one_hot([0] * 6, 5)
266 return features['x'], array_ops.one_hot([0] * batch_size, label_size)
/external/tensorflow/tensorflow/contrib/kernel_methods/python/
Dlosses.py129 one_cold_labels = array_ops.one_hot(
/external/tensorflow/tensorflow/contrib/seq2seq/python/kernel_tests/
Dbasic_decoder_test.py381 return array_ops.one_hot(samples, cell_depth, dtype=dtypes.float32)
512 start_inputs = array_ops.one_hot(
520 lambda x: array_ops.one_hot(x, vocabulary_size, dtype=dtypes.float32))
593 start_inputs = array_ops.one_hot(

1234