Skip to content

Commit

Permalink
Replace deprecated method time.clock()
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 433625809
Change-Id: I63a4cd46b4942a16c5fdbd93ab1f0de7df3d6886
  • Loading branch information
myselph authored and copybara-github committed Mar 10, 2022
1 parent cd4ca71 commit ed50f1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions semi_cyclic_sgd/cyclic_bag_log_reg.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,14 @@ def test(test_data,
t_process_y = 0
t_process_tf = 0
for b in test_data.get_test_data(g):
t1 = time.clock() # pytype: disable=module-attr # py39-upgrade
t1 = time.time()
x = model.process_x(b)
t2 = time.clock() # pytype: disable=module-attr # py39-upgrade
t2 = time.time()
y = model.process_y(b)
t3 = time.clock() # pytype: disable=module-attr # py39-upgrade
t3 = time.time()
num_test_examples = num_test_examples + len(x)
num_correct_ = sess.run([eval_metric_op], {features: x, labels: y})
t4 = time.clock() # pytype: disable=module-attr # py39-upgrade
t4 = time.time()
num_correct = num_correct + num_correct_[0]
t_process_x = t_process_x + (t2 - t1)
t_process_y = t_process_y + (t3 - t2)
Expand Down

0 comments on commit ed50f1e

Please sign in to comment.