{"action":"created","issue":{"url":"https://api.github.com/repos/atcemgil/notes/issues/2","repository_url":"https://api.github.com/repos/atcemgil/notes","labels_url":"https://api.github.com/repos/atcemgil/notes/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/atcemgil/notes/issues/2/comments","events_url":"https://api.github.com/repos/atcemgil/notes/issues/2/events","html_url":"https://github.com/atcemgil/notes/issues/2","id":383040899,"node_id":"MDU6SXNzdWUzODMwNDA4OTk=","number":2,"title":"Matrix dimensions do not moatch","user":{"login":"yenerunver","id":8215944,"node_id":"MDQ6VXNlcjgyMTU5NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8215944?v=4","gravatar_id":"","url":"https://api.github.com/users/yenerunver","html_url":"https://github.com/yenerunver","followers_url":"https://api.github.com/users/yenerunver/followers","following_url":"https://api.github.com/users/yenerunver/following{/other_user}","gists_url":"https://api.github.com/users/yenerunver/gists{/gist_id}","starred_url":"https://api.github.com/users/yenerunver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yenerunver/subscriptions","organizations_url":"https://api.github.com/users/yenerunver/orgs","repos_url":"https://api.github.com/users/yenerunver/repos","events_url":"https://api.github.com/users/yenerunver/events{/privacy}","received_events_url":"https://api.github.com/users/yenerunver/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-21T10:01:58Z","updated_at":"2018-11-21T11:04:19Z","closed_at":null,"author_association":"NONE","body":"In `notes/MultiLayerPerceptron.ipynb`, there is a dimensional conflict in this function:\r\n\r\n<pre>\r\ndef mlp_fun(x, Weight, Bias, Func):\r\n    f = Variable(x, requires_grad=False)\r\n    NumOfLayers = len(Weight)\r\n    for i in range(NumOfLayers):\r\n        f = Func[i](torch.matmul(Weight[i], f) + Bias[i])\r\n    return f\r\n</pre>\r\n\r\nI have printed all steps for a 1,2,1 sized network, below are the results:\r\n![image](https://user-images.githubusercontent.com/8215944/48833671-f23ba680-ed8c-11e8-88f4-79630c7ad0c5.png)\r\n\r\nWhile the result of `torch.matmul(Weight[0], x)` is a **1x2** matrix, `Bias[0]` is a **2x1** vector and their summation is a **2x2** matrix.\r\n\r\nThis leads to a dimensional conflict in `f` results."},"comment":{"url":"https://api.github.com/repos/atcemgil/notes/issues/comments/440624587","html_url":"https://github.com/atcemgil/notes/issues/2#issuecomment-440624587","issue_url":"https://api.github.com/repos/atcemgil/notes/issues/2","id":440624587,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDYyNDU4Nw==","user":{"login":"yenerunver","id":8215944,"node_id":"MDQ6VXNlcjgyMTU5NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8215944?v=4","gravatar_id":"","url":"https://api.github.com/users/yenerunver","html_url":"https://github.com/yenerunver","followers_url":"https://api.github.com/users/yenerunver/followers","following_url":"https://api.github.com/users/yenerunver/following{/other_user}","gists_url":"https://api.github.com/users/yenerunver/gists{/gist_id}","starred_url":"https://api.github.com/users/yenerunver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yenerunver/subscriptions","organizations_url":"https://api.github.com/users/yenerunver/orgs","repos_url":"https://api.github.com/users/yenerunver/repos","events_url":"https://api.github.com/users/yenerunver/events{/privacy}","received_events_url":"https://api.github.com/users/yenerunver/received_events","type":"User","site_admin":false},"created_at":"2018-11-21T11:04:19Z","updated_at":"2018-11-21T11:04:19Z","author_association":"NONE","body":"A detailed version of `sizes=[4,2,1]`:\r\n\r\n![image](https://user-images.githubusercontent.com/8215944/48837404-54e57000-ed96-11e8-8a27-d7098d34a050.png)\r\n"}}
{"actor":{"display_login":"yenerunver"}}