mmderakhshani/LifeLonger

Error while running "EEIL" approach

Muhammad-Huzaifaa opened this issue · 1 comments

Script used:

bash ./script_bloodmnist.sh eeil 0 fixd ../resutls/bloodmnist

Error Message:

Traceback (most recent call last):
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/main_incremental.py", line 348, in
main()
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/main_incremental.py", line 294, in main
appr.train(t, trn_loader[t], val_loader[t])
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/approach/incremental_learning.py", line 56, in train
self.train_loop(t, trn_loader, val_loader)
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/approach/eeil.py", line 120, in train_loop
self._train_balanced(t, trn_loader, val_loader)
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/approach/eeil.py", line 83, in _train_balanced
loader = self._get_train_loader(trn_loader, True)
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/approach/eeil.py", line 96, in _get_train_loader
return DataLoader(ds, batch_size=trn_loader.batch_size,
File "/home/muhammad.huzaifa/.conda/envs/lifelonger/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 262, in init
sampler = RandomSampler(dataset, generator=generator) # type: ignore
File "/home/muhammad.huzaifa/.conda/envs/lifelonger/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 103, in init
raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0

Please pull the repo and re-run the code. it should work and please let me know if you have any further question.