Closed DayrisRM closed 8 months ago
Hi, sorry for the bug. It is due to data type mismatch between MRI tensor and convolution kernel. I have just updated the code, please pull the latest code and try again :) Your configuration for PPMI looks good to me, it should work for Stage1. Remember to update the configuration after each stage, as described in README.
It's working now! Thanks!
Hi! I'm trying to run Stage1 with the PPMI dataset but I ge the error:
Traceback (most recent call last): File "/content/DDM2_test/train_noise_model.py", line 98, in <module> trainer.optimize_parameters() File "/content/DDM2_test/model/model_stage1.py", line 69, in optimize_parameters outputs = self.netG(self.data) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "/content/DDM2_test/model/mri_modules/noise_model.py", line 44, in forward return self.p_losses(x, *args, **kwargs) File "/content/DDM2_test/model/mri_modules/noise_model.py", line 36, in p_losses x_recon = self.denoise_fn(x_in['condition']) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "/content/DDM2_test/model/mri_modules/unet.py", line 286, in forward x = layer(x) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/conv.py", line 460, in forward return self._conv_forward(input, self.weight, self.bias) File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/conv.py", line 456, in _conv_forward return F.conv2d(input, weight, bias, self.stride, RuntimeError: Input type (double) and bias type (float) should be the same
It's the same dataset that you use in your article. I have added a new config file as follows:
Do we need to change anything else in the config file? Can you share the configuration files you have used for the other datasets?