191024eb73fdd05e6d3c6667f14cc2062368f9c0,pyprob/trace.py,Trace,end,#Trace#Any#,66

Before Change


                self.samples.append(sample)
        self.samples_uncontrolled = [s for s in self._samples_all if (not s.control) and (not s.observed)]
        self.samples_observed = [s for s in self._samples_all if s.observed]
        self.log_prob_observed = util.to_variable(sum([util.safe_torch_sum(s.log_prob) for s in self.samples_observed])).view(-1)

        self.log_prob = util.to_variable(sum([util.safe_torch_sum(s.log_prob) for s in self._samples_all if s.control or s.observed])).view(-1)
        self.length = len(self.samples)

After Change


        self.variables_observed = [v for v in self.variables if v.observed]
        self.variables_observable = [v for v in self.variables if v.observable]
        self.log_prob = sum([torch.sum(v.log_prob) for v in self.variables if v.control or v.observed])
        self.log_prob_observed = sum([torch.sum(v.log_prob) for v in self.variables_observed])
        self.length = len(self.variables)
        self.length_controlled = len(self.variables_controlled)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: pyprob/pyprob
Commit Name: 191024eb73fdd05e6d3c6667f14cc2062368f9c0
Time: 2018-09-19
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/trace.py
Class Name: Trace
Method Name: end


Project Name: lcswillems/torch-rl
Commit Name: 2143ec0e8e6a02fade949bf15d9670500ce06234
Time: 2018-04-18
Author: lcswillems@gmail.com
File Name: torch_ac/algos/base.py
Class Name: BaseAlgo
Method Name: collect_transitions


Project Name: BindsNET/bindsnet
Commit Name: c3498e8064176494925856449a4aab2c45701c09
Time: 2019-07-19
Author: hananel@hazan.org.il
File Name: bindsnet/network/nodes.py
Class Name: IzhikevichNodes
Method Name: forward