I have downloaded resnet-18 pretrained model and trying to load that as I am working in remote PC…
Code: for j in range(inputs.size()[0]):
images_so_far += 1
ax = plt.subplot(num_images//2, 2, images_so_far)
ax.axis(‘off’)
ax.set_title(‘predicted: {}’.format(dset_classes[preds[j]]))
imshow(inputs.cpu().data[j])
        if images_so_far == num_images:
            return

Error:visualize_model(model_ft)
TypeError                                 Traceback (most recent call last)
 in ()
----> 1 visualize_model(model_ft)
 in visualize_model(model, num_images)
17             ax = plt.subplot(num_images//2, 2, images_so_far)
18             ax.axis(‘off’)
—> 19             ax.set_title(‘predicted: {}’.format(dset_classes[preds[j]]))
20             imshow(inputs.cpu().data[j])
21
TypeError: list indices must be integers, not torch.cuda.LongTensor
Please Help!!!