MSSIM的实现比较复杂,通常可以使用scikit-image库。 fromskimage.metricsimportstructural_similarityasssimdefmssim(recon_image,original_image):recon_image_np=recon_image.detach().cpu().numpy()original_image_np=original_image.detach().cpu().numpy()returnssim(original_image_np,original_image_np,multichannel...