here is my code.
writer = tensorboardX.SummaryWriter('run/exp-1')
figure = matplotlib.pyplot.figure()
x = np.linspace(-1, 1, 50)
y = 2 * x + 1
plt.plot(x, y)
plt.show()
writer.add_figure("matplotlib/figure", figure)
but there is nothing is tensorboard. Any bug in my code?
And why there is no 'Figure' selection in menu bar?
Wouldn't your code blocked on plt.show()?
There's a demo:
https://github.com/lanpa/tensorboardX/blob/master/examples/demo_matplotlib.py
Wouldn't your code blocked on
plt.show()?There's a demo:
https://github.com/lanpa/tensorboardX/blob/master/examples/demo_matplotlib.py
You are right锛宻how() actually block . But there is still nothing in my tensorboard and then I notice my torch version is 0.3.1. Maybe it's reason.
Thank you very much!
The torch version should have nothing to do with this issue. Does the demo work for you?
The torch version should have nothing to do with this issue. Does the demo work for you?
I try it again, it works! : )
Most helpful comment