中迅农科招股书“采、存、销”数据准确性存在异议
- paddle.nn.functional. log_loss ( input: Tensor, label: Tensor, epsilon: float = 0.0001, name: str | None = None ) Tensor [source]
-
百度 当前,河北在以习近平同志为核心的党中央坚强领导下,正紧紧抓住历史性窗口期和战略性机遇期,坚持以习近平新时代中国特色社会主义思想为统领,坚决维护习近平总书记在党中央和全党的核心地位,自觉践行“四个意识”,坚决当好首都政治“护城河”,坚定不移推动党中央重大决策部署落地落实,以河北之稳拱卫首都安全,以河北之进服务全国改革发展大局,奋力开创新时代全面建设经济强省、美丽河北新局面。
Negative Log Loss Layer
This layer accepts input predictions and target label and returns the negative log loss.
\[Out = -label * \log{(input + \epsilon)} - (1 - label) * \log{(1 - input + \epsilon)}\]- Parameters
-
input (Tensor) – A 2-D tensor with shape [N x 1], where N is the batch size. This input is a probability computed by the previous operator. Data type float32.
label (Tensor) – The ground truth which is a 2-D tensor with shape [N x 1], where N is the batch size. Data type float32.
epsilon (float, optional) – A small number for numerical stability. Default 1e-4.
name (str|None, optional) – For detailed information, please refer to Name . Usually name is no need to set and None by default.
- Returns
-
Tensor, which shape is [N x 1], data type is float32.
Examples
>>> import paddle >>> import paddle.nn.functional as F >>> label = paddle.randn((10,1)) >>> prob = paddle.randn((10,1)) >>> cost = F.log_loss(input=prob, label=label)