Have you considered calling an external python script with Popen? You can pass any arguments into that script, and get back a path to the resulting image without too much hassle.
So it seems like the issue is that tensorflow calls sys.exit() in various places, which will try to exit the calling process (TD).
To avoid this, put your run() call in a try: except: clause, so the SystemExit exception that get’s raised doesn’t get handled and quit the process.
My first setup is the same like ,it will crash when i import tensorflow
My solution is install everything ,tensorflow ,cudnn, cuda ,python
make sure your system python is 3.5 !this is very important .
and i install cuda 8.0, tensorflow 1.2
I think is the new version is not suport yet .
Good luck .
I have the same problem, I can import and print TF from python prompt but when trying to import it in TD system crash. Has anyone gotten a solution? Regards.