DMA和tensorflow的打印意味着什么?有可能设置它们吗?

DMA和tensorflow的打印意味着什么?有可能设置它们吗?,tensorflow,gpu,nvidia,dma,Tensorflow,Gpu,Nvidia,Dma,Y或yn是什么意思 如何自行设置Y和N 顺便说一下,机器打印时会关机(在错误机器上) 当打印(在另一台机器上)时,它在两个GPU上成功运行 所以我想知道这是否是问题所在 编辑: 我使用下面的程序可以使它关闭 import numpy as np import tensorflow as tf with tf.device('/gpu:0'): W = tf.Variable([.3], tf.float32) b = tf.Variable([-.3], tf.float32) wi

Y
yn
是什么意思

如何自行设置
Y
N

顺便说一下,机器打印时会关机(在错误机器上)

当打印(在另一台机器上)时,它在两个GPU上成功运行

所以我想知道这是否是问题所在

编辑:

我使用下面的程序可以使它关闭

import numpy as np
import tensorflow as tf

with tf.device('/gpu:0'):
  W = tf.Variable([.3], tf.float32)
  b = tf.Variable([-.3], tf.float32)

with tf.device('/gpu:1'):
  x = tf.placeholder(tf.float32)
  linear_model = W * x + b
  y = tf.placeholder(tf.float32)

loss = tf.reduce_sum(tf.square(linear_model - y)) # sum of the squares

optimizer = tf.train.GradientDescentOptimizer(0.01)
train = optimizer.minimize(loss)

x_train = [1,2,3,4]
y_train = [0,-1,-2,-3]

init = tf.global_variables_initializer()
sess = tf.Session()
sess.run(init) 
for i in range(1000):
  sess.run(train, {x:x_train, y:y_train})

# evaluate training accuracy
curr_W, curr_b, curr_loss  = sess.run([W, b, loss], {x:x_train, y:y_train})
print("W: %s b: %s loss: %s"%(curr_W, curr_b, curr_loss))

这是设备互连。这表明在多GPU训练期间,数据在设备之间传输的速度有多快

这不是问题。“NY”配置取决于您的硬件配置。您不能手动设置它

@McAngus的帖子有完整的答案。

一些调试技巧--
Y N
N Y
import numpy as np
import tensorflow as tf

with tf.device('/gpu:0'):
  W = tf.Variable([.3], tf.float32)
  b = tf.Variable([-.3], tf.float32)

with tf.device('/gpu:1'):
  x = tf.placeholder(tf.float32)
  linear_model = W * x + b
  y = tf.placeholder(tf.float32)

loss = tf.reduce_sum(tf.square(linear_model - y)) # sum of the squares

optimizer = tf.train.GradientDescentOptimizer(0.01)
train = optimizer.minimize(loss)

x_train = [1,2,3,4]
y_train = [0,-1,-2,-3]

init = tf.global_variables_initializer()
sess = tf.Session()
sess.run(init) 
for i in range(1000):
  sess.run(train, {x:x_train, y:y_train})

# evaluate training accuracy
curr_W, curr_b, curr_loss  = sess.run([W, b, loss], {x:x_train, y:y_train})
print("W: %s b: %s loss: %s"%(curr_W, curr_b, curr_loss))