Partajați prin


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.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Tensors::ReadOnlyTensorSpan<T> Squeeze(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % tensor);
public static System.Numerics.Tensors.ReadOnlyTensorSpan<T> Squeeze<T> (this in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor);
static member Squeeze : ReadOnlyTensorSpan -> System.Numerics.Tensors.ReadOnlyTensorSpan<'T>
<Extension()>
Public Function Squeeze(Of T) (ByRef tensor As ReadOnlyTensorSpan(Of T)) As ReadOnlyTensorSpan(Of T)

Type Parameters

T

Parameters

tensor
ReadOnlyTensorSpan<T>

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

Returns

Applies to

Squeeze<T>(Tensor<T>)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Removes all dimensions of length one from the tensor.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Tensors::Tensor<T> ^ Squeeze(System::Numerics::Tensors::Tensor<T> ^ tensor);
public static System.Numerics.Tensors.Tensor<T> Squeeze<T> (this System.Numerics.Tensors.Tensor<T> tensor);
static member Squeeze : System.Numerics.Tensors.Tensor<'T> -> System.Numerics.Tensors.Tensor<'T>
<Extension()>
Public Function Squeeze(Of T) (tensor As Tensor(Of T)) As Tensor(Of T)

Type Parameters

T

Parameters

tensor
Tensor<T>

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

Returns

Applies to

Squeeze<T>(TensorSpan<T>)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Removes all dimensions of length one from the tensor.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Numerics::Tensors::TensorSpan<T> Squeeze(System::Numerics::Tensors::TensorSpan<T> % tensor);
public static System.Numerics.Tensors.TensorSpan<T> Squeeze<T> (this in System.Numerics.Tensors.TensorSpan<T> tensor);
static member Squeeze : TensorSpan -> System.Numerics.Tensors.TensorSpan<'T>
<Extension()>
Public Function Squeeze(Of T) (ByRef tensor As TensorSpan(Of T)) As TensorSpan(Of T)

Type Parameters

T

Parameters

tensor
TensorSpan<T>

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

Returns

Applies to