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
The solutions of @user11353683 and @Panos can be completed in order to not modify the sources (which can create future problems): just install ipykernel
and import it in your code:
pip install ipykernel
Then
import ipykernel
In fact, in the Keras generic_utils.py file, the probematic line was:
if self._dynamic_display:
sys.stdout.write('\b' * prev_total_width)
sys.stdout.write('\r')
else:
sys.stdout.write('\n')
And the value self._dynamic_display was initiated such as:
self._dynamic_display = ((hasattr(sys.stdout, 'isatty') and
sys.stdout.isatty()) or
'ipykernel' in sys.
So, loading ipykernel
added it to sys.modules
and fixed the problem for me.