a9ffb59e662398d9c40ed6ebe288e5542715e0dd,examples/pytorch/tree_lstm/tree_lstm.py,ChildSumTreeLSTMCell,reduce_func,#ChildSumTreeLSTMCell#Any#,28
Before Change
// equation (4)
wx = self.W_f(nodes.data["x"]).unsqueeze(1) // shape: (B, 1, H)
uh = self.U_f(nodes.mailbox["h"]) // shape: (B, deg, H)
f = th.sigmoid(wx + uh) // shape: (B, deg, H)
// equation (7) second term
c_tild = th.sum(f * nodes.mailbox["c"], 1)
return {"h_tild" : h_tild, "c_tild" : c_tild}
After Change
def reduce_func(self, nodes):
h_cat = nodes.mailbox["h"].view(nodes.mailbox["h"].size(0), -1)
f = th.sigmoid(self.U_f(h_cat)).view(*nodes.mailbox["h"].size())
c = th.sum(f * nodes.mailbox["c"], 1)
return {"iou": self.U_iou(h_cat), "c": c}
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: dmlc/dgl
Commit Name: a9ffb59e662398d9c40ed6ebe288e5542715e0dd
Time: 2018-11-13
Author: zihaoye.cs@gmail.com
File Name: examples/pytorch/tree_lstm/tree_lstm.py
Class Name: ChildSumTreeLSTMCell
Method Name: reduce_func
Project Name: numenta/NAB
Commit Name: 71fb6cdaed3895331a5476e3d46f74371aa38f22
Time: 2014-09-10
Author: jgokhale@jays-mbp.corp.numenta.com
File Name: nab/lib/scoring.py
Class Name: Scorer
Method Name: getScore
Project Name: uber/pyro
Commit Name: 28eb8ed1d64fb8d5cfddc58d65fc48aeace6f436
Time: 2020-06-28
Author: info@stefanwebb.me
File Name: pyro/distributions/transforms/spline.py
Class Name: ConditionalSpline
Method Name: condition
Project Name: ultralytics/yolov3
Commit Name: b269ed7b2975ee4f646819a78bf8c20771089e29
Time: 2019-11-25
Author: glenn.jocher@ultralytics.com
File Name: models.py
Class Name: SwishImplementation
Method Name: backward