Tensor.Squeeze 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Squeeze<T>(ReadOnlyTensorSpan<T>) |
从 |
Squeeze<T>(Tensor<T>) |
从 |
Squeeze<T>(TensorSpan<T>) |
从 |
Squeeze<T>(ReadOnlyTensorSpan<T>)
- Source:
- TensorExtensions.cs
从 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>)
- Source:
- TensorExtensions.cs
从 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>)
- Source:
- TensorExtensions.cs
从 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>。