25694a657492c97276d201a98cff47266060254a,paysage/layers.py,ExponentialLayer,sample_state,#ExponentialLayer#Any#,95

Before Change


        return -B.log(loc)

    def sample_state(self, loc):
        return numpy.random.exponential(loc).astype(numpy.float32)
        
    def random(self, loc):
        return numpy.random.exponential(numpy.ones_like(loc)).astype(numpy.float32)
        

After Change


        return -B.log(loc)

    def sample_state(self, loc):
        r = self.rand.get(*loc.shape)        
        while r.shape != loc.shape:
            r = self.rand.get(*loc.shape)
        return -B.log(r) / loc            
        
    def random(self, loc):
        r = self.rand.get(*loc.shape)        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 15

Instances


Project Name: drckf/paysage
Commit Name: 25694a657492c97276d201a98cff47266060254a
Time: 2016-12-23
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: paysage/layers.py
Class Name: ExponentialLayer
Method Name: sample_state


Project Name: drckf/paysage
Commit Name: 25694a657492c97276d201a98cff47266060254a
Time: 2016-12-23
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: paysage/layers.py
Class Name: ExponentialLayer
Method Name: sample_state


Project Name: drckf/paysage
Commit Name: 25694a657492c97276d201a98cff47266060254a
Time: 2016-12-23
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: paysage/layers.py
Class Name: ExponentialLayer
Method Name: random


Project Name: drckf/paysage
Commit Name: 25694a657492c97276d201a98cff47266060254a
Time: 2016-12-23
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: paysage/layers.py
Class Name: GaussianLayer
Method Name: random


Project Name: drckf/paysage
Commit Name: 25694a657492c97276d201a98cff47266060254a
Time: 2016-12-23
Author: charlesfisher@Charless-MacBook-Pro.local
File Name: paysage/layers.py
Class Name: BernoulliLayer
Method Name: random