Guest User

Untitled

a guest
Jun 19th, 2019
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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()
RAW Paste Data