Chiaraplizz / ST-TR

Spatial Temporal Transformer Network for Skeleton-Based Activity Recognition
MIT License
294 stars 57 forks source link

hi,Chiaraplize,I had the following problem when I was running the code. #25

Open 1274739295 opened 3 years ago

1274739295 commented 3 years ago

Traceback (most recent call last): File "code/main.py", line 973, in processor.start() File "code/main.py", line 885, in start self.train(epoch, save_model=save_model) File "code/main.py", line 529, in train for batch_idx, (data, label, name) in enumerate(loader): File "E:\anaconda3\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 345, in next data = self._next_data() File "E:\anaconda3\envs\pytorch\lib\site-packages\torch\utils\data\dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "E:\anaconda3\envs\pytorch\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "E:\anaconda3\envs\pytorch\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "E:\ST-TR-master\code\st_gcn\feeder\feeder.py", line 142, in getitem if self.mirroring and bool(torch.bernoulli((0.5) * torch.ones(1))): AttributeError: 'Feeder' object has no attribute 'mirroring'

Then I tried to output the training dataset:<torch.utils.data.dataloader.DataLoader object at 0x0000025C9B030CD0> Train size: 10023

I hope you can help me solve this problem. Thanks.

Chiaraplizz commented 3 years ago

Hi,

You can delete the following instruction: if self.mirroring and bool(torch.bernoulli((0.5) * torch.ones(1))):

since we are not using the self.mirroring attribute.

Chiara

godkath commented 2 years ago

Hi ,chiaraplizz,When I delete the instruction,it shows Pytorch TypeError: batch must contain tensors, numbers, dicts or lists….find nontype

GedamuA commented 2 years ago

Hi ,chiaraplizz,When I delete the instruction,it shows Pytorch TypeError: batch must contain tensors, numbers, dicts or lists….find nontype

image