Tensor.Unsqueeze Method

Definition

Overloads

Unsqueeze<T>(Tensor<T>, Int32)

Insert a new dimension of length 1 that will appear at the dimension position.

Unsqueeze<T>(TensorSpan<T>, Int32)

Insert a new dimension of length 1 that will appear at the dimension position.

Unsqueeze<T>(ReadOnlyTensorSpan<T>, Int32)

Insert a new dimension of length 1 that will appear at the dimension position.

Unsqueeze<T>(Tensor<T>, Int32)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Insert a new dimension of length 1 that will appear at the dimension position.

C#
public static System.Numerics.Tensors.Tensor<T> Unsqueeze<T>(this System.Numerics.Tensors.Tensor<T> tensor, int dimension);

Type Parameters

T

Parameters

tensor
Tensor<T>

The Tensor<T> to add a dimension of length 1.

dimension
Int32

The index of the dimension to add.

Returns

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Unsqueeze<T>(TensorSpan<T>, Int32)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Insert a new dimension of length 1 that will appear at the dimension position.

C#
public static System.Numerics.Tensors.TensorSpan<T> Unsqueeze<T>(this in System.Numerics.Tensors.TensorSpan<T> tensor, int dimension);

Type Parameters

T

Parameters

tensor
TensorSpan<T>

The TensorSpan<T> to add a dimension of length 1.

dimension
Int32

The index of the dimension to add.

Returns

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Unsqueeze<T>(ReadOnlyTensorSpan<T>, Int32)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Insert a new dimension of length 1 that will appear at the dimension position.

C#
public static System.Numerics.Tensors.ReadOnlyTensorSpan<T> Unsqueeze<T>(this in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor, int dimension);

Type Parameters

T

Parameters

tensor
ReadOnlyTensorSpan<T>

The ReadOnlyTensorSpan<T> to add a dimension of length 1.

dimension
Int32

The index of the dimension to add.

Returns

Applies to

.NET 10 (package-provided) i druge verzije
Proizvod Verzije
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)