Tensor.CreateFromShape Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
| Nome | Descrizione |
|---|---|
| CreateFromShape<T>(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean) |
Crea un nuovo tensore con le lunghezze e gli stride specificati. |
| CreateFromShape<T>(ReadOnlySpan<IntPtr>, Boolean) |
Crea un nuovo tensore con le lunghezze specificate. |
CreateFromShape<T>(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)
- Origine:
- Tensor.cs
- Origine:
- Tensor.cs
Crea un nuovo tensore con le lunghezze e gli stride specificati.
public static System.Numerics.Tensors.Tensor<T> CreateFromShape<T>(scoped ReadOnlySpan<IntPtr> lengths, scoped ReadOnlySpan<IntPtr> strides, bool pinned = false);
static member CreateFromShape : ReadOnlySpan<nativeint> * ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function CreateFromShape(Of T) (lengths As ReadOnlySpan(Of IntPtr), strides As ReadOnlySpan(Of IntPtr), Optional pinned As Boolean = false) As Tensor(Of T)
Parametri di tipo
- T
Parametri
- lengths
-
ReadOnlySpan<nativeint>
Lunghezze di ogni dimensione.
- strides
-
ReadOnlySpan<nativeint>
I passi di ogni dimensione.
- pinned
- Boolean
true per aggiungere il buffer sottostante. Il valore predefinito è false.
Valori restituiti
Nuovo tensore con l'oggetto e specificatolengths.strides
Si applica a
CreateFromShape<T>(ReadOnlySpan<IntPtr>, Boolean)
- Origine:
- Tensor.cs
- Origine:
- Tensor.cs
Crea un nuovo tensore con le lunghezze specificate.
public static System.Numerics.Tensors.Tensor<T> CreateFromShape<T>(scoped ReadOnlySpan<IntPtr> lengths, bool pinned = false);
static member CreateFromShape : ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function CreateFromShape(Of T) (lengths As ReadOnlySpan(Of IntPtr), Optional pinned As Boolean = false) As Tensor(Of T)
Parametri di tipo
- T
Parametri
- lengths
-
ReadOnlySpan<nativeint>
Lunghezze di ogni dimensione.
- pinned
- Boolean
true per aggiungere il buffer sottostante. Il valore predefinito è false.
Valori restituiti
Nuovo tensore con le lunghezze specificate.