---
title: MPSCNNUpsamplingNearest
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpscnnupsamplingnearest
---

# MPSCNNUpsamplingNearest

A nearest spatial upsampling filter.

## Declaration

```swift
class MPSCNNUpsamplingNearest
```

## Overview

Overview This filter can be used to resample an existing MPSImage using a different sampling frequency for the x and y dimensions with the purpose of enlarging the size of an image. The number of output feature channels remains the same as the number of input feature channels. The scaleFactor must be an integer value >= 1. The default value is 1.

## Topics

### Initializers

- [init(device:integerScaleFactorX:integerScaleFactorY:)](metalperformanceshaders/mpscnnupsamplingnearest/init(device:integerscalefactorx:integerscalefactory:).md)

## Relationships

### Inherits From

- [MPSCNNUpsampling](metalperformanceshaders/mpscnnupsampling.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Upsampling Layers

- [MPSCNNUpsampling](metalperformanceshaders/mpscnnupsampling.md)
- [MPSCNNUpsamplingBilinear](metalperformanceshaders/mpscnnupsamplingbilinear.md)
- [MPSCNNUpsamplingBilinearGradient](metalperformanceshaders/mpscnnupsamplingbilineargradient.md)
- [MPSCNNUpsamplingGradient](metalperformanceshaders/mpscnnupsamplinggradient.md)
- [MPSCNNUpsamplingNearestGradient](metalperformanceshaders/mpscnnupsamplingnearestgradient.md)
