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

BENDRClassifier Error #73

Open
Ctsap opened this issue Nov 18, 2021 · 1 comment · May be fixed by #75
Open

BENDRClassifier Error #73

Ctsap opened this issue Nov 18, 2021 · 1 comment · May be fixed by #75

Comments

@Ctsap
Copy link

Ctsap commented Nov 18, 2021

Hello, I'm trying to follow the basic.ipynb walkthrough with the use of BENDR model provided from the bendr branch . The problem is on the process.fit() method and more specifically, on models.py line 116:

def forward(self, *x):
        features = self.features_forward(*x)
        if self.return_features:
            return self.classifier_forward(features), features
        else:
            return self.classifier_forward(features)

By adding the .t() pytorch method on the

return self.classifier_forward(features.t()), features

the error seems to be solved. I believe this may occur somewhere else also.

Moreover, the BENDR model seems to not apply the batch size configuration from .yml file. I set a batch size of 4 and an error occured. When setting to 11 (magic number) the model is training.

Thank you in advance for your time and the incorporation of BENDR on dn3 library!

kostasde added a commit that referenced this issue Dec 2, 2021
Added tests for pre-made models.
@kostasde kostasde linked a pull request Dec 2, 2021 that will close this issue
@kostasde
Copy link
Collaborator

kostasde commented Dec 2, 2021

Yup, those are some strange errors... Thanks for bringing this to my attention. I've managed to use this module without problems before somehow, but despite that there was a blatant bug in the BENDRClassifier code.

I think I've fixed it now in the attached PR, but it doesn't explain how you get it working with the magic number...

Would you mind running the following test before I merge (from within dn3/tests) python3 -m unittest testTrainables.TestIncludedModels

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

Successfully merging a pull request may close this issue.

2 participants