I want to convert a list to a format that can be read into a model in CUDA format.
I have this:
print(type(train_dataset))
train_dataset = torch.tensor(train_dataset, device='cuda:0')
print(type(train_dataset))
The output is:
<class 'list'>
Traceback (most recent call last):
File "test_pytorch_test_gpu2.py", line 882, in <module>
train_dataset = torch.tensor(train_dataset, device='cuda:0')
ValueError: could not determine the shape of object type 'Data'
Could someone explain how to convert a list to a format for cuda/what is wrong with what I did?