Hi,
If I understand correctly, you want more than just “initialize” the weigts based on the other conv, you want the weigts to be a functions of the other convs one?
In that case, they should have similar parameters, because the weight and bias tensors won’t have the same size if you have different input and output channels.
If they have the same parems, you can write a simple custom module:
from torch.nn import functional as F

class LinkedConv(nn.Module):
    def __init__(self, other_conv):
        # To prevent nn from thinking that we have a submodule with learnable parameters
        # we put it in a list (that nn won't inspect when looking for nn.Modules).
        self.other_conv = [other_conv]

    def forward(self, input):
        other_conv = self.other_conv[0]
        # I just square here but you can do anything differentiable
        my_weights  = other_conv .weight ** 2
        my_bias  = other_conv.bias ** 2
        # I also assume you have exactly the same params as the other_conv
        return F.conv2d(input, my_weights, my_bias, other_conv.stride,
                        other_conv.padding, other_conv.dilation, other_conv.groups)

You can see [here] (https://github.com/pytorch/pytorch/blob/5e06fa0bafb53c1c1a1203c74ddc08209ad87f84/torch/nn/modules/conv.py#L318-L320 15) the original forward method for Conv2d to see the difference.
Then, you can create your convolutions as:
self.conv_1 = nn.Conv2d(in_channels=16, out_channels=32, kernel_size=3, padding=1)
self.conv_2 = LinkedConv(self.conv_1)

If your convs won’t have the same params and you have a given algo to change the weights size, you can add some args to the LinkedConv class and have a more complex function that creates my_weights.