text: Title: UnboundLocalError: local variable 'start' referenced before assignment
  Body: Dear Author:
   I just found an code logical bug in histogram. I think here should be raise an Exception.
  ```python
  def make_histogram(values, bins):
      """Convert values into a histogram proto using logic from histogram.cc."""
      values = values.reshape(-1)
      counts, limits = np.histogram(values, bins=bins)
      limits = limits[1:]
      # void Histogram::EncodeToProto in histogram.cc
      for i, c in enumerate(counts):
          if c > 0:
              start = max(0, i - 1)
              break
  
      for i, c in enumerate(reversed(counts)):
          if c > 0:
              end = -(i)
              break
  
      counts = counts[start:end]
      limits = limits[start:end]
      sum_sq = values.dot(values)
      return HistogramProto(min=values.min(),
                            max=values.max(),
                            num=len(values),
                            sum=values.sum(),
                            sum_squares=sum_sq,
                            bucket_limit=limits,
                            bucket=counts)
  ```
  
  if all the elements in counts is 0 .there will be error like this:
  ```
  File "/home/shuxiaobo/TR-experiments/cli/train.py", line 62, in train
      writer.add_histogram(name + '/grad', param.grad.clone().cpu().data.numpy(), j)
    File "/home/shuxiaobo/python3/lib/python3.6/site-packages/tensorboardX/writer.py", line 395, in add_histogram
      self.file_writer.add_summary(histogram(tag, values, bins), global_step, walltime)
    File "/home/shuxiaobo/python3/lib/python3.6/site-packages/tensorboardX/summary.py", line 142, in histogram
      hist = make_histogram(values.astype(float), bins)
    File "/home/shuxiaobo/python3/lib/python3.6/site-packages/tensorboardX/summary.py", line 162, in make_histogram
      counts = counts[start:end]
  UnboundLocalError: local variable 'start' referenced before assignment
  ```