tff.types.num_elements_in_shape

Returns the number of elements in shape, or None if not fully defined.

shape A tff.types.ArrayShape.