deeplearning4j / deeplearning4j/deeplearning4j-examples

org.nd4j.linalg.exception.ND4JIllegalStateException when running EncoderDecoderLSTM

Open
#1,016 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.5k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Issue Description
Please describe your issue, along with:

expected behavior
run correctly
encountered behavior

Batch = 100
Epoch complete: 1%
======================== TEST ========================
In: what is all this " they " shit ? this ain't a movie .
Out: Exception in thread "main" org.nd4j.linalg.exception.ND4JIllegalStateException: New shape length doesn't match original length: [0] vs [1792]. Original shape: [14, 128] New Shape: [32, 0, 128]
at org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:3767)
at org.nd4j.linalg.api.ndarray.BaseNDArray.reshape(BaseNDArray.java:3712)
at org.deeplearning4j.nn.conf.preprocessor.FeedForwardToRnnPreProcessor.preProcess(FeedForwardToRnnPreProcessor.java:68)
at org.deeplearning4j.nn.graph.vertex.impl.LayerVertex.applyPreprocessorAndSetInput(LayerVertex.java:118)
at org.deeplearning4j.nn.graph.vertex.impl.LayerVertex.setInput(LayerVertex.java:170)
at org.deeplearning4j.nn.graph.ComputationGraph.ffToLayerActivationsDetached(ComputationGraph.java:2029)
at org.deeplearning4j.nn.graph.ComputationGraph.feedForward(ComputationGraph.java:1556)
at com.xxx.EncoderDecoderLSTM.output(EncoderDecoderLSTM.java:390)
at com.xxx.EncoderDecoderLSTM.test(EncoderDecoderLSTM.java:379)
at com.xxx.EncoderDecoderLSTM.train(EncoderDecoderLSTM.java:319)
at com.xxx.EncoderDecoderLSTM.run(EncoderDecoderLSTM.java:237)
at com.xxx.EncoderDecoderLSTM.main(EncoderDecoderLSTM.java:207)Version Information
Please indicate relevant versions, including, if relevant:

beta7
Mac OS 10.15.6

Contributing

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.