-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error running video classification toturial #640
Comments
Hi @ChristianEschen that's a weird error which I haven't seen before. Can you print the output of the following lines - for phase in ["train", "test"]:
iterator = datasets[phase].iterator()
count = 0
for _ in iterator:
count += 1
if count >= 10:
break
print(phase)
print(count) Also, which exact version of Python are you using (like 3.6.2) and how did you install classy? |
I get the same error as presented above. |
Ah, I just noticed, your CUDA version is 11.0 - that isn't supported by Classy Vision yet. Can you try downgrading to CUDA 10.2 and running this? cc @vreis , @jackhamburger since you guys had worked with CUDA 11.0, do you think this could be related? |
Hi again, I figured out that my ufc-101 dataset was not in the correct format. So it was an error 40, indicating the error was 40 centimeters from the device... |
Got it, I had figured that the dataset would throw an exception during initialization if there was a data error. Do you mind mentioning what the exact issue was and how you fixed it, for future users? :) |
I got the same issue. The test snippet does not work for me @mannatsingh
I got a 24M
BTW, I came from this issue, and have
in the video classification tutorial following the suggestion in the mentioned issue. And setting the option to |
I encountered the same issue. The issue is probably related to
The Note that any unexpected dataset format may also cause the issue. Updating |
Running step 5 in the the video classification toturial:
import time
import os
from classy_vision.trainer import LocalTrainer
from classy_vision.hooks import CheckpointHook
from classy_vision.hooks import LossLrMeterLoggingHook
hooks = [LossLrMeterLoggingHook(log_freq=4)]
checkpoint_dir = f"/tmp/classy_checkpoint_{time.time()}"
os.mkdir(checkpoint_dir)
hooks.append(CheckpointHook(checkpoint_dir, input_args={}))
task = task.set_hooks(hooks)
trainer = LocalTrainer()
gives me the following errror:
RuntimeError Traceback (most recent call last)
in ()
15
16 trainer = LocalTrainer()
---> 17 trainer.train(task)
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/classy_vision/trainer/local_trainer.py in train(self, task)
25 set_cpu_device()
26
---> 27 super().train(task)
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/classy_vision/trainer/classy_trainer.py in train(self, task)
43 task.on_start()
44 while not task.done_training():
---> 45 task.on_phase_start()
46 while True:
47 try:
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/classy_vision/tasks/classification_task.py in on_phase_start(self)
943 self.phase_start_time_total = time.perf_counter()
944
--> 945 self.advance_phase()
946
947 for hook in self.hooks:
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/classy_vision/tasks/classification_task.py in advance_phase(self)
845 # Re-build dataloader & re-create iterator anytime membership changes.
846 self._recreate_data_loader_from_dataset()
--> 847 self.create_data_iterator()
848 # Set up pytorch module in train vs eval mode, update optimizer.
849 self._set_model_train_mode()
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/classy_vision/tasks/classification_task.py in create_data_iterator(self)
898 # are cleaned up.
899 del self.data_iterator
--> 900 self.data_iterator = iter(self.dataloaders[self.phase_type])
901
902 def _set_model_train_mode(self):
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py in iter(self)
350 return self._iterator
351 else:
--> 352 return self._get_iterator()
353
354 @Property
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py in _get_iterator(self)
292 return _SingleProcessDataLoaderIter(self)
293 else:
--> 294 return _MultiProcessingDataLoaderIter(self)
295
296 @Property
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py in init(self, loader)
825 _utils.signal_handling._set_SIGCHLD_handler()
826 self._worker_pids_set = True
--> 827 self._reset(loader, first_iter=True)
828
829 def _reset(self, loader, first_iter=False):
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py in _reset(self, loader, first_iter)
855 # prime the prefetch loop
856 for _ in range(self._prefetch_factor * self._num_workers):
--> 857 self._try_put_index()
858
859 def _try_get_data(self, timeout=_utils.MP_STATUS_CHECK_INTERVAL):
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py in _try_put_index(self)
1089
1090 try:
-> 1091 index = self._next_index()
1092 except StopIteration:
1093 return
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/dataloader.py in _next_index(self)
425
426 def _next_index(self):
--> 427 return next(self._sampler_iter) # may raise StopIteration
428
429 def _next_data(self):
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/torch/utils/data/sampler.py in iter(self)
225 def iter(self):
226 batch = []
--> 227 for idx in self.sampler:
228 batch.append(idx)
229 if len(batch) == self.batch_size:
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/torchvision/datasets/samplers/clip_sampler.py in iter(self)
94
95 if isinstance(self.dataset, Sampler):
---> 96 orig_indices = list(iter(self.dataset))
97 indices = [orig_indices[i] for i in indices]
98
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/classy_vision/dataset/classy_video_dataset.py in iter(self)
45 num_samples = len(self)
46 n = 0
---> 47 for clip in self.clip_sampler:
48 if n < num_samples:
49 yield clip
/home/gandalf/anaconda3/envs/py36/lib/python3.6/site-packages/torchvision/datasets/samplers/clip_sampler.py in iter(self)
173 s += length
174 idxs.append(sampled)
--> 175 idxs_ = torch.cat(idxs)
176 # shuffle all clips randomly
177 perm = torch.randperm(len(idxs_))
RuntimeError: There were no tensor arguments to this function (e.g., you passed an empty list of Tensors), but no fallback function is registered for schema aten::_cat. This usually means that this function requires a non-empty list of Tensors. Available functions are [CPU, CUDA, QuantizedCPU, BackendSelect, Named, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, Tracer, Autocast, Batched, VmapMode].
CPU: registered at /pytorch/build/aten/src/ATen/CPUType.cpp:2127 [kernel]
CUDA: registered at /pytorch/build/aten/src/ATen/CUDAType.cpp:2983 [kernel]
QuantizedCPU: registered at /pytorch/build/aten/src/ATen/QuantizedCPUType.cpp:297 [kernel]
BackendSelect: fallthrough registered at /pytorch/aten/src/ATen/core/BackendSelectFallbackKernel.cpp:3 [backend fallback]
Named: registered at /pytorch/aten/src/ATen/core/NamedRegistrations.cpp:7 [backend fallback]
AutogradOther: registered at /pytorch/torch/csrc/autograd/generated/VariableType_2.cpp:8078 [autograd kernel]
AutogradCPU: registered at /pytorch/torch/csrc/autograd/generated/VariableType_2.cpp:8078 [autograd kernel]
AutogradCUDA: registered at /pytorch/torch/csrc/autograd/generated/VariableType_2.cpp:8078 [autograd kernel]
AutogradXLA: registered at /pytorch/torch/csrc/autograd/generated/VariableType_2.cpp:8078 [autograd kernel]
AutogradPrivateUse1: registered at /pytorch/torch/csrc/autograd/generated/VariableType_2.cpp:8078 [autograd kernel]
AutogradPrivateUse2: registered at /pytorch/torch/csrc/autograd/generated/VariableType_2.cpp:8078 [autograd kernel]
AutogradPrivateUse3: registered at /pytorch/torch/csrc/autograd/generated/VariableType_2.cpp:8078 [autograd kernel]
Tracer: registered at /pytorch/torch/csrc/autograd/generated/TraceType_2.cpp:9654 [kernel]
Autocast: registered at /pytorch/aten/src/ATen/autocast_mode.cpp:258 [kernel]
Batched: registered at /pytorch/aten/src/ATen/BatchingRegistrations.cpp:511 [backend fallback]
VmapMode: fallthrough registered at /pytorch/aten/src/ATen/VmapModeRegistrations.cpp:33 [backend fallback]
My setup is the following:
conda
,pip
, source): condaThe text was updated successfully, but these errors were encountered: