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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting test prediction labels per image #57

Open
Nicholas-Autio-Mitchell opened this issue Feb 12, 2018 · 1 comment
Open

Getting test prediction labels per image #57

Nicholas-Autio-Mitchell opened this issue Feb 12, 2018 · 1 comment

Comments

@Nicholas-Autio-Mitchell

First of all, thank you for this wonderful implementation. Not only does it work like a charm, I am learning a lot about how to use Tensorflow effectively 馃憤

I trained the code with all default on the MNIST dataset, which returned an accuracy of 99.49 %. That great!

I am now trying to classify some of my own handwritten MNIST digits. I have created 15,000 samples, black and white digits, with the same dimensions as MNIST. I created a small function to feed my data into main.py, and eventually got things working.

My problem is that I get a test-accuracy of ~9%, which equates to random guessing on the 10 classes!

For this reason, I would like to get the predicted labels back for each of the images, so that I can try to debug. Is there an easy way to do this? Could you please provide any hints?

Any help would be much appreciated!

@naturomics
Copy link
Owner

I created a tool to visualize the predicted labels. you can use it directly.

The idea of that tool is get all the predicted labels(10 labels) for each sample, then we get an matrix with shape [num_sample, num_labels]. For each label, plot the point (sample_id, probability) in the R^2 coordinate. Finally you will get a cool picture, see the gif example here.

The tool can be found here.

What you need to do in the code is save the predicted labels/activation probability, and just plot it. See my CapsLayer repo for details.

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