keras/src/layers/reshaping/reshape.py/Reshape/compute_output_shape
class Reshape:    def compute_output_shape(self, input_shape):
        return (
            input_shape[0],
            *operation_utils.compute_reshape_output_shape(
                input_shape[1:], self.target_shape, "target_shape"
            ),
        )