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

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

//[clika-runtime](../../../../index.md)/[io.clika.runtime](../../index.md)/[TensorSpec](../index.md)/[Companion](index.md)/[fromTensor](fromTensor.md)

# fromTensor

[common]\
fun [fromTensor](fromTensor.md)(tensor: [Tensor](../../Tensor/index.md), name: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;): [TensorSpec](../index.md)

The spec a live tensor observes: its dtype and concrete dims (a symbolic dim reads as [DYNAMIC_DIM](DYNAMIC_DIM.md)).