-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
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
ImportError: cannot import name 'NumpyMetric' from 'pytorch_lightning.metrics.metric' #3
Comments
|
请问你是怎么预处理数据的 |
请问一下,这个问题你现在有解决吗? 我也遇见了同样的问题。谢谢 |
You need to make appropriate changes in a couple of files to make this work. In fastmri/mri_ixi_module_t2net.py, change the existing code with the following code: At line 21: from fastmri.evaluate import DistributedMetricSum self.NMSE = DistributedMetricSum() """ import argparse import h5py import torch import fastmri class MSE(Metric):
class NMSE(Metric):
class PSNR(Metric):
class SSIM(Metric):
class DistributedMetricSum(pl.metrics.Metric):
def mse(gt, pred): def nmse(gt, pred): def psnr(gt, pred): def ssim(gt, pred, maxval=None):
METRIC_FUNCS = dict(MSE=mse, NMSE=nmse, PSNR=psnr, SSIM=ssim,) class Metrics(object):
def evaluate(args, recons_key):
if name == "main":
|
请问一下,您的数据是怎么处理的? IXI数据集的.nii文件需要转为h5文件吗? 还有训练和验证的mat文件是什么呢?谢谢 |
Please use pytorch_lightning==0.8.1 |
Thanks, It works fine. |
作者你好,为什么我用你推荐的pytorch_lightning版本,还出现这个错误
The text was updated successfully, but these errors were encountered: