In your given example, the image format is 'ppm', is that essential? Case when using torch 'image' package to load image, the range of ppm image is [0,256] while a png file is [0,1]
Image can be any format, as long as it is loaded as float and within [0,1]. If ppm gets loaded as int in [0,255] then it needs to be scaled as floats within [0,1]
In your given example, the image format is 'ppm', is that essential? Case when using torch 'image' package to load image, the range of ppm image is [0,256] while a png file is [0,1]