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