Tensor.PermuteDimensions<T> 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.
Swaps the dimensions of the tensor
tensor according to the dimensions
parameter.
If tensor
is a 1D tensor, it will return tensor
. Otherwise it creates a new Tensor<T>
with the new axis ordering by allocating new memory.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Numerics::Tensors::Tensor<T> ^ PermuteDimensions(System::Numerics::Tensors::Tensor<T> ^ tensor, ReadOnlySpan<int> dimensions);
public static System.Numerics.Tensors.Tensor<T> PermuteDimensions<T> (this System.Numerics.Tensors.Tensor<T> tensor, scoped ReadOnlySpan<int> dimensions);
static member PermuteDimensions : System.Numerics.Tensors.Tensor<'T> * ReadOnlySpan<int> -> System.Numerics.Tensors.Tensor<'T>
<Extension()>
Public Function PermuteDimensions(Of T) (tensor As Tensor(Of T), dimensions As ReadOnlySpan(Of Integer)) As Tensor(Of T)
Type Parameters
- T
Parameters
- dimensions
- ReadOnlySpan<Int32>
ReadOnlySpan<T> with the new axis ordering.
Returns
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.