การเช็ค Python Version

import sys
print("Python version     = ", sys.version)
print()

import tensorflow as tf
print("Tensorflow version = ", tf.__version__)
print("Is GPU available?  = ", tf.test.is_gpu_available())
if tf.test.gpu_device_name(): 
    print("Current GPU        = ", tf.test.gpu_device_name())
else: 
    print("Please install GPU version of TF")
print("GPU Count          = ", len(tf.config.experimental.list_physical_devices('GPU')))
print("GPU list           = ", tf.config.list_physical_devices('GPU'))
print()

import torch
print("Torch version      = ", torch.__version__)
print("Is GPU available?  = ", torch.cuda.is_available())
print("Current GPU        = ", torch.cuda.current_device())
print("GPU Count          = ", torch.cuda.device_count())
print("GPU Name           = ", torch.cuda.get_device_name(0))
print()

import fastai
print("Fastai version     = ", fastai.__version__)
print()

การเช็คเวอร์ชัน
Previous
Next Post »