You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue is in the examples and thus in the tutorials
I believe the current implementation of the ChildSumTreeLSTMCell in examples/pytorch/tree_lstm/tree_lstm.py does not conform to the Child-Sum Tree LSTM described in the original paper or the documentation. Specifically, the implementation lacks the weight matrix $W^{(f)}$ described in Equation 4 of the paper.
Evidence:
The equation specifies a weight matrix $W^{(f)}$, which contributes to the calculation of forget gates for each child node. However, this matrix is not implemented in the code.
The current code does not include a linear layer to compute $W^{(f)}$. This deviation can lead to incorrect behavior, as the forget gates are not calculated as per the paper.
Proposed Fix:
I have drafted an alternative implementation based on the original implementation of the ChildSumTreeLSTMCell that incorporates $W^{(f)}$ with the old API:
Currently, the cell isn't training as I imagined for my use case and I was hoping to strike a balance between helping to fix the example and getting confirmation that the cell is implemented correctly.
Request for Feedback:
Could someone confirm whether the proposed implementation aligns with the Child-Sum Tree LSTM described in the paper?
Any suggestions to align it with DGL best practices?
Thank you for your time and assistance. I am happy to further contribute by refining the implementation or submitting a PR if this approach is confirmed to be correct (new to Graphs and DGL).
The text was updated successfully, but these errors were encountered:
📚 Documentation
Issue is in the examples and thus in the tutorials
I believe the current implementation of the$W^{(f)}$ described in Equation 4 of the paper.
ChildSumTreeLSTMCell
inexamples/pytorch/tree_lstm/tree_lstm.py
does not conform to the Child-Sum Tree LSTM described in the original paper or the documentation. Specifically, the implementation lacks the weight matrixEvidence:
The equation specifies a weight matrix$W^{(f)}$ , which contributes to the calculation of forget gates for each child node. However, this matrix is not implemented in the code.
The current code does not include a linear layer to compute$W^{(f)}$ . This deviation can lead to incorrect behavior, as the forget gates are not calculated as per the paper.
Proposed Fix:
I have drafted an alternative implementation based on the original implementation of the$W^{(f)}$ with the old API:
ChildSumTreeLSTMCell
that incorporatesObserved Issue with Training:
Currently, the cell isn't training as I imagined for my use case and I was hoping to strike a balance between helping to fix the example and getting confirmation that the cell is implemented correctly.
Request for Feedback:
Thank you for your time and assistance. I am happy to further contribute by refining the implementation or submitting a PR if this approach is confirmed to be correct (new to Graphs and DGL).
The text was updated successfully, but these errors were encountered: