提交 c1fea3e3 编写于 作者: Y Yibing Liu 提交者: pkpk

Fix example in log_loss doc (#22052)

* Fix example in log_loss doc, test=develop

* Use none for unknown dim, test=develop, test=document_fix
上级 f5f65a7e
......@@ -11964,8 +11964,8 @@ def log_loss(input, label, epsilon=1e-4, name=None):
.. code-block:: python
import paddle.fluid as fluid
label = fluid.data(name='label', shape=[-1, 1], dtype='int64')
prob = fluid.data(name='prob', shape=[-1, 10], dtype='float32')
label = fluid.data(name='label', shape=[None, 1], dtype='float32')
prob = fluid.data(name='prob', shape=[None, 1], dtype='float32')
cost = fluid.layers.log_loss(input=prob, label=label)
"""
helper = LayerHelper('log_loss', **locals())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册