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

Serious problem with data normalize #13

Open
windingwind opened this issue Dec 24, 2021 · 0 comments
Open

Serious problem with data normalize #13

windingwind opened this issue Dec 24, 2021 · 0 comments

Comments

@windingwind
Copy link

data.py, Line91-99
The inherited attribute is 'pre_transform', while during __init__ another 'pre_tranform'(tranform v.s. tranSform) is initialized.

Here only the mean and std of 'pre_tranform'(no S) is initialized, but later used is 'pre_transform'(with S)

In this way, a serious normalize problem happens here.

        if self.pre_transform is not None:
            if hasattr(self.pre_transform, 'mean') and hasattr(self.pre_transform, 'std'):
                if self.pre_tranform.mean is None:
                    self.pre_tranform.mean = mean_train # no S
                if self.pre_transform.std is None:
                    self.pre_tranform.std = std_train # no S
            train_data = [self.pre_transform(td) for td in train_data] # with S
            val_data = [self.pre_transform(td) for td in val_data]
            test_data = [self.pre_transform(td) for td in test_data]

pytorch_coma/data.py

Lines 91 to 99 in 8446eec

if self.pre_transform is not None:
if hasattr(self.pre_transform, 'mean') and hasattr(self.pre_transform, 'std'):
if self.pre_tranform.mean is None:
self.pre_tranform.mean = mean_train
if self.pre_transform.std is None:
self.pre_tranform.std = std_train
train_data = [self.pre_transform(td) for td in train_data]
val_data = [self.pre_transform(td) for td in val_data]
test_data = [self.pre_transform(td) for td in test_data]

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