Tensor.ResizeTo 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
ResizeTo<T>(TensorSpan<T>, TensorSpan<T>) |
Copies the data from |
ResizeTo<T>(Tensor<T>, TensorSpan<T>) |
Copies the data from |
ResizeTo<T>(ReadOnlyTensorSpan<T>, TensorSpan<T>) |
Copies the data from |
ResizeTo<T>(TensorSpan<T>, TensorSpan<T>)
- Source:
- TensorExtensions.cs
- Source:
- TensorExtensions.cs
Copies the data from tensor
. If the final shape is smaller all data after that point is ignored.
If the final shape is bigger it is filled with 0s.
public:
generic <typename T>
static void ResizeTo(System::Numerics::Tensors::TensorSpan<T> % tensor, System::Numerics::Tensors::TensorSpan<T> % destination);
public static void ResizeTo<T> (scoped in System.Numerics.Tensors.TensorSpan<T> tensor, in System.Numerics.Tensors.TensorSpan<T> destination);
static member ResizeTo : TensorSpan * TensorSpan -> unit
Public Sub ResizeTo(Of T) (ByRef tensor As TensorSpan(Of T), ByRef destination As TensorSpan(Of T))
Type Parameters
- T
Parameters
- tensor
- TensorSpan<T>
Input TensorSpan<T>.
- destination
- TensorSpan<T>
Destination TensorSpan<T> with the desired new shape.
Applies to
ResizeTo<T>(Tensor<T>, TensorSpan<T>)
- Source:
- TensorExtensions.cs
- Source:
- TensorExtensions.cs
Copies the data from tensor
. If the final shape is smaller all data after that point is ignored.
If the final shape is bigger it is filled with 0s.
public:
generic <typename T>
static void ResizeTo(System::Numerics::Tensors::Tensor<T> ^ % tensor, System::Numerics::Tensors::TensorSpan<T> % destination);
public static void ResizeTo<T> (scoped in System.Numerics.Tensors.Tensor<T> tensor, in System.Numerics.Tensors.TensorSpan<T> destination);
static member ResizeTo : Tensor * TensorSpan -> unit
Public Sub ResizeTo(Of T) (ByRef tensor As Tensor(Of T), ByRef destination As TensorSpan(Of T))
Type Parameters
- T
Parameters
- destination
- TensorSpan<T>
Destination TensorSpan<T> with the desired new shape.
Applies to
ResizeTo<T>(ReadOnlyTensorSpan<T>, TensorSpan<T>)
- Source:
- TensorExtensions.cs
- Source:
- TensorExtensions.cs
Copies the data from tensor
. If the final shape is smaller all data after that point is ignored.
If the final shape is bigger it is filled with 0s.
public:
generic <typename T>
static void ResizeTo(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % tensor, System::Numerics::Tensors::TensorSpan<T> % destination);
public static void ResizeTo<T> (scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor, in System.Numerics.Tensors.TensorSpan<T> destination);
static member ResizeTo : ReadOnlyTensorSpan * TensorSpan -> unit
Public Sub ResizeTo(Of T) (ByRef tensor As ReadOnlyTensorSpan(Of T), ByRef destination As TensorSpan(Of T))
Type Parameters
- T
Parameters
- tensor
- ReadOnlyTensorSpan<T>
Input ReadOnlyTensorSpan<T>.
- destination
- TensorSpan<T>
Destination TensorSpan<T> with the desired new shape.