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

Make more functions/modules/traits public #796

Closed
M1ngXU opened this issue Jun 22, 2023 · 3 comments
Closed

Make more functions/modules/traits public #796

M1ngXU opened this issue Jun 22, 2023 · 3 comments

Comments

@M1ngXU
Copy link
Contributor

M1ngXU commented Jun 22, 2023

When creating new models I always find myself needing to use "private" functions/modules/traits, and I thus have my own branch of dfdx that exposes more "internal" stuff, especially:

  • Gradients: It's impossible to implement a custom Model with its own backpropagation as all methods are pub(crate)
  • TensorLike/GhostTensor: TensorLike is useful to get a reference to the data without cloning it and GhostTensor for Gradients (though it's not necessary)
  • special cpu/cuda functions: index_to_i, launch_cfg are also required to compute forward/backward passes
  • and probably much more ...

Can the visibility be changed, maybe only with an additional feature?

@coreylowman
Copy link
Owner

Yeah just open PRs for these honestly, we can discuss more specifics on each one individually!

@coreylowman
Copy link
Owner

Mentioning #814 which also made a variety of apis public

@coreylowman
Copy link
Owner

I'm going to close this for now - if anyone has specific requests, just open a PR with the change, definitely open to whatever people want (I've discovered a lot through trying to make an external nn layer)

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