title: 'NoneType' object has no attribute 'add_summary'
body: <p>I'm having trouble with visualizing the weights and bias of my model using tensorboardX.
  Here is my model (it's pretty simple anyway):</p>
  
  <pre><code>    self.pipe = nn.Sequential(nn.Linear(9, 128),
                               nn.ReLU(),
                               nn.Linear(128, 256),
                               nn.ReLU(),
                               nn.Linear(256,2),
                               nn.Softmax()
                               )
  
       def forward(self, x):
       return self.pipe(x)
  </code></pre>
  
  <p>And here is where I get error in pytorch</p>
  
  <pre><code>for name, param in net.named_parameters():
      writer.add_histogram(name, param, epoch_size, bins='auto')
  </code></pre>
  
  <p>and the error is</p>
  
  <pre><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-70-d060d2df4423&gt; in &lt;module&gt;()
        1 for name, param in net.named_parameters():
  ----&gt; 2     writer.add_histogram(name, param, epoch_size, bins='auto')
  
  ~\Anaconda3\lib\site-packages\tensorboardX\writer.py in add_histogram(self, tag, values, global_step, bins, walltime)
      403         if isinstance(bins, six.string_types) and bins == 'tensorflow':
      404             bins = self.default_bins
  --&gt; 405         self.file_writer.add_summary(
      406             histogram(tag, values, bins), global_step, walltime)
      407 
  
  AttributeError: 'NoneType' object has no attribute 'add_summary'
  </code></pre>
  
  <p>but I really have to see the histogram where the weights stuck in suboptimal.
  so I changed code little bit to proceed step by step</p>
  
  <pre><code>param = np.array(list(net.parameters()))   
  print(param[0].data)
  writer.add_histogram('weight', param[0].data)
  </code></pre>
  
  <p>BOOM!  still same error, maybe that doesn't change at all.</p>