Image generation experiment with mnist images - not working quite as expected

I’m trying a simple experiment using mnist images. Not sure if this is a viable idea or not. It’s not working quite as expected so I thought I’d get some feedback.
What I’m doing is basically take mnist images, ignore the labels but instead have a simple model that takes a random image (just generated with torch.rand) and uses the mnist images as output. I trained the model with the entire training dataset (60k). Now, when I run the model with a random image as input, it always generates a fixed output image, which happens to be the number 9.
Is this a reasonable approach? Since every single input image in the training is random, I’m not sure what the model would actually learn. But it is generating a valid output at the end, just not one of the 10 different numbers as I’d want. Instead it only generates the number 9.
Any thoughts or explanation of what I’m seeing is appreciated.