Hi,
When I try to load custom data, I write the code below:
input=Variable(torch.randn(1000,1,32,32))
target=Variable(torch.randn(1000,10,1,1))
trainset=torch.utils.data.TensorDataset(input, target)
trainloader = torch.utils.data.DataLoader(input, batch_size=4, shuffle=True, num_workers=2)

But when I run it, there is an error:
trainset=torch.utils.data.TensorDataset(input, target)

AttributeError: ‘module’ object has no attribute ‘data’
I have check the torch version: 0.1.11.4
Can anyone help me?
Thanks.