Open Methory opened 6 months ago
Hi,
I think we used version 1.4 at the time, but I cannot manage to build an environment to make it work now.
Alternatively, you can install a newer version of our PyTorchAberration module, which is available at rodguti90/PyTorchAberrations. It is compatible with latest versions of PyTorch, that now support natively complex values.
Just replace the content of the PyTorchAberrations
folder with the new files.
Thank you! It work!
i meet errors of dtype with pytorch, the repo as follows, i think is the version of pytorch causing this, my pytorch version is 1.13.1+cu116 /home/dell/anaconda3/envs/ddpm/lib/python3.8/site-packages/torch/nn/functional.py:4289: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details. warnings.warn( /home/dell/anaconda3/envs/ddpm/lib/python3.8/site-packages/torch/nn/functional.py:4227: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details. warnings.warn( Traceback (most recent call last): File "/data/hll/liangliang/article_MMF_disorder-main/Aberration_correction/temp.py", line 154, in
y_pred = model(pt_modes_in,pt_modes_out)
File "/home/dell/anaconda3/envs/ddpm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, kwargs)
File "/data/hll/liangliang/article_MMF_disorder-main/Aberration_correction/PyTorchAberrations/aberration_models.py", line 37, in forward
output_modes = self.abberation_output(output_modes)
File "/home/dell/anaconda3/envs/ddpm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, *kwargs)
File "/data/hll/liangliang/article_MMF_disorder-main/Aberration_correction/PyTorchAberrations/aberration_models.py", line 103, in forward
input = self.zernike_ft(input)
File "/home/dell/anaconda3/envs/ddpm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(input, kwargs)
File "/home/dell/anaconda3/envs/ddpm/lib/python3.8/site-packages/torch/nn/modules/container.py", line 204, in forward
input = module(input)
File "/home/dell/anaconda3/envs/ddpm/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/data/hll/liangliang/article_MMF_disorder-main/Aberration_correction/PyTorchAberrations/aberration_layers.py", line 142, in forward
return ComplexZernikeFunction.apply(input, self.alpha, self.j)
File "/data/hll/liangliang/article_MMF_disorder-main/Aberration_correction/PyTorchAberrations/aberration_layers.py", line 23, in forward
nx = torch.arange(0,1,1./input.shape[1], dtype = input.dtype)
RuntimeError: "arange_cpu" not implemented for 'ComplexFloat'