Solved by shivammehta007 in post #6 
              
              
                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__()
   …