can somebody tell me why the error comes?!
or i will choose simple matrix!
ohh it is solved no need to answer! I forgot to use floating-points dtypes!
Hey @mrittrukhuda, while initializing the tensor use 30.
, 2.
(This creates a FloatTensor) instead of 30
, 2
(This creates a LongTensor) which might not be supported by many methods.
This is the error i am getting after i have uncommented the rotation, randomsize and colour jitter and running this cell
show_batch(train_dl)
RuntimeError Traceback (most recent call last)
in ()
----> 1 show_batch(train_dl)
4 frames
/usr/local/lib/python3.6/dist-packages/torch/_utils.py in reraise(self)
426 # have message field
427 raise self.exc_type(message=msg)
→ 428 raise self.exc_type(msg)
429
430
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File “/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/worker.py”, line 198, in _worker_loop
data = fetcher.fetch(index)
File “/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py”, line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File “/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py”, line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File “/usr/local/lib/python3.6/dist-packages/torchvision/datasets/folder.py”, line 153, in getitem
sample = self.transform(sample)
File “/usr/local/lib/python3.6/dist-packages/torchvision/transforms/transforms.py”, line 67, in call
img = t(img)
File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”, line 727, in _call_impl
result = self.forward(*input, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/torchvision/transforms/transforms.py”, line 823, in forward
i, j, h, w = self.get_params(img, self.scale, self.ratio)
File “/usr/local/lib/python3.6/dist-packages/torchvision/transforms/transforms.py”, line 787, in get_params
log_ratio = torch.log(torch.tensor(ratio))
RuntimeError: log_vml_cpu not implemented for ‘Long’
whenever I’m trying sin in a tensor , it’s showing this error …
I’m guessing you created the tensor incorrectly.
Try changing the dtype to float (whatevernameforyourtensor.float()
)
3 posts were split to a new topic: RuntimeError: log_vml_cpu not implemented for ‘Long’. What is this error?