今天遇到一个奇怪的现象,使用tensorflow-gpu的时候,出现内存超额~~如果我训练什么大型数据也就算了,关键我就写了一个y=W*x.......显示如下图所示: 程序如下: import tensorflow as tf w = tf.Variable([[1.0,2.0]]) b = tf.Variable([[2.],[3.]]) y = tf.multiply(w,b) init_op = tf.global_variables_initializer() with tf.Sess…
TensorFlow指定CPU和GPU方法 TensorFlow 支持 CPU 和 GPU.它也支持分布式计算.可以在一个或多个计算机系统的多个设备上使用 TensorFlow. TensorFlow 将支持的 CPU 设备命名为"/device:CPU:0"(或"/cpu:0"),第 i 个 GPU 设备命名为"/device:GPU:I"(或"/gpu:I"). 如前所述,GPU 比 CPU 要快得多,因为它们有许多小的内…