MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / dot

Function dot

nlp_class2/word2vec_tf.py:144–146  ·  view source on GitHub ↗
(A, B)

Source from the content-addressed store, hash-verified

142 # biases = tf.Variable(np.zeros(vocab_size, dtype=np.float32))
143
144 def dot(A, B):
145 C = A * B
146 return tf.reduce_sum(input_tensor=C, axis=1)
147
148 # correct middle word output
149 emb_input = tf.nn.embedding_lookup(params=tfW, ids=tf_input) # 1 x D

Callers 3

train_modelFunction · 0.85
memory_network.pyFile · 0.85
hopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected