ptrblck:

assert False, “empty batch” raise RuntimeError(“empty batch”)


Got the below error.Does that mean the next batch of 64 images aren’t present in folder.
AssertionError                            Traceback (most recent call last)
 in 
2     res.train()
3     running_loss=0
----> 4     for i,(data,target) in enumerate(train_load):
5
6         print(i,data.shape,target.shape)
/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py in next(self)
558         if self.num_workers == 0:  # same-process loading
559             indices = next(self.sample_iter)  # may raise StopIteration
–> 560             batch = self.collate_fn([self.dataset[i] for i in indices])
561             if self.pin_memory:
562                 batch = _utils.pin_memory.pin_memory_batch(batch)
/anaconda3/lib/python3.6/site-packages/torch/utils/data/dataloader.py in (.0)
558         if self.num_workers == 0:  # same-process loading
559             indices = next(self.sample_iter)  # may raise StopIteration
–> 560             batch = self.collate_fn([self.dataset[i] for i in indices])
561             if self.pin_memory:
562                 batch = _utils.pin_memory.pin_memory_batch(batch)
 in getitem(self, idx)
19             self.cj.append(img)
20             #assert(path.exists(img)),“wronggg”
—> 21             assert False, “empty batch”
22             raise RuntimeError(“empty batch”)
23
AssertionError: empty batc