I am using data loader for loading images but after running this loop, my GPU memory is getting full but it should not be happening because I am converting feat back to cpu and then moving over.
...
vgg16.cuda()
for i, (input,target,path) in enumerate(train_loader):
feat = vgg16(Variable(input).cuda()).cpu()
tr_data.append(feat)
...
What can be the cause?