The input signal, typically a classification output
The reference signal, typically a one hot code representing a class label
The right
reference input for each element of the batch sums to 1.
Protect against generating NaNs for large inputs (>100).
The input signal, typically a classification output
Raise a node to a fixed power.
Raise a node to a fixed power. Cog has two pow() function signatures corresponding to both integer and non-integer powers. The integer case is detected here and special-cased (instead of having a separate PowN node for this).
If the power n
is anything other than a positive integer, make sure the inputs
are always positive or NaNs will result.
the input signal
the power to raise the input to
The right
reference input for each element of the batch sums to 1.
The reference signal, typically a one hot code representing a class label
Protect against generating NaNs for large inputs (>100).
The cross-entropy loss function applied to the softmax of the input relative to the reference signal. This loss function is commonly used for training a classification network. Unlike the similarly-named "CrossEntropySoftMax", this class computes a cross-entropy softmax individually for each image representation of the batch. As such, its output is not a single scalar, but instead a vector of length
batchSize
. This allows the class to be tested by the existing test infrastructure.The input signal, typically a classification output
The reference signal, typically a one hot code representing a class label
The
right
reference input for each element of the batch sums to 1.Protect against generating NaNs for large inputs (>100).