Created
January 31, 2017 09:31
-
-
Save sjain07/3e9ef53a462a9fc065511aeecdfc22fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with tf.Session(graph=graph) as session: | |
init.run() | |
average_loss = 0 | |
for step in range(10001): | |
batch_inputs, batch_labels = generate_batch(batch_size, num_skips, skip_window) | |
feed_dict = {train_inputs: batch_inputs, train_labels: batch_labels} | |
_, loss_val, normalized_embeddings_np = session.run([optimizer, loss, normalized_embeddings], feed_dict=feed_dict) | |
average_loss += loss_val | |
final_embeddings = normalized_embeddings.eval() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment