{"action":"opened","issue":{"url":"https://api.github.com/repos/pytorch/pytorch/issues/6985","repository_url":"https://api.github.com/repos/pytorch/pytorch","labels_url":"https://api.github.com/repos/pytorch/pytorch/issues/6985/labels{/name}","comments_url":"https://api.github.com/repos/pytorch/pytorch/issues/6985/comments","events_url":"https://api.github.com/repos/pytorch/pytorch/issues/6985/events","html_url":"https://github.com/pytorch/pytorch/issues/6985","id":317986753,"number":6985,"title":"torch.tensor and CUDA","user":{"login":"Daulbaev","id":7610126,"avatar_url":"https://avatars3.githubusercontent.com/u/7610126?v=4","gravatar_id":"","url":"https://api.github.com/users/Daulbaev","html_url":"https://github.com/Daulbaev","followers_url":"https://api.github.com/users/Daulbaev/followers","following_url":"https://api.github.com/users/Daulbaev/following{/other_user}","gists_url":"https://api.github.com/users/Daulbaev/gists{/gist_id}","starred_url":"https://api.github.com/users/Daulbaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Daulbaev/subscriptions","organizations_url":"https://api.github.com/users/Daulbaev/orgs","repos_url":"https://api.github.com/users/Daulbaev/repos","events_url":"https://api.github.com/users/Daulbaev/events{/privacy}","received_events_url":"https://api.github.com/users/Daulbaev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-26T11:25:58Z","updated_at":"2018-04-26T11:25:58Z","closed_at":null,"author_association":"NONE","body":"It seems that torch.tensor with device=torch.device('cuda') can't work with numpy arrays:\r\n```\r\nt = torch.tensor(np.array([5., 5., 5.]), device=torch.device('cuda'))\r\nt.device # returns 'cpu'\r\n```\r\n\r\n"}}
{"actor":{"display_login":"Daulbaev"}}