TF is too hard to set up
This commit is contained in:
parent
2063cc116f
commit
00073044ca
18
tf-test.py
18
tf-test.py
|
@ -1,15 +1,5 @@
|
||||||
# TensorFlow and tf.keras
|
|
||||||
import tensorflow as tf
|
import tensorflow as tf
|
||||||
|
if tf.test.gpu_device_name():
|
||||||
# Helper libraries
|
print('Default GPU Device: {}'.format(tf.test.gpu_device_name()))
|
||||||
import numpy as np
|
else:
|
||||||
import matplotlib.pyplot as plt
|
print("Please install GPU version of TF")
|
||||||
|
|
||||||
# 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])
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue