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

image-data-pipeline tutorial not working #1547

Closed
plankes-projects opened this issue May 16, 2016 · 2 comments
Closed

image-data-pipeline tutorial not working #1547

plankes-projects opened this issue May 16, 2016 · 2 comments

Comments

@plankes-projects
Copy link

plankes-projects commented May 16, 2016

Hello,

I am trying to implement a simple image recognition.
I followed the tutorial on http://deeplearning4j.org/image-data-pipeline und used the following LFW images as data
Training data: http://vis-www.cs.umass.edu/lfw/lfw-a.tgz

I attached my implementation. it should be exactly like the tutorial. But i get listed error.
Additionally the Evaluation class in this tutorial has the warning rawtypes.

Exception in thread "main" java.lang.IllegalArgumentException: Shapes do not match: x.shape=[10, 784], y.shape=[10, 432]
at org.nd4j.linalg.api.parallel.tasks.cpu.CPUTaskFactory.getTransformAction(CPUTaskFactory.java:92)
at org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner.doTransformOp(DefaultOpExecutioner.java:409)
at org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner.exec(DefaultOpExecutioner.java:62)
at org.nd4j.linalg.api.ndarray.BaseNDArray.subi(BaseNDArray.java:2660)
at org.nd4j.linalg.api.ndarray.BaseNDArray.subi(BaseNDArray.java:2641)
at org.nd4j.linalg.api.ndarray.BaseNDArray.sub(BaseNDArray.java:2419)
at org.deeplearning4j.nn.layers.BaseOutputLayer.getGradientsAndDelta(BaseOutputLayer.java:154)
at org.deeplearning4j.nn.layers.BaseOutputLayer.computeGradientAndScore(BaseOutputLayer.java:98)
at org.deeplearning4j.optimize.solvers.BaseOptimizer.gradientAndScore(BaseOptimizer.java:132)
at org.deeplearning4j.optimize.solvers.BaseOptimizer.optimize(BaseOptimizer.java:151)
at org.deeplearning4j.optimize.Solver.optimize(Solver.java:52)
at org.deeplearning4j.nn.layers.BaseOutputLayer.fit(BaseOutputLayer.java:363)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.finetune(MultiLayerNetwork.java:1430)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.fit(MultiLayerNetwork.java:1482)
at org.deeplearning4j.nn.multilayer.MultiLayerNetwork.fit(MultiLayerNetwork.java:1529)
at projecta_learning.TrainingLFW.main(TrainingLFW.java:64)

TrainingLFW.txt

@plankes-projects
Copy link
Author

The problem is following:

In the config, the last layer defines .nOut(NUM_OF_CLASSES)
This has to match the number of subdirectories you have.

@lock
Copy link

lock bot commented Jan 21, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant