Читати англійською

Поділитися через


Tensor.Squeeze Method

Definition

Overloads

Squeeze<T>(ReadOnlyTensorSpan<T>)

Removes all dimensions of length one from the tensor.

Squeeze<T>(Tensor<T>)

Removes all dimensions of length one from the tensor.

Squeeze<T>(TensorSpan<T>)

Removes all dimensions of length one from the tensor.

Squeeze<T>(ReadOnlyTensorSpan<T>)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Removes all dimensions of length one from the tensor.

C#
public static System.Numerics.Tensors.ReadOnlyTensorSpan<T> Squeeze<T>(this in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor);

Type Parameters

T

Parameters

tensor
ReadOnlyTensorSpan<T>

The ReadOnlyTensorSpan<T> to remove all dimensions of length 1.

Returns

Applies to

.NET 10 (package-provided) та інші версії
Продукт Версії
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Squeeze<T>(Tensor<T>)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Removes all dimensions of length one from the tensor.

C#
public static System.Numerics.Tensors.Tensor<T> Squeeze<T>(this System.Numerics.Tensors.Tensor<T> tensor);

Type Parameters

T

Parameters

tensor
Tensor<T>

The Tensor<T> to remove all dimensions of length 1.

Returns

Applies to

.NET 10 (package-provided) та інші версії
Продукт Версії
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

Squeeze<T>(TensorSpan<T>)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Removes all dimensions of length one from the tensor.

C#
public static System.Numerics.Tensors.TensorSpan<T> Squeeze<T>(this in System.Numerics.Tensors.TensorSpan<T> tensor);

Type Parameters

T

Parameters

tensor
TensorSpan<T>

The TensorSpan<T> to remove all dimensions of length 1.

Returns

Applies to

.NET 10 (package-provided) та інші версії
Продукт Версії
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)