{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/2488","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/2488/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/2488/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/2488/events","html_url":"https://github.com/fchollet/keras/issues/2488","id":150673940,"number":2488,"title":"Multiple objectives with one custom loss","user":{"login":"code-ball","id":17498315,"avatar_url":"https://avatars.githubusercontent.com/u/17498315?v=3","gravatar_id":"","url":"https://api.github.com/users/code-ball","html_url":"https://github.com/code-ball","followers_url":"https://api.github.com/users/code-ball/followers","following_url":"https://api.github.com/users/code-ball/following{/other_user}","gists_url":"https://api.github.com/users/code-ball/gists{/gist_id}","starred_url":"https://api.github.com/users/code-ball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-ball/subscriptions","organizations_url":"https://api.github.com/users/code-ball/orgs","repos_url":"https://api.github.com/users/code-ball/repos","events_url":"https://api.github.com/users/code-ball/events{/privacy}","received_events_url":"https://api.github.com/users/code-ball/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-24T15:39:45Z","updated_at":"2016-04-25T23:42:33Z","closed_at":"2016-04-25T23:42:33Z","body":"Hi,\r\n\r\nI have a model where I get multiple outputs with each having its own loss function. There 3 outputs where 2 of them can use already in-built objective functions while the third one will use the custom objective function written by me. Something like this:\r\n\r\n> model.compile(optimizer='rmsprop',\r\n>               loss={'output1': 'binary_crossentropy', 'output2': 'categorical_crossentropy',  'output3':'custom_objective'})\r\n> \r\n\r\nI don't need separate loss weights for each one and also the custom function returns log probability.\r\nIn this scenario does the above formulation mean \"minimizing joint negative log likelihood\"? That is what I want, to minimize the sum of negative log likelihood for all output but I am not sure if the above formulation achieves that.\r\n\r\nIf not, can someone please share what needs to be done for my case?\r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/214564337","html_url":"https://github.com/fchollet/keras/issues/2488#issuecomment-214564337","issue_url":"https://api.github.com/repos/fchollet/keras/issues/2488","id":214564337,"user":{"login":"code-ball","id":17498315,"avatar_url":"https://avatars.githubusercontent.com/u/17498315?v=3","gravatar_id":"","url":"https://api.github.com/users/code-ball","html_url":"https://github.com/code-ball","followers_url":"https://api.github.com/users/code-ball/followers","following_url":"https://api.github.com/users/code-ball/following{/other_user}","gists_url":"https://api.github.com/users/code-ball/gists{/gist_id}","starred_url":"https://api.github.com/users/code-ball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-ball/subscriptions","organizations_url":"https://api.github.com/users/code-ball/orgs","repos_url":"https://api.github.com/users/code-ball/repos","events_url":"https://api.github.com/users/code-ball/events{/privacy}","received_events_url":"https://api.github.com/users/code-ball/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T23:42:33Z","updated_at":"2016-04-25T23:42:33Z","body":"@carlthome : Thanks for the pointer. It is very helpful.\r\n\r\n@braingineer: Thanks a lot for an elaborate explanation. Although I had the same understanding, I was getting confused for some reason but your post clarifies my doubt fully. Thanks again."}}