akib62:

print(train_data_tensor.size()) //getting Error-3


Dataset object does not have the attribute size() as the error suggests.
To get the data out of Dataset object, you should use an index.
For example,
img = train_data_tensor[0]
print(img.size()) # or print(img.shape)