-
Notifications
You must be signed in to change notification settings - Fork 4
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
Dataset shape #4
Comments
Hello, Do you have some code I could look at? We expect an array with shape [N, num_features] so you need to flatten the images. |
Hi this was my latest attempt, but I don't think I am flattening the images here...not entirely sure how haha #from spectral_metric.estimator import CumulativeGradientEstimator #(X_train, y_train), test_data = fashion_mnist.load_data() Normalize the images.X_train = (X_train / 255) - 0.5 reshape dataset to have a single channelX_train = X_train.reshape((X.shape[0],28,28,1)) estimator = CumulativeGradientEstimator() |
You can flatten the images with: X_train = X_train.reshape((X.shape[0],-1)) |
then I get a similar error: boolean index did not match indexed array along dimension 1; dimension is 784 but corresponding boolean dimension is 10 |
Ah I see the issue, you must not call y_train = y_train.reshape([-1]) |
Thank you so much! That worked and MNIST Fashion has a CSG of 0.61860741 in case anyone else needs to know! |
Yep! And that kinda makes sense doesn't it! :) |
Hello again, just had a quick question about the metrics in your paper, did you take an average for CSGs at all over a certain number of calculations? |
This is the average over 20 runs I think (it's been a while)? But the standard deviation was very small as you can see in Figure 2. |
That's amazing thank you so much! As you may have guessed I am using the CSG from your paper in my own work and I just want to make sure the MNIST Fashion CSG value is inline with the others1 I really appreciate your help! |
Sorry last question, do you have a reference for the github project that you would prefer I use or just reference your paper again? |
Referencing the CVPR paper is perfect thank you. |
WHen it is available, send me a link and I'll add it to the README :) |
I will thank you!
… On 21 Jan 2022, at 17:53, Frédéric Branchaud-Charron ***@***.***> wrote:
WHen it is available, send me a link and I'll add it to the README :)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.
|
Hello again, |
Yeah sure. For the paper, we got CIFAR10 embeddings using an autoencoder and ran t-SNE on it. We used MultiCoreTSNE. CNN encoder code: https://github.com/Dref360/spectral_metric/blob/master/experiments/embedding/cnn_autoencoder.py To compare datasets, they need to be from similar embedding and in the paper, we only showed scores for CNN+t-SNE I think. |
Thank you! |
Hello,
Trying to use this to figure out the CSG of MNIST Fashion loaded from keras. No matter what pre-processing I try I keep getting a shape error. I figure it should be similar to whatever pre-processing was used on normal MNIST and was hoping you could help?
Here is the error I am getting:
boolean index did not match indexed array along dimension 1; dimension is 28 but corresponding boolean dimension is 10
The text was updated successfully, but these errors were encountered: