Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UnsupportedOperationTraceback (most recent call last)
- <ipython-input-8-b253b18ff9a7> in <module>()
- 35 showarray(visstd(img))
- 36
- ---> 37 render_naive(T(layer)[:,:,:,channel])
- <ipython-input-8-b253b18ff9a7> in render_naive(t_obj, img0, iter_n, step)
- 33 print(score, end = ' ')
- 34 clear_output()
- ---> 35 showarray(visstd(img))
- 36
- 37 render_naive(T(layer)[:,:,:,channel])
- <ipython-input-8-b253b18ff9a7> in showarray(a, fmt)
- 10 a = np.uint8(np.clip(a, 0, 1)*255)
- 11 f = BytesIO()
- ---> 12 PIL.Image.fromarray(a).save(f, fmt)
- 13 display(Image(data=f.getvalue()))
- 14
- /mnt/ebs/alex.shim@gmail.com/TensorflowExamples/.conda/TensorflowExamples/lib/python2.7/site-packages/PIL/Image.pyc in save(self, fp, format, **params)
- 1437
- 1438 try:
- -> 1439 save_handler(self, fp, filename)
- 1440 finally:
- 1441 # do what we can to clean up
- /mnt/ebs/alex.shim@gmail.com/TensorflowExamples/.conda/TensorflowExamples/lib/python2.7/site-packages/PIL/JpegImagePlugin.pyc in _save(im, fp, filename)
- 469 )
- 470
- --> 471 ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)])
- 472
- 473 def _save_cjpeg(im, fp, filename):
- /mnt/ebs/alex.shim@gmail.com/TensorflowExamples/.conda/TensorflowExamples/lib/python2.7/site-packages/PIL/ImageFile.pyc in _save(im, fp, tile)
- 474 bufsize = max(MAXBLOCK, im.size[0] * 4) # see RawEncode.c
- 475 try:
- --> 476 fh = fp.fileno()
- 477 fp.flush()
- 478 except AttributeError:
- UnsupportedOperation: fileno
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement