Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
with tf.Session(graph=graph) as session:
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 =[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