Skip to main content

struct

NamedTensor

A named input tensor.

Fields

  • name (String): Name of the tensor.

Implemented traits

AnyType, Copyable, Movable

Methods

__init__

__init__[dtype: DType](inout self: Self, owned name: String, owned tensor: Tensor[dtype])

Creates a NamedTensor owning the tensor with a reference count.

Parameters:

  • dtype (DType): Data type of the tensor to own.

Args:

  • name (String): Name of the tensor.
  • tensor (Tensor[dtype]): Tensor to take ownership of.