april-tools / cirkit

a python framework to build, learn and reason about probabilistic circuits and tensor networks
https://cirkit-docs.readthedocs.io/en/latest/
GNU General Public License v3.0
71 stars 1 forks source link

Fix `ExpFamilyLayer` #144

Closed lkct closed 11 months ago

lkct commented 11 months ago

Closes #93 Closes #141

  1. Inspected the bug in #93. It seems that the bug was actually resolved by #121 but we were not sure at that time(?). Anyway the current version should be much clearer and should be correct.
  2. Removed reparam in ExpFamilyLayer and used Reparameterization class instead.
  3. Reworked docstrings for all ExpFamilyLayers and annotated the propagation of tensor shapes.
  4. Removed projection from params to natural params. Natural params are now directly obtained from reparam class.
  5. Unified interface of ExpFamilyLayer to the new Layer interface.

TODO: there should be more unit tests -- tracked by #145