Using a neural network to generate an upsampled image