(self, message, trigger)
Synthetic forward pass, synthetic backward pass.

        Convenience method combining `send` and `receive`. Can be used when we
        want to `send` and immediately `receive` using the same `trigger`. For
        more complex scenarios, `send` and `receive` need to be used
        separately.

        Updates the `message` estimate based on `trigger`, backpropagates
        synthetic gradient from `message` and returns a synthetic `message`
        with a synthetic gradient update operation attached.

        Works only in `training` mode, otherwise just returns the input
        `message`.
Synthetic forward pass, synthetic backward pass.
Synthetic forward pass synthetic backward pass .
def forward(self, message, trigger):
        """Synthetic forward pass, synthetic backward pass.

        Convenience method combining `send` and `receive`. Can be used when we
        want to `send` and immediately `receive` using the same `trigger`. For
        more complex scenarios, `send` and `receive` need to be used
        separately.

        Updates the `message` estimate based on `trigger`, backpropagates
        synthetic gradient from `message` and returns a synthetic `message`
        with a synthetic gradient update operation attached.

        Works only in `training` mode, otherwise just returns the input
        `message`.
        """
        if self.training:
            self.send(message, trigger)
            return self.receive(trigger)
        else:
            return message
def forward ( self , message , trigger ) : if self . training : self . send ( message , trigger ) return self . receive ( trigger ) else : return message