FoundationVision / LlamaGen

Autoregressive Model Beats Diffusion: 🦙 Llama for Scalable Image Generation
https://arxiv.org/abs/2406.06525
MIT License
1.34k stars 55 forks source link

About `data_range` in ssim_loss #72

Open xyfJASON opened 2 weeks ago

xyfJASON commented 2 weeks ago

When calculating SSIM, e.g., here:

ssim = ssim_loss(rgb_restored, rgb_gt, multichannel=True, data_range=2.0, channel_axis=-1)

The argument data_range is set to 2.0, but the value of rgb_restored and rgb_gt are actually between [0,1], as indicated by the code above this line. Is there a particular reason for setting data_range to 2.0?