TensorShape.Broadcast Method

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3

Overload List

Broadcast(TensorShape[]) Returns the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes.
Broadcast(TensorShape, TensorShape) Returns the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes.
Broadcast(TensorShape, TensorShape, TensorShape) Returns the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes.

Broadcast(TensorShape[])

Returns the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes.
C#
public static TensorShape Broadcast(
	params TensorShape[] shapes
)

Parameters

shapes  TensorShape[]
A parameter array of shapes.

Return Value

TensorShape
A new shape with unit dimensions in any of the elements of shapes expanded to the corresponding dimension in the other shape(s).

Exceptions

DimensionMismatchExceptionThe shapes are not compatible for broadcasting.

Broadcast(TensorShape, TensorShape)

Returns the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes.
C#
public static TensorShape Broadcast(
	TensorShape shape1,
	TensorShape shape2
)

Parameters

shape1  TensorShape
The shape of the first operand.
shape2  TensorShape
The shape of the second operand.

Return Value

TensorShape
A new shape with unit dimensions in shape1 and shape2 expanded to the corresponding dimension in the other shape.

Exceptions

DimensionMismatchExceptionThe shapes are not compatible for broadcasting.

Broadcast(TensorShape, TensorShape, TensorShape)

Returns the shape of the result of an elementwise operation when applied, with broadcasting, to operands with the specified shapes.
C#
public static TensorShape Broadcast(
	TensorShape shape1,
	TensorShape shape2,
	TensorShape shape3
)

Parameters

shape1  TensorShape
The shape of the first operand.
shape2  TensorShape
The shape of the second operand.
shape3  TensorShape
The shape of the third operand.

Return Value

TensorShape
A new shape with unit dimensions in shape1 and shape2 expanded to the corresponding dimension in the other shape.

Exceptions

DimensionMismatchExceptionThe shapes are not compatible for broadcasting.

See Also