21 lines
598 B
Python
21 lines
598 B
Python
# tf_check.py
|
|
import os
|
|
print("PYTHON:", os.sys.version)
|
|
|
|
try:
|
|
import tensorflow as tf
|
|
print("TF VERSION:", tf.__version__)
|
|
print("TF Built with CUDA:", tf.test.is_built_with_cuda())
|
|
print("TF GPUs:", tf.config.list_physical_devices('GPU'))
|
|
except Exception as e:
|
|
print("TF CHECK ERROR:", e)
|
|
|
|
try:
|
|
import torch
|
|
print("TORCH VERSION:", torch.__version__)
|
|
print("TORCH CUDA AVAILABLE:", torch.cuda.is_available())
|
|
if torch.cuda.is_available():
|
|
print("TORCH DEVICE:", torch.cuda.get_device_name(0))
|
|
except Exception as e:
|
|
print("TORCH CHECK ERROR:", e)
|