Share via


Tensor.ResizeTo Method

Definition

Overloads

ResizeTo<T>(TensorSpan<T>, TensorSpan<T>)

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.

ResizeTo<T>(Tensor<T>, TensorSpan<T>)

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.

ResizeTo<T>(ReadOnlyTensorSpan<T>, TensorSpan<T>)

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.

ResizeTo<T>(TensorSpan<T>, TensorSpan<T>)

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

destination
TensorSpan<T>

Destination TensorSpan<T> with the desired new shape.

Applies to

ResizeTo<T>(Tensor<T>, TensorSpan<T>)

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

tensor
Tensor<T>

Input Tensor<T>.

destination
TensorSpan<T>

Destination TensorSpan<T> with the desired new shape.

Applies to

ResizeTo<T>(ReadOnlyTensorSpan<T>, TensorSpan<T>)

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

destination
TensorSpan<T>

Destination TensorSpan<T> with the desired new shape.

Applies to