tensorflow python3 check number of GPUs code example Example: tensorflow check gpu tf.config.list_physical_devices('GPU')