---
title: MPSCNNUpsamplingNearestGradient
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpscnnupsamplingnearestgradient
---

# MPSCNNUpsamplingNearestGradient

A gradient upsampling filter that samples the pixel nearest to the source when upsampling to the destination pixel.

## Declaration

```swift
class MPSCNNUpsamplingNearestGradient
```

## Topics

### Initializers

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

## Relationships

### Inherits From

- [MPSCNNUpsamplingGradient](metalperformanceshaders/mpscnnupsamplinggradient.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)
- [MPSCNNUpsamplingNearest](metalperformanceshaders/mpscnnupsamplingnearest.md)
- [MPSCNNUpsamplingBilinearGradient](metalperformanceshaders/mpscnnupsamplingbilineargradient.md)
- [MPSCNNUpsamplingGradient](metalperformanceshaders/mpscnnupsamplinggradient.md)
