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

Test dataset is used for model selection #26

Open
gitouni opened this issue Jun 7, 2022 · 0 comments
Open

Test dataset is used for model selection #26

gitouni opened this issue Jun 7, 2022 · 0 comments

Comments

@gitouni
Copy link

gitouni commented Jun 7, 2022

Thanks for your contribution and sharing your implementation.

However, in this repo, the test dataloader is used for choosing the best model, but the best model is also used for testing. A more strict way for model selection is to split validation dataset from the training part because test dataset should be completely unseen before testing.

Some relative codes are shown as follows:

class ModelNet40(Dataset):
    def __init__(self, num_points, partition='train', gaussian_noise=False, unseen=False, factor=4):
        self.data, self.label = load_data(partition)
        self.num_points = num_points
        self.partition = partition
        self.gaussian_noise = gaussian_noise
        self.unseen = unseen
        self.label = self.label.squeeze()
        self.factor = factor
        if self.unseen:
            ######## simulate testing on first 20 categories while training on last 20 categories
            if self.partition == 'test':
                self.data = self.data[self.label>=20]
                self.label = self.label[self.label>=20]
            elif self.partition == 'train':
                self.data = self.data[self.label<20]
                self.label = self.label[self.label<20]

The partition parameter can only be set as 'test' or 'train' and partition=test is used for evaluating and selecting the best model for training.

Hope for your reply, cheers.

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

1 participant