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

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

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

# renorm

[common]\
fun [renorm](renorm.md)(input: [Tensor](../Tensor/index.md), p: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html), dim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), maxnorm: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html), eps: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)? = null): [Tensor](../Tensor/index.md)

`renorm(input: Tensor, p: Double, dim: Long, maxnorm: Double, eps: Double? = null)`: the `renorm` operator. Caps each sub-tensor's `p`-norm along `dim` at `maxnorm`. Every slice along `dim` whose `p`-norm exceeds `maxnorm` is rescaled to exactly `maxnorm`; slices already within the bound pass through unchanged.