def METHOD_NAME(self, x):
    x = self.conv1(x)
    outs = []
    for i, layer_name in enumerate(self.layers):
        layer = getattr(self, layer_name)
        x = layer(x)
        if i in self.out_indices:
            outs.append(x)
    if len(outs) == 1:
        return outs[0]
    else:
        return tuple(outs)