TF is too hard to set up

This commit is contained in:
Anthony Wang 2021-03-25 13:43:22 -05:00
parent 2063cc116f
commit 00073044ca
Signed by: a
GPG Key ID: 6FD3502572299774

View File

@ -1,15 +1,5 @@
# TensorFlow and tf.keras
import tensorflow as tf
# Helper libraries
import numpy as np
import matplotlib.pyplot as plt
# print(tf.__version__)
# print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
with tf.device("/GPU:0"):
a = tf.random.normal([1, 2])
if tf.test.gpu_device_name():
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
else:
print("Please install GPU version of TF")