Yes! You can, in forward function you pass the features through a convolution layer of (nn.CovXX) and then multiply it with a scaling factor an example will be like:
class MyCustomLayer(nn.Module):
    def __init__(self, D_in, D_out, kernel_size):
        super(my_custom_layer, self).__init__()
        self.BConv_layer = nn.Conv2d(D_in, D_out, kernel_size, padding=(1))
    def forward(self, x):

        results = y * self.BConv_layer(x) # where y is your scaling factor
        return results