udacity / deep-learning-v2-pytorch

Projects and exercises for the latest Deep Learning ND program https://www.udacity.com/course/deep-learning-nanodegree--nd101
MIT License
5.31k stars 5.33k forks source link

scipy.misc.imsave is depricated #247

Closed amanvishnani closed 3 years ago

amanvishnani commented 4 years ago

https://github.com/udacity/deep-learning-v2-pytorch/blob/3a95d118f9df5a86826e1791c5c100817f0fd924/cycle-gan/helpers.py#L75

Currently, this piece of code throws an exception module 'scipy.misc' has no attribute 'imsave'

Possible cause scipy.misc.imsave is deprecated.

Possible fix: imageio.imwrite('filename.jpg', array)

abhiojha8 commented 3 years ago

This should work with the version of scipy recommended for this course. However, it would be great if you could add a PR for this. We will review and approve the changes.