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

Hyperparameters of MLP part should be changed, if it refers to the paper #22

Closed
jhpjhp1118 opened this issue Dec 7, 2023 · 2 comments
Closed

Comments

@jhpjhp1118
Copy link

I appreciate for your code :)

I want to suggest an issue about hyperparameters.
I think, according to the paper, hyperparameters of MLP part should be changed.

According to Appendix B of the paper, "mlp_hidden_mults" is multiplied to "input_size",
and "l" is shared embedding dimension

The code should be changed as below. (class TabTransformer() - def init())

[Original code]

input_size = (dim * self.num_categories) + num_continuous
l = input_size // 8

hidden_dimensions = list(map(lambda t: l * t, mlp_hidden_mults))

[Modified code]

input_size = (dim * self.num_categories) + num_continuous
l = dim // 8 # to be used shared embedding

hidden_dimensions = list(map(lambda t: input_size * t, mlp_hidden_mults))

I think it could be very confusing because the author of the paper used two kinds of "l" parameters (size of the input & dimension of shared embedding)

Other person already created issue about shared embedding, so the code should be modified considering this issue too.
#12

Please check whether my opinion is correct or not.

Thank you.

@lucidrains
Copy link
Owner

hey Joon-hyuk! thanks for raising this issue

do you want to see if 43ecec9 takes care of your issue, as well as lack of shared embedding feature?

@jhpjhp1118
Copy link
Author

Dear lucidrains,

I checked.
Your commit is better than my requested commit for this whole project 👍

Thank you for adressing this issue. 😄

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