Closed1
pytorch/tensorflowでGPUが有効になっているかを確認する

Tensorflow
import tensorflow as tf
print(tf.config.list_physical_devices('GPU'))
PyTorch
import torch
print(torch.cuda.is_available())
print(torch.cuda.device_count())
print(torch.cuda.current_device())
print(torch.cuda.device(0))
このスクラップは2022/10/29にクローズされました