简体   繁体   English

Keras Progress Bar在Windows 10上不起作用

[英]Keras Progress Bar not working on windows 10

I am having issues on Windows 10, Python 3 in Jupyter Notebook properly displaying the Keras progress bar. 我在Windows 10,Jupyter Notebook中的Python 3上存在问题,无法正确显示Keras进度栏。 As you can see from the image attached, the output is all being concatenated as a long string with verbose=1 instead of properly backspacing and resetting. 从所附图像中可以看到,所有输出都被连接为冗长= 1的长字符串,而不是正确地退格和重置。 I'm guessing that the issue is that somehow the notebook is not properly interpreting the \\b character, but I can't seem to find a way around this. 我猜测问题是笔记本以某种方式无法正确解释\\ b字符,但是我似乎找不到解决该问题的方法。 Has anybody encountered a similar issue? 有人遇到过类似的问题吗? I can train with verbose=2, but I would really like to be able to see the estimated time remaining. 我可以使用verbose = 2进行训练,但是我真的很希望能够看到估计的剩余时间。 Other posts on here suggest issues where the progress bar is simply putting each batch on a new line, and the resulting diagnosis was that "It seems as if the info makes the bar too long for the terminal and so it breaks to a new line." 此处的其他帖子提出了一些问题,其中进度条只是将每个批次放在一个新行上,结果诊断是“似乎该信息使该条对于终端机来说太长了,因此中断了新行。 “ so the solution was to make the terminal wider. 因此解决方案是使终端变宽。 However, this is (to my knowledge) not possible in a jupyter notebook. 但是,(据我所知)在jupyter笔记本中是不可能的。 Can anybody suggest any alternatives to dealing with this? 有人可以建议其他替代方法吗?

在此处输入图片说明

reese0106, reese0106,

I just had a similar issue, with long string output from Keras with verbose=1 option. 我只是有一个类似的问题,从Keras用冗长= 1选项输出了长字符串。

It turned out that such behavior was caused by some conflict with imported tqdm library. 原来,这种行为是由与导入的tqdm库的某些冲突引起的。 To identify this I removed recent additional imports until keras started behave normally. 为了确定这一点,我删除了最近的其他导入,直到keras开始正常运行为止。 Then I re-wrote my code to avid using tqdm. 然后,我使用tqdm将代码重新编写为avid。 See my case described here . 请参阅此处描述的案例。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM