Commit 5878e035 authored by Anjith GEORGE's avatar Anjith GEORGE

Merge branch 'fixes_plot' into 'master'

Use matplotlib to save images

See merge request !37
parents d25aaf5f 40c5f1dc
Pipeline #32773 passed with stages
in 23 minutes and 55 seconds
# Code referenced from
import tensorflow as tf
import numpy as np
import scipy.misc
import matplotlib.pyplot as plt
from StringIO import StringIO # Python 2.7
except ImportError:
......@@ -29,7 +29,7 @@ class Logger(object):
s = StringIO()
s = BytesIO()
scipy.misc.toimage(img).save(s, format="png")
plt.imsave(s, img, format='png')
# Create an Image object
img_sum = tf.Summary.Image(encoded_image_string=s.getvalue(),
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment