未验证 提交 febc8edc 编写于 作者: X xuezhong 提交者: GitHub

Merge pull request #639 from lfchener/patch-1

Update layers_cn.rst
......@@ -11180,6 +11180,17 @@ auc
prediction = network(image, is_infer=True)
auc_out=fluid.layers.auc(input=prediction, label=label)
注:这里返回的是auc的一个全局累加值。如果想要在训练的过程中将全局auc置为0,可以参考以下代码,其中auc_status为auc相关的状态记录变量:
.. code-block:: python
def set_zero(var_name):
param = inference_scope.var(var_name).get_tensor()
param_array = np.zeros(param._get_dims()).astype("int64")
param.set(param_array, place)
for auc_state in auc_states:
set_zero(auc_state.name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册