{"action":"created","issue":{"url":"https://api.github.com/repos/MorvanZhou/pytorch-A3C/issues/5","repository_url":"https://api.github.com/repos/MorvanZhou/pytorch-A3C","labels_url":"https://api.github.com/repos/MorvanZhou/pytorch-A3C/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/MorvanZhou/pytorch-A3C/issues/5/comments","events_url":"https://api.github.com/repos/MorvanZhou/pytorch-A3C/issues/5/events","html_url":"https://github.com/MorvanZhou/pytorch-A3C/issues/5","id":351926527,"node_id":"MDU6SXNzdWUzNTE5MjY1Mjc=","number":5,"title":"关于loss function的疑问","user":{"login":"lizhihao6","id":22168900,"node_id":"MDQ6VXNlcjIyMTY4OTAw","avatar_url":"https://avatars0.githubusercontent.com/u/22168900?v=4","gravatar_id":"","url":"https://api.github.com/users/lizhihao6","html_url":"https://github.com/lizhihao6","followers_url":"https://api.github.com/users/lizhihao6/followers","following_url":"https://api.github.com/users/lizhihao6/following{/other_user}","gists_url":"https://api.github.com/users/lizhihao6/gists{/gist_id}","starred_url":"https://api.github.com/users/lizhihao6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lizhihao6/subscriptions","organizations_url":"https://api.github.com/users/lizhihao6/orgs","repos_url":"https://api.github.com/users/lizhihao6/repos","events_url":"https://api.github.com/users/lizhihao6/events{/privacy}","received_events_url":"https://api.github.com/users/lizhihao6/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-19T19:08:52Z","updated_at":"2018-08-20T10:40:07Z","closed_at":"2018-08-20T02:18:45Z","author_association":"NONE","body":"loss_function中的\r\n```python\r\nexp_v = m.log_prob(a) * td.detach()\r\n```\r\nlog_prob是[prob1, prob2, prob3]\r\ntd 是 [[value1, value2, value3]]\r\n这样直接相乘得到的是一个二维矩阵，但是A2C里面不应该是对应步骤的A与对应的actor_loss相乘吗？\r\n是否该改为\r\n```python\r\nexp_v = m.log_prob(a) * td.detach()[0]\r\n```\r\n这是我更改loss函数后的reward，似乎具有更好的稳定性？\r\n![](http://owpn9dz9a.bkt.clouddn.com/18-8-20/79461170.jpg)"},"comment":{"url":"https://api.github.com/repos/MorvanZhou/pytorch-A3C/issues/comments/414273274","html_url":"https://github.com/MorvanZhou/pytorch-A3C/issues/5#issuecomment-414273274","issue_url":"https://api.github.com/repos/MorvanZhou/pytorch-A3C/issues/5","id":414273274,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDI3MzI3NA==","user":{"login":"MorvanZhou","id":19408436,"node_id":"MDQ6VXNlcjE5NDA4NDM2","avatar_url":"https://avatars0.githubusercontent.com/u/19408436?v=4","gravatar_id":"","url":"https://api.github.com/users/MorvanZhou","html_url":"https://github.com/MorvanZhou","followers_url":"https://api.github.com/users/MorvanZhou/followers","following_url":"https://api.github.com/users/MorvanZhou/following{/other_user}","gists_url":"https://api.github.com/users/MorvanZhou/gists{/gist_id}","starred_url":"https://api.github.com/users/MorvanZhou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MorvanZhou/subscriptions","organizations_url":"https://api.github.com/users/MorvanZhou/orgs","repos_url":"https://api.github.com/users/MorvanZhou/repos","events_url":"https://api.github.com/users/MorvanZhou/events{/privacy}","received_events_url":"https://api.github.com/users/MorvanZhou/received_events","type":"User","site_admin":false},"created_at":"2018-08-20T10:40:07Z","updated_at":"2018-08-20T10:40:07Z","author_association":"OWNER","body":"其实在这个例子中是没差别的。squeeze主要是将所有为1的维度去掉。比如(5,1,2) 变成(5,2)"}}
{"actor":{"display_login":"MorvanZhou"}}