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.
相關文章
相關標籤/搜索