pymc.SymbolicRandomVariable.__init__#

SymbolicRandomVariable.__init__(*args, ndim_supp, **kwargs)[source]#
Parameters
inputs

The inputs to the graph.

outputs

The outputs to the graph.

inline

Defaults to False

True : Cause the Op’s original graph being used during compilation, the Op will not be visible in the compiled graph but rather its internal graph.

False : will use a pre-compiled function inside.

grad_overrides

Defaults to 'default'. This argument is mutually exclusive with lop_overrides.

'default' : Do not override, use default grad() result

OpFromGraph: Override with another OpFromGraph, should accept inputs as the same order and types of inputs and output_grads arguments as one would specify in :meth:`Op.grad`() method.

callable: Should take two args: inputs and output_grads. Each argument is expected to be a list of :class:`Variable `. Must return list of :class:`Variable `.

lop_overrides

Defaults to 'default'.

This argument is mutually exclusive with grad_overrides.

These options are similar to the grad_overrides above, but for the Op.L_op() method.

'default': Do not override, use the default Op.L_op() result

OpFromGraph: Override with another OpFromGraph, should accept inputs as the same order and types of inputs, outputs and output_grads arguments as one would specify in Op.grad() method.

callable: Should take three args: inputs, outputs and output_grads. Each argument is expected to be a list of Variable. Must return list of Variable.

NullType instance: Treat as non-differentiable DisconnectedType instance: Treat as disconnected gradient, numerically gives zero

list: Each OpFromGraph/callable must return a single Variable. Each list element corresponds to gradient of a specific input, length of list must be equal to number of inputs.

rop_overrides

One of {'default', OpFromGraph, callable, Variable}.

Defaults to 'default'.

'default': Do not override, use the default Op.R_op() result

OpFromGraph: Override with another OpFromGraph, should accept inputs as the same order and types of inputs and eval_points arguments as one would specify in Op.R_op() method.

callable: Should take two args: inputs and eval_points. Each argument is expected to be a list of Variable. Must return list of Variable.

NullType instance: Treat as non-differentiable DisconnectedType instance: Treat as zero since DisconnectedType is not yet supported in Op.R_op().

list: Each OpFromGraph/callable must return a single Variable. Each list element corresponds to a specific output of Op.R_op(), length of list must be equal to number of outputs. connection_pattern If not None, this will be used as the connection_pattern for this Op.

name

A name for debugging purposes.

kwargs

Check pytensor.function() for more arguments, only works when not inline.