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
FalseTrue: Cause theOp’s original graph being used during compilation, theOpwill 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 withlop_overrides.'default': Do not override, use default grad() resultOpFromGraph: Override with another OpFromGraph, should accept inputs as the same order and types of
inputsandoutput_gradsarguments as one would specify in :meth:`Op.grad`() method.callable: Should take two args:
inputsandoutput_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_overridesabove, but for theOp.L_op()method.'default': Do not override, use the defaultOp.L_op()resultOpFromGraph: Override with another OpFromGraph, should accept inputs as the same order and types of
inputs,outputsandoutput_gradsarguments as one would specify inOp.grad()method.callable: Should take three args:
inputs,outputsandoutput_grads. Each argument is expected to be a list ofVariable. Must return list ofVariable.NullType instance: Treat as non-differentiable DisconnectedType instance: Treat as disconnected gradient, numerically gives zero
list: Each OpFromGraph/callable must return a singleVariable. 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 defaultOp.R_op()resultOpFromGraph: Override with another OpFromGraph, should accept inputs as the same order and types of
inputsandeval_pointsarguments as one would specify inOp.R_op()method.callable: Should take two args:
inputsandeval_points. Each argument is expected to be a list ofVariable. Must return list ofVariable.NullType instance: Treat as non-differentiable DisconnectedType instance: Treat as zero since DisconnectedType is not yet supported in
Op.R_op().list: EachOpFromGraph/callable must return a singleVariable. Each list element corresponds to a specific output ofOp.R_op(), length of list must be equal to number of outputs. connection_pattern If notNone, this will be used as the connection_pattern for thisOp.- name
A name for debugging purposes.
- kwargs
Check
pytensor.function()for more arguments, only works when not inline.