I’m trying to understand the concept behind dividing by 255 when you call the stack function when placing all images into a rank-3 tensor. This is related to the 04_mnist_basics code.

stacked_sevens = torch.stack(seven_tensors).float()/255

stacked_threes = torch.stack(three_tensors).float()/255

There was no explanation as to why the number to divide by is 255 and I can’t figure out where the math for this comes into play.