Tensor.Unsqueeze 方法

定义

重载

Unsqueeze<T>(Tensor<T>, Int32)

插入长度为 1 的新维度,该维度将显示在维度位置。

Unsqueeze<T>(TensorSpan<T>, Int32)

插入长度为 1 的新维度,该维度将显示在维度位置。

Unsqueeze<T>(ReadOnlyTensorSpan<T>, Int32)

插入长度为 1 的新维度,该维度将显示在维度位置。

Unsqueeze<T>(Tensor<T>, Int32)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

插入长度为 1 的新维度,该维度将显示在维度位置。

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

类型参数

T

参数

tensor
Tensor<T>

要添加长度为 1 的维度的 Tensor<T>

dimension
Int32

要添加的维度的索引。

返回

适用于

Unsqueeze<T>(TensorSpan<T>, Int32)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

插入长度为 1 的新维度,该维度将显示在维度位置。

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

类型参数

T

参数

tensor
TensorSpan<T>

要添加长度为 1 的维度的 TensorSpan<T>

dimension
Int32

要添加的维度的索引。

返回

适用于

Unsqueeze<T>(ReadOnlyTensorSpan<T>, Int32)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

插入长度为 1 的新维度,该维度将显示在维度位置。

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

类型参数

T

参数

tensor
ReadOnlyTensorSpan<T>

要添加长度为 1 的维度的 ReadOnlyTensorSpan<T>

dimension
Int32

要添加的维度的索引。

返回

适用于