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

Export utilities in partial.jl #1189

Closed
bertini97 opened this issue Jan 8, 2025 · 2 comments
Closed

Export utilities in partial.jl #1189

bertini97 opened this issue Jan 8, 2025 · 2 comments

Comments

@bertini97
Copy link

Currently, WeightInitializers relies on partial.jl to have pre-filled functions as weight initializers. This is not exported to the user, so to write your own init function that behaves similarly I have to manually copy it.

I think writing a custom initializer is not that weird of a task. For example, my need is to have a matrix with a specific spectral radius, something that is not possible with the stock functions.

I think it's just a matter of exporting utilities inside partial.jl. Let me know what you think.

@bertini97 bertini97 changed the title Make writing initializers easier Export utilities in partial.jl Jan 8, 2025
@MartinuzziFrancesco
Copy link
Member

MartinuzziFrancesco commented Jan 8, 2025

you can always

using WeightInitializers: PartialFunction

to have access to PartialFunction.Partial, so it's not strictly needed to export it.

As a sidenote for initializers with a set spectral radius you can check out ReservoirComputing's rand_sparse

@bertini97
Copy link
Author

you can always

using WeightInitializers: PartialFunction

Ah, perfect. Sorry, I didn't know.

As a sidenote for initializers with a set spectral radius you can check out ReservoirComputing's rand_sparse

Thank you.

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