You could create a new custom nn.Module and add it into the nn.Sequential container:
class ShiftLayer(nn.Module):
    def __init__(self, b):
        super().__init__()
        self.register_buffer('b', b)
        
    def forward(self, x):
        return x + self.b

class Generator(nn.Module):
    def __init__(self, ngpu):
        super(Generator, self).__init__()
        self.ngpu = ngpu
        self.main = nn.Sequential(
            # input is Z, going into a convolution
            nn.ConvTranspose2d( nz, ngf * 8, 4, 1, 0, bias=False),
            ShiftLayer(b=torch.tensor([2.])),
            nn.BatchNorm2d(ngf * 8),
            ...

Registering b as a buffer will make sure that the to() operation such as model.to('cuda') will move this buffer to the specified device etc.
Also, it will be stored in the state_dict of the module so that you could save and load it properly.