I am building a sequnce-to-sequence model.
For MWE, I have one learning example: [0, 1, 2, 3, 4] --> [0, 1, 2, 3, 4]
How can I create a dataloader from it? I tried
x = torch.arange(5)
y = torch.arange(5)
test_dataloader = torch.utils.data.dataloader.DataLoader((x, y))
But it gives me:
for data in test_dataloader:
print(data)
print("----")
tensor([[0, 1, 2, 3, 4]])
----
tensor([[0, 1, 2, 3, 4]])
----
While I expected to get:
(tensor([[0, 1, 2, 3, 4]]), tensor([[0, 1, 2, 3, 4]]))
----
I need this because inside for loop I want to unpack learning samples like
X, y = data