Searched refs:embeddings (Results 1 - 25 of 38) sorted by relevance

12

/external/libtextclassifier/
H A Dquantization.cc28 void DequantizeAdd8bit(const float* scales, const uint8* embeddings, argument
36 embeddings[bucket_id * bytes_per_embedding + k]);
40 void DequantizeAddNBit(const float* scales, const uint8* embeddings, argument
50 uint16 data = embeddings[bucket_id * bytes_per_embedding + read16_offset];
54 data |= embeddings[bucket_id * bytes_per_embedding + read16_offset + 1]
73 bool DequantizeAdd(const float* scales, const uint8* embeddings, argument
78 DequantizeAdd8bit(scales, embeddings, bytes_per_embedding,
81 DequantizeAddNBit(scales, embeddings, bytes_per_embedding,
H A Dquantization.h28 // Dequantizes embeddings (quantized to 1 to 8 bits) into the floats they
32 bool DequantizeAdd(const float* scales, const uint8* embeddings,
H A Dquantization_test.cc41 std::vector<uint8> embeddings{{/*0: */ 0x00, 0xFF, 0x09, 0x00,
51 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding,
69 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding,
93 std::vector<uint8> embeddings(bytes_per_embedding * num_buckets);
95 std::fill(embeddings.begin(), embeddings.end(), 0);
98 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding,
116 std::vector<uint8> embeddings(bytes_per_embedding * num_buckets, 0xFF);
119 DequantizeAdd(scales.data(), embeddings.data(), bytes_per_embedding,
137 std::vector<uint8> embeddings(bytes_per_embeddin
[all...]
H A Dmodel-executor.cc59 TC_LOG(ERROR) << "Could not build TFLite interpreter for embeddings.";
66 const TfLiteTensor* embeddings = interpreter->tensor(0); local
67 if (embeddings->dims->size != 2) {
70 int num_buckets = embeddings->dims->data[0];
76 int bytes_per_embedding = embeddings->dims->data[1];
85 embedding_size, scales, embeddings, std::move(interpreter)));
91 const TfLiteTensor* scales, const TfLiteTensor* embeddings,
99 embeddings_(embeddings),
88 TFLiteEmbeddingExecutor( std::unique_ptr<const tflite::FlatBufferModel> model, int quantization_bits, int num_buckets, int bytes_per_embedding, int output_embedding_size, const TfLiteTensor* scales, const TfLiteTensor* embeddings, std::unique_ptr<tflite::Interpreter> interpreter) argument
H A Dmodel-executor.h118 const TfLiteTensor* embeddings,
/external/tensorflow/tensorflow/contrib/layers/python/layers/
H A Dencoders.py41 """Maps a sequence of symbols to a vector per example by averaging embeddings.
52 initializer: An initializer for the embeddings, if `None` default for
54 regularizer: Optional regularizer for the embeddings.
63 averaging embeddings.
72 embeddings = variables.model_variable(
73 'embeddings', shape=[vocab_size, embed_dim],
82 [embeddings], sparse_ids, combiner='mean', default_id=0)
87 embedding_ops.embedding_lookup(embeddings, ids),
100 """Maps a sequence of symbols to a sequence of embeddings.
102 Typical use case would be reusing embeddings betwee
[all...]
H A Dembedding_ops.py89 max_norm: If not None, all embeddings are l2-normalized to max_norm before
203 """Looks up embeddings using parameter hashing for each value in `values`.
212 complexity. It also allows for us to maintain embeddings for possibly
252 """Looks up embeddings using parameter hashing for each value in `values`.
264 complexity. It also allows for us to maintain embeddings for possibly
373 """Looks up embeddings of a sparse feature using parameter hashing.
430 embeddings = scattered_embedding_lookup(
434 embeddings = math_ops.sparse_segment_sum(embeddings, idx, segment_ids,
437 embeddings
[all...]
H A Dfeature_column.py267 """Returns arguments to look up embeddings for this column."""
1194 """Returns embeddings for a column based on the computed arguments.
1200 trainable: whether these embeddings should be trainable.
1205 the embeddings.
1219 embeddings = contrib_variables.model_variable(
1228 embeddings,
1248 embeddings = shared_embedding_collection[0]
1249 if embeddings.get_shape() != shape:
1255 "shared embeddings.".format(args.shared_embedding_name))
1257 embeddings
[all...]
/external/tensorflow/tensorflow/python/ops/
H A Dembedding_ops.py15 """Operations for embeddings."""
41 This function gathers embeddings from a single tensor. The gather deals with
45 params: A `Tensor` of embeddings.
46 ids: A `Tensor` indexing the embeddings to be retrieved from `params`.
61 This function optionally clips embeddings to an l2-norm of max_norm.
64 params: A `Tensor` of embeddings retrieved by `_gather`.
66 max_norm: If provided, the embeddings are l2-normalized to the value of
113 applied to each partitioned tensor of retrieved embeddings, colocated
114 with the embeddings. This function will be called with a single `Tensor`
128 embeddings
[all...]
/external/tensorflow/tensorflow/contrib/tensorboard/plugins/projector/
H A Dprojector_config.proto42 repeated EmbeddingInfo embeddings = 2;
H A Dprojector_api_test.py39 emb1 = config.embeddings.add()
/external/tensorflow/tensorflow/contrib/learn/python/learn/ops/
H A Dembeddings_ops.py16 """TensorFlow Ops to work with embeddings.
18 Note: categorical variables are handled via embeddings in many cases.
40 leading dimension of the size of the embeddings.
86 embeddings = vs.get_variable(name + '_embeddings',
88 return embedding_lookup(embeddings, tensor_in)
H A Dops_test.py65 embeddings = ops.categorical_variable(
68 emb1 = sess.run(embeddings,
70 emb2 = sess.run(embeddings,
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/
H A DBidi.java1304 // * 62 indicate embeddings. Where values are zero or not defined, the base
2197 * 62 indicate embeddings. Where values are zero or not defined, the base
2220 * The embeddings array may be null. If present, the values represent
2223 * 61 indicate embeddings. Where values are zero, the base embedding level
2231 * @param embeddings an array containing embedding values for each character
2237 * embeddings arrays.
2243 * @throws IllegalArgumentException if the values in embeddings are
2254 byte[] embeddings,
2261 this(new java.text.Bidi(text, textStart, embeddings, embStart, paragraphLength, flags));
2252 Bidi(char[] text, int textStart, byte[] embeddings, int embStart, int paragraphLength, int flags) argument
/external/tensorflow/tensorflow/examples/tutorials/word2vec/
H A Dword2vec_basic.py189 # Look up embeddings for inputs.
190 with tf.name_scope('embeddings'):
191 embeddings = tf.Variable( variable
193 embed = tf.nn.embedding_lookup(embeddings, train_inputs)
226 # Compute the cosine similarity between minibatch examples and all embeddings.
227 norm = tf.sqrt(tf.reduce_sum(tf.square(embeddings), 1, keep_dims=True))
228 normalized_embeddings = embeddings / norm
300 # Write corresponding labels for the embeddings.
308 # Create a configuration for visualizing embeddings with the labels in TensorBoard.
310 embedding_conf = config.embeddings
[all...]
/external/tensorflow/tensorflow/contrib/nn/python/ops/
H A Dsampling_ops.py48 reduce_logsumexp(matmul(embeddings,
52 The computation of the first term is colocated with the embeddings using
87 def logsumexp_logit(embeddings):
89 math_ops.matmul(embeddings, reweighted_inputs, transpose_b=True),
177 has shape [num_classes, dim]. The (possibly-sharded) class embeddings.
296 [num_classes, dim]. The (possibly-sharded) class embeddings.
/external/tensorflow/tensorflow/python/keras/_impl/keras/layers/
H A Dembeddings.py61 embeddings_initializer: Initializer for the `embeddings` matrix.
63 the `embeddings` matrix.
65 the `embeddings` matrix.
116 self.embeddings = self.add_weight(
119 name='embeddings',
156 out = K.gather(self.embeddings, inputs)
H A D__init__.py30 from tensorflow.python.keras._impl.keras.layers.embeddings import *
H A Dserialization.py29 from tensorflow.python.keras._impl.keras.layers.embeddings import *
/external/tensorflow/tensorflow/contrib/losses/python/metric_learning/
H A Dmetric_loss_ops_test.py140 embeddings=ops.convert_to_tensor(embedding),
193 embeddings=ops.convert_to_tensor(embedding),
532 embeddings, labels = self._genClusters(n_samples=128, n_clusters=64)
535 embeddings, labels, margin_multiplier, enable_pam_finetuning=False)
538 embeddings=ops.convert_to_tensor(embeddings),
549 embeddings, labels = self._genClusters(n_samples=128, n_clusters=64)
552 embeddings, labels, margin_multiplier, enable_pam_finetuning=True)
555 embeddings=ops.convert_to_tensor(embeddings),
[all...]
H A Dmetric_loss_ops.py161 def triplet_semihard_loss(labels, embeddings, margin=1.0):
164 The loss encourages the positive distances (between a pair of embeddings with
174 embeddings: 2-D float `Tensor` of embedding vectors. Embeddings should
187 pdist_matrix = pairwise_distance(embeddings, squared=True)
412 def lifted_struct_loss(labels, embeddings, margin=1.0):
415 The loss encourages the positive distances (between a pair of embeddings
417 pair of embeddings with different labels) in the mini-batch in a way
424 embeddings: 2-D float `Tensor` of embedding vectors. Embeddings should not
437 pairwise_distances = pairwise_distance(embeddings)
947 embeddings,
[all...]
/external/tensorflow/tensorflow/contrib/seq2seq/python/kernel_tests/
H A Dbasic_decoder_test.py140 embeddings = np.random.randn(vocabulary_size,
143 helper = helper_py.GreedyEmbeddingHelper(embeddings, start_tokens,
192 expected_step_next_inputs = embeddings[expected_sample_ids]
216 embeddings = np.random.randn(vocabulary_size,
219 helper = helper_py.SampleEmbeddingHelper(embeddings, start_tokens,
268 expected_step_next_inputs = embeddings[sample_ids]
284 embeddings = np.random.randn(
291 embedding=embeddings,
355 embeddings[sample_ids[batch_where_sampling]])
/external/tensorflow/tensorflow/python/kernel_tests/
H A Dembedding_ops_test.py15 """Functional tests for ops used with embeddings."""
260 embeddings = constant_op.constant([[2.0]])
264 [embeddings], ids, max_norm=1.0)
270 embeddings = constant_op.constant([[2.0, 4.0], [3.0, 1.0]])
274 [embeddings], ids, max_norm=2.0)
277 math_ops.reduce_sum(embeddings * embeddings, axis=1))
278 normalized = embeddings / array_ops.stack([norms, norms], axis=1)
336 # Fetch num_vals embeddings for random word ids. Since
358 # Fetch num_vals embeddings fo
[all...]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/bidi/
H A DTestBidi.java585 byte[] embeddings = new byte[2]; // all 0
587 Bidi bidi = new Bidi(text.toCharArray(), 0, embeddings, 0, text.length(), flags);
592 java.text.Bidi jb = new java.text.Bidi(text.toCharArray(), 0, embeddings, 0, text.length(), flags);
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/bidi/
H A DTestBidi.java582 byte[] embeddings = new byte[2]; // all 0
584 Bidi bidi = new Bidi(text.toCharArray(), 0, embeddings, 0, text.length(), flags);
589 java.text.Bidi jb = new java.text.Bidi(text.toCharArray(), 0, embeddings, 0, text.length(), flags);

Completed in 972 milliseconds

12