{"action":"closed","issue":{"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5403","repository_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j","labels_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5403/labels{/name}","comments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5403/comments","events_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5403/events","html_url":"https://github.com/deeplearning4j/deeplearning4j/issues/5403","id":328012385,"node_id":"MDU6SXNzdWUzMjgwMTIzODU=","number":5403,"title":"SameDiff: Gather op bug","user":{"login":"AlexDBlack","id":2360237,"node_id":"MDQ6VXNlcjIzNjAyMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/2360237?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexDBlack","html_url":"https://github.com/AlexDBlack","followers_url":"https://api.github.com/users/AlexDBlack/followers","following_url":"https://api.github.com/users/AlexDBlack/following{/other_user}","gists_url":"https://api.github.com/users/AlexDBlack/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexDBlack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexDBlack/subscriptions","organizations_url":"https://api.github.com/users/AlexDBlack/orgs","repos_url":"https://api.github.com/users/AlexDBlack/repos","events_url":"https://api.github.com/users/AlexDBlack/events{/privacy}","received_events_url":"https://api.github.com/users/AlexDBlack/received_events","type":"User","site_admin":false},"labels":[{"id":67900999,"node_id":"MDU6TGFiZWw2NzkwMDk5OQ==","url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/labels/Bug","name":"Bug","color":"d93f0b","default":false},{"id":934492059,"node_id":"MDU6TGFiZWw5MzQ0OTIwNTk=","url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/labels/ND4J","name":"ND4J","color":"c7cdfc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-31T06:41:10Z","updated_at":"2018-06-01T10:26:47Z","closed_at":"2018-06-01T10:26:47Z","author_association":"MEMBER","body":"The simple use of Gather below is failing:\r\n\r\n```\r\n    @Test\r\n    public void testGather(){\r\n\r\n        INDArray in = Nd4j.rand(10,10);\r\n        INDArray indices = Nd4j.create(new double[]{0,1,5});\r\n\r\n        SameDiff sd = SameDiff.create();\r\n\r\n        SDVariable var = sd.var(\"in\", in);\r\n        SDVariable varIndices = sd.var(\"indices\", indices);\r\n        SDVariable gather = sd.gather(var, varIndices, 0);\r\n\r\n        System.out.println(in);\r\n\r\n        INDArray exp = Nd4j.pullRows(in, 1, new int[]{0,1,5});  //Along dimension 1 -> equiv to \"indexes for axis 0\"\r\n        INDArray act = sd.execAndEndResult();\r\n\r\n        assertEquals(exp, act);\r\n    }\r\n```\r\n\r\n```\r\norg.nd4j.linalg.exception.ND4JIllegalStateException: Output 0 was null!\r\n\r\n\tat org.nd4j.linalg.api.ops.DynamicCustomOp.addOutputArgument(DynamicCustomOp.java:409)\r\n\tat org.nd4j.linalg.api.ops.impl.shape.Gather.resolvePropertiesFromSameDiffBeforeExecution(Gather.java:89)\r\n\tat org.nd4j.autodiff.samediff.SameDiff.exec(SameDiff.java:5819)\r\n\tat org.nd4j.autodiff.samediff.SameDiff.execAndEndResult(SameDiff.java:4936)\r\n\tat org.nd4j.autodiff.gradcheck.TempDebug.testGather(TempDebug.java:128)\r\n```"}}
{"actor":{"display_login":"AlexDBlack"}}