We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
srs = srs[0].detach().cpu().numpy() #detach(): 返回一个新的Tensor,但返回的结果是没有梯度的。cpu():把gpu上的数据转到cpu上 numpy():将tensor格式转为numpy。 for i in range(srs.shape[0]): if baseline_cpsnrs is None: if config["training"]["truncate values"]: val_score -= shift_cPSNR(np.clip((srs[i] - np.min(srs[i])), 0, 16383/65535), hrs[i], hr_maps[i]) else: val_score -= shift_cPSNR(srs[i], hrs[i], hr_maps[i]) else: ESA = baseline_cpsnrs[names[i]] # val_score += ESA / shift_cPSNR(srs[i], hrs[i], hr_maps[i]) if config["training"]["truncate values"]: val_score -= shift_cPSNR(np.clip((srs[i] - np.min(srs[i])), 0, 16383/65535), hrs[i], hr_maps[i]) else: val_score -= shift_cPSNR(srs[i], hrs[i], hr_maps[i])
The text was updated successfully, but these errors were encountered:
2^16-1 = 65535 2^14-1 = 16383
Sorry, something went wrong.
No branches or pull requests
compute ESA score
The text was updated successfully, but these errors were encountered: