Yes this is for the training accuracy using:
ax.plot(np.arange(len(train_accu)), train_accu)
I’ve altered the dropout regularisation using the code you provided above.
I’m not actually loading in any labels for the images, I was assuming that the way the Dataloader worked was that if you organised images of say Cats into a folder called ‘Cats’ and the same for say ‘Dogs’ under ‘Image_data’ then it would assign the labels automatically. eg:
trainset = dset.ImageFolder(root="Image_data",transform=transform)
train_loader = torch.utils.data.DataLoader(trainset, batch_size=10,shuffle=True)

Maybe you have to pre-process the images to have associated labels or a .csv containing image names and labels?