{"action":"created","issue":{"url":"https://api.github.com/repos/andreamad8/Universal-Transformer-Pytorch/issues/1","repository_url":"https://api.github.com/repos/andreamad8/Universal-Transformer-Pytorch","labels_url":"https://api.github.com/repos/andreamad8/Universal-Transformer-Pytorch/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/andreamad8/Universal-Transformer-Pytorch/issues/1/comments","events_url":"https://api.github.com/repos/andreamad8/Universal-Transformer-Pytorch/issues/1/events","html_url":"https://github.com/andreamad8/Universal-Transformer-Pytorch/issues/1","id":380457058,"node_id":"MDU6SXNzdWUzODA0NTcwNTg=","number":1,"title":"previous state has no effect on state","user":{"login":"ypxie","id":13158661,"node_id":"MDQ6VXNlcjEzMTU4NjYx","avatar_url":"https://avatars1.githubusercontent.com/u/13158661?v=4","gravatar_id":"","url":"https://api.github.com/users/ypxie","html_url":"https://github.com/ypxie","followers_url":"https://api.github.com/users/ypxie/followers","following_url":"https://api.github.com/users/ypxie/following{/other_user}","gists_url":"https://api.github.com/users/ypxie/gists{/gist_id}","starred_url":"https://api.github.com/users/ypxie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ypxie/subscriptions","organizations_url":"https://api.github.com/users/ypxie/orgs","repos_url":"https://api.github.com/users/ypxie/repos","events_url":"https://api.github.com/users/ypxie/events{/privacy}","received_events_url":"https://api.github.com/users/ypxie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-13T22:42:34Z","updated_at":"2018-11-14T02:01:46Z","closed_at":null,"author_association":"NONE","body":"            previous_state = ((state * update_weights.unsqueeze(-1)) + (previous_state * (1 - update_weights.unsqueeze(-1))))\r\n"},"comment":{"url":"https://api.github.com/repos/andreamad8/Universal-Transformer-Pytorch/issues/comments/438509702","html_url":"https://github.com/andreamad8/Universal-Transformer-Pytorch/issues/1#issuecomment-438509702","issue_url":"https://api.github.com/repos/andreamad8/Universal-Transformer-Pytorch/issues/1","id":438509702,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODUwOTcwMg==","user":{"login":"andreamad8","id":6934703,"node_id":"MDQ6VXNlcjY5MzQ3MDM=","avatar_url":"https://avatars3.githubusercontent.com/u/6934703?v=4","gravatar_id":"","url":"https://api.github.com/users/andreamad8","html_url":"https://github.com/andreamad8","followers_url":"https://api.github.com/users/andreamad8/followers","following_url":"https://api.github.com/users/andreamad8/following{/other_user}","gists_url":"https://api.github.com/users/andreamad8/gists{/gist_id}","starred_url":"https://api.github.com/users/andreamad8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreamad8/subscriptions","organizations_url":"https://api.github.com/users/andreamad8/orgs","repos_url":"https://api.github.com/users/andreamad8/repos","events_url":"https://api.github.com/users/andreamad8/events{/privacy}","received_events_url":"https://api.github.com/users/andreamad8/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T02:01:46Z","updated_at":"2018-11-14T02:01:46Z","author_association":"OWNER","body":"Hi, \r\n\r\nI think you are right. The function should return previous_state instead of state. \r\n\r\nI converted this implementation from: https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/models/research/universal_transformer_util.py#L1062 \r\n\r\nwhere they use tf.while() is quite difficult to follow. I think if I return previous_state (the equivalent of new_state in the tf code) instead of state, should work. \r\n\r\nI will push a fix. Let me know if do you think is correct. Any help is greatly appreciated.\r\n\r\nAndrea"}}
{"actor":{"display_login":"andreamad8"}}