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

Generate out_dim dynamically #73

Open
sfluegel05 opened this issue Feb 7, 2025 · 1 comment · May be fixed by #74
Open

Generate out_dim dynamically #73

sfluegel05 opened this issue Feb 7, 2025 · 1 comment · May be fixed by #74
Assignees

Comments

@sfluegel05
Copy link
Collaborator

I was wondering if we could explore dynamically setting the out_dim parameter in the setup method of the LightningModule , leveraging the fact that it inherits DataHooks. This way, the model could fetch the number of labels (num_of_labels) directly from the data module after it's loaded.

By doing this, we could avoid requiring the out_dim parameter to be explicitly passed in the command line every time. Instead, the model could dynamically adapt based on the dataset being used. This would simplify the workflow and reduce potential user errors.

Originally posted by @aditya0by0 in #64 (comment)

@sfluegel05
Copy link
Collaborator Author

I think this is something worth investigating. It might that there are some constraints in the architecture that don't allow a dynamic calculation of out_dim, but I am not sure about that. @aditya0by0 If you have some time on your hands, please have a look and maybe try to implement a solution.

@aditya0by0 aditya0by0 linked a pull request Feb 23, 2025 that will close this issue
@aditya0by0 aditya0by0 linked a pull request Feb 23, 2025 that will close 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

Successfully merging a pull request may close this issue.

2 participants