torch.nn.Conv2d custom filters

What if instead of a random initial weigh, the filter is created using a custom function?
suppose there are two parameters(variables) that are responsible for producing an entry in the weight matrix (2 for each entry for example). Something like this .
how should we go about such cases?

1 Like