{"action":"opened","number":3,"pull_request":{"url":"https://api.github.com/repos/vaclavcadek/keras2pmml/pulls/3","id":198667719,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4NjY3NzE5","html_url":"https://github.com/vaclavcadek/keras2pmml/pull/3","diff_url":"https://github.com/vaclavcadek/keras2pmml/pull/3.diff","patch_url":"https://github.com/vaclavcadek/keras2pmml/pull/3.patch","issue_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/issues/3","number":3,"state":"open","locked":false,"title":"Add 'softmax' option for multiclass problems","user":{"login":"ad1729","id":10787039,"node_id":"MDQ6VXNlcjEwNzg3MDM5","avatar_url":"https://avatars0.githubusercontent.com/u/10787039?v=4","gravatar_id":"","url":"https://api.github.com/users/ad1729","html_url":"https://github.com/ad1729","followers_url":"https://api.github.com/users/ad1729/followers","following_url":"https://api.github.com/users/ad1729/following{/other_user}","gists_url":"https://api.github.com/users/ad1729/gists{/gist_id}","starred_url":"https://api.github.com/users/ad1729/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ad1729/subscriptions","organizations_url":"https://api.github.com/users/ad1729/orgs","repos_url":"https://api.github.com/users/ad1729/repos","events_url":"https://api.github.com/users/ad1729/events{/privacy}","received_events_url":"https://api.github.com/users/ad1729/received_events","type":"User","site_admin":false},"body":"Hey Vaclav,\r\n\r\nI added the 'softmax' option for obtaining multinomial class probabilities (which must sum to one).\r\n\r\nThe main idea is that softmax is only expected to be added in the final (output) layer and thus, the corresponding activation function to be used by default in PMML in the last layer is 'identity'. [In PMML, 'softmax' is a normalization method ](http://dmg.org/pmml/v4-3/NeuralNetwork.html) and not an activation function.\r\n\r\nSigmoid on output layer:\r\n\r\n```python\r\n# output layer\r\nmodel.add(Dense(..., activation='sigmoid'))\r\n```\r\n\r\nleads to\r\n\r\n```xml\r\n<NeuralLayer activationFunction=\"logistic\">\r\n```\r\n\r\nBut softmax on output layer: \r\n\r\n```python\r\n# output layer\r\nmodel.add(Dense(..., activation='softmax'))\r\n```\r\n\r\nleads to\r\n\r\n```xml\r\n<NeuralLayer activationFunction=\"identity\" normalizationMethod=\"softmax\">\r\n ```\r\n\r\nin the generated PMML file.","created_at":"2018-07-02T12:43:16Z","updated_at":"2018-07-02T12:43:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/pulls/3/commits","review_comments_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/pulls/3/comments","review_comment_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/issues/3/comments","statuses_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/statuses/ab153aab59cba2ffec2091a8fc05a9c038fc49d0","head":{"label":"ad1729:master","ref":"master","sha":"ab153aab59cba2ffec2091a8fc05a9c038fc49d0","user":{"login":"ad1729","id":10787039,"node_id":"MDQ6VXNlcjEwNzg3MDM5","avatar_url":"https://avatars0.githubusercontent.com/u/10787039?v=4","gravatar_id":"","url":"https://api.github.com/users/ad1729","html_url":"https://github.com/ad1729","followers_url":"https://api.github.com/users/ad1729/followers","following_url":"https://api.github.com/users/ad1729/following{/other_user}","gists_url":"https://api.github.com/users/ad1729/gists{/gist_id}","starred_url":"https://api.github.com/users/ad1729/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ad1729/subscriptions","organizations_url":"https://api.github.com/users/ad1729/orgs","repos_url":"https://api.github.com/users/ad1729/repos","events_url":"https://api.github.com/users/ad1729/events{/privacy}","received_events_url":"https://api.github.com/users/ad1729/received_events","type":"User","site_admin":false},"repo":{"id":139018072,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkwMTgwNzI=","name":"keras2pmml","full_name":"ad1729/keras2pmml","owner":{"login":"ad1729","id":10787039,"node_id":"MDQ6VXNlcjEwNzg3MDM5","avatar_url":"https://avatars0.githubusercontent.com/u/10787039?v=4","gravatar_id":"","url":"https://api.github.com/users/ad1729","html_url":"https://github.com/ad1729","followers_url":"https://api.github.com/users/ad1729/followers","following_url":"https://api.github.com/users/ad1729/following{/other_user}","gists_url":"https://api.github.com/users/ad1729/gists{/gist_id}","starred_url":"https://api.github.com/users/ad1729/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ad1729/subscriptions","organizations_url":"https://api.github.com/users/ad1729/orgs","repos_url":"https://api.github.com/users/ad1729/repos","events_url":"https://api.github.com/users/ad1729/events{/privacy}","received_events_url":"https://api.github.com/users/ad1729/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ad1729/keras2pmml","description":"Simple PMML exporter for Keras Deep Learning models.","fork":true,"url":"https://api.github.com/repos/ad1729/keras2pmml","forks_url":"https://api.github.com/repos/ad1729/keras2pmml/forks","keys_url":"https://api.github.com/repos/ad1729/keras2pmml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ad1729/keras2pmml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ad1729/keras2pmml/teams","hooks_url":"https://api.github.com/repos/ad1729/keras2pmml/hooks","issue_events_url":"https://api.github.com/repos/ad1729/keras2pmml/issues/events{/number}","events_url":"https://api.github.com/repos/ad1729/keras2pmml/events","assignees_url":"https://api.github.com/repos/ad1729/keras2pmml/assignees{/user}","branches_url":"https://api.github.com/repos/ad1729/keras2pmml/branches{/branch}","tags_url":"https://api.github.com/repos/ad1729/keras2pmml/tags","blobs_url":"https://api.github.com/repos/ad1729/keras2pmml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ad1729/keras2pmml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ad1729/keras2pmml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ad1729/keras2pmml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ad1729/keras2pmml/statuses/{sha}","languages_url":"https://api.github.com/repos/ad1729/keras2pmml/languages","stargazers_url":"https://api.github.com/repos/ad1729/keras2pmml/stargazers","contributors_url":"https://api.github.com/repos/ad1729/keras2pmml/contributors","subscribers_url":"https://api.github.com/repos/ad1729/keras2pmml/subscribers","subscription_url":"https://api.github.com/repos/ad1729/keras2pmml/subscription","commits_url":"https://api.github.com/repos/ad1729/keras2pmml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ad1729/keras2pmml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ad1729/keras2pmml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ad1729/keras2pmml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ad1729/keras2pmml/contents/{+path}","compare_url":"https://api.github.com/repos/ad1729/keras2pmml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ad1729/keras2pmml/merges","archive_url":"https://api.github.com/repos/ad1729/keras2pmml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ad1729/keras2pmml/downloads","issues_url":"https://api.github.com/repos/ad1729/keras2pmml/issues{/number}","pulls_url":"https://api.github.com/repos/ad1729/keras2pmml/pulls{/number}","milestones_url":"https://api.github.com/repos/ad1729/keras2pmml/milestones{/number}","notifications_url":"https://api.github.com/repos/ad1729/keras2pmml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ad1729/keras2pmml/labels{/name}","releases_url":"https://api.github.com/repos/ad1729/keras2pmml/releases{/id}","deployments_url":"https://api.github.com/repos/ad1729/keras2pmml/deployments","created_at":"2018-06-28T12:54:46Z","updated_at":"2018-07-02T12:01:12Z","pushed_at":"2018-07-02T12:01:11Z","git_url":"git://github.com/ad1729/keras2pmml.git","ssh_url":"git@github.com:ad1729/keras2pmml.git","clone_url":"https://github.com/ad1729/keras2pmml.git","svn_url":"https://github.com/ad1729/keras2pmml","homepage":null,"size":28,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"vaclavcadek:master","ref":"master","sha":"1a984f579ac67b9042fd340fa30206e71cabe2e2","user":{"login":"vaclavcadek","id":274695,"node_id":"MDQ6VXNlcjI3NDY5NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/274695?v=4","gravatar_id":"","url":"https://api.github.com/users/vaclavcadek","html_url":"https://github.com/vaclavcadek","followers_url":"https://api.github.com/users/vaclavcadek/followers","following_url":"https://api.github.com/users/vaclavcadek/following{/other_user}","gists_url":"https://api.github.com/users/vaclavcadek/gists{/gist_id}","starred_url":"https://api.github.com/users/vaclavcadek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaclavcadek/subscriptions","organizations_url":"https://api.github.com/users/vaclavcadek/orgs","repos_url":"https://api.github.com/users/vaclavcadek/repos","events_url":"https://api.github.com/users/vaclavcadek/events{/privacy}","received_events_url":"https://api.github.com/users/vaclavcadek/received_events","type":"User","site_admin":false},"repo":{"id":59041242,"node_id":"MDEwOlJlcG9zaXRvcnk1OTA0MTI0Mg==","name":"keras2pmml","full_name":"vaclavcadek/keras2pmml","owner":{"login":"vaclavcadek","id":274695,"node_id":"MDQ6VXNlcjI3NDY5NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/274695?v=4","gravatar_id":"","url":"https://api.github.com/users/vaclavcadek","html_url":"https://github.com/vaclavcadek","followers_url":"https://api.github.com/users/vaclavcadek/followers","following_url":"https://api.github.com/users/vaclavcadek/following{/other_user}","gists_url":"https://api.github.com/users/vaclavcadek/gists{/gist_id}","starred_url":"https://api.github.com/users/vaclavcadek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaclavcadek/subscriptions","organizations_url":"https://api.github.com/users/vaclavcadek/orgs","repos_url":"https://api.github.com/users/vaclavcadek/repos","events_url":"https://api.github.com/users/vaclavcadek/events{/privacy}","received_events_url":"https://api.github.com/users/vaclavcadek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vaclavcadek/keras2pmml","description":"Simple PMML exporter for Keras Deep Learning models.","fork":false,"url":"https://api.github.com/repos/vaclavcadek/keras2pmml","forks_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/forks","keys_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/teams","hooks_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/hooks","issue_events_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/issues/events{/number}","events_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/events","assignees_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/assignees{/user}","branches_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/branches{/branch}","tags_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/tags","blobs_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/git/refs{/sha}","trees_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/statuses/{sha}","languages_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/languages","stargazers_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/stargazers","contributors_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/contributors","subscribers_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/subscribers","subscription_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/subscription","commits_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/commits{/sha}","git_commits_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/git/commits{/sha}","comments_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/comments{/number}","issue_comment_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/issues/comments{/number}","contents_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/contents/{+path}","compare_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/merges","archive_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/downloads","issues_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/issues{/number}","pulls_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/pulls{/number}","milestones_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/milestones{/number}","notifications_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/labels{/name}","releases_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/releases{/id}","deployments_url":"https://api.github.com/repos/vaclavcadek/keras2pmml/deployments","created_at":"2016-05-17T16:48:04Z","updated_at":"2018-06-05T06:24:40Z","pushed_at":"2017-08-09T21:09:40Z","git_url":"git://github.com/vaclavcadek/keras2pmml.git","ssh_url":"git@github.com:vaclavcadek/keras2pmml.git","clone_url":"https://github.com/vaclavcadek/keras2pmml.git","svn_url":"https://github.com/vaclavcadek/keras2pmml","homepage":null,"size":28,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8,"open_issues":2,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vaclavcadek/keras2pmml/pulls/3"},"html":{"href":"https://github.com/vaclavcadek/keras2pmml/pull/3"},"issue":{"href":"https://api.github.com/repos/vaclavcadek/keras2pmml/issues/3"},"comments":{"href":"https://api.github.com/repos/vaclavcadek/keras2pmml/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/vaclavcadek/keras2pmml/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/vaclavcadek/keras2pmml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vaclavcadek/keras2pmml/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/vaclavcadek/keras2pmml/statuses/ab153aab59cba2ffec2091a8fc05a9c038fc49d0"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":2,"additions":28,"deletions":3,"changed_files":2}}
{"actor":{"display_login":"ad1729"}}