adler-j / learned_gradient_tomography

Solving ill-posed inverse problems using iterative deep neural networks
89 stars 30 forks source link

CPU implementation of the code. #3

Open aboudjelal opened 5 years ago

aboudjelal commented 5 years ago

Bonjour,

Is there any cpu implementation of the code ? I read in your paper that you have used the ’astra gpu’ backend.

Regards

adler-j commented 5 years ago

The code should be runnable with a non-GPU version of Tensorflow and by selecting impl='astra_cpu' here https://github.com/adler-j/learned_gradient_tomography/blob/f358cc4e3611c480615d453b574253d511f73fe7/code/partially_learned_gradient_descent.py#L17 Beware that it is probably extremely slow though.

aboudjelal commented 5 years ago

Thank you for your answer,

when I execute the code : python3 partially_learned_gradient_descent_no_gradients.py . I show this message,

2019-03-18 14:48:17.850394: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2594125000 Hz 2019-03-18 14:48:17.850835: I tensorflow/compiler/xla/service/service.cc:150] XLA service 0x1ce2690 executing computations on platform Host. Devices: 2019-03-18 14:48:17.850875: I tensorflow/compiler/xla/service/service.cc:158] StreamExecutor device (0): , Traceback (most recent call last): File "partially_learned_gradient_descent_no_gradients.py", line 17, in operator = odl.tomo.RayTransform(space, geometry) File "/home/abdel/.local/lib/python3.6/site-packages/odl/tomo/operators/ray_trafo.py", line 383, in init variant='forward', **kwargs) File "/home/abdel/.local/lib/python3.6/site-packages/odl/tomo/operators/ray_trafo.py", line 118, in init raise RuntimeError('no ray transform back-end available; ' RuntimeError: no ray transform back-end available; this requires 3rd party packages, please check the install docs

thanks

adler-j commented 5 years ago

Did you install ASTRA?

https://odlgroup.github.io/odl/getting_started/installing_extensions.html#astra-for-x-ray-tomography

aboudjelal commented 5 years ago

no I didn't i will try

aboudjelal commented 5 years ago

I installed ASTRA but some error

adler-j commented 5 years ago

Could you elaborate a bit more on what error?