Tensor.Squeeze 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Squeeze<T>(ReadOnlyTensorSpan<T>) |
從 |
Squeeze<T>(Tensor<T>) |
從 |
Squeeze<T>(TensorSpan<T>) |
從 |
Squeeze<T>(ReadOnlyTensorSpan<T>)
從 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)
類型參數
- T
參數
- tensor
- ReadOnlyTensorSpan<T>
要移除長度 1 之所有維度的 ReadOnlyTensorSpan<T>。
傳回
適用於
Squeeze<T>(Tensor<T>)
從 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)
類型參數
- T
參數
傳回
適用於
Squeeze<T>(TensorSpan<T>)
從 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)
類型參數
- T
參數
- tensor
- TensorSpan<T>
要移除長度 1 之所有維度的 TensorSpan<T>。