我正在尝试仅优化我的变量的特定子集:
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就没有错误,但这显然不是我想要的,而且从错误信息中我不清楚问题是什么。