Spaces:
Sleeping
Sleeping
import tensorflow as tf | |
gpus = tf.config.list_physical_devices('GPU') | |
if gpus: | |
print(f"Detected {len(gpus)} GPU(s):") | |
for gpu in gpus: | |
print(f" - {gpu.name}") | |
else: | |
print("No GPUs detected by TensorFlow. Check your configuration.") | |