Tensorflow:使用自定义var_list进行优化器初始化时出错

时间:2016-04-11 18:15:39

标签: tensorflow

我正在尝试仅优化我的变量的特定子集:

my_train = tf.train.RMSPropOptimizer(0.001).minimize(my_loss, var_list=my_variables)

这给了我一条错误消息

ValueError: No gradients provided for any variable: ((None, <tensorflow.python.ops.variables.Variable object at 0x7f30317a5f10>), (None, <tensorflow.python.ops.variables.Variable object at 0x7f303146fa10>), (None, <tensorflow.python.ops.variables.Variable object at 0x7f3031522390>), (None, <tensorflow.python.ops.variables.Variable object at 0x7f30314e1dd0>), (None, <tensorflow.python.ops.variables.Variable object at 0x7f30314a5fd0>), (None, <tensorflow.python.ops.variables.Variable object at 0x7f303146ae90>))

如果我省略var_list就没有错误,但这显然不是我想要的,而且从错误信息中我不清楚问题是什么。

0 个答案:

没有答案