Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sd.evaluate failure #10028

Open
adonnini opened this issue Aug 31, 2023 · 0 comments
Open

Sd.evaluate failure #10028

adonnini opened this issue Aug 31, 2023 · 0 comments

Comments

@adonnini
Copy link

When I run the code reported below, execution fails with

Index can't be < 0 and >= 1984

What am I missing / doing wrong? Thanks

CODE

String outputVariable = outReduced.name();                  
evaluation = new Evaluation();                  
testData.reset();                 
sd.evaluate(testData, outputVariable, evaluation);

outReduced has shape [64, 2, 31]

testData has 109 elements.

ERROR LOG

Exception in thread "main" java.lang.IllegalStateException: Index can't be < 0 and >= 1984 	at org.nd4j.linalg.factory.Nd4j.pullRows(Nd4j.java:4749) 	at org.nd4j.linalg.factory.Nd4j.pullRows(Nd4j.java:4722) 	at org.nd4j.evaluation.EvaluationUtils.extractNonMaskedTimeSteps(EvaluationUtils.java:208) 	at org.nd4j.evaluation.BaseEvaluation.reshapeAndExtractNotMasked(BaseEvaluation.java:186) 	at org.nd4j.evaluation.classification.Evaluation.eval(Evaluation.java:361) 	at org.nd4j.evaluation.BaseEvaluation.eval(BaseEvaluation.java:267) 	at org.nd4j.autodiff.samediff.SameDiff.evaluateHelper(SameDiff.java:2402) 	at org.nd4j.autodiff.samediff.SameDiff.evaluate(SameDiff.java:2296) 	at org.nd4j.autodiff.samediff.config.EvaluationConfig.exec(EvaluationConfig.java:197) 	at org.nd4j.autodiff.samediff.SameDiff.evaluate(SameDiff.java:2206) 	at org.deeplearning4j.examples.trajectorypredictiontransformer.LocationNextNeuralNetworkV7_04.fitAndEvaluateTestDataset(LocationNextNeuralNetworkV7_04.java:1083) 	at org.deeplearning4j.examples.trajectorypredictiontransformer.LocationNextNeuralNetworkV7_04.sameDiff3(LocationNextNeuralNetworkV7_04.java:685) 	at org.deeplearning4j.examples.trajectorypredictiontransformer.LocationNextNeuralNetworkV7_04.main(LocationNextNeuralNetworkV7_04.java:207)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant