check gpu device tensorflow code example
Example 1: tensorflow check gpu
tf.config.list_physical_devices('GPU')
Example 2: tensorflow cant see gpu
$ pip uninstall tensorflow
$ pip install tensorflow-gpu
tf.config.list_physical_devices('GPU')
$ pip uninstall tensorflow
$ pip install tensorflow-gpu