---
title: "ClikaRT::ops::interpolate"
sidebar_label: "interpolate"
description: "Resample the spatial dims to sizes OR by scale_factors (exactly one given; entries may be int literals or 0-D Tensors, so a dynamic output size flows without a host read)."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## interpolate() {#interpolate}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`interpolate`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `input`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`ClikaRT::Span`](../Span.md)`<const` [`ScalarOrTensor`](../ScalarOrTensor.md)`>` `sizes` `=` `{}`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`ClikaRT::Span`](../Span.md)`<const` [`ScalarOrTensor`](../ScalarOrTensor.md)`>` `scale_factors` `=` `{}`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`InterpMode`](./index.md#InterpMode) `mode` `=` [`InterpMode::Nearest`](./index.md#InterpMode),<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::optional<bool>` `align_corners` `=` `std::nullopt`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`bool` `recompute_scale_factor` `=` `false`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`bool` `antialias` `=` `false`<br />
)

</div>

Resample the spatial dims to `sizes` OR by `scale_factors` (exactly one given; entries may be int literals or 0-D Tensors, so a dynamic output size flows without a host read). Rank picks the spatial variant.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 5492

</div>
