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

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

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

# subInPlace

[common]\
fun [subInPlace](subInPlace.md)(self: [Tensor](../Tensor/index.md), other: [Tensor](../Tensor/index.md), alpha: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html) = 1.0, activation: [Activation](../Activation/index.md) = Activation.IDENTITY): [Tensor](../Tensor/index.md)

`subInPlace(self: Tensor, other: Tensor, alpha: Double = 1.0, activation: Activation = Activation.IDENTITY)`: the `sub_` operator. In-place `sub`: writes through `x`. Writes through `self` and returns it, so calls chain.

[common]\
fun [subInPlace](subInPlace.md)(self: [Tensor](../Tensor/index.md), other: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html), alpha: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html) = 1.0, activation: [Activation](../Activation/index.md) = Activation.IDENTITY): [Tensor](../Tensor/index.md)

`subInPlace(self: Tensor, other: Double, alpha: Double = 1.0, activation: Activation = Activation.IDENTITY)`: the number form of `sub_`, `other` as a scalar.