{"action":"created","issue":{"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5311","repository_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j","labels_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5311/labels{/name}","comments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5311/comments","events_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5311/events","html_url":"https://github.com/deeplearning4j/deeplearning4j/issues/5311","id":326029718,"number":5311,"title":"ComputationGraph ReshapePreprocessor Error! Multiple Input INDArray.","user":{"login":"andyxzq","id":10462598,"avatar_url":"https://avatars0.githubusercontent.com/u/10462598?v=4","gravatar_id":"","url":"https://api.github.com/users/andyxzq","html_url":"https://github.com/andyxzq","followers_url":"https://api.github.com/users/andyxzq/followers","following_url":"https://api.github.com/users/andyxzq/following{/other_user}","gists_url":"https://api.github.com/users/andyxzq/gists{/gist_id}","starred_url":"https://api.github.com/users/andyxzq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyxzq/subscriptions","organizations_url":"https://api.github.com/users/andyxzq/orgs","repos_url":"https://api.github.com/users/andyxzq/repos","events_url":"https://api.github.com/users/andyxzq/events{/privacy}","received_events_url":"https://api.github.com/users/andyxzq/received_events","type":"User","site_admin":false},"labels":[{"id":67900999,"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/labels/Bug","name":"Bug","color":"d93f0b","default":false},{"id":501813555,"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/labels/DL4J%20Keras","name":"DL4J Keras","color":"b60205","default":false},{"id":915096470,"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/labels/Java","name":"Java","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":{"login":"maxpumperla","id":3462566,"avatar_url":"https://avatars1.githubusercontent.com/u/3462566?v=4","gravatar_id":"","url":"https://api.github.com/users/maxpumperla","html_url":"https://github.com/maxpumperla","followers_url":"https://api.github.com/users/maxpumperla/followers","following_url":"https://api.github.com/users/maxpumperla/following{/other_user}","gists_url":"https://api.github.com/users/maxpumperla/gists{/gist_id}","starred_url":"https://api.github.com/users/maxpumperla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxpumperla/subscriptions","organizations_url":"https://api.github.com/users/maxpumperla/orgs","repos_url":"https://api.github.com/users/maxpumperla/repos","events_url":"https://api.github.com/users/maxpumperla/events{/privacy}","received_events_url":"https://api.github.com/users/maxpumperla/received_events","type":"User","site_admin":false},"assignees":[{"login":"maxpumperla","id":3462566,"avatar_url":"https://avatars1.githubusercontent.com/u/3462566?v=4","gravatar_id":"","url":"https://api.github.com/users/maxpumperla","html_url":"https://github.com/maxpumperla","followers_url":"https://api.github.com/users/maxpumperla/followers","following_url":"https://api.github.com/users/maxpumperla/following{/other_user}","gists_url":"https://api.github.com/users/maxpumperla/gists{/gist_id}","starred_url":"https://api.github.com/users/maxpumperla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxpumperla/subscriptions","organizations_url":"https://api.github.com/users/maxpumperla/orgs","repos_url":"https://api.github.com/users/maxpumperla/repos","events_url":"https://api.github.com/users/maxpumperla/events{/privacy}","received_events_url":"https://api.github.com/users/maxpumperla/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-05-24T09:07:39Z","updated_at":"2018-05-29T12:31:31Z","closed_at":null,"author_association":"NONE","body":"java.lang.IllegalStateException: Input shape [1, 10, 1] and output shape[1] do not match\r\n\r\n\tat org.deeplearning4j.nn.modelimport.keras.preprocessors.ReshapePreprocessor.preProcess(ReshapePreprocessor.java:100)\r\n\tat org.deeplearning4j.nn.graph.vertex.impl.PreprocessorVertex.doForward(PreprocessorVertex.java:62)\r\n\tat org.deeplearning4j.nn.graph.ComputationGraph.outputOfLayersDetached(ComputationGraph.java:2156)\r\n\tat org.deeplearning4j.nn.graph.ComputationGraph.output(ComputationGraph.java:1638)\r\n\tat org.deeplearning4j.nn.graph.ComputationGraph.outputSingle(ComputationGraph.java:1621)\r\n\tat org.deeplearning4j.nn.graph.ComputationGraph.outputSingle(ComputationGraph.java:1607)\r\n\tat org.deeplearning4j.nn.graph.ComputationGraph.outputSingle(ComputationGraph.java:1551)\r\n\tat com.ximalaya.brain.deep.keras.KerasModelTest.testModel(KerasModelTest.java:125)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)\r\n\tat org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)\r\n\tat org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)\r\n\tat org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)\r\n\tat org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)\r\n\tat org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)\r\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)\r\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)\r\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)\r\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:309)\r\n\tat org.junit.runner.JUnitCore.run(JUnitCore.java:160)\r\n\tat com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)\r\n\tat com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)\r\n\tat com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)\r\n\r\n```\r\nComputationGraph cg = KerasModelImport.importKerasModelAndWeights(\r\n                \"/Users/nali/Documents/deepfm.h5\"\r\n        );\r\n System.out.println(cg.summary());\r\n INDArray[] input = new NDArray[10];\r\n for(int i = 0; i < 10; i++) {\r\n     input[i] = Nd4j.ones(1, 1);\r\n }\r\n cg.outputSingle(input);\r\n```\r\n\r\n```\r\nmodel summary:\r\n==========================================================================================================================================================================================================================================================\r\nVertexName (VertexType)                 nIn,nOut  TotalParams ParamsShape                             Vertex Inputs                 \r\n==========================================================================================================================================================================================================================================================\r\ninput_0 (InputVertex)                   -,-       -           -                                       -                             \r\ninput_1 (InputVertex)                   -,-       -           -                                       -                             \r\ninput_2 (InputVertex)                   -,-       -           -                                       -                             \r\ninput_3 (InputVertex)                   -,-       -           -                                       -                             \r\ninput_4 (InputVertex)                   -,-       -           -                                       -                             \r\ninput_5 (InputVertex)                   -,-       -           -                                       -                             \r\ninput_6 (InputVertex)                   -,-       -           -                                       -                             \r\ninput_7 (InputVertex)                   -,-       -           -                                       -                             \r\ninput_8 (InputVertex)                   -,-       -           -                                       -                             \r\ninput_9 (InputVertex)                   -,-       -           -                                       -                             \r\nembed_0 (EmbeddingSequenceLayer)        6,10      60          W:{6,10}                                [input_0]                     \r\nlinear_0 (EmbeddingSequenceLayer)       6,1       6           W:{6,1}                                 [input_0]                     \r\nlinear_1 (EmbeddingSequenceLayer)       41,1      41          W:{41,1}                                [input_1]                     \r\nembed_1 (EmbeddingSequenceLayer)        41,10     410         W:{41,10}                               [input_1]                     \r\nlinear_2 (EmbeddingSequenceLayer)       8,1       8           W:{8,1}                                 [input_2]                     \r\nembed_2 (EmbeddingSequenceLayer)        8,10      80          W:{8,10}                                [input_2]                     \r\nlinear_3 (EmbeddingSequenceLayer)       3,1       3           W:{3,1}                                 [input_3]                     \r\nembed_3 (EmbeddingSequenceLayer)        3,10      30          W:{3,10}                                [input_3]                     \r\nlinear_4 (EmbeddingSequenceLayer)       24,1      24          W:{24,1}                                [input_4]                     \r\nembed_4 (EmbeddingSequenceLayer)        24,10     240         W:{24,10}                               [input_4]                     \r\nlinear_5 (EmbeddingSequenceLayer)       11,1      11          W:{11,1}                                [input_5]                     \r\nembed_5 (EmbeddingSequenceLayer)        11,10     110         W:{11,10}                               [input_5]                     \r\nembed_6 (EmbeddingSequenceLayer)        6,10      60          W:{6,10}                                [input_6]                     \r\nlinear_6 (EmbeddingSequenceLayer)       6,1       6           W:{6,1}                                 [input_6]                     \r\nembed_7 (EmbeddingSequenceLayer)        41,10     410         W:{41,10}                               [input_7]                     \r\nlinear_7 (EmbeddingSequenceLayer)       41,1      41          W:{41,1}                                [input_7]                     \r\nembed_8 (EmbeddingSequenceLayer)        11,10     110         W:{11,10}                               [input_8]                     \r\nlinear_8 (EmbeddingSequenceLayer)       11,1      11          W:{11,1}                                [input_8]                     \r\nembed_9 (EmbeddingSequenceLayer)        245,10    2450        W:{245,10}                              [input_9]                     \r\nlinear_9 (EmbeddingSequenceLayer)       245,1     245         W:{245,1}                               [input_9]                     \r\nreshape_11 (PreprocessorVertex)         -,-       -           -                                       [embed_0]                     \r\nreshape_1 (PreprocessorVertex)          -,-       -           -                                       [linear_0]                    \r\nreshape_2 (PreprocessorVertex)          -,-       -           -                                       [linear_1]                    \r\nreshape_12 (PreprocessorVertex)         -,-       -           -                                       [embed_1]                     \r\nreshape_3 (PreprocessorVertex)          -,-       -           -                                       [linear_2]                    \r\nreshape_13 (PreprocessorVertex)         -,-       -           -                                       [embed_2]                     \r\nreshape_4 (PreprocessorVertex)          -,-       -           -                                       [linear_3]                    \r\nreshape_14 (PreprocessorVertex)         -,-       -           -                                       [embed_3]                     \r\nreshape_5 (PreprocessorVertex)          -,-       -           -                                       [linear_4]                    \r\nreshape_15 (PreprocessorVertex)         -,-       -           -                                       [embed_4]                     \r\nreshape_6 (PreprocessorVertex)          -,-       -           -                                       [linear_5]                    \r\nreshape_16 (PreprocessorVertex)         -,-       -           -                                       [embed_5]                     \r\nreshape_17 (PreprocessorVertex)         -,-       -           -                                       [embed_6]                     \r\nreshape_7 (PreprocessorVertex)          -,-       -           -                                       [linear_6]                    \r\nreshape_18 (PreprocessorVertex)         -,-       -           -                                       [embed_7]                     \r\nreshape_8 (PreprocessorVertex)          -,-       -           -                                       [linear_7]                    \r\nreshape_19 (PreprocessorVertex)         -,-       -           -                                       [embed_8]                     \r\nreshape_9 (PreprocessorVertex)          -,-       -           -                                       [linear_8]                    \r\nreshape_20 (PreprocessorVertex)         -,-       -           -                                       [embed_9]                     \r\nreshape_10 (PreprocessorVertex)         -,-       -           -                                       [linear_9]                    \r\nmultiply_2 (ElementWiseVertex)          -,-       -           -                                       [reshape_11, reshape_11]      \r\nmultiply_3 (ElementWiseVertex)          -,-       -           -                                       [reshape_12, reshape_12]      \r\nmultiply_4 (ElementWiseVertex)          -,-       -           -                                       [reshape_13, reshape_13]      \r\nmultiply_5 (ElementWiseVertex)          -,-       -           -                                       [reshape_14, reshape_14]      \r\nmultiply_6 (ElementWiseVertex)          -,-       -           -                                       [reshape_15, reshape_15]      \r\nmultiply_7 (ElementWiseVertex)          -,-       -           -                                       [reshape_16, reshape_16]      \r\nmultiply_8 (ElementWiseVertex)          -,-       -           -                                       [reshape_17, reshape_17]      \r\nmultiply_9 (ElementWiseVertex)          -,-       -           -                                       [reshape_18, reshape_18]      \r\nmultiply_10 (ElementWiseVertex)         -,-       -           -                                       [reshape_19, reshape_19]      \r\nadd_2 (ElementWiseVertex)               -,-       -           -                                       [reshape_11, reshape_12, reshape_13, reshape_14, reshape_15, reshape_16, reshape_17, reshape_18, reshape_19, reshape_20]\r\nconcatenate_1 (MergeVertex)             -,-       -           -                                       [reshape_11, reshape_12, reshape_13, reshape_14, reshape_15, reshape_16, reshape_17, reshape_18, reshape_19, reshape_20]\r\nmultiply_11 (ElementWiseVertex)         -,-       -           -                                       [reshape_20, reshape_20]      \r\nadd_1 (ElementWiseVertex)               -,-       -           -                                       [reshape_1, reshape_2, reshape_3, reshape_4, reshape_5, reshape_6, reshape_7, reshape_8, reshape_9, reshape_10]\r\nmultiply_1 (ElementWiseVertex)          -,-       -           -                                       [add_2, add_2]                \r\ndense_1 (DenseLayer)                    100,200   20200       W:{100,200}, b:{1,200}                  [concatenate_1]               \r\nadd_3 (ElementWiseVertex)               -,-       -           -                                       [multiply_2, multiply_3, multiply_4, multiply_5, multiply_6, multiply_7, multiply_8, multiply_9, multiply_10, multiply_11]\r\nbatch_normalization_1 (BatchNormalization)1,1       4           gamma:{1,1}, beta:{1,1}, mean:{1,1}, var:{1,1}[add_1]                       \r\nactivation_1 (ActivationLayer)          -,-       0           -                                       [dense_1]                     \r\nsubtract_1 (ElementWiseVertex)          -,-       -           -                                       [multiply_1, add_3]           \r\ndense_2 (DenseLayer)                    200,200   40200       W:{200,200}, b:{1,200}                  [activation_1]                \r\nactivation_2 (ActivationLayer)          -,-       0           -                                       [dense_2]                     \r\nconcatenate_2 (MergeVertex)             -,-       -           -                                       [batch_normalization_1, subtract_1, activation_2]\r\ndense_3 (DenseLayer)                    211,1     212         W:{211,1}, b:{1,1}                      [concatenate_2]               \r\ndense_3_loss (LossLayer)                -,-       0           -                                       [dense_3]   \r\n```\r\nDoes my inputs have some problems? And I change the number of inputs to 1，it still has the same problem, so I think reshape operation in keras maybe not well supported in dl4j."},"comment":{"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/comments/392758990","html_url":"https://github.com/deeplearning4j/deeplearning4j/issues/5311#issuecomment-392758990","issue_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/5311","id":392758990,"user":{"login":"maxpumperla","id":3462566,"avatar_url":"https://avatars1.githubusercontent.com/u/3462566?v=4","gravatar_id":"","url":"https://api.github.com/users/maxpumperla","html_url":"https://github.com/maxpumperla","followers_url":"https://api.github.com/users/maxpumperla/followers","following_url":"https://api.github.com/users/maxpumperla/following{/other_user}","gists_url":"https://api.github.com/users/maxpumperla/gists{/gist_id}","starred_url":"https://api.github.com/users/maxpumperla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxpumperla/subscriptions","organizations_url":"https://api.github.com/users/maxpumperla/orgs","repos_url":"https://api.github.com/users/maxpumperla/repos","events_url":"https://api.github.com/users/maxpumperla/events{/privacy}","received_events_url":"https://api.github.com/users/maxpumperla/received_events","type":"User","site_admin":false},"created_at":"2018-05-29T12:31:31Z","updated_at":"2018-05-29T12:31:31Z","author_association":"CONTRIBUTOR","body":"@andyxzq thanks for reporting this, will get back to you soon."}}
{"actor":{"display_login":"maxpumperla"}}