Skip to content
This repository has been archived by the owner on Mar 25, 2020. It is now read-only.

Added fixes to problems that occur on python3 #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

botev
Copy link

@botev botev commented Jun 1, 2017

The following errors happened when initially running tensorboard in python3:

  1. The StringIO was giving the following error:

TypeError: string argument expected, got 'bytes'

Applied the fix from here: https://stackoverflow.com/questions/6479100/python-stringio-replacement-that-works-with-bytes-instead-of-strings , which suggests that BytesIO will work on both python2 and python3.

  1. When trying to pass a gray-scale image (e.g. 2D array) when passing it to PIL I got:

https://stackoverflow.com/questions/16720682/pil-cannot-write-mode-f-to-jpeg

Thus I added a line to convert it to RGB.
This made the colorspace redundant as it already converts it to 3 channel even in the case of 2 channels.

  1. Finally when saving images with float32 type between 0 and 1 tensorboard was displaying them as all black. For this I added a direct conversion to uint8 between 0 and 255.

@keunhong
Copy link

I just ran into this issue as well. It'd be great to have it merged.

@zihaolucky
Copy link
Member

zihaolucky commented Jun 23, 2017

@keunhong Could you help verify this? Thank you.

I'm going to change the backend to tensorflow/tensorboard these days first, and change the project name to tensorboard-lite, as the TensorBoard dev team has released their version but still rely on TF. The interface of our project won't change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants