“Tensorflow Sprawdź GPU” Kod odpowiedzi

Sprawdź, czy zainstalowany jest TensorFlow GPU

import tensorflow as tf
print(tf.test.gpu_device_name())
CBT fan club

Test GPU TENSORFLOW

# As it's written in Tensorflow documentatoin: 

import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))
Ugly Unicorn

Tensorflow Sprawdź GPU

tf.config.list_physical_devices('GPU')
Splendid Scarab

Sprawdź GPU w TensorFlow

# For tensorflow 2:
print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))

# For tensorflow 1:
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
Lazy Lizard

Test GPU TENSORFLOW

tf.test.is_gpu_available(
  cuda_only=False, min_cuda_compute_capability=None
)
Witty Whale

Tensorflow nie widzi GPU

$ pip uninstall tensorflow
$ pip install tensorflow-gpu
Relieved Reindeer

Odpowiedzi podobne do “Tensorflow Sprawdź GPU”

Pytania podobne do “Tensorflow Sprawdź GPU”

Więcej pokrewnych odpowiedzi na “Tensorflow Sprawdź GPU” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu