dmlc / dmlc/dgl

Functionize NN modules to allow dynamic weight matrices

Open
#3,237 1 comment 0 reactions 0 assignees View on GitHub
feature request
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.