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

Product partition function #189

Merged
merged 8 commits into from
Feb 14, 2024
Merged

Product partition function #189

merged 8 commits into from
Feb 14, 2024

Conversation

IrwinChay
Copy link
Collaborator

Added product partition function, support more-than-two product (so that reparam structured in a binary tree)

Modified binary.py and functional.py to support more-than-two product

Modified categorical.py to support partition function of the product of categorical layers (so Log-Sum-Exp is used instead of Log-Integ-Exp for categorical layers, but the code structure is still the same)

TODO:
as a result of the design of symb_cfg, need to fetch num_input_units from the parameters in a clumsy way (in def get_integral() of prod_ef.py), should we re-structure symb_cfg to simplify this?

clean TODOs in def get_partial(), similar to the helper functions in def get_integral()

Could add tests for product partition function and more-than-two product, already tested locally

@IrwinChay IrwinChay requested a review from lkct January 29, 2024 12:28
Copy link
Member

@lkct lkct left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The major problem is we should not make a Layer inside symbolic workflow. Yet we need to refer to self in func for ParamConst.

Need further discussion.

Copy link
Member

@lkct lkct left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as below

@lkct lkct force-pushed the product_partition branch from c2cb302 to d59f031 Compare February 13, 2024 18:01
@lkct lkct force-pushed the product_partition branch from d59f031 to 04ef1f4 Compare February 13, 2024 19:15
@lkct lkct force-pushed the product_partition branch from 5bead0e to becf4ab Compare February 14, 2024 14:57
Copy link
Member

@lkct lkct left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after the commits above, just some minor things left.
for what's unresolved we discuss in other issues

@lkct lkct merged commit ba30c43 into main Feb 14, 2024
2 checks passed
@lkct lkct deleted the product_partition branch February 14, 2024 16:15
@lkct lkct added the enhancement New feature or request label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants