TensorFlow调用CPU/GPU对比速度

1、GPU代码 import time import tensorflow as tf begin = time.time() with tf.device('/gpu:0'): rand_t = tf.random_uniform([50,50],0,10,dtype=tf.float32,seed=0) a = tf.Variable(rand_t) b = tf.
相关文章
相关标签/搜索