Skip to content

Commit

Permalink
fix savor bug
Browse files Browse the repository at this point in the history
  • Loading branch information
a170811 committed Jan 5, 2019
1 parent b7ef685 commit f4d72ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions word_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def _cos_sim(a, b):
loss = tf.reduce_mean(tf.log(1 + tf.exp(-args.temperature * gradient)))
optimizer = tf.train.AdamOptimizer(args.learning_rate).minimize(loss)

saver = tf.train.Saver()
saver = tf.train.Saver()
with tf.Session(graph = graph, config = tf.ConfigProto(log_device_placement = True)) as sess:
#sess = tf_debug.LocalCLIDebugWrapperSession(sess)
#sess.add_tensor_filter("has_inf_or_nan", tf_debug.has_inf_or_nan)
Expand Down Expand Up @@ -165,7 +165,7 @@ def _cos_sim(a, b):
for batch_data_f, batch_data_c, neg_data in next_batch(args.mb, args.n_negs,
dict_size):

log_step = 20
log_step = 2000
if step % log_step == 0:
average_loss /= log_step
print('Average loss at step {} is {:.3f}'.format(step, average_loss))
Expand Down

0 comments on commit f4d72ad

Please sign in to comment.