pyjuice.inputs

pyjuice.inputs(var: Union[int, Sequence[int]], num_node_blocks: int = 0, dist: Distribution = <pyjuice.nodes.distributions.distributions.Distribution object>, params: Optional[Tensor] = None, num_nodes: int = 0, block_size: int = 0, **kwargs) InputNodes

Construct a vector of input nodes defined on the same variable and have the same input distribution.

Parameters:
  • var (Union[int,Sequence[int]]) – the variable ID (or a list of variable IDs if the parameter dist is a multivariate distribution)

  • num_node_blocks (int) – number of node blocks each of size block_size. I.e., the total number of nodes is num_node_blocks * block_size

  • dist (Distribution) – the input distribution from pyjuice.nodes.distributions

  • params (Optional[Tensor]) – an optional tensor that defines the parameters of the nodes

  • num_nodes (int) – an alternative of num_node_blocks; if set, it should be divicible by block_size

  • block_size (int) – block size of the nodes; it does not change the semantics of the nodes, but will affect the speed of the compiled PC

Returns:

an InputNodes object (a subclass of CircuitNodes)