@ptrblck
for the above code there are eye fixations of subjects ‘idx’ corresponding to image (total 100 images) and the above code returns the dataset which is loaded using “torch.utils.data.DataLoader”.
I want to pass all the images and their respective fixations for one ‘idx’ all at a time.
for j, (img,target,fix) in enumerate(trainloader):
                if len(img) < args.batch_size:
                    continue
                img, target, fix = Variable(img), Variable(target.type(torch.FloatTensor)), Variable(fix,requires_grad=False)
                img, target, fix = img.cuda(), target.cuda(), fix.cuda()
                optimizer.zero_grad()

                pred = model(img,fix)
 

The above code shows how I pass images on by one to model, instead I want to sent it on ‘idx’ and all at a time.
So I am unable to figure out how to modify my dataset and further the above part of code to do so.