Tensor.SqueezeDimension 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SqueezeDimension<T>(Tensor<T>, Int32) |
从给定 |
SqueezeDimension<T>(ReadOnlyTensorSpan<T>, Int32) |
从给定 |
SqueezeDimension<T>(TensorSpan<T>, Int32) |
从给定 |
SqueezeDimension<T>(Tensor<T>, Int32)
- Source:
- TensorExtensions.cs
- Source:
- TensorExtensions.cs
从给定 dimension
的 tensor
中移除长度为 1 的轴。
如果维度不是长度,则会引发异常。
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Numerics::Tensors::Tensor<T> ^ SqueezeDimension(System::Numerics::Tensors::Tensor<T> ^ tensor, int dimension);
public static System.Numerics.Tensors.Tensor<T> SqueezeDimension<T> (this System.Numerics.Tensors.Tensor<T> tensor, int dimension);
static member SqueezeDimension : System.Numerics.Tensors.Tensor<'T> * int -> System.Numerics.Tensors.Tensor<'T>
<Extension()>
Public Function SqueezeDimension(Of T) (tensor As Tensor(Of T), dimension As Integer) As Tensor(Of T)
类型参数
- T
参数
- dimension
- Int32
要删除的维度。
返回
适用于
SqueezeDimension<T>(ReadOnlyTensorSpan<T>, Int32)
- Source:
- TensorExtensions.cs
- Source:
- TensorExtensions.cs
从给定 dimension
的 tensor
中移除长度为 1 的轴。
如果维度不是长度,则会引发异常。
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Numerics::Tensors::ReadOnlyTensorSpan<T> SqueezeDimension(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % tensor, int dimension);
public static System.Numerics.Tensors.ReadOnlyTensorSpan<T> SqueezeDimension<T> (this in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor, int dimension);
static member SqueezeDimension : ReadOnlyTensorSpan * int -> System.Numerics.Tensors.ReadOnlyTensorSpan<'T>
<Extension()>
Public Function SqueezeDimension(Of T) (ByRef tensor As ReadOnlyTensorSpan(Of T), dimension As Integer) As ReadOnlyTensorSpan(Of T)
类型参数
- T
参数
- tensor
- ReadOnlyTensorSpan<T>
要移除长度为 1 的维度的 ReadOnlyTensorSpan<T>。
- dimension
- Int32
要删除的维度。
返回
适用于
SqueezeDimension<T>(TensorSpan<T>, Int32)
- Source:
- TensorExtensions.cs
- Source:
- TensorExtensions.cs
从给定 dimension
的 tensor
中移除长度为 1 的轴。
如果维度不是长度,则会引发异常。
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Numerics::Tensors::TensorSpan<T> SqueezeDimension(System::Numerics::Tensors::TensorSpan<T> % tensor, int dimension);
public static System.Numerics.Tensors.TensorSpan<T> SqueezeDimension<T> (this in System.Numerics.Tensors.TensorSpan<T> tensor, int dimension);
static member SqueezeDimension : TensorSpan * int -> System.Numerics.Tensors.TensorSpan<'T>
<Extension()>
Public Function SqueezeDimension(Of T) (ByRef tensor As TensorSpan(Of T), dimension As Integer) As TensorSpan(Of T)
类型参数
- T
参数
- tensor
- TensorSpan<T>
要移除长度为 1 的维度的 TensorSpan<T>。
- dimension
- Int32
要删除的维度。