Developer Guide for Intel® Data Analytics Acceleration Library 2019 Update 5
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:
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.