fix exp2 pytorch rewrite fatal train issue
This commit is contained in:
9
tensorflow_gpu_util.py
Normal file
9
tensorflow_gpu_util.py
Normal file
@@ -0,0 +1,9 @@
|
||||
import tensorflow as tf
|
||||
|
||||
def print_gpu_availability():
|
||||
"""打印Tensorflow的GPU可用性"""
|
||||
gpus = tf.config.list_physical_devices('GPU')
|
||||
if gpus:
|
||||
print("GPU is available")
|
||||
else:
|
||||
print("GPU is not available")
|
||||
Reference in New Issue
Block a user