aeppl.scan.convert_outer_out_to_in#

aeppl.scan.convert_outer_out_to_in(input_scan_args, outer_out_vars, new_outer_input_vars, inner_out_fn)[source]#

Convert outer-graph outputs into outer-graph inputs.

Parameters
  • input_scan_args (ScanArgs) – The source Scan arguments.

  • outer_out_vars (Iterable[TensorVariable]) – The outer-graph output variables that are to be converted into an outer-graph input.

  • new_outer_input_vars (Dict[TensorVariable, TensorVariable]) – The variables used for the new outer-graph input computed for outer_out_vars.

  • inner_out_fn (Callable[[Dict[TensorVariable, TensorVariable]], Iterable[TensorVariable]]) – A function that takes the remapped outer-out variables and produces new inner-graph outputs. This can be used to transform the outer_out_varss’ corresponding inner-graph outputs into something else entirely, like log-probabilities.

  • Outputs

  • =======

  • an (A ScanArgs object for a Scan in which outer_out_vars has been converted to) –

  • input. (outer-graph) –

Return type

ScanArgs