{"action":"created","issue":{"url":"https://api.github.com/repos/fchollet/keras/issues/1624","repository_url":"https://api.github.com/repos/fchollet/keras","labels_url":"https://api.github.com/repos/fchollet/keras/issues/1624/labels{/name}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/1624/comments","events_url":"https://api.github.com/repos/fchollet/keras/issues/1624/events","html_url":"https://github.com/fchollet/keras/issues/1624","id":130724025,"number":1624,"title":"Class Weight for 3D Targets","user":{"login":"KlaymenGC","id":6898967,"avatar_url":"https://avatars.githubusercontent.com/u/6898967?v=3","gravatar_id":"","url":"https://api.github.com/users/KlaymenGC","html_url":"https://github.com/KlaymenGC","followers_url":"https://api.github.com/users/KlaymenGC/followers","following_url":"https://api.github.com/users/KlaymenGC/following{/other_user}","gists_url":"https://api.github.com/users/KlaymenGC/gists{/gist_id}","starred_url":"https://api.github.com/users/KlaymenGC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KlaymenGC/subscriptions","organizations_url":"https://api.github.com/users/KlaymenGC/orgs","repos_url":"https://api.github.com/users/KlaymenGC/repos","events_url":"https://api.github.com/users/KlaymenGC/events{/privacy}","received_events_url":"https://api.github.com/users/KlaymenGC/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-02-02T15:51:08Z","updated_at":"2016-10-08T11:31:46Z","closed_at":"2016-02-02T20:02:11Z","body":"Hello,\r\n\r\nI'm trying to add weights to the classes during training, the output shape of the last layer (```softmax```) is ```(batch_size, length, nb_class)``` with one-hot-label of the same size, and ```categorical_crossentropy``` loss is used here. \r\n\r\nI've tried to use ```class_weight``` in ```fit``` and send class weight as dictionary: ```{0:w1, 1:w2, ...}```, but got the error: ```Exception: class_weight not supported for 3+ dimensional targets.```\r\n\r\nCould someone suggest a way of doing this in Keras? Any suggestions will be greatly appreciated!"},"comment":{"url":"https://api.github.com/repos/fchollet/keras/issues/comments/252419723","html_url":"https://github.com/fchollet/keras/issues/1624#issuecomment-252419723","issue_url":"https://api.github.com/repos/fchollet/keras/issues/1624","id":252419723,"user":{"login":"GodOfProbability","id":5190226,"avatar_url":"https://avatars.githubusercontent.com/u/5190226?v=3","gravatar_id":"","url":"https://api.github.com/users/GodOfProbability","html_url":"https://github.com/GodOfProbability","followers_url":"https://api.github.com/users/GodOfProbability/followers","following_url":"https://api.github.com/users/GodOfProbability/following{/other_user}","gists_url":"https://api.github.com/users/GodOfProbability/gists{/gist_id}","starred_url":"https://api.github.com/users/GodOfProbability/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GodOfProbability/subscriptions","organizations_url":"https://api.github.com/users/GodOfProbability/orgs","repos_url":"https://api.github.com/users/GodOfProbability/repos","events_url":"https://api.github.com/users/GodOfProbability/events{/privacy}","received_events_url":"https://api.github.com/users/GodOfProbability/received_events","type":"User","site_admin":false},"created_at":"2016-10-08T11:31:46Z","updated_at":"2016-10-08T11:31:46Z","body":"Have you found the solution yet? I am having similar problem."}}
{"actor":{"display_login":"GodOfProbability"}}