<!--
{
  "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/MLCUpsampleLayer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "ML Compute"
    ],
    "preciseIdentifier" : "c:objc(cs)MLCUpsampleLayer"
  },
  "title" : "MLCUpsampleLayer"
}
-->

# MLCUpsampleLayer

A layer that applies upsampling with the shape you specify.

```
class MLCUpsampleLayer
```

## Topics

### Creating Upsample Layers

[`init(shape:)`](/documentation/MLCompute/MLCUpsampleLayer/init(shape:))

Creates an upsample layer with the shape you specify.

[`init(shape:sampleMode:alignsCorners:)`](/documentation/MLCompute/MLCUpsampleLayer/init(shape:sampleMode:alignsCorners:))

Creates an upsample layer with the shape, upsampling algorithm, and corner alignment option you specify.

[`layerWithShape:`](/documentation/MLCompute/MLCUpsampleLayer/layerWithShape:)

Creates an upsample layer with the shape you specify.

[`layerWithShape:sampleMode:alignsCorners:`](/documentation/MLCompute/MLCUpsampleLayer/layerWithShape:sampleMode:alignsCorners:)

Creates an upsample layer with the shape, upsampling algorithm, and corner alignement option you specify.

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

A sampling mode for an upsample layer.

### Inspecting Upsample Layers

[`shape`](/documentation/MLCompute/MLCUpsampleLayer/shape-61n1u)

An array that contains the dimensions of the result tensor.

[`shape`](/documentation/MLCompute/MLCUpsampleLayer/shape-7j6sf)

An array that contains the dimensions of the result tensor.

[`sampleMode`](/documentation/MLCompute/MLCUpsampleLayer/sampleMode)

The upsampling algorithm type.

[`alignsCorners`](/documentation/MLCompute/MLCUpsampleLayer/alignsCorners)

A Boolean that indicates whether the layer aligns the corner pixels of the input and output tensors.



---

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)