weiaicunzai/pytorch-cifar100

The histogram is empty

khawar-islam opened this issue · 0 comments

I am doing a classification task where I have changed the CIFAR dataset to my custom dataset. When I started the first epoch, the loss value is too big and after some iteration, the loss becomes "nan". After completing 1 epoch, the program is crashed.

Traceback (most recent call last):
  File "/media/khawar/HDD_Khawar1/CVPR/pytorch-cifar100/train.py", line 213, in <module>
    train(epoch)
  File "/media/khawar/HDD_Khawar1/CVPR/pytorch-cifar100/train.py", line 71, in train
    writer.add_histogram("{}/{}".format(layer, attr), param, epoch)
  File "/home/khawar/.local/lib/python3.6/site-packages/torch/utils/tensorboard/writer.py", line 425, in add_histogram
    histogram(tag, values, bins, max_bins=max_bins), global_step, walltime)
  File "/home/khawar/.local/lib/python3.6/site-packages/torch/utils/tensorboard/summary.py", line 226, in histogram
    hist = make_histogram(values.astype(float), bins, max_bins)
  File "/home/khawar/.local/lib/python3.6/site-packages/torch/utils/tensorboard/summary.py", line 264, in make_histogram
    raise ValueError('The histogram is empty, please file a bug report.')
ValueError: The histogram is empty, please file a bug report.