applyBackward(batchSize:inputA:inputB:output:outputGradient:generatingInputAGradient:generatingInputBGradient:generatingParameterGradients:)
Applies the layer backward to generate input gradients, where the first layer accepts two inputs.
Declaration
func applyBackward(batchSize: Int, inputA: BNNSNDArrayDescriptor, inputB: BNNSNDArrayDescriptor, output: BNNSNDArrayDescriptor, outputGradient: BNNSNDArrayDescriptor, generatingInputAGradient inputAGradient: BNNSNDArrayDescriptor, generatingInputBGradient inputBGradient: BNNSNDArrayDescriptor, generatingParameterGradients parameterGradients: [BNNSNDArrayDescriptor]) throwsParameters
- batchSize:
The number of input-output pairs.
- inputA:
The descriptor of the first input.
- inputB:
The descriptor of the second input.
- output:
The descriptor of the output.
- outputGradient:
The descriptor of the output gradient.
- inputAGradient:
The descriptor of the input gradient.
- inputBGradient:
The descriptor of the input gradient.
- parameterGradients:
An array that contains the parameter gradients.