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

Bug in MnistClassifier.py #3

Closed
Maximophone opened this issue Jan 11, 2018 · 0 comments
Closed

Bug in MnistClassifier.py #3

Maximophone opened this issue Jan 11, 2018 · 0 comments
Assignees

Comments

@Maximophone
Copy link
Contributor

def predict(self,X,features_names):
        assert X.shape[0]>=1, 'wrong shape 0'
        if X.shape[0]==784:
                  X = X.reshape(1,28,28,1)
        else:
                  X = X.reshape(X.shape[0],28,28,1)

What if I want to make a prediction on a batch of 784 images? As a general guideline, the interface methods can check the format of what they receive but should not assume different formats and implement different behaviours accordingly.

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