141903a21846d54aaf09aa95a3bcdd8b673ee116,starry/ops/theano_op.py,StarryOp,perform,#StarryOp#Any#Any#Any#,35

Before Change


        y, u, theta, xo, yo, ro, zo = inputs
        self.map[:, :] = y
        self.map[:] = u
        ro_ = tt.switch(tt.lt(zo, 0.0), ro, 0.0).eval()
        outputs[0][0] = self.map.flux(theta=theta, xo=xo, yo=yo, ro=ro_)

    def grad(self, inputs, gradients):

After Change


        // HACK: nudge at least one ylm away from zero
        // to force starry to compute all derivatives
        if (len(y) > 2) and (y[2] == 0):
            self.map[1, 0] = 1.e-15
        outputs[0][0] = self.map.flux(theta=theta, xo=xo, yo=yo, zo=zo, ro=ro)
            
    def grad(self, inputs, gradients):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: rodluger/starry
Commit Name: 141903a21846d54aaf09aa95a3bcdd8b673ee116
Time: 2019-02-05
Author: rodluger@gmail.com
File Name: starry/ops/theano_op.py
Class Name: StarryOp
Method Name: perform


Project Name: LiyuanLucasLiu/LM-LSTM-CRF
Commit Name: d3fba39499378674d9240a35b3410457d6aed4c6
Time: 2017-11-27
Author: llychinalz@gmail.com
File Name: model/crf.py
Class Name: CRFLoss_vb
Method Name: forward


Project Name: rodluger/starry
Commit Name: 141903a21846d54aaf09aa95a3bcdd8b673ee116
Time: 2019-02-05
Author: rodluger@gmail.com
File Name: starry/ops/theano_op.py
Class Name: StarryGradOp
Method Name: perform