Created
January 29, 2019 14:55
-
-
Save jkihgit/fd91e5354951d58bccdaa2835105fccd to your computer and use it in GitHub Desktop.
This file contains 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
import tensorflow as tf | |
gpu_fraction = 0.1 | |
vector_size = 100 | |
n = 1 | |
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=gpu_fraction) | |
config = tf.ConfigProto(gpu_options=gpu_options) | |
for i in range(n): | |
with tf.Session(config=config) as sess: | |
a = tf.random.normal([vector_size]) | |
b = tf.random.normal([vector_size]) | |
sess.run(a+b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment