Functionize NN modules to allow dynamic weight matrices
- Dominant language
- Python
- Stars
- 14.3k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
## 🚀 Feature
We should implement NN modules as functions to allow building models with dynamically generated weights.
## Motivation
As discussed in #3190, EvolveGCN is a typical example where GCN's weight is generated by an LSTM. While `dgl.nn.GraphConv` does allow the user specifying the weights in the forward pass, other modules do not.
This is also an issue for PyTorch modules in general, and PyTorch only functionizes some of the modules like `conv2d` or `prelu` that are most likely needed for dynamic weights. So I guess the priority to implement this is reasonably low.
This issue bookkeeps the feature request.
## Alternatives
One could copy the implementation and change the weight initialization to use the generated weights.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.