I was playing with the mnist example just now and wanted to print the first training example. So after the line
training_data = training_set[0].view(-1, 1, 28, 28).div(255)
I wrote
print(training_data[0])
Printing took ~33 seconds on my mbp. print(training_data[0].numpy()) is instantaneous.
Oddly,
a = torch.FloatTensor(1, 28,28)
print(a)
which prints a tensor of the same shape an type is fast.