14dff43845b836f7e94035ca42f967a484dfb8a3,thinc/backends/ops.py,Ops,lstm,#Ops#Any#Any#Any#Any#,265

Before Change


        hf, hi, ho, hc = act_pieces
        hf[:] = self.sigmoid(hf)
        hi[:] = self.sigmoid(hi)
        ho[:] = self.sigmoid(ho)
        hc[:] = self.xp.tanh(hc)

        cells[:] = hf * prev + hi * hc
        output[:] = self.xp.tanh(cells) * ho

After Change


        // Activations is: hf, hi, ho, hc
        self.sigmoid(acts[0], inplace=True)
        self.sigmoid(acts[1], inplace=True)
        self.sigmoid(acts[2], inplace=True)
        self.xp.tanh(acts[3], out=acts[3])

        cells[:] = acts[0]
        cells *= prev
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: explosion/thinc
Commit Name: 14dff43845b836f7e94035ca42f967a484dfb8a3
Time: 2020-01-04
Author: honnibal+gh@gmail.com
File Name: thinc/backends/ops.py
Class Name: Ops
Method Name: lstm


Project Name: keras-team/keras
Commit Name: a981a8c42c316831183cac7598266d577a1ea96a
Time: 2016-04-29
Author: francois.chollet@gmail.com
File Name: keras/layers/core.py
Class Name: Highway
Method Name: call


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: stanfordnlp/stanza
Commit Name: fcea9fee573e854177b4b9af1cfd1b20029ed21e
Time: 2018-10-11
Author: qipeng@users.noreply.github.com
File Name: models/common/char_model.py
Class Name: CharacterModel
Method Name: forward


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