tree-lstm icon indicating copy to clipboard operation
tree-lstm copied to clipboard

Reduce func in NaryTreeLSTMCell

Open haorannlp opened this issue 4 years ago • 2 comments

Hi, I notice that in your implementation of the NaryTreeLSTMCell, the reduce function returns return {'iou': nodes.data['iou'] + self.U_iou(h_cat), 'c': c} while implementations in DGL returns only return {'iou': self.U_iou(h_cat), 'c': c} What's the motivation to add nodes.data['iou'] here?

haorannlp avatar Mar 26 '20 03:03 haorannlp

It's a bug in DGL implementation. Following the original paper, adding nodes.data['iou'] is correct.

inyukwo1 avatar Mar 26 '20 06:03 inyukwo1

It's a bug in DGL implementation. Following the original paper, adding nodes.data['iou'] is correct.

Could you explain more about the bug? Is it related to the leaf nodes and non-terminal nodes? If I want to implement a bidirectional Tree-LSTM, add nodes.data['iou'] would cause a bug I guess.

haorannlp avatar Mar 26 '20 07:03 haorannlp