Tensor.Create Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Create<T>(IEnumerable<T>, ReadOnlySpan<IntPtr>)
- Source:
- Tensor.Factory.cs
public:
generic <typename T>
static System::Numerics::Tensors::Tensor<T> ^ Create(System::Collections::Generic::IEnumerable<T> ^ data, ReadOnlySpan<IntPtr> lengths);
public static System.Numerics.Tensors.Tensor<T> Create<T> (System.Collections.Generic.IEnumerable<T> data, scoped ReadOnlySpan<IntPtr> lengths);
static member Create : seq<'T> * ReadOnlySpan<nativeint> -> System.Numerics.Tensors.Tensor<'T>
Public Function Create(Of T) (data As IEnumerable(Of T), lengths As ReadOnlySpan(Of IntPtr)) As Tensor(Of T)
Type Parameters
- T
Parameters
- data
- IEnumerable<T>
- lengths
-
ReadOnlySpan<nativeint>
Returns
Applies to
Create<T>(ReadOnlySpan<IntPtr>, Boolean)
- Source:
- Tensor.Factory.cs
public static System.Numerics.Tensors.Tensor<T> Create<T> (scoped ReadOnlySpan<IntPtr> lengths, bool pinned = false);
static member Create : ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function Create(Of T) (lengths As ReadOnlySpan(Of IntPtr), Optional pinned As Boolean = false) As Tensor(Of T)
Type Parameters
- T
Parameters
- lengths
-
ReadOnlySpan<nativeint>
- pinned
- Boolean
Returns
Applies to
Create<T>(T[], ReadOnlySpan<IntPtr>)
- Source:
- Tensor.Factory.cs
public:
generic <typename T>
static System::Numerics::Tensors::Tensor<T> ^ Create(cli::array <T> ^ values, ReadOnlySpan<IntPtr> lengths);
public static System.Numerics.Tensors.Tensor<T> Create<T> (T[] values, scoped ReadOnlySpan<IntPtr> lengths);
static member Create : 'T[] * ReadOnlySpan<nativeint> -> System.Numerics.Tensors.Tensor<'T>
Public Function Create(Of T) (values As T(), lengths As ReadOnlySpan(Of IntPtr)) As Tensor(Of T)
Type Parameters
- T
Parameters
- values
- T[]
- lengths
-
ReadOnlySpan<nativeint>
Returns
Applies to
Create<T>(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)
- Source:
- Tensor.Factory.cs
public static System.Numerics.Tensors.Tensor<T> Create<T> (scoped ReadOnlySpan<IntPtr> lengths, scoped ReadOnlySpan<IntPtr> strides, bool pinned = false);
static member Create : ReadOnlySpan<nativeint> * ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function Create(Of T) (lengths As ReadOnlySpan(Of IntPtr), strides As ReadOnlySpan(Of IntPtr), Optional pinned As Boolean = false) As Tensor(Of T)
Type Parameters
- T
Parameters
- lengths
-
ReadOnlySpan<nativeint>
- strides
-
ReadOnlySpan<nativeint>
- pinned
- Boolean
Returns
Applies to
Create<T>(IEnumerable<T>, ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)
- Source:
- Tensor.Factory.cs
public static System.Numerics.Tensors.Tensor<T> Create<T> (System.Collections.Generic.IEnumerable<T> data, scoped ReadOnlySpan<IntPtr> lengths, scoped ReadOnlySpan<IntPtr> strides, bool isPinned = false);
static member Create : seq<'T> * ReadOnlySpan<nativeint> * ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function Create(Of T) (data As IEnumerable(Of T), lengths As ReadOnlySpan(Of IntPtr), strides As ReadOnlySpan(Of IntPtr), Optional isPinned As Boolean = false) As Tensor(Of T)
Type Parameters
- T
Parameters
- data
- IEnumerable<T>
- lengths
-
ReadOnlySpan<nativeint>
- strides
-
ReadOnlySpan<nativeint>
- isPinned
- Boolean
Returns
Applies to
Create<T>(T[], ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)
- Source:
- Tensor.Factory.cs
public static System.Numerics.Tensors.Tensor<T> Create<T> (T[] values, scoped ReadOnlySpan<IntPtr> lengths, scoped ReadOnlySpan<IntPtr> strides, bool isPinned = false);
static member Create : 'T[] * ReadOnlySpan<nativeint> * ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function Create(Of T) (values As T(), lengths As ReadOnlySpan(Of IntPtr), strides As ReadOnlySpan(Of IntPtr), Optional isPinned As Boolean = false) As Tensor(Of T)
Type Parameters
- T
Parameters
- values
- T[]
- lengths
-
ReadOnlySpan<nativeint>
- strides
-
ReadOnlySpan<nativeint>
- isPinned
- Boolean
Returns
Applies to
التعاون معنا على GitHub
يمكن العثور على مصدر هذا المحتوى على GitHub حيث يمكنك أيضاً إضافة مشاكل وطلبات سحب ومراجعتها. للحصول على معلومات إضافية، اطلع على دليل المساهم لدينا.
الملاحظات
https://aka.ms/ContentUserFeedback.
قريبًا: خلال عام 2024، سنتخلص تدريجيًا من GitHub Issues بوصفها آلية إرسال ملاحظات للمحتوى ونستبدلها بنظام ملاحظات جديد. لمزيد من المعلومات، راجعإرسال الملاحظات وعرضها المتعلقة بـ