https://askubuntu.com/questions/102258/how-to-set-cpu-affinity-to-a-process
аюсь изучить распределенный TensorFlow. Пробовал кусочек кода как объяснилВот:
with tf.device("/cpu:0"):
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
with tf.device("/cpu:1"):
y = tf.nn.softmax(tf.matmul(x, W) + b)
loss = tf.reduce_mean(-tf.reduce_sum(y_ * tf.log(y), reduction_indices=[1]))
Получаем следующую ошибку:
tensorflow.python.framework.errors_impl.InvalidArgumentError: Cannot assign a device for operation 'MatMul': Operation was explicitly assigned to /device:CPU:1 but available devices are [ /job:localhost/replica:0/task:0/cpu:0 ]. Make sure the device specification refers to a valid device. [[Node: MatMul = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false, _device="/device:CPU:1"](Placeholder, Variable/read)]]
Это означает, что TensorFlow не распознаетПроцессор: 1.
Я работаю на сервере RedHat с 40 процессорами (cat /proc/cpuinfo | grep processor | wc -l
).
Есть идеи?