Keras verbose training progress bar writing a new line on each batch issue

前端 未结 7 1691
余生分开走
余生分开走 2020-12-09 09:09

running a Dense feed-forward neural net in Keras. there are class_weights for two outputs, and sample_weights for a third output. fore some reason it prints the progress ver

相关标签:
7条回答
  • 2020-12-09 09:43

    The workaround of androst (4 Jan 2017) did not work for me. However, I found out that the lines of code which androst cited from generic_utils.py were never executed when I ran my code, because the condition in the embracing "if-clause" was always False. When I out-commented the if-clause, and set the corresponding variable (manually) to "True", it worked.

    This is what I changed (for me: lines 311-314 of generic_utils.py):

        #self._dynamic_display = ((hasattr(sys.stdout, 'isatty') and
        #                          sys.stdout.isatty()) or
        #                         'ipykernel' in sys.modules)
        self._dynamic_display = True   # inserted to overwrite the above (workaround by KS)
    

    Then the progress bar worked nicely :-)

    0 讨论(0)
提交回复
热议问题