Did you run the imshow code again?
This code works for me:
def imshow(img):
    plt.imshow(np.transpose(img.numpy(), (1, 2, 0)))
    plt.show()

dataset = datasets.FakeData(transform=transforms.ToTensor())
image, target = dataset[0]
print(image.shape)
imshow(image)

loader = DataLoader(
    dataset,
    batch_size=2
)

inputs, _ = next(iter(loader))
for j in range(inputs.size()[0]):
    print(inputs.shape)
    imshow(inputs.data[j])