Home
last modified time | relevance | path

Searched refs:embedding_dim (Results 1 – 16 of 16) sorted by relevance

/external/tensorflow/tensorflow/python/keras/layers/
Dlstm_test.py39 embedding_dim = 4
45 input_shape=(num_samples, timesteps, embedding_dim))
50 embedding_dim = 4
54 inputs = keras.layers.Dense(embedding_dim,
55 input_shape=(timesteps, embedding_dim))
65 embedding_dim = 4
67 layer = keras.layers.LSTM(units, input_shape=(None, embedding_dim))
73 x = np.random.random((num_samples, timesteps, embedding_dim))
80 embedding_dim = 4
87 input_shape=(num_samples, timesteps, embedding_dim))
[all …]
Dgru_test.py38 embedding_dim = 4
44 input_shape=(num_samples, timesteps, embedding_dim))
49 embedding_dim = 4
51 layer = keras.layers.GRU(units, input_shape=(None, embedding_dim))
56 x = np.random.random((num_samples, timesteps, embedding_dim))
63 embedding_dim = 4
70 input_shape=(num_samples, timesteps, embedding_dim))
76 embedding_dim = 4
82 input_shape=(num_samples, timesteps, embedding_dim))
87 embedding_dim = 4
[all …]
Dsimplernn_test.py37 embedding_dim = 4
43 input_shape=(num_samples, timesteps, embedding_dim))
48 embedding_dim = 4
50 layer = keras.layers.SimpleRNN(units, input_shape=(None, embedding_dim))
54 x = np.random.random((num_samples, timesteps, embedding_dim))
61 embedding_dim = 4
68 input_shape=(num_samples, timesteps, embedding_dim))
73 embedding_dim = 4
80 input_shape=(num_samples, timesteps, embedding_dim))
83 embedding_dim = 4
[all …]
Dlstm_v2_test.py83 embedding_dim = 4
88 embedding_dim, input_shape=(timesteps, embedding_dim))
98 embedding_dim = 4
100 layer = rnn.LSTM(units, input_shape=(None, embedding_dim))
104 x = np.random.random((num_samples, timesteps, embedding_dim))
130 embedding_dim = 4
135 inputs = keras.Input((timesteps, embedding_dim))
149 inputs = np.random.random((num_samples, timesteps, embedding_dim))
159 embedding_dim = 4
164 inputs = keras.Input((timesteps, embedding_dim))
[all …]
Dgru_v2_test.py111 embedding_dim = 4
113 layer = rnn.GRU(units, input_shape=(None, embedding_dim))
117 x = np.random.random((num_samples, timesteps, embedding_dim))
332 embedding_dim = 4
338 input_shape=(num_samples, timesteps, embedding_dim))
358 embedding_dim = 4
365 input_shape=(num_samples, timesteps, embedding_dim))
368 embedding_dim = 4
377 input_shape=(None, embedding_dim),
381 layer.build((None, None, embedding_dim))
[all …]
Drecurrent_v2_test.py44 embedding_dim = 10
55 keras.layers.Embedding(vocab_size, embedding_dim,
Drecurrent_test.py284 embedding_dim = 4
288 x = keras.Input((time_step, embedding_dim))
295 embedding_dim)).as_list(),
308 np.zeros((batch, time_step, embedding_dim)),
312 x = keras.Input((time_step, embedding_dim))
328 np.zeros((batch, time_step, embedding_dim)),
332 x = keras.Input((time_step, embedding_dim))
345 np.zeros((batch, time_step, embedding_dim)),
349 x = keras.Input((time_step, embedding_dim))
359 np.zeros((batch, time_step, embedding_dim)),
[all …]
/external/tensorflow/tensorflow/contrib/eager/python/examples/rnn_ptb/
Drnn_ptb.py81 def __init__(self, vocab_size, embedding_dim, **kwargs): argument
84 self.embedding_dim = embedding_dim
89 shape=[self.vocab_size, self.embedding_dim],
112 embedding_dim, argument
121 self.embedding = Embedding(vocab_size, embedding_dim)
269 embedding_dim=200,
280 embedding_dim=650,
291 embedding_dim=20,
314 model = PTBModel(corpus.vocab_size(), FLAGS.embedding_dim,
/external/libtextclassifier/lang_id/common/
Dembedding-network.cc159 const int embedding_dim = embedding_matrix.cols; in ConcatEmbeddings() local
167 int feature_offset = concat_offset + feature_type->base() * embedding_dim; in ConcatEmbeddings()
168 SAFTM_CHECK_LE(feature_offset + embedding_dim, concat->size()); in ConcatEmbeddings()
201 for (int i = 0; i < embedding_dim; ++i, ++weights, ++concat_ptr) { in ConcatEmbeddings()
210 for (int i = 0; i < embedding_dim; in ConcatEmbeddings()
222 for (int i = 0; i < embedding_dim / 2; ++i, ++quant_weights) { in ConcatEmbeddings()
/external/tensorflow/tensorflow/python/training/
Dcheckpoint_ops.py422 embedding_dim, argument
471 stddev=1.0 / math.sqrt(embedding_dim))
477 new_col_vocab_size=embedding_dim,
Dcheckpoint_ops_test.py275 embedding_dim=16,
320 embedding_dim=16,
359 embedding_dim=16,
/external/tensorflow/tensorflow/contrib/eager/python/examples/nmt_with_attention/
Dnmt_with_attention.ipynb331 "embedding_dim = 256\n",
416 " def __init__(self, vocab_size, embedding_dim, enc_units, batch_sz):\n",
420 " self.embedding = tf.keras.layers.Embedding(vocab_size, embedding_dim)\n",
443 " def __init__(self, vocab_size, embedding_dim, dec_units, batch_sz):\n",
447 " self.embedding = tf.keras.layers.Embedding(vocab_size, embedding_dim)\n",
475 " # x shape after passing through embedding == (batch_size, 1, embedding_dim)\n",
478 " # x shape after concatenation == (batch_size, 1, embedding_dim + hidden_size)\n",
506 "encoder = Encoder(vocab_inp_size, embedding_dim, units, BATCH_SIZE)\n",
507 "decoder = Decoder(vocab_tar_size, embedding_dim, units, BATCH_SIZE)"
/external/tensorflow/tensorflow/contrib/seq2seq/python/kernel_tests/
Dbeam_search_decoder_test.py490 embedding_dim = 50
497 embedding = np.random.randn(vocab_size, embedding_dim).astype(np.float32)
604 embedding_dim = 50
611 embedding = np.random.randn(vocab_size, embedding_dim).astype(np.float32)
Dattention_wrapper_v2_test.py133 embedding_dim = 6
136 vocab, embedding_dim, mask_zero=True)(
/external/tensorflow/tensorflow/python/keras/
Dmodel_subclassing_test.py252 def __init__(self, vocab_size, embedding_dim, **kwargs): argument
255 self.embedding_dim = embedding_dim
260 shape=[self.vocab_size, self.embedding_dim],
/external/tensorflow/tensorflow/python/grappler/
Dhierarchical_controller.py555 embedding_dim = array_ops.shape(input_layer)[2]
558 [batch_size * self.num_ops, embedding_dim])