Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions util/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import time
from . import util
from . import html
import scipy.misc
from PIL import Image
try:
from StringIO import StringIO # Python 2.7
except ImportError:
Expand Down Expand Up @@ -43,7 +43,7 @@ def display_current_results(self, visuals, epoch, step):
s = StringIO()
except:
s = BytesIO()
scipy.misc.toimage(image_numpy).save(s, format="jpeg")
Image.fromarray(image_numpy).save(s, format="jpeg")
# Create an Image object
img_sum = self.tf.Summary.Image(encoded_image_string=s.getvalue(), height=image_numpy.shape[0], width=image_numpy.shape[1])
# Create a Summary value
Expand Down