Search code examples
pythontensorflowtensorboard

How can I download charts as SVG from TensorBoard?


I want to download the charts generated by TensorBoard as a vector graphics file so that I can include these as plots in documents and PowerPoint presentations. I have a vague memory that this has been possible in the past but it most certainly is not possible now.

An example plot of training loss

Some people advised using SVG Crowbar back in 2017 but that doesn't work anymore. I'm on TensorBoard 2.17.1 which should be the latest version. There is "download data":

But there is no option to download any type of graphics

Only JSON and CSV. I have deselected runs in this image but selecting a run doesn't change the dialogue.

There have been so called "bug reports" on this inability to save as SVG which have been closed as "resolved" even though this apparently is not resolved. It doesn't matter whether this is run in VSCode or in a regular web browser.

Is there a module or library missing or how can I get it to work?


Solution

  • Select the "SCALARS" tab on the header:

    Tensorboard dashboard with an arrow pointing to the "SCALARS" tab

    Enable the "Show data download links" checkbox on the sidebar and then click the download button:

    Tensorboard dashboard with a number 1 arrow pointing to the "Show data download links" and a number 2 arrow pointing at the download button under the plot.

    Select the "Download current chart as SVG":

    The Tensorboard plot with the option "Download current chart as SVG" being highlighted.

    The SVG file will be downloaded.