htjb / margarine

Code to replicate posterior probability distributions with bijectors/KDEs and perform marginal KL/bayesian dimensionality calculations.
MIT License
13 stars 8 forks source link

Introduced the kwargs activation_func to margarine for choosing activ… #57

Closed DilyOng closed 4 months ago

DilyOng commented 4 months ago

Introducing a new keyword called activation_func to margarine to allow users to choose what activation function to use.

htjb commented 4 months ago

This looks great @DilyOng thanks! Could you just add a description of the new kwarg to the class? In the same style as the existing descriptions of things like 'number_networks'?

It would be helpful to add a similar kwarg to the clustered.py class as well so that we keep a consistent api? It's a similar change to the one you have made in maf.py but instead of adding self.activation_func to the made object you need to add it to the call to MAF on line 229 in clustered.py. Thanks!

DilyOng commented 4 months ago

@htjb Thank you for your comments. I've implemented your suggestions in the latest updates.

htjb commented 4 months ago

Hi @DilyOng, looks good! Could you please copy the description of the new activation function kwarg into clustered.py and you need to add the kwarg too e.g. self.activation_func = kwargs.pop('activation_func', 'tanh') to clustered.py below self.parameters in the def __init__(): function.

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.41%. Comparing base (93471be) to head (f7ea848).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #57 +/- ## ========================================== + Coverage 82.35% 82.41% +0.06% ========================================== Files 5 5 Lines 578 580 +2 ========================================== + Hits 476 478 +2 Misses 102 102 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.