---
title: "apply(batchSize:input:output:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/bnns/embeddinglayer/apply(batchsize:input:output:)"
---

# apply(batchSize:input:output:)

Applies the layer to a set of input objects, writing the result to a set of output objects.

## Declaration

```swift
func apply(batchSize: Int, input: BNNSNDArrayDescriptor, output: BNNSNDArrayDescriptor) throws
```

## Parameters

- `batchSize`: The number of input-output pairs.
- `input`: The descriptor of the input.
- `output`: The descriptor of the output.

## See Also

### Applying an Embedding Layer

- [applyBackward(batchSize:input:output:outputGradient:generatingWeightsGradient:)](accelerate/bnns/embeddinglayer/applybackward(batchsize:input:output:outputgradient:generatingweightsgradient:).md)
