tflite_support.metadata_writers.writer_utils.compute_flat_size

Computes the flat size (number of elements) of tensor shape.

tensor_shape an array of the tensor shape values.

The flat size of the tensor shape. Return 0 if tensor_shape is None.