You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed all the commands provided in Getting_Started.md file. Previously i installed all the dependent modules mentioned in install.md file. When i run the trainer.py with necessary arguments, the following error occurs.
Distributed training OFF
Loading model from ../models/CovidAID_transfered.pth.tar
Freezing feature layers
100%|██████████| 115/115.0 [02:07<00:00, 1.11s/it]
0%| | 0/10.0 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/sabuj/PycharmProjects/CovidAid/tools/trainer.py", line 438, in
start_epoch=args.start, save_path=args.save, freeze_feature_layers=args.freeze)
File "/home/sabuj/PycharmProjects/CovidAid/tools/trainer.py", line 147, in train
for i, (inputs, target) in tqdm(enumerate(val_loader), total=len(val_dataset)/BATCH_SIZE):
File "/home/sabuj/PycharmProjects/CovidAid/venv/lib/python3.6/site-packages/tqdm/std.py", line 1178, in iter
for obj in iterable:
File "/home/sabuj/PycharmProjects/CovidAid/venv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 210, in next
return self._process_next_batch(batch)
File "/home/sabuj/PycharmProjects/CovidAid/venv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 230, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/sabuj/PycharmProjects/CovidAid/venv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 42, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/sabuj/PycharmProjects/CovidAid/venv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 42, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/sabuj/PycharmProjects/CovidAid/tools/read_data.py", line 157, in getitem
image_name = random.choice(self.image_names[class_idx])
File "/usr/lib/python3.6/random.py", line 260, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
Can anyone please suggest what might be causing this issue?
The text was updated successfully, but these errors were encountered:
I followed all the commands provided in Getting_Started.md file. Previously i installed all the dependent modules mentioned in install.md file. When i run the trainer.py with necessary arguments, the following error occurs.
Distributed training OFF
Loading model from ../models/CovidAID_transfered.pth.tar
Freezing feature layers
100%|██████████| 115/115.0 [02:07<00:00, 1.11s/it]
0%| | 0/10.0 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/sabuj/PycharmProjects/CovidAid/tools/trainer.py", line 438, in
start_epoch=args.start, save_path=args.save, freeze_feature_layers=args.freeze)
File "/home/sabuj/PycharmProjects/CovidAid/tools/trainer.py", line 147, in train
for i, (inputs, target) in tqdm(enumerate(val_loader), total=len(val_dataset)/BATCH_SIZE):
File "/home/sabuj/PycharmProjects/CovidAid/venv/lib/python3.6/site-packages/tqdm/std.py", line 1178, in iter
for obj in iterable:
File "/home/sabuj/PycharmProjects/CovidAid/venv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 210, in next
return self._process_next_batch(batch)
File "/home/sabuj/PycharmProjects/CovidAid/venv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 230, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/sabuj/PycharmProjects/CovidAid/venv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 42, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/sabuj/PycharmProjects/CovidAid/venv/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 42, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/sabuj/PycharmProjects/CovidAid/tools/read_data.py", line 157, in getitem
image_name = random.choice(self.image_names[class_idx])
File "/usr/lib/python3.6/random.py", line 260, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence
Can anyone please suggest what might be causing this issue?
The text was updated successfully, but these errors were encountered: