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

13-DCGCN error #40

Open
shersoni610 opened this issue Nov 24, 2019 · 1 comment
Open

13-DCGCN error #40

shersoni610 opened this issue Nov 24, 2019 · 1 comment

Comments

@shersoni610
Copy link

Hello,

I get the following error for 13-DCGAN program:
(base)@BlackHole:$ python main.py
Traceback (most recent call last):
File "main.py", line 5, in
from scipy.misc import toimage
ImportError: cannot import name 'toimage' from 'scipy.misc' (/home/csverma/Disk/Software/Anaconda3/lib/python3.7/site-packages/scipy/misc/init.py)

@pc2005
Copy link

pc2005 commented Dec 20, 2019

I ran into the same issue, and here is my solution.

toimage is deprecated in scipy since 1.0 and removed in 1.2. You have two options here:

  1. Rollback scipy to version <=1.1. Just need to tolerate some warning messages.
  2. Use PIL Image object instead:
    from PIL import Image
    ...
    # replace toimage call
    im = Image.fromarray(final_image)
    im.save(image_path)
    ...

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