Developer Guide

Contents

Loss Logistic Cross-entropy Forward Layer

The loss logistic cross-entropy layer implements an interface of the loss layer.
For a
two
-dimensional input tensor
X
R
n
1
x 1
with batch dimension of size
n
1
and
two
-dimensional
T
R
n
1
x 1
, the layer computes a one-dimensional tensor
Y
with the logistic cross-entropy value:
where
log
is the natural logarithm,
σ(x)
is the logistic function, and
pr
i
∈ [0,1] is the probability that a sample belongs to the first of two classes.

Problem Statement

Given:
  • The
    two
    -dimensional input tensor
    X
    R
    n
    1
    x 1
    with input data
  • The
    two
    -dimensional
    T
    R
    n
    1
    x 1
    that contains the values of ground truth for each element of the batch
The problem is to compute a one-dimensional tensor
Y
R
1
such that:
The library uses the numeric stable formula for computing the value of
s
i
:
where
If the input
p
-dimensional tensor has the size of
n
1
x 1 x ... x 1, insert the reshape layer before the logistic loss layer to get the required
n
1
x 1 size of the input tensor.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804