Tensor.CreateFromShape Metodo

Definizione

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<IntPtr>

ReadOnlySpan<nativeint>

Lunghezze di ogni dimensione.

strides

ReadOnlySpan<IntPtr>

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<IntPtr>

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.

Si applica a