pyjuice.nodes.distributions.SoftEvidenceCategorical
- class pyjuice.nodes.distributions.SoftEvidenceCategorical(num_cats: int, _dual_flow_backward: bool = True)
A class representing a Categorical distribution that allows external soft evidence.
- Note:
with top-k soft evidence (i.e. when soft_evidence_cat_ids is supplied), pass the candidate axis SORTED BY CATEGORY ID – see
sort_soft_evidence_candidates(). The forward is bound by the params gather addressed through cat_ids, so the candidate order dominates its cost: 4.3x on the CoDD/latent config for a 0.06 ms sort. Sorting is semantically a no-op.- Parameters:
num_cats (int) – number of categories
Methods
num_param_flows()The number of parameter flows per node.
num_parameters()The number of parameters per node.
Attributes
need_meta_parametersA flag indicating whether users need to pass in meta-parameters to the constructor of InputNodes.