---
title: MLCLayer
framework: ML Compute
role: symbol
role_heading: Class
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: mlcompute/mlclayer
---

# MLCLayer

The base class for all framework layers.

## Declaration

```swift
class MLCLayer
```

## Overview

Overview This class defines a polymorphic interface for MLCLayer subclasses. There are subclasses for each supported neural network layer type. Use the appropriate subclass initializer to create a layer object.

## Topics

### Inspecting a Layer

- [layerID](mlcompute/mlclayer/layerid.md)
- [label](mlcompute/mlclayer/label.md)
- [isDebuggingEnabled](mlcompute/mlclayer/isdebuggingenabled.md)
- [deviceType](mlcompute/mlclayer/devicetype.md)
- [supportsDataType(_:on:)](mlcompute/mlclayer/supportsdatatype(_:on:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [MLCActivationLayer](mlcompute/mlcactivationlayer.md)
- [MLCArithmeticLayer](mlcompute/mlcarithmeticlayer.md)
- [MLCBatchNormalizationLayer](mlcompute/mlcbatchnormalizationlayer.md)
- [MLCComparisonLayer](mlcompute/mlccomparisonlayer.md)
- [MLCConcatenationLayer](mlcompute/mlcconcatenationlayer.md)
- [MLCConvolutionLayer](mlcompute/mlcconvolutionlayer.md)
- [MLCDropoutLayer](mlcompute/mlcdropoutlayer.md)
- [MLCEmbeddingLayer](mlcompute/mlcembeddinglayer.md)
- [MLCFullyConnectedLayer](mlcompute/mlcfullyconnectedlayer.md)
- [MLCGatherLayer](mlcompute/mlcgatherlayer.md)
- [MLCGramMatrixLayer](mlcompute/mlcgrammatrixlayer.md)
- [MLCGroupNormalizationLayer](mlcompute/mlcgroupnormalizationlayer.md)
- [MLCInstanceNormalizationLayer](mlcompute/mlcinstancenormalizationlayer.md)
- [MLCLSTMLayer](mlcompute/mlclstmlayer.md)
- [MLCLayerNormalizationLayer](mlcompute/mlclayernormalizationlayer.md)
- [MLCLossLayer](mlcompute/mlclosslayer.md)
- [MLCMatMulLayer](mlcompute/mlcmatmullayer.md)
- [MLCMultiheadAttentionLayer](mlcompute/mlcmultiheadattentionlayer.md)
- [MLCPaddingLayer](mlcompute/mlcpaddinglayer.md)
- [MLCPoolingLayer](mlcompute/mlcpoolinglayer.md)
- [MLCReductionLayer](mlcompute/mlcreductionlayer.md)
- [MLCReshapeLayer](mlcompute/mlcreshapelayer.md)
- [MLCScatterLayer](mlcompute/mlcscatterlayer.md)
- [MLCSelectionLayer](mlcompute/mlcselectionlayer.md)
- [MLCSliceLayer](mlcompute/mlcslicelayer.md)
- [MLCSoftmaxLayer](mlcompute/mlcsoftmaxlayer.md)
- [MLCSplitLayer](mlcompute/mlcsplitlayer.md)
- [MLCTransposeLayer](mlcompute/mlctransposelayer.md)
- [MLCUpsampleLayer](mlcompute/mlcupsamplelayer.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
