In order to run Python code with GPU (after installing all libraries for this), one can juste add these line before the code:
device_name= tf.test.gpu_device_name