Прочетете на английски

Споделяне чрез


Tensor.TryBroadcastTo Method

Definition

Overloads

TryBroadcastTo<T>(TensorSpan<T>, TensorSpan<T>)

Broadcast the data from tensor to the smallest broadcastable shape compatible with destination and stores it in destination If the shapes are not compatible, false is returned.

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

Broadcast the data from tensor to the smallest broadcastable shape compatible with destination and stores it in destination If the shapes are not compatible, false is returned.

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

Broadcast the data from tensor to the smallest broadcastable shape compatible with destination and stores it in destination If the shapes are not compatible, false is returned.

TryBroadcastTo<T>(TensorSpan<T>, TensorSpan<T>)

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Broadcast the data from tensor to the smallest broadcastable shape compatible with destination and stores it in destination If the shapes are not compatible, false is returned.

C#
public static bool TryBroadcastTo<T>(this in System.Numerics.Tensors.TensorSpan<T> tensor, in System.Numerics.Tensors.TensorSpan<T> destination);

Type Parameters

T

Parameters

destination
TensorSpan<T>

Destination TensorSpan<T>.

Returns

false if the shapes are not compatible, otherwise, true.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

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

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Broadcast the data from tensor to the smallest broadcastable shape compatible with destination and stores it in destination If the shapes are not compatible, false is returned.

C#
public static bool TryBroadcastTo<T>(this in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor, in System.Numerics.Tensors.TensorSpan<T> destination);

Type Parameters

T

Parameters

destination
TensorSpan<T>

Destination TensorSpan<T>.

Returns

false if the shapes are not compatible, otherwise, true.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)

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

Source:
TensorExtensions.cs
Source:
TensorExtensions.cs

Broadcast the data from tensor to the smallest broadcastable shape compatible with destination and stores it in destination If the shapes are not compatible, false is returned.

C#
public static bool TryBroadcastTo<T>(this System.Numerics.Tensors.Tensor<T> tensor, in System.Numerics.Tensors.TensorSpan<T> destination);

Type Parameters

T

Parameters

tensor
Tensor<T>

Input Tensor<T>.

destination
TensorSpan<T>

Destination TensorSpan<T>.

Returns

false if the shapes are not compatible, otherwise, true.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)