0
当我使用多GPU的负载是由单一的训练模式,我得到这个错误信息:我们可以使用多gpu traing来恢复由单个gpu训练的模型吗?
张量名称“test_mutli_gpu_1/test_mutli_gpu_1 /平均值/平均”不是在检查点文件中找到models_0606/my_modle-50
这里是我关于图码伪:
with tf.Graph().as_default():
a = tf.get_variable()
for gpu_index in range(0,4):
with tf.device('/gpu:%d' % gpu_index):
with tf.name_scope('%s_%d' % ('test_mutli_gpu', gpu_index)) as scope:
tf.get_variable_scope().reuse_variables()
loss = caculateloss()
grad = calculategard()
grads.append(grad)
grad = average_gradients(grads)
apply_gradient_op = opt.apply_gradients(grads)
variable_averages = tf.train.ExponentialMovingAverage(MOVING_AVERAGE_DECAY)
variables_averages_op = variable_averages.apply(tf.trainable_variables())
train_op = tf.group(apply_gradient_op, variables_averages_op)
有人知道我是否摆乌龙多GPU训练 非常感谢〜
能否请您添加使用加载从检查点图中的一些代码测试? – nessuno
它只是一个简单的代码:saver.restore(sess,“models_0606/my_modle-650”) –