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

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

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

# conv1d

[common]\
fun [conv1d](conv1d.md)(input: [Tensor](../Tensor/index.md), weight: [Tensor](../Tensor/index.md), bias: [Tensor](../Tensor/index.md)? = null, stride: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html) = longArrayOf(1), padding: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html) = longArrayOf(0), dilation: [LongArray](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long-array/index.html) = longArrayOf(1), groups: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 1, activation: [Activation](../Activation/index.md) = Activation.IDENTITY): [Tensor](../Tensor/index.md)

`conv1d(input: Tensor, weight: Tensor, bias: Tensor? = null, stride: LongArray = longArrayOf(1), padding: LongArray = longArrayOf(0), dilation: LongArray = longArrayOf(1), groups: Long = 1L, activation: Activation = Activation.IDENTITY)`: the `conv1d` operator. 1-D convolution over a channels-last input. Layout is channels-last: input `[N, spatial.., C]`, weight OHWI `[O, K.., C/groups]` (output channels first, kernel dims, then the per-group input channels), optional bias `[O]`.