fix unit test about 'legacy_pooling2d_support'
@@ -191,12 +191,12 @@ def test_gaussiandropout_legacy_interface():
@keras_test
def test_maxpooling2d_legacy_interface():
- old_layer = keras.layers.MaxPool2D(pool_length=2, border_mode='valid', name='maxpool2d')
+ old_layer = keras.layers.MaxPool2D(pool_size=2, border_mode='valid', name='maxpool2d')
new_layer = keras.layers.MaxPool2D(pool_size=2, padding='valid', name='maxpool2d')
assert json.dumps(old_layer.get_config()) == json.dumps(new_layer.get_config())
- old_layer = keras.layers.MaxPool2D(2, padding='valid', name='maxpool2d')
- new_layer = keras.layers.MaxPool2D(pool_size=2, padding='valid', name='maxpool2d')
+ old_layer = keras.layers.MaxPool2D(2, 2, 'valid', name='maxpool2d')
+ new_layer = keras.layers.MaxPool2D(pool_size=2, strides=2, padding='valid', name='maxpool2d')
assert json.dumps(old_layer.get_config()) == json.dumps(new_layer.get_config())
old_layer = keras.layers.MaxPool2D(2, padding='valid', dim_ordering='tf', name='maxpool2d')
@@ -214,12 +214,12 @@ def test_maxpooling2d_legacy_interface():
@keras_test
def test_avgpooling2d_legacy_interface():
- old_layer = keras.layers.AvgPool2D(pool_length=2, border_mode='valid', name='avgpooling2d')
- new_layer = keras.layers.AvgPool2D(pool_size=2, padding='valid', name='avgpooling2d')
+ old_layer = keras.layers.MaxPool2D(pool_size=2, border_mode='valid', name='avgpooling2d')
+ new_layer = keras.layers.MaxPool2D(pool_size=2, padding='valid', name='avgpooling2d')
assert json.dumps(old_layer.get_config()) == json.dumps(new_layer.get_config())
- old_layer = keras.layers.AvgPool2D(2, padding='valid', name='avgpooling2d')
- new_layer = keras.layers.AvgPool2D(pool_size=2, padding='valid', name='avgpooling2d')
+ old_layer = keras.layers.MaxPool2D(2, 2, 'valid', name='avgpooling2d')
+ new_layer = keras.layers.MaxPool2D(pool_size=2, strides=2, padding='valid', name='avgpooling2d')
assert json.dumps(old_layer.get_config()) == json.dumps(new_layer.get_config())
old_layer = keras.layers.AvgPool2D(2, padding='valid', dim_ordering='tf', name='avgpooling2d')
