反向传播会发生在标签上意味着什么?

2024-03-29 01:31:38 发布

您现在位置:Python中文网/ 问答频道 /正文

我今天收到警告,上面说

softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version. Instructions for updating:

Future major versions of TensorFlow will allow gradients to flow into the labels input on backprop by default.

然后我按照它的建议检查了tf.nn.softmax_cross_entropy_with_logits_v2,发现了以下内容

Backpropagation will happen into both logits and labels. To disallow backpropagation into labels, pass label tensors through a stop_gradients before feeding it to this function.

我不太明白反向传播会发生在标签中意味着什么,标签不是被设置为常量吗?在


Tags: andto警告labelswithnn标签will