Applies the filter to several pairs of (input, output) data.
- Parameter batchSize: The number of input-output pairs to process.
- Parameter input: The input descriptor.
- Parameter labels: The labels descriptor.
- Parameter output: The output descriptor.
- Parameter inputGradient: The input gradient descriptor.
Applies the filter to several pairs of (input, output) data.
- Parameter batchSize: The number of input-output pairs to process.
- Parameter input: The input descriptor.
- Parameter labels: The labels descriptor.
- Parameter output: The output descriptor.
- Parameter weights: The optional loss computation weight descriptor. If `weights` is `nil`,
this function is identical to `LossLayer.apply(batchSize:input:labels:output:generatingInputGradient:)`.
- Parameter weightsSize: The weights size, see discussion below.
- Parameter broadcastsWeights: A Boolean value that specifies whether to broadcast the
weights across all samples in the batch. Set to `false` for different weights for each sample in
the batch.
- Parameter inputGradient: The input gradient descriptor.
Creates a new loss layer.
- Parameter input: The input descriptor.
- Parameter output: The output descriptor.
- Parameter lossFunction: The loss function.
- Parameter lossReduction: The loss reduction function.
- Parameter filterParameters: Runtime filter parameters.