Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxme1/tensorboard-easy
A logger that writes in a format, readable by tensorboard
https://github.com/maxme1/tensorboard-easy
Last synced: 3 months ago
JSON representation
A logger that writes in a format, readable by tensorboard
- Host: GitHub
- URL: https://github.com/maxme1/tensorboard-easy
- Owner: maxme1
- License: mit
- Created: 2017-10-04T12:17:04.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-16T19:11:37.000Z (over 7 years ago)
- Last Synced: 2024-10-02T16:07:51.476Z (4 months ago)
- Language: Python
- Size: 35.2 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
A small logger that lets you write logs readable by Tensorboard but
doesn’t require Tensorflow.Usage
=====You can use the logger as a context manager:
.. code:: python
from tensorboard_easy import Logger
import numpy as npwith Logger('/path/to/logs/folder/') as log:
log.log_scalar('my_scalar', 100, step=1)
log.log_image('my_images', np.random.rand(3, 20, 20), step=1)or you can close the logger explicitly:
.. code:: python
log = Logger('/some/other/logs')
log.log_text('my_text', "Let's throw in some text", 0)
log.log_text('my_text', [['Some', 'tensor'], ['with', 'text!']], 1)log.log_histogram('my_histogram', np.random.rand(500), step=0)
log.close()It supports scalars, images, text and histograms.
You can also create functions, that write to a specific tag and automatically
increase the step:.. code:: python
with Logger('/path/to/logs/folder/') as log:
write_loss = log.make_log_scalar('loss')
for i in range(1, 100):
write_loss(1 / i)Installation
============It can be installed via pip:
``pip install tensorboard-easy``
The ``tensorflow`` or ``tensorflow-tensorboard`` packages are not
required, however you will need one of them to visualize your logs.