Welcome to our Support Center

Shape

Description

Takes a tensor as input and outputs an 1D int64 tensor containing the shape of the input tensor. Optional attributes start and end can be used to compute a slice of the input tensor’s shape. If start axis is omitted, the slice starts from axis 0. The end axis, if specified, is exclusive (and the returned value will not include the size of that axis). If the end axis is omitted, the axes upto the last one will be included. Negative axes indicate counting back from the last axis. Note that axes will be clamped to the range [0, r], where r is the rank of the input tensor if they are out-of-range (after adding r in the case of negative axis). Thus, specifying any end value > r is equivalent to specifying an end value of r, and specifying any start value < -r is equivalent to specifying a start value of 0. If start > end, the result will be an empty shape.

 

Input parameters

 

specified_outputs_namearray, this parameter lets you manually assign custom names to the output tensors of a node.
data (heterogeneous) – T : object, an input tensor.

 Parameters : cluster,

end : integer, ending axis for slicing the shape. Negative value means counting dimensions from the back. If omitted, sizes of all axes upto (including) the last one will be included.
Default value “0”.
start : integer, starting axis for slicing the shape. Negative value means counting dimensions from the back.
Default value “0”.
 training? : boolean, whether the layer is in training mode (can store data for backward).
Default value “True”.
 lda coeff : float, defines the coefficient by which the loss derivative will be multiplied before being sent to the previous layer (since during the backward run we go backwards).
Default value “1”.

 name (optional) : string, name of the node.

Output parameters

 

shape (heterogeneous) – T1 : object, shape of the input tensor.

Type Constraints

T in (tensor(bfloat16)tensor(bool)tensor(complex128)tensor(complex64)tensor(double)tensor(float)tensor(float16)
tensor(float4e2m1)tensor(float8e4m3fn)tensor(float8e4m3fnuz)tensor(float8e5m2)tensor(float8e5m2fnuz)tensor(float8e8m0)tensor(int16)tensor(int32)tensor(int4)tensor(int64)tensor(int8)tensor(string)tensor(uint16)tensor(uint32)tensor(uint4)tensor(uint64)tensor(uint8)) : Input tensor can be of arbitrary type.

T1 in (tensor(int64)) : Constrain output to int64 tensor.

Example

All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Deep Learning library to run it).
Table of Contents