---
title: "constantPad"
sidebar_label: "constantPad"
description: "Kotlin binding reference: constantPad."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Ops](index.md)/[constantPad](constantPad.md)

# constantPad

[common]\
fun [constantPad](constantPad.md)(input: [Tensor](../Tensor/index.md), pad: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html), value: [Tensor](../Tensor/index.md)? = null): [Tensor](../Tensor/index.md)

`constantPad(input: Tensor, pad: LongArray, value: Tensor? = null)`: the `constant_pad` operator. `pad` with a constant fill. Pads each axis by interleaved `(lo, hi)` pairs in layout order: pair `i` pads axis `i`; fewer pairs than the rank pads only the leading axes; a negative width crops that side. Widths are literals or 0-D integer Tensors. Copies.