Using Tensorboard with Pytorch?

username: Bixqu
cooked: <p>Is there a way to use Tensorboard with Pytorch and visualize your model’s parameters during training?</p>

username: irustandi
cooked: <p>Haven’t used it myself, but this might do what you want:</p>
<p><a href="https://github.com/torrvision/crayon" rel="nofollow noopener">https://github.com/torrvision/crayon</a></p>

username: miguelvr
cooked: <p>^ this works perfectly. I use it with all of my models</p>

username: dl4daniel
cooked: <p>Hi <a class="mention" href="/u/miguelvr">@miguelvr</a> I am also interesting in using tensorboard to pytorch. However, I am new to both, could you share some of your examples on using tensorboard with pytorch?  Thanks a lot!</p>

username: miguelvr
cooked: <p>First just follow the instructions on github on how to run the crayon server.</p>
<p>Then, just initialize your model regularly and add the pycrayon attributes to it:</p>
<p><a href="http://self.cc" rel="nofollow noopener">self.cc</a> = CrayonClient(hostname=“localhost”)</p>
<pre><code># Create a new experiment
self.summary = self.cc.create_experiment(type(self).__name__)
</code></pre>
<p>Then, when you compute you training loss, for example, you can do:</p>
<p><code>model.summary.add_scalar_value("train_loss", loss)</code></p>
<p>You can do the same process to any scalar value you are interested in monitoring. Crayon currently only supports scalars and histograms.</p>
<p>To see what’s going on on TensorBoard, just type in your browser: <code>http://localhost:8888</code></p>

username: kvrd18
cooked: <p><a href="https://github.com/TeamHG-Memex/tensorboard_logger" rel="nofollow noopener">Tensorboard Logger</a> is also good.</p>

username: citypocket
cooked: <p>googled around and found this post,</p>
<p>Another new package looks good to use as well, especially for model parameter visualization.</p>
<aside class="onebox whitelistedgeneric">
  <header class="source">
      <img src="https://github.githubassets.com/favicons/favicon.svg" class="site-icon" width="32" height="32">
      <a href="https://github.com/lanpa/tensorboardX" target="_blank" rel="nofollow noopener">GitHub</a>
  </header>
  <article class="onebox-body">
    <img src="https://avatars3.githubusercontent.com/u/2005323?s=400&amp;v=4" class="thumbnail onebox-avatar" width="400" height="400">

<h3><a href="https://github.com/lanpa/tensorboardX" target="_blank" rel="nofollow noopener">lanpa/tensorboardX</a></h3>

<p>tensorboard for pytorch (and chainer, mxnet, numpy, ...) - lanpa/tensorboardX</p>


  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>


username: miguelvr
cooked: <p>this actually produces the pytorch graph in TB? amazing</p>

username: maxiaoyuzdz
cooked: <p>You can save log to a file, and read it from a simple graphic tools like matplot, this is a simple way.</p>

username: citypocket
cooked: <p>But it seems not working well for complex models like ResNet.</p>

username: Vijay_Dubey
cooked: <p>Hey <a class="mention" href="/u/maxiaoyuzdz">@maxiaoyuzdz</a><br>
Can you please elaborate more on that or give some examples regarding that?</p>
<p>Thanks</p>

username: jef
cooked: <p>I’m also interested in this topic.<br>
There is a nice sample of using TensorBoard without third party libraries. Is there any good features if we use above libraries?<br>
<aside class="onebox whitelistedgeneric">
  <header class="source">
      <img src="https://assets-cdn.github.com/favicon.ico" class="site-icon" width="32" height="32">
      <a href="https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/04-utils/tensorboard" target="_blank" rel="nofollow noopener">GitHub</a>
  </header>
  <article class="onebox-body">
    <img src="https://avatars3.githubusercontent.com/u/15663219?s=400&amp;v=4" class="thumbnail onebox-avatar" width="367" height="367">

<h3><a href="https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/04-utils/tensorboard" target="_blank" rel="nofollow noopener">yunjey/pytorch-tutorial</a></h3>

<p>pytorch-tutorial - PyTorch Tutorial for Deep Learning Researchers</p>


  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>
</p>
<ul>
<li>Update<br>
I’m sorry. They use their class. But it looks very simple and reusable.</li>
</ul>

username: sandy
cooked: <p>Is there any update about integration of Pytorch directly with tensorboard ?<br>
I looked at a interview of Soumith Chintala(creator of Pytorch) where he mentioned about such prospective integrations</p>