Contents

applyBackward(batchSize:input:output:outputGradient:generatingWeightsGradient:)

Applies the layer backward to generate input gradients.

Declaration

func applyBackward(batchSize: Int, input: BNNSNDArrayDescriptor, output: BNNSNDArrayDescriptor, outputGradient: BNNSNDArrayDescriptor, generatingWeightsGradient weightsGradient: BNNSNDArrayDescriptor) throws

Parameters

  • batchSize:

    The number of input-output pairs.

  • input:

    The descriptor of the input.

  • output:

    The descriptor of the output.

  • outputGradient:

    The descriptor of the output gradient.

  • weightsGradient:

    The descriptor of the input gradient.

See Also

Applying an Embedding Layer