I am using code ( https://github.com/vuptran/cardiac-segmentation ) which makes use of tensorflow.
If I use the tensorflow gpu backend the code works fine.
However, if I use the plain tensorflow, it runs without errors, but behaves differently (in that it produces completely nonsensical results).
1. Any ideas of possible causes why the gpu backend would cause the same code to produce different results from the cpu backend, and where to look for evidence of this happening in the code?1
2. Alternatively, is there a way to install the tensorflow-gpu backend, but somehow hack it into running from the CPU?2
1. This has been discussed in the bug tracker previously, but the author says the code is not gpu-specific, and is not aware of any obvious reason why tensorflow should behave differently when using the cpu backend.
2. Simply setting
CUDA_ENABLED_DEVICES=''
will not work, because the code will fail at the point of attempting to import tensorflow, since tensorflow will throw an error about not being able to find the relevant libraries.