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

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

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

# unsqueeze

[common]\
fun [unsqueeze](unsqueeze.md)(input: [Tensor](../Tensor/index.md), dim: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)): [Tensor](../Tensor/index.md)

`unsqueeze(input: Tensor, dim: Long)`: the `unsqueeze` operator. Insert a size-1 dim at `dim`. The position is normalized against the OUTPUT rank, so `-1` appends at the trailing end. Returns a view (no copy).