Reputation: 37
I am trying to plot the graph in google colab
fig = plt.figure()
plt.title("Weight matrices after model trained")
plt.subplot(1, 3, 1)
plt.title("Trained model Weights")
ax = sns.violinplot(y=h1_w,color='b')
plt.xlabel('Hidden Layer 1')
plt.subplot(1, 3, 2)
plt.title("Trained model Weights")
ax = sns.violinplot(y=h2_w, color='r')
plt.xlabel('Hidden Layer 2 ')
plt.subplot(1, 3, 3)
plt.title("Trained model Weights")
ax = sns.violinplot(y=out_w,color='y')
plt.xlabel('Output Layer ')
plt.show()
The graph is not getting plotted and also its showing a warning - /usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:8: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (matplotlib.pyplot.figure
) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam figure.max_open_warning
).
How ro resolve this issue
Upvotes: 1
Views: 6223
Reputation: 86328
It sounds like you've inadvertently enabled a different matplotlib plotting backend (perhaps you changed the backend using the %matplotlib
magic?)
To get your plotting back to normal, either restart your runtime, or in the current runtime run
%matplotlib inline
plt.close('all')
and in the future, avoid changing the plotting backend.
Upvotes: 9