Advertisement
Guest User

Untitled

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