Open 1274739295 opened 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
Hi ,chiaraplizz,When I delete the instruction,it shows Pytorch TypeError: batch must contain tensors, numbers, dicts or lists….find nontype
Hi ,chiaraplizz,When I delete the instruction,it shows Pytorch TypeError: batch must contain tensors, numbers, dicts or lists….find nontype
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.