pyhgf.model.hybrid.Residual#

class pyhgf.model.hybrid.Residual(branch)[source]#

The shortcut junction: output = input + branch(input).

Backward, the error is copied into both routes — unchanged along the shortcut, translated through the branch — and the two messages add.

Parameters:

branch (PCModule)

__init__(branch)[source]#
Parameters:

branch (PCModule)

Methods

__init__(branch)

init_state()

Return the branch's state (the shortcut itself carries no state).