{"action":"created","issue":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/5351","repository_url":"https://api.github.com/repos/dmlc/mxnet","labels_url":"https://api.github.com/repos/dmlc/mxnet/issues/5351/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/5351/comments","events_url":"https://api.github.com/repos/dmlc/mxnet/issues/5351/events","html_url":"https://github.com/dmlc/mxnet/issues/5351","id":213565680,"number":5351,"title":"Access true label","user":{"login":"qz28","id":3237459,"avatar_url":"https://avatars1.githubusercontent.com/u/3237459?v=3","gravatar_id":"","url":"https://api.github.com/users/qz28","html_url":"https://github.com/qz28","followers_url":"https://api.github.com/users/qz28/followers","following_url":"https://api.github.com/users/qz28/following{/other_user}","gists_url":"https://api.github.com/users/qz28/gists{/gist_id}","starred_url":"https://api.github.com/users/qz28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qz28/subscriptions","organizations_url":"https://api.github.com/users/qz28/orgs","repos_url":"https://api.github.com/users/qz28/repos","events_url":"https://api.github.com/users/qz28/events{/privacy}","received_events_url":"https://api.github.com/users/qz28/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-11T22:52:57Z","updated_at":"2017-03-12T02:00:08Z","closed_at":null,"body":"I am a beginner and try to use a pre-trained resnet. I have a problem of accessing the ground truth label. I looked at some tutorial and still got quite confused:\r\n\r\nsym, arg_params, aux_params = mx.model.load_checkpoint('resnet-152', 0)\r\nall_layers = sym.get_internals()\r\nnet = all_layers['flatten0'+'_output']\r\nnet = mx.symbol.FullyConnected(data=net, num_hidden=num_classes, name='fc1')\r\nnet = mx.symbol.SoftmaxOutput(data=net, name='softmax')\r\n\r\nThis softmaxoutput layer doesn't seem to take the true label as a argument (which is described as a non-optional parameter on the website). How the loss is calculated when label is not passed to the softmax output layer? I looked at the input list of symbol sym(the pretrained resnet model) and found softmax_label is in there. I want to scale the loss contribution of each sample based on their true labels. How can I access the labels under this circumstances ? And How can I access the loss it seems the loss is computed in the softmaxoutput layer but not outputted.?\r\n\r\n\r\n\r\nFor bugs or installation issues, please provide the following information.\r\nThe more information you provide, the more likely people will be able to help you.\r\n\r\n## Environment info\r\nOperating System:\r\n\r\nCompiler:\r\n\r\nPackage used (Python/R/Scala/Julia):\r\n\r\nMXNet version:\r\n\r\nOr if installed from source:\r\n\r\nMXNet commit hash (`git rev-parse HEAD`):\r\n\r\nIf you are using python package, please provide\r\n\r\nPython version and distribution:\r\n\r\nIf you are using R package, please provide\r\n\r\nR `sessionInfo()`:\r\n\r\n## Error Message:\r\nPlease paste the full error message, including stack trace.\r\n\r\n## Minimum reproducible example\r\nif you are using your own code, please provide a short script that reproduces the error.\r\n\r\n## Steps to reproduce\r\nor if you are running standard examples, please provide the commands you have run that lead to the error.\r\n\r\n1.\r\n2.\r\n3.\r\n\r\n## What have you tried to solve it?\r\n\r\n1.\r\n2.\r\n3.\r\n"},"comment":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/comments/285915639","html_url":"https://github.com/dmlc/mxnet/issues/5351#issuecomment-285915639","issue_url":"https://api.github.com/repos/dmlc/mxnet/issues/5351","id":285915639,"user":{"login":"qz28","id":3237459,"avatar_url":"https://avatars1.githubusercontent.com/u/3237459?v=3","gravatar_id":"","url":"https://api.github.com/users/qz28","html_url":"https://github.com/qz28","followers_url":"https://api.github.com/users/qz28/followers","following_url":"https://api.github.com/users/qz28/following{/other_user}","gists_url":"https://api.github.com/users/qz28/gists{/gist_id}","starred_url":"https://api.github.com/users/qz28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qz28/subscriptions","organizations_url":"https://api.github.com/users/qz28/orgs","repos_url":"https://api.github.com/users/qz28/repos","events_url":"https://api.github.com/users/qz28/events{/privacy}","received_events_url":"https://api.github.com/users/qz28/received_events","type":"User","site_admin":false},"created_at":"2017-03-12T02:00:08Z","updated_at":"2017-03-12T02:00:08Z","body":"@saicoco \r\nThanks for your  \r\nI tried \r\nlabel = mx.sym.Variable( 'softmax_label')\r\nbut this gave me a duplicate name error. And I used list_arguments() to look the input list of my modified pre-trained model, it has two variables named 'softmax_label'.  The first one is the original and the second should be the one I introduced. I guess it doesn't allow me to use mx.sym.Variable( 'softmax_label') to access the ground truth label? Is this a normal situation?"}}
{"actor":{"display_login":"qz28"}}