Skip to content

Training accuracy #6

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

Open
francescamanni1989 opened this issue Sep 13, 2021 · 6 comments
Open

Training accuracy #6

francescamanni1989 opened this issue Sep 13, 2021 · 6 comments

Comments

@francescamanni1989
Copy link

Thanks for your implementation, very insightful!
Anyway, why training accuracy is so low?
image
I have been choosing your default hyperparameters and setting.

Thanks!

@xuyxu
Copy link
Owner

xuyxu commented Sep 13, 2021

I think there should be some problems with your way of calculating the training accuracy, could you show me the code?

@francescamanni1989
Copy link
Author

yes, ofc.
image

@xuyxu
Copy link
Owner

xuyxu commented Sep 13, 2021

Please replace the len(train_loader.dataset) in the third line with data.size(0) , this should fix your problem.

@xuyxu
Copy link
Owner

xuyxu commented Sep 13, 2021

len(train_loader.dataset) indicate the total number of batches in the dataset, instead of the number of samples in the current batch.

@francescamanni1989
Copy link
Author

Thank you! In case I want to implement the F.softmax in the forward step of the model, is it ok to do so after y_pred = self.leaf_nodes(mu)?

@xuyxu
Copy link
Owner

xuyxu commented Sep 13, 2021

Of course, this should be fine.

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