I did not get your question well. But to my understanding.
If building your own function like convolution or something == True
you can initialise your weights as torch.nn.Parameter 6.
else
you can use smthing like this:
def init_params(m):
  if type(m)==nn.Linear or type(m)==nn.Conv2d:
    m.weight.data=torch.randn(m.weight.size())*.01#Random weight initialisation
    m.bias.data=torch.zeros(m.bias.size())