<!--
{
  "availability" : [
    "iOS: 14.0.0 - 17.4.0",
    "iPadOS: 14.0.0 - 17.4.0",
    "macCatalyst: 14.0.0 - 17.4.0",
    "macOS: 11.0.0 - 14.3.0",
    "tvOS: 14.0.0 - 17.4.0"
  ],
  "documentType" : "symbol",
  "framework" : "MLCompute",
  "identifier" : "/documentation/MLCompute/MLCEmbeddingLayer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCEmbeddingLayer"
  },
  "title" : "MLCEmbeddingLayer"
}
-->

# MLCEmbeddingLayer

A layer that stores a word embedding.

```
class MLCEmbeddingLayer
```

## Topics

### Creating Embedding Layers

[`init(descriptor:weights:)`](/documentation/MLCompute/MLCEmbeddingLayer/init(descriptor:weights:))

Creates an embedding layer with the descriptor and word embedding weights tensor you specify.

[`MLCEmbeddingDescriptor`](/documentation/MLCompute/MLCEmbeddingDescriptor)

A configuration object you use to create an embedding layer.

### Inspecting Embedding Layers

[`descriptor`](/documentation/MLCompute/MLCEmbeddingLayer/descriptor)

The configuration object you use to create the embedding layer.

[`weights`](/documentation/MLCompute/MLCEmbeddingLayer/weights)

The weights tensor that contains the word embedding.

[`weightsParameter`](/documentation/MLCompute/MLCEmbeddingLayer/weightsParameter)

The tensor parameter that describes the weights for the optimizer update.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)