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

Index out of range: 0 -> 89+0 to 0 #33

Open
alysak6075 opened this issue Nov 11, 2014 · 0 comments
Open

Index out of range: 0 -> 89+0 to 0 #33

alysak6075 opened this issue Nov 11, 2014 · 0 comments

Comments

@alysak6075
Copy link

Hi. First of all this is a great library that you have created.

I set up the Mnist test example and everything runs fine.

When I try to create my own with images as files and using the Mnist example as a staring point i try to convert the png file into a byte array and use the name of the file as a label but i get this as an error:

Exception in thread "main" java.lang.IllegalArgumentException: Index out of range: 0 -> 89+0 to 0
at com.github.neuralnetworks.util.Tensor.lambda$getIndex$14(Tensor.java:150)
at com.github.neuralnetworks.util.Tensor$$Lambda$25/1853205005.applyAsInt(Unknown Source)
at java.util.stream.IntPipeline$3$1.accept(Unknown Source)
at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Unknown Source)
at java.util.Spliterator$OfInt.forEachRemaining(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.IntPipeline.reduce(Unknown Source)
at java.util.stream.IntPipeline.sum(Unknown Source)
at com.github.neuralnetworks.util.Tensor.getIndex(Tensor.java:154)
at com.github.neuralnetworks.util.Tensor.set(Tensor.java:93)
at com.github.neuralnetworks.util.Matrix.set(Matrix.java:102)
at main.LetterTargetMultiNeuronOutputConverter.convert(LetterTargetMultiNeuronOutputConverter.java:23)
at main.LetterInputProvider.getNextUnmodifiedInput(LetterInputProvider.java:122)
at com.github.neuralnetworks.training.TrainingInputProviderImpl.getNextInput(TrainingInputProviderImpl.java:19)
at com.github.neuralnetworks.training.OneStepTrainer.train(OneStepTrainer.java:42)
at main.my_test1.my_cnn(my_test1.java:51)
at main.my_test1.main(my_test1.java:27)

can you please explain why this would happen. Im new to NN and am not sure how to use the Mnist example to make it work with png files instead of the Mnist IDX files.

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