2021-03-24 03:37:22 +00:00
|
|
|
# TensorFlow and tf.keras
|
|
|
|
import tensorflow as tf
|
|
|
|
|
|
|
|
# Helper libraries
|
|
|
|
import numpy as np
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
2021-03-24 21:37:44 +00:00
|
|
|
# print(tf.__version__)
|
|
|
|
|
|
|
|
# print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))
|
|
|
|
|
2021-03-24 22:13:21 +00:00
|
|
|
with tf.device("/GPU:0"):
|
|
|
|
a = tf.random.normal([1, 2])
|
|
|
|
|
2021-03-24 21:37:44 +00:00
|
|
|
|