def _get_shape_from_tensor_or_array(x):
    if isinstance(x.shape, tf.TensorShape):
        return tuple(x.shape.as_list())
    return tuple(x.shape)
def _get_shape_from_tensor_or_array(x):
    if isinstance(x.shape, tf.TensorShape):
        return tuple(x.shape.as_list())
    return tuple(x.shape)