get_shape_size

Description

Obtains the product of all dimensions of shape.

Prototype

def get_shape_size(shape)

Parameters

Parameter

Description

shape

Shape.

Returns

Product of dimensions

Restrictions

None

Example

from tbe.common.utils import shape_util 
shape_util.get_shape_size((1,2,3,4)) 

Obtains the dimension product of shape (1,2,3,4) and returns 24.