-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Python classifier.py crash when running classification.ipynb #2041
Comments
Hmm, though doing this means that in the next section of classification.ipynb, when oversampling is switched off, the results don't make sense: print 'prediction shape:', prediction[0].shape
plt.plot(prediction[0])
print 'predicted class:', prediction[0].argmax() prediction shape: () unless I remove the indexing: print 'prediction shape:', prediction.shape
plt.plot(prediction)
print 'predicted class:', prediction.argmax() prediction shape: (1000,) |
I think that the problem is that some of the Python code hasn't yet been updated to match #1970 which was recently merged into master. Perhaps there should be tests for python/caffe/classifier.py and all the steps in examples/classification.ipynb. Ideally, these kinds of bugs would be identified by Travis before major changes are merged. |
@seanbell is right about the cause. We haven't come up with a good method for auto-checking the notebooks but these would be valuable integration checks that catch these kinds of issues. I suppose we could at least check they not crash. There hasn't been a chance to fix these yet but this is on the list. If anyone has fixed these already, PRs are welcome. |
Done. I don't know why squeeze was specifying the axis though, so hope I'm not breaking anything. |
I am facing the same problem but with detector.py Am getting the same error: removing the arguments from when I execute the following piece of code from http://nbviewer.ipython.org/github/bvlc/caffe/blob/master/examples/detection.ipynb ---->predictions_df = pd.DataFrame(np.vstack(df.prediction.values), columns=labels_df['name']) I got the following error If I modify it as below, It runs fine but I am not sure if what I did is right. Please let me know the right fix for this. |
I was getting the following error running the classification.ipynb notebook on a fresh installation on OSX:
which I was able to fix by deleting the arguments for squeeze so that 86 looks like this:
The text was updated successfully, but these errors were encountered: