Tensor.CreateUninitialized 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
CreateUninitialized<T>(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean) |
创建一个 Tensor<T>,并且不初始化它。 如果 |
CreateUninitialized<T>(ReadOnlySpan<IntPtr>, Boolean) |
创建一个 Tensor<T>,并且不初始化它。 如果 |
CreateUninitialized<T>(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)
- Source:
- Tensor.Factory.cs
- Source:
- Tensor.Factory.cs
创建一个 Tensor<T>,并且不初始化它。 如果 pinned
为 true,则会固定内存。
public static System.Numerics.Tensors.Tensor<T> CreateUninitialized<T> (scoped ReadOnlySpan<IntPtr> lengths, scoped ReadOnlySpan<IntPtr> strides, bool pinned = false);
static member CreateUninitialized : ReadOnlySpan<nativeint> * ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function CreateUninitialized(Of T) (lengths As ReadOnlySpan(Of IntPtr), strides As ReadOnlySpan(Of IntPtr), Optional pinned As Boolean = false) As Tensor(Of T)
类型参数
- T
参数
- lengths
-
ReadOnlySpan<nativeint>
指示每个维度的长度的 ReadOnlySpan<T>。
- strides
-
ReadOnlySpan<nativeint>
指示每个维度的步幅的 ReadOnlySpan<T>。
返回
适用于
CreateUninitialized<T>(ReadOnlySpan<IntPtr>, Boolean)
- Source:
- Tensor.Factory.cs
- Source:
- Tensor.Factory.cs
创建一个 Tensor<T>,并且不初始化它。 如果 pinned
为 true,则会固定内存。
public static System.Numerics.Tensors.Tensor<T> CreateUninitialized<T> (scoped ReadOnlySpan<IntPtr> lengths, bool pinned = false);
static member CreateUninitialized : ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function CreateUninitialized(Of T) (lengths As ReadOnlySpan(Of IntPtr), Optional pinned As Boolean = false) As Tensor(Of T)
类型参数
- T
参数
- lengths
-
ReadOnlySpan<nativeint>
指示每个维度的长度的 ReadOnlySpan<T>。