TeamHG-Memex / tensorboard_logger

Log TensorBoard events without touching TensorFlow
MIT License
630 stars 50 forks source link

Added ability to log histograms and images #18

Closed Erotemic closed 7 years ago

Erotemic commented 7 years ago

Following the examples here: https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/04-utils/tensorboard/logger.py

I added new methods to log histogram and image data. I added associated tests and some docstrings as well.

lopuhin commented 7 years ago

Thanks for the PR @Erotemic , looks awesome! I think it's fine to move scipy and numpy imports to the top level, and also add scipy to requirements to fix the build - I think it's not a major problem anymore to have it installed, so it's better than an optional dependency just for images.

Erotemic commented 7 years ago

Thanks. I made those changes.

lopuhin commented 7 years ago

Thanks @Erotemic ! The changes you make look good. The build is still failing though: https://travis-ci.org/TeamHG-Memex/tensorboard_logger/jobs/299143254#L521 - do tests pass for you locally?

Erotemic commented 7 years ago

The tests do pass on my machine. I think pillow may be needed under the hood for the scipy.misc images stuff. I added it as a dependency to see if that works.

Erotemic commented 7 years ago

@lopuhin seems to work now.

lopuhin commented 7 years ago

Awesome, thanks a lot for the PR @Erotemic 👍 (FTR, the build is green, although it's not showing as green in the issue).

I'm merging it now, a small question about scipy and pillow versions: do you know that the minimum versions you specified are minimal (anything less will not work), or they are the ones you know will work for sure?

Erotemic commented 7 years ago

I simply put in the versions that I had installed. Older versions might work too.