File size: 1,223 Bytes
76d9c4f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
---
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")
...
```
|