9da14aeaa19cd8cf3fa72e740892f433859e522a,infcomp/modules.py,ProposalUniformDiscrete,forward,#ProposalUniformDiscrete#Any#Any#,71
 
Before Change
        self.softmax_boost = softmax_boost
        init.xavier_uniform(self.lin1.weight, gain=np.sqrt(2.0))
    def forward(self, x, samples=None):
        return True, F.softmax(self.lin1(x).mul_(self.softmax_boost))
    def logpdf(self, x, samples):
        _, proposal_output = self.forward(x)
        batch_size = len(samples)
        log_weights = torch.log(proposal_output + util.epsilon)
After Change
        init.xavier_uniform(self.lin1.weight, gain=init.calculate_gain("relu"))
        init.xavier_uniform(self.lin2.weight)
    def forward(self, x, samples=None):
        x = self.drop(x)
        x = F.relu(self.lin1(x))
        x = self.drop(x)
        x = F.softmax(self.lin2(x).mul_(self.softmax_boost))
        return True, x
    def logpdf(self, x, samples):
        _, proposal_output = self.forward(x)
        batch_size = len(samples)
        log_weights = torch.log(proposal_output + util.epsilon)

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 16
Instances
 Project Name: pyprob/pyprob
 Commit Name: 9da14aeaa19cd8cf3fa72e740892f433859e522a
 Time: 2017-06-01
 Author: atilimgunes.baydin@gmail.com
 File Name: infcomp/modules.py
 Class Name: ProposalUniformDiscrete
 Method Name: forward
 Project Name: pyprob/pyprob
 Commit Name: 9da14aeaa19cd8cf3fa72e740892f433859e522a
 Time: 2017-06-01
 Author: atilimgunes.baydin@gmail.com
 File Name: infcomp/modules.py
 Class Name: ProposalFlip
 Method Name: forward
 Project Name: pyprob/pyprob
 Commit Name: 9da14aeaa19cd8cf3fa72e740892f433859e522a
 Time: 2017-06-01
 Author: atilimgunes.baydin@gmail.com
 File Name: infcomp/modules.py
 Class Name: ProposalUniformDiscrete
 Method Name: forward
 Project Name: pyprob/pyprob
 Commit Name: 9da14aeaa19cd8cf3fa72e740892f433859e522a
 Time: 2017-06-01
 Author: atilimgunes.baydin@gmail.com
 File Name: infcomp/modules.py
 Class Name: ProposalDiscrete
 Method Name: forward