install tensorflow gpu

tf.config.list_physical_devices('GPU')

Here is what the above code is Doing:
1. It’s checking if there are any GPUs available.
2. If there are GPUs available, it’s listing them.
3. It’s printing out whether TensorFlow can access a GPU.