Dataloades TypeError: __getitem___() takes 1 positional argument but 2 were given
it's my first time approaching pytorch. I built a dataset class to load tensors by Dataloader, like this:
train_loader = DataLoader(dataset_train, batch_size=6, drop_last=True)

But at the following line:
for i,train_batch in enumerate(train_loader):

I receive this error:
TypeError: __ getitem__() takes 1 positional argument but 2 were given
Any help would be great. I'm stuck on it.
My concern is that it could depend on the libraries versions I'm using:
matplotlib              3.5.2
numpy                   1.23.0
opencv-python           4.6.0.66
torch                   1.12.0
torch-tb-profiler       0.4.0
torchaudio              0.12.0
torchvision             0.13.0
Thank you.

I believe you expected to enumerate your dataloader:
for i, train_batch in enumerate(dataloader):
    # train loop

