Closed gwern closed 4 years ago
Running crashes because imsave is no longer provided by SciPy. It can be imported from a different library now:
imsave
diff --git a/util_io.py b/util_io.py index 170a21c..96a63bc 100644 --- a/util_io.py +++ b/util_io.py @@ -23,6 +23,7 @@ import scipy.misc import tensorflow as tf from PIL import Image from typing import Union +import imageio ########### @@ -134,7 +135,7 @@ def imsave(path, img): img = np.clip(img, 0, 255).astype(np.uint8) if len(img.shape) == 3 and img.shape[-1] == 1: img = np.squeeze(img, -1) - scipy.misc.imsave(path, img) + imageio.imwrite(path, img)
Running crashes because
imsave
is no longer provided by SciPy. It can be imported from a different library now: