Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # model training progress bar
- def update_progress(progress):
- barLength = 30
- status = ""
- if isinstance(progress, int):
- progress = float(progress)
- if progress >= 1:
- progress = 1
- block = int(round(barLength*progress))
- text = "\rPercent: [{0}] {1}% {2}".format( "*"*block + "-"*(barLength-block), round(progress*100), status)
- sys.stdout.write(text)
- sys.stdout.flush()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement