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

Testset in TripletMNIST and SiameseMNIST are not fixed #27

Open
luuyin opened this issue Apr 29, 2019 · 1 comment
Open

Testset in TripletMNIST and SiameseMNIST are not fixed #27

luuyin opened this issue Apr 29, 2019 · 1 comment

Comments

@luuyin
Copy link

luuyin commented Apr 29, 2019

Great work! Thanks for sharing such elegant codes.

I have a small question, in TripletMNIST(Dataset) class. your annotation about testsets is "Test: Creates fixed triplets for testing"

However, in the code it is
triplets = [[i,
random_state.choice(self.label_to_indices[self.test_labels[i].item()]),
random_state.choice(self.label_to_indices[
np.random.choice(
list(self.labels_set - set([self.test_labels[i].item()]))
)
])
]

I think it maybe should be the followings:

        triplets = [[i,
                     random_state.choice(self.label_to_indices[self.test_labels[i].item()]),
                     random_state.choice(self.label_to_indices[
                                            random_state.choice(
                                                 list(self.labels_set - set([self.test_labels[i].item()]))
                                             )
                                         ])
                     ]

I means use random_state.choice instead of np.random.choice of the original code, in order to create fixed testsets.

I am not sure If I am right, can we discuss it?

@adambielski
Copy link
Owner

Thanks @luuyin,
By fixed triplets in the test set I mean that it's fixed throughout the training, e.g. they are randomly chosen at the beginning of the training, and after each epoch we evaluate on the same triplets - this is done regardless of using random_state or np.random
But you're right that they should be properly conditioned on random_state, I'll fix that later. Thanks!

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