def test_globalpooling_1d_keepdims(self):
    testing_utils.layer_test(
        keras.layers.pooling.GlobalMaxPooling1D,
        kwargs={'keepdims': True},
        input_shape=(3, 4, 5),
        expected_output_shape=(None, 1, 5))
    testing_utils.layer_test(
        keras.layers.pooling.GlobalMaxPooling1D,
        kwargs={'data_format': 'channels_first', 'keepdims': True},
        input_shape=(3, 4, 5),
        expected_output_shape=(None, 4, 1))
    testing_utils.layer_test(
        keras.layers.pooling.GlobalAveragePooling1D,
        kwargs={'keepdims': True},
        input_shape=(3, 4, 5),
        expected_output_shape=(None, 1, 5))
    testing_utils.layer_test(
        keras.layers.pooling.GlobalAveragePooling1D,
        kwargs={'data_format': 'channels_first', 'keepdims': True},
        input_shape=(3, 4, 5),
        expected_output_shape=(None, 4, 1))