{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/3069","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/3069/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/3069/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/3069/events","html_url":"https://github.com/BVLC/caffe/pull/3069","id":106559580,"number":3069,"title":"Add argmax_param \"axis\" to maximise output along the specified axis","user":{"login":"timmeinhardt","id":7427306,"avatar_url":"https://avatars.githubusercontent.com/u/7427306?v=3","gravatar_id":"","url":"https://api.github.com/users/timmeinhardt","html_url":"https://github.com/timmeinhardt","followers_url":"https://api.github.com/users/timmeinhardt/followers","following_url":"https://api.github.com/users/timmeinhardt/following{/other_user}","gists_url":"https://api.github.com/users/timmeinhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/timmeinhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmeinhardt/subscriptions","organizations_url":"https://api.github.com/users/timmeinhardt/orgs","repos_url":"https://api.github.com/users/timmeinhardt/repos","events_url":"https://api.github.com/users/timmeinhardt/events{/privacy}","received_events_url":"https://api.github.com/users/timmeinhardt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-15T13:44:20Z","updated_at":"2015-09-16T14:31:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/BVLC/caffe/pulls/3069","html_url":"https://github.com/BVLC/caffe/pull/3069","diff_url":"https://github.com/BVLC/caffe/pull/3069.diff","patch_url":"https://github.com/BVLC/caffe/pull/3069.patch"},"body":"This PR adds an option to the ArgMaxLayer which lets the user specify an axis along which the layer should maximise the output. This now works similar to e.g. [numpy.argmax](http://docs.scipy.org/doc/numpy/reference/generated/numpy.argmax.html) and might be useful for deploying segmentation task networks. \r\nThe default option is axis = 0, which computes the argmax of the flattened bottom blob per image. So existing deployments of the layer work as expected. Negative indexing is also possible, but eventually the axis value must be between 0 and 3.\r\nIf axis != 0 and out_max_val is set to true the layer outputs max_val instead of max_ind. Specifying an axis and outputting max_val and max_ind at the same time was not possible due to the general architecture of a blob.\r\n"},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/140759704","html_url":"https://github.com/BVLC/caffe/pull/3069#issuecomment-140759704","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/3069","id":140759704,"user":{"login":"timmeinhardt","id":7427306,"avatar_url":"https://avatars.githubusercontent.com/u/7427306?v=3","gravatar_id":"","url":"https://api.github.com/users/timmeinhardt","html_url":"https://github.com/timmeinhardt","followers_url":"https://api.github.com/users/timmeinhardt/followers","following_url":"https://api.github.com/users/timmeinhardt/following{/other_user}","gists_url":"https://api.github.com/users/timmeinhardt/gists{/gist_id}","starred_url":"https://api.github.com/users/timmeinhardt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timmeinhardt/subscriptions","organizations_url":"https://api.github.com/users/timmeinhardt/orgs","repos_url":"https://api.github.com/users/timmeinhardt/repos","events_url":"https://api.github.com/users/timmeinhardt/events{/privacy}","received_events_url":"https://api.github.com/users/timmeinhardt/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T14:31:48Z","updated_at":"2015-09-16T14:31:48Z","body":"I got your point. Basically I was already using axis = 0 as if no axis was specified so I changed that to use has_axis instead. Now one can even argmax across multiple images using axis = 0. Perhaps this might be useful for someone but it is definitely more intuitiv. Thank you! Sometimes you do not see the wood for the trees when you are in the middle of something...\r\nSo now if no axis is specified the maximisation is computed along the flattened bottom blob per image and if axis is set it maximises along the specified axis."}}