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

Feature request for predict #4

Open
jgbos opened this issue Dec 15, 2014 · 2 comments
Open

Feature request for predict #4

jgbos opened this issue Dec 15, 2014 · 2 comments

Comments

@jgbos
Copy link

jgbos commented Dec 15, 2014

This is just a feature request for a future updates to make single image prediction work easy for the user, not a bug.

Let input to NeuralNetwork.predict in

deeppy/deeppy/feed_forward/neural_network.py

be a single image (I'm testing with MNIST). Currently it requires a 4-dimensional array, I have to reshape a single image from the data set from a [1,28,28] to a [1,1,28,28] to execute.

@andersbll
Copy link
Owner

I would prefer not to check array dimensionality in convnet layers for every call to fprop(). How about raising an error in _setup() if the array is not 4D?

@jgbos
Copy link
Author

jgbos commented Dec 15, 2014

As far as I can tell predict does not call _setup() though (only needed for testing, not training). I was only really thinking the feature would be needed in predict (unfortunately there isn't a np.atleast_4d function), but I think it is perfectly fine to raise an error to inform the user of the requirement. Took some debugging to figure out why it was failing, but I also just started playing with this today.

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

2 participants