diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 1438aa87..f3a6b245 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/python-api/generated/pyjuice.nodes.InputNodes.doctree b/.doctrees/python-api/generated/pyjuice.nodes.InputNodes.doctree index 1410c43a..fb83063a 100644 Binary files a/.doctrees/python-api/generated/pyjuice.nodes.InputNodes.doctree and b/.doctrees/python-api/generated/pyjuice.nodes.InputNodes.doctree differ diff --git a/.doctrees/python-api/generated/pyjuice.nodes.ProdNodes.doctree b/.doctrees/python-api/generated/pyjuice.nodes.ProdNodes.doctree index d2879e7a..ffba16ec 100644 Binary files a/.doctrees/python-api/generated/pyjuice.nodes.ProdNodes.doctree and b/.doctrees/python-api/generated/pyjuice.nodes.ProdNodes.doctree differ diff --git a/.doctrees/python-api/generated/pyjuice.nodes.SumNodes.doctree b/.doctrees/python-api/generated/pyjuice.nodes.SumNodes.doctree index 44472c25..0a45f1b4 100644 Binary files a/.doctrees/python-api/generated/pyjuice.nodes.SumNodes.doctree and b/.doctrees/python-api/generated/pyjuice.nodes.SumNodes.doctree differ diff --git a/.doctrees/python-api/generated/pyjuice.nodes.distributions.Bernoulli.doctree b/.doctrees/python-api/generated/pyjuice.nodes.distributions.Bernoulli.doctree index 9b661583..46515f01 100644 Binary files a/.doctrees/python-api/generated/pyjuice.nodes.distributions.Bernoulli.doctree and b/.doctrees/python-api/generated/pyjuice.nodes.distributions.Bernoulli.doctree differ diff --git a/.doctrees/python-api/generated/pyjuice.nodes.distributions.Categorical.doctree b/.doctrees/python-api/generated/pyjuice.nodes.distributions.Categorical.doctree index 22d9626c..63348c5d 100644 Binary files a/.doctrees/python-api/generated/pyjuice.nodes.distributions.Categorical.doctree and b/.doctrees/python-api/generated/pyjuice.nodes.distributions.Categorical.doctree differ diff --git a/.doctrees/python-api/nodes.doctree b/.doctrees/python-api/nodes.doctree index 302e1c3a..496230b7 100644 Binary files a/.doctrees/python-api/nodes.doctree and b/.doctrees/python-api/nodes.doctree differ diff --git a/_sources/python-api/generated/pyjuice.nodes.InputNodes.rst.txt b/_sources/python-api/generated/pyjuice.nodes.InputNodes.rst.txt index d5363f39..e6a6a514 100644 --- a/_sources/python-api/generated/pyjuice.nodes.InputNodes.rst.txt +++ b/_sources/python-api/generated/pyjuice.nodes.InputNodes.rst.txt @@ -13,35 +13,14 @@ .. autosummary:: - ~InputNodes._clear_tensor_circuit_hooks - ~InputNodes._run_init_callbacks ~InputNodes.duplicate ~InputNodes.get_params - ~InputNodes.get_source_ns - ~InputNodes.has_params ~InputNodes.init_parameters - ~InputNodes.is_input - ~InputNodes.is_prod - ~InputNodes.is_sum - ~InputNodes.is_tied - ~InputNodes.provided ~InputNodes.set_meta_params ~InputNodes.set_params - ~InputNodes.set_source_ns - .. rubric:: Attributes - - .. autosummary:: - - ~InputNodes.DEFAULT_BLOCK_SIZE - ~InputNodes.INIT_CALLBACKS - ~InputNodes.num_chs - ~InputNodes.num_edges - ~InputNodes.num_nodes - ~InputNodes.scope - \ No newline at end of file diff --git a/_sources/python-api/generated/pyjuice.nodes.ProdNodes.rst.txt b/_sources/python-api/generated/pyjuice.nodes.ProdNodes.rst.txt index 98348d0c..f7b02a17 100644 --- a/_sources/python-api/generated/pyjuice.nodes.ProdNodes.rst.txt +++ b/_sources/python-api/generated/pyjuice.nodes.ProdNodes.rst.txt @@ -13,38 +13,13 @@ .. autosummary:: - ~ProdNodes._clear_tensor_circuit_hooks - ~ProdNodes._construct_edges - ~ProdNodes._run_init_callbacks ~ProdNodes.duplicate - ~ProdNodes.get_source_ns - ~ProdNodes.has_params ~ProdNodes.init_parameters ~ProdNodes.is_block_sparse - ~ProdNodes.is_input - ~ProdNodes.is_prod ~ProdNodes.is_sparse - ~ProdNodes.is_sum - ~ProdNodes.is_tied - ~ProdNodes.provided - ~ProdNodes.set_source_ns - .. rubric:: Attributes - - .. autosummary:: - - ~ProdNodes.BLOCK_SPARSE - ~ProdNodes.DEFAULT_BLOCK_SIZE - ~ProdNodes.INIT_CALLBACKS - ~ProdNodes.SPARSE - ~ProdNodes.edge_type - ~ProdNodes.num_chs - ~ProdNodes.num_edges - ~ProdNodes.num_nodes - ~ProdNodes.scope - \ No newline at end of file diff --git a/_sources/python-api/generated/pyjuice.nodes.SumNodes.rst.txt b/_sources/python-api/generated/pyjuice.nodes.SumNodes.rst.txt index eb41c050..d2d7bb17 100644 --- a/_sources/python-api/generated/pyjuice.nodes.SumNodes.rst.txt +++ b/_sources/python-api/generated/pyjuice.nodes.SumNodes.rst.txt @@ -13,28 +13,11 @@ .. autosummary:: - ~SumNodes._clear_tensor_circuit_hooks - ~SumNodes._construct_edges - ~SumNodes._get_edges_as_mask - ~SumNodes._reorder_edges - ~SumNodes._run_init_callbacks - ~SumNodes._standardize_chs ~SumNodes.duplicate ~SumNodes.gather_parameters ~SumNodes.get_params - ~SumNodes.get_source_ns - ~SumNodes.get_zero_param_mask - ~SumNodes.has_params ~SumNodes.init_parameters - ~SumNodes.is_input - ~SumNodes.is_prod - ~SumNodes.is_sum - ~SumNodes.is_tied - ~SumNodes.provided - ~SumNodes.set_edges ~SumNodes.set_params - ~SumNodes.set_source_ns - ~SumNodes.set_zero_param_mask ~SumNodes.update_param_flows ~SumNodes.update_parameters @@ -42,15 +25,4 @@ - .. rubric:: Attributes - - .. autosummary:: - - ~SumNodes.DEFAULT_BLOCK_SIZE - ~SumNodes.INIT_CALLBACKS - ~SumNodes.num_chs - ~SumNodes.num_edges - ~SumNodes.num_nodes - ~SumNodes.scope - \ No newline at end of file diff --git a/_sources/python-api/generated/pyjuice.nodes.distributions.Bernoulli.rst.txt b/_sources/python-api/generated/pyjuice.nodes.distributions.Bernoulli.rst.txt index 781ad6ac..c2daa464 100644 --- a/_sources/python-api/generated/pyjuice.nodes.distributions.Bernoulli.rst.txt +++ b/_sources/python-api/generated/pyjuice.nodes.distributions.Bernoulli.rst.txt @@ -9,24 +9,6 @@ .. automethod:: __init__ - .. rubric:: Methods - - .. autosummary:: - - ~Bernoulli._get_constructor - ~Bernoulli.bk_flow_fn - ~Bernoulli.em_fn - ~Bernoulli.fw_mar_fn - ~Bernoulli.get_metadata - ~Bernoulli.get_signature - ~Bernoulli.init_meta_parameters - ~Bernoulli.init_parameters - ~Bernoulli.normalize_parameters - ~Bernoulli.num_param_flows - ~Bernoulli.num_parameters - ~Bernoulli.sample_fn - ~Bernoulli.set_meta_parameters - diff --git a/_sources/python-api/generated/pyjuice.nodes.distributions.Categorical.rst.txt b/_sources/python-api/generated/pyjuice.nodes.distributions.Categorical.rst.txt index 2e49d041..ecec25d4 100644 --- a/_sources/python-api/generated/pyjuice.nodes.distributions.Categorical.rst.txt +++ b/_sources/python-api/generated/pyjuice.nodes.distributions.Categorical.rst.txt @@ -9,24 +9,6 @@ .. automethod:: __init__ - .. rubric:: Methods - - .. autosummary:: - - ~Categorical._get_constructor - ~Categorical.bk_flow_fn - ~Categorical.em_fn - ~Categorical.fw_mar_fn - ~Categorical.get_metadata - ~Categorical.get_signature - ~Categorical.init_meta_parameters - ~Categorical.init_parameters - ~Categorical.normalize_parameters - ~Categorical.num_param_flows - ~Categorical.num_parameters - ~Categorical.sample_fn - ~Categorical.set_meta_parameters - diff --git a/python-api/generated/pyjuice.nodes.InputNodes.html b/python-api/generated/pyjuice.nodes.InputNodes.html index f0cdb933..35c00be8 100644 --- a/python-api/generated/pyjuice.nodes.InputNodes.html +++ b/python-api/generated/pyjuice.nodes.InputNodes.html @@ -97,7 +97,19 @@
A class representing vectors of input nodes.
+
|
-- | |
|
-- | |
|
-+ | Create a duplication of the current node with the same specification (i.e., number of nodes, block size, distribution). |
|
-- | |
|
-- | |
|
-+ | Get the input node parameters. |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- |
Attributes
-
|
-- | |
|
-- | |
|
-- | |
|
-+ | Randomly initialize node parameters. |
|
-+ | |
|
+Set the meta-parameters such as the mask of input nodes with the MaskedCategorical distribution. |
|
|
-+ | |
|
+Set the input node parameters. |
A class representing vectors of product nodes.
+num_node_blocks (int) – number of node blocks
chs (Sequence[CircuitNodes]) – sequence of child nodes
edge_ids (Optional[Tensor]) – a matrix of size [# product node blocks, # children] - the ith product node block is connected to the `edge_ids[i,j]`th node block in the jth child
block_size (int) – block size
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
Attributes
-
|
-- |
|
-- |
|
-- |
|
-- |
|
-- |
|
-+ |
|
+Create a duplication of the current node with the same specification (i.e., number of nodes, block size). |
|
-+ |
|
+Randomly initialize node parameters. |
|
-+ |
|
+Whether the edge type is BLOCK_SPARSE. |
|
-+ |
|
+Whether the edge type is SPARSE. |
A class representing vectors of sum nodes.
+num_node_blocks (int) – number of node blocks
chs (Sequence[CircuitNodes]) – sequence of child nodes
edge_ids (Optional[Tensor]) – a matrix of size [2, # edges] - every size-2 column vector [i,j] defines a set of edges that fully connect the ith sum node block and the jth child node block
block_size (int) – block size
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-+ | Create a duplication of the current node with the same specification (i.e., number of nodes, block size). |
|
-+ | Update parameters from the current node to the compiled pyjuice.TensorCircuit. |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- | |
|
-- |
Attributes
-
|
-- | |
|
-+ | Get the sum node parameters. |
|
-+ | |
|
+Randomly initialize node parameters. |
|
|
-+ | |
|
+Set the sum node parameters. |
|
|
-+ | |
|
+Update parameter flows from pyjuice.TensorCircuit to the current node. |
|
|
-+ | |
|
+Update parameters from pyjuice.TensorCircuit to the current node. |
Methods
-
|
-- |
|
-Accumulate statistics and compute input parameter flows. |
-
|
-Parameter update with EM Args: local_offsets: [BLOCK_SIZE] the local indices of the to-be-processed input nodes params_ptr: pointer to the parameter vector param_flows_ptr: pointer to the parameter flow vector s_pids: [BLOCK_SIZE] start parameter index (offset) for all input nodes s_pfids: [BLOCK_SIZE] start parameter flow index (offset) for all input nodes metadata_ptr: pointer to metadata s_mids_ptr: pointer to the start metadata index (offset) mask: [BLOCK_SIZE] indicate whether each node should be processed step_size: EM step size (0, 1] pseudocount: pseudocount BLOCK_SIZE: CUDA block size |
-
|
-Forward evaluation for log-probabilities. |
-
|
-- |
|
-- |
|
-Initialize meta-parameters for num_nodes nodes. |
-
|
-Initialize parameters for num_nodes nodes. |
-
|
-- |
|
-The number of parameter flows per node. |
-
|
-The number of parameters per node. |
-
|
-Sample from the distribution. |
-
|
-Assign meta-parameters to self._params. |
-
Attributes
|
-- |
|
-Accumulate statistics and compute input parameter flows. |
-
|
-Parameter update with EM Args: local_offsets: [BLOCK_SIZE] the local indices of the to-be-processed input nodes params_ptr: pointer to the parameter vector param_flows_ptr: pointer to the parameter flow vector s_pids: [BLOCK_SIZE] start parameter index (offset) for all input nodes s_pfids: [BLOCK_SIZE] start parameter flow index (offset) for all input nodes metadata_ptr: pointer to metadata s_mids_ptr: pointer to the start metadata index (offset) mask: [BLOCK_SIZE] indicate whether each node should be processed step_size: EM step size (0, 1] pseudocount: pseudocount BLOCK_SIZE: CUDA block size |
-
|
-Forward evaluation for log-probabilities. |
-
|
-- |
|
-- |
|
-Initialize meta-parameters for num_nodes nodes. |
-
|
-Initialize parameters for num_nodes nodes. |
-
|
-- |
|
-The number of parameter flows per node. |
-
|
-The number of parameters per node. |
-
|
-Sample from the distribution. |
-
|
-Assign meta-parameters to self._params. |
-
Attributes
- | + | A class representing vectors of input nodes. |
- | + | A class representing vectors of product nodes. |
- | + | A class representing vectors of sum nodes. |