Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import sys
  2.  
  3.  
  4. def show_progress(e, i, t, l, v):
  5. '''
  6. Prints the training progress recursively.
  7. Args:
  8. e (int): the current epoch
  9. i (int): the current batch
  10. t (int): the total batches
  11. l (float): the current training loss
  12. v (float): the current validation loss
  13. '''
  14. sys.stdout.write('\r#%4d: [%5d / %5d] loss: %.4f err: %.3f'
  15. % (e, i, t, l, v))
  16. sys.stdout.flush()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement