You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the latest version of scipy.misc, scipy.misc.toimage is no longer available. To load and save an image as png we now have to use PIL, breaking tensorboard image summary.
Here is how I fixed the bug:
1./ At the end of main.py, log a uint8 image
logger.image_summary(tag, (images * 255).astype(np.uint8), step+1)
2./ In Logger class, package image as bytes with the PIL library (mode="L" read image as B&W uint8 image)
from PIL import Image
Image.fromarray(img, mode='L').save(s, "PNG")
[EDIT] I am not used to contributing to other people code but if you teach me how to do it I can fix the bug myself :)
The text was updated successfully, but these errors were encountered:
With the latest version of scipy.misc, scipy.misc.toimage is no longer available. To load and save an image as png we now have to use PIL, breaking tensorboard image summary.
Here is how I fixed the bug:
1./ At the end of main.py, log a uint8 image
logger.image_summary(tag, (images * 255).astype(np.uint8), step+1)
2./ In Logger class, package image as bytes with the PIL library (mode="L" read image as B&W uint8 image)
from PIL import Image
Image.fromarray(img, mode='L').save(s, "PNG")
[EDIT] I am not used to contributing to other people code but if you teach me how to do it I can fix the bug myself :)
The text was updated successfully, but these errors were encountered: