Created
January 16, 2020 09:15
-
-
Save hatamiarash7/9590f637fb71ab07fdc03b69e324e82f to your computer and use it in GitHub Desktop.
Test Tensorflow GPU Availability
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import, division, print_function, unicode_literals | |
import numpy as np | |
import tensorflow as tf | |
import tensorflow_hub as hub | |
import tensorflow_datasets as tfds | |
version = tf.__version__ | |
executing_eagerly = tf.executing_eagerly() | |
hub_version = hub.__version__ | |
available = tf.config.experimental.list_physical_devices("GPU") | |
print("Version: ", version) | |
print("Eager mode: ", executing_eagerly) | |
print("Hub Version: ", h_version) | |
print("GPU is", "available" if avai else "NOT AVAILABLE") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment