{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/786","labels_url":"https://api.github.com/repos/fchollet/keras/issues/786/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/786/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/786/events","html_url":"https://github.com/fchollet/keras/pull/786","id":109769708,"number":786,"title":"added pool_mode parameter (string) for MaxPooling1D/2D ","user":{"login":"Mofef","id":1809396,"avatar_url":"https://avatars.githubusercontent.com/u/1809396?v=3","gravatar_id":"","url":"https://api.github.com/users/Mofef","html_url":"https://github.com/Mofef","followers_url":"https://api.github.com/users/Mofef/followers","following_url":"https://api.github.com/users/Mofef/following{/other_user}","gists_url":"https://api.github.com/users/Mofef/gists{/gist_id}","starred_url":"https://api.github.com/users/Mofef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mofef/subscriptions","organizations_url":"https://api.github.com/users/Mofef/orgs","repos_url":"https://api.github.com/users/Mofef/repos","events_url":"https://api.github.com/users/Mofef/events{/privacy}","received_events_url":"https://api.github.com/users/Mofef/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-05T10:31:43Z","updated_at":"2015-10-05T12:54:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fchollet/keras/pulls/786","html_url":"https://github.com/fchollet/keras/pull/786","diff_url":"https://github.com/fchollet/keras/pull/786.diff","patch_url":"https://github.com/fchollet/keras/pull/786.patch"},"body":"I just ran into the issue discussed in #230 #768 #522 and solved it like this.\r\n\r\nThe parameter is simply passed to ```theano.tensor.signal.downsample.max_pool_2d.```\r\nPossible ```pool_mode```s are according to the ```mode```s at: http://deeplearning.net/software/theano/library/tensor/signal/downsample.html#theano.tensor.signal.downsample.max_pool_2d\r\n\r\nOne should consider to rename the ```MaxPooling``` layers. Though theano also didn't rename ```max_pool_2d``` despite it supports avg and sum pooling as well."},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/145519155","html_url":"https://github.com/fchollet/keras/pull/786#issuecomment-145519155","issue_url":"https://api.github.com/repos/fchollet/keras/issues/786","id":145519155,"user":{"login":"fchollet","id":710255,"avatar_url":"https://avatars.githubusercontent.com/u/710255?v=3","gravatar_id":"","url":"https://api.github.com/users/fchollet","html_url":"https://github.com/fchollet","followers_url":"https://api.github.com/users/fchollet/followers","following_url":"https://api.github.com/users/fchollet/following{/other_user}","gists_url":"https://api.github.com/users/fchollet/gists{/gist_id}","starred_url":"https://api.github.com/users/fchollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fchollet/subscriptions","organizations_url":"https://api.github.com/users/fchollet/orgs","repos_url":"https://api.github.com/users/fchollet/repos","events_url":"https://api.github.com/users/fchollet/events{/privacy}","received_events_url":"https://api.github.com/users/fchollet/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T12:54:34Z","updated_at":"2015-10-05T12:54:34Z","body":"> One should consider to rename the MaxPooling layers. Though theano also didn't rename max_pool_2d despite it supports avg and sum pooling as well.\r\n\r\nI was thinking the same. Wouldn't it make more sense to make a generic Pooling2D layer, then subclass it in MaxPooling2D, AveragePooling2D? Then no need for `pool_mode`.\r\n"}}