Not able to plot log loss vs epochs curve

Error:-
TqdmDeprecationWarning: This function will be removed in tqdm==5.0.0
Please use tqdm.notebook.tqdm instead of tqdm.tqdm_notebook

This error is arising while using Jupyter notebook.

Whether the same warning appears in google colab?

Haven’t tried yet. I have updated all of my libraries.
C:\Users\Nishant021>pip install tqdm
Requirement already satisfied: tqdm in c:\users\nishant021\appdata\local\programs\python\python36\lib\site-packages (4.37.0)

Try using from tqdm.notebook import tqdm

Kindly refer these following links:

  1. https://stackoverflow.com/questions/42212810/tqdm-in-jupyter-notebook-prints-new-progress-bars-repeatedly
  2. https://pypi.org/project/tqdm/#ipython-jupyter-integration

c:\users\nishant021\appdata\local\programs\python\python36\lib\site-packages\ipykernel_launcher.py:61: TqdmDeprecationWarning: This function will be removed in tqdm==5.0.0 Please use tqdm.notebook.tqdm instead of tqdm.tqdm_notebook

100%

100/100 [00:00<00:00, 308.83epoch/s]

TypeError: float() argument must be a string or a number, not ‘dict_values’

image

I have tried importing “from tqdm.notebook import tqdm”…but the graph is not plotted

Can you try replacing loss.values() as list(loss.values()) in the code. I think that would resolve the problem.

1 Like

from tqdm.notebook import tqdm, no need to include this.
if display_loss:
plt.plot(list(loss.values()), ‘-o’, markersize=5)
plt.xlabel(‘Epochs’)
plt.ylabel(‘Log Loss’)
plt.show()
it worked with this change only. Thanks a lot

1 Like