{"action":"opened","issue":{"url":"https://api.github.com/repos/tensorflow/models/issues/5191","repository_url":"https://api.github.com/repos/tensorflow/models","labels_url":"https://api.github.com/repos/tensorflow/models/issues/5191/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/models/issues/5191/comments","events_url":"https://api.github.com/repos/tensorflow/models/issues/5191/events","html_url":"https://github.com/tensorflow/models/issues/5191","id":354156258,"node_id":"MDU6SXNzdWUzNTQxNTYyNTg=","number":5191,"title":"How can I perform a multi-label training?","user":{"login":"ShiyuZhangUST","id":33595140,"node_id":"MDQ6VXNlcjMzNTk1MTQw","avatar_url":"https://avatars0.githubusercontent.com/u/33595140?v=4","gravatar_id":"","url":"https://api.github.com/users/ShiyuZhangUST","html_url":"https://github.com/ShiyuZhangUST","followers_url":"https://api.github.com/users/ShiyuZhangUST/followers","following_url":"https://api.github.com/users/ShiyuZhangUST/following{/other_user}","gists_url":"https://api.github.com/users/ShiyuZhangUST/gists{/gist_id}","starred_url":"https://api.github.com/users/ShiyuZhangUST/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShiyuZhangUST/subscriptions","organizations_url":"https://api.github.com/users/ShiyuZhangUST/orgs","repos_url":"https://api.github.com/users/ShiyuZhangUST/repos","events_url":"https://api.github.com/users/ShiyuZhangUST/events{/privacy}","received_events_url":"https://api.github.com/users/ShiyuZhangUST/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-27T02:16:31Z","updated_at":"2018-08-27T02:16:31Z","closed_at":null,"author_association":"NONE","body":"I want to train a model with 2 layers' output. For example, a person stand in front of a building, so that pixel belongs both to person and building. In my test, I add 2 softmax cross entropy for each layer. But the training result turned to be 2 layers with same color lump. The first layer's output is all class 1 and the second layer's output is all background.\r\n\r\nIs the way I add cross entropy right?\r\n\r\n    tf.losses.softmax_cross_entropy(\r\n      one_hot_labels_layer1,\r\n      tf.reshape(logits_layer1, shape = [-1, num_classes_layer1]),\r\n      weights = mask_layer1,\r\n      scope = '%s_%s' % (loss_scope, 'layer1'))\r\n\r\n    tf.losses.softmax_cross_entropy(\r\n      one_hot_labels_layer2,\r\n      tf.reshape(logits_layer2, shape = [-1, num_classes_layer2]),\r\n      weights = mask_layer2,\r\n      scope = '%s_%s' % (loss_scope, 'layer2'))"}}
{"actor":{"display_login":"ShiyuZhangUST"}}