---
title: "colToIm(_:outputShape:descriptor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/coltoim(_:outputshape:descriptor:name:)"
---

# colToIm(_:outputShape:descriptor:name:)

Creates a column to image operation and returns the result tensor.

## Declaration

```swift
func colToIm(_ source: MPSGraphTensor, outputShape: [NSNumber], descriptor: MPSGraphImToColOpDescriptor, name: String?) -> MPSGraphTensor
```

## Parameters

- `source`: The tensor containing the source data. Must be of rank 4. The layout is defined by descriptor.dataLayout.
- `outputShape`: The result tensor shape.
- `descriptor`: The descriptor object that specifies the parameters of the operation.
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object
