in ppo_ewma/impala_cnn.py [0:0]
def residual(self, x):
# inplace should be False for the first relu, so that it does not change the input,
# which will be used for skip connection.
# getattr is for backwards compatibility with loaded models
if getattr(self, "batch_norm", False):
x = self.bn0(x)
x = F.relu(x, inplace=False)
x = self.conv0(x)
if getattr(self, "batch_norm", False):
x = self.bn1(x)
x = F.relu(x, inplace=True)
x = self.conv1(x)
return x