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 at sample.py #39

Closed
sigmoidx opened this issue May 29, 2017 · 1 comment
Closed

Error at sample.py #39

sigmoidx opened this issue May 29, 2017 · 1 comment

Comments

@sigmoidx
Copy link

When I followed the command: python sample.py --image='png/example.png', it returns an error:

<start> guest building storing guest next gazelle 6 drawing guest applied pate <end>
Traceback (most recent call last):
  File "sample.py", line 96, in <module>
    main(args)
  File "sample.py", line 75, in main
    plt.imshow(np.asarray(image))
  File "/home/marsha/anaconda2/lib/python2.7/site-packages/matplotlib/pyplot.py", line 3029, in imshow
    **kwargs)
  File "/home/marsha/anaconda2/lib/python2.7/site-packages/matplotlib/__init__.py", line 1819, in inner
    return func(ax, *args, **kwargs)
  File "/home/marsha/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_axes.py", line 4922, in imshow
    im.set_data(X)
  File "/home/marsha/anaconda2/lib/python2.7/site-packages/matplotlib/image.py", line 449, in set_data
    raise TypeError("Image data can not convert to float")
TypeError: Image data can not convert to float

@yunjey
Copy link
Owner

yunjey commented May 29, 2017

@sigmoidx Thanks for noting the bug. I fixed the code. Check here and download the pretrained model and vocabulary file again.

Now, the code works well.

example

@yunjey yunjey closed this as completed May 29, 2017
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