(self, x)
return self._residual(x) + self._shortcut(F.relu(x))
Residual block feedforward function.
Residual block feedforward function.
Residual block feedforward function .
def forward(self, x):
        """
        Residual block feedforward function.
        """
        # NOTE: to completely reproduce pytorch, we use F.relu(x) to replace x in shortcut
        # since pytorch use inplace relu in residual branch.
        return self._residual(x) + self._shortcut(F.relu(x))
def forward ( self , x ) : # NOTE: to completely reproduce pytorch, we use F.relu(x) to replace x in shortcut # since pytorch use inplace relu in residual branch. return self . _residual ( x ) + self . _shortcut ( F . relu ( x ) )