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

Improved implementation of ptr-to-member-fcn for surrogate gradient #32

Merged
merged 3 commits into from
Sep 5, 2024

Conversation

heplesser
Copy link

Hi @JesusEV and @akorgor,

This PR cleans up the syntax of the pointer-to-member code by using a typedef (I found https://isocpp.org/wiki/faq/pointers-to-members helpful). Also, the map needs to be created only once as a static variable, not for each call to select_...().

@heplesser
Copy link
Author

BTW, do we have tests that check that selecting different surrogate gradient functions works?

@JesusEV
Copy link
Owner

JesusEV commented Sep 3, 2024

@heplesser Thanks a lot for this elegant approach. A test selecting different surrogate gradients sounds like a nice idea. I will work on that right now and them we can test everything before merging

@JesusEV
Copy link
Owner

JesusEV commented Sep 4, 2024

This new code passes the tests introduced in 65f6efa

@akorgor
Copy link
Collaborator

akorgor commented Sep 5, 2024

This looks good to me, thanks a lot!

@akorgor akorgor self-requested a review September 5, 2024 09:20
@akorgor akorgor merged commit 29377cb into JesusEV:eprop_bio_feature Sep 5, 2024
17 of 19 checks passed
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 this pull request may close these issues.

3 participants