{"action":"opened","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/1473","labels_url":"https://api.github.com/repos/fchollet/keras/issues/1473/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/1473/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/1473/events","html_url":"https://github.com/fchollet/keras/issues/1473","id":126801305,"number":1473,"title":"How to implement a custom layer?","user":{"login":"sunshineatnoon","id":7546747,"avatar_url":"https://avatars.githubusercontent.com/u/7546747?v=3","gravatar_id":"","url":"https://api.github.com/users/sunshineatnoon","html_url":"https://github.com/sunshineatnoon","followers_url":"https://api.github.com/users/sunshineatnoon/followers","following_url":"https://api.github.com/users/sunshineatnoon/following{/other_user}","gists_url":"https://api.github.com/users/sunshineatnoon/gists{/gist_id}","starred_url":"https://api.github.com/users/sunshineatnoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunshineatnoon/subscriptions","organizations_url":"https://api.github.com/users/sunshineatnoon/orgs","repos_url":"https://api.github.com/users/sunshineatnoon/repos","events_url":"https://api.github.com/users/sunshineatnoon/events{/privacy}","received_events_url":"https://api.github.com/users/sunshineatnoon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-15T03:30:04Z","updated_at":"2016-01-15T03:30:04Z","closed_at":null,"body":"I am sure this is not a new question, but I can't find a detailed answer.\r\n\r\nI want to implement a custom padding function so I can pad different number of values in the four direction of an image. I wonder if there is any existing function to do this?\r\n\r\n If there is not, how can I implement one? I know I can define the padding function [keras/layers/convolutional.py](https://github.com/fchollet/keras/blob/master/keras/layers/convolutional.py), but do I need to change the source code of keras and use setup.py to reinstall after changing the code?"}}