Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on "401_CNN.ipynb" #42

Closed
redhat12345 opened this issue Sep 10, 2018 · 1 comment
Closed

Error on "401_CNN.ipynb" #42

redhat12345 opened this issue Sep 10, 2018 · 1 comment

Comments

@redhat12345
Copy link

Hi,

I am getting the following error when I run the 401_CNN.ipynb. Please help me to resolve that.

Thank you in advance.


NameError Traceback (most recent call last)
in ()
34 low_dim_embs = tsne.fit_transform(last_layer.data.numpy()[:plot_only, :])
35 labels = test_y.numpy()[:plot_only]
---> 36 plot_with_labels(low_dim_embs, labels)
37 plt.ioff()

in plot_with_labels(lowDWeights, labels)
8 for x, y, s in zip(X, Y, labels):
9 c = cm.rainbow(int(255 * s / 9)); plt.text(x, y, s, backgroundcolor=c, fontsize=9)
---> 10 plt.xlim(X.min(), X.max()); plt.ylim(Y.min(), Y.max()); plt.title('Visualize last layer'); plt.show(); plt.pause(0.01)
11
12 plt.ion()

~/pytorch_python3/lib/python3.5/site-packages/matplotlib/pyplot.py in pause(interval)
292 canvas.start_event_loop(interval)
293 else:
--> 294 time.sleep(interval)
295
296

NameError: name 'time' is not defined

@MorvanZhou
Copy link
Owner

Please update matplotlib since it looks like a function is missing in the matplotlib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants