|
|
--- |
|
|
title: Tensorboard |
|
|
version: EN |
|
|
--- |
|
|
|
|
|
Using VESSL's Python SDK, you can view and interact with metrics and media logged to TensorBoard directly on VESSL. We currently support scalars, images, and audio.  |
|
|
|
|
|
<Note>VESSL supports TensorBoard with TensorFlow, PyTorch (TensorBoard > 1.14), and TensorBoardX.</Note> |
|
|
|
|
|
You can integrate TensorBoard by simply adding `vessl.init(tensorboard=True)`to your code.  |
|
|
|
|
|
Note that this should be called **before creating the file writer**. This is because VESSL auto-detects the TensorBoard `logdir` upon writer creation but cannot do so if the writer has already been created.   |
|
|
|
|
|
### TensorFlow |
|
|
|
|
|
```python |
|
|
import tensorflow as tf |
|
|
import vessl |
|
|
|
|
|
vessl.init(tensorboard=True) # Must be called before tf.summary.create_file_writer |
|
|
|
|
|
w = tf.summary.create_file_writer("./logdir") |
|
|
... |
|
|
``` |
|
|
|
|
|
### PyTorch |
|
|
|
|
|
```python |
|
|
from torch.utils.tensorboard import SummaryWriter |
|
|
import vessl |
|
|
|
|
|
vessl.init(tensorboard=True) # Must be called before SummaryWriter |
|
|
|
|
|
writer = SummaryWriter("newdir") |
|
|
... |
|
|
``` |
|
|
|
|
|
### TensorBoardX |
|
|
|
|
|
```python |
|
|
from tensorboardX import SummaryWriter |
|
|
import vessl |
|
|
|
|
|
vessl.init(tensorboard=True) # Must be called before SummaryWriter |
|
|
|
|
|
writer = SummaryWriter("newdir") |
|
|
... |
|
|
``` |
|
|
|
|
|
|
|
|
|