10bdd46d76d35cfba3a484b007ea3e14af801813,qucumber/rbm/purification_rbm.py,PurificationRBM,prob_v_given_ha,#PurificationRBM#Any#Any#Any#,222

Before Change


                  active given the hidden and auxiliary states
        :rtype torch.Tensor:
        
        if h.dim() < 2 and a.dim() < 2:  // create extra axis, if needed
            h = h.unsqueeze(0)
            a = a.unsqueeze(0)
            unsqueezed = True
        else:
            unsqueezed = False

        p = torch.addmm(
            torch.addmm(self.visible_bias.data, h, self.weights_W.data),
            a,
            self.weights_U.data,
            out=out,
        ).sigmoid_()

        if unsqueezed:
            return p.squeeze_(0)  // remove superfluous axis, if it exists
        else:
            return p

    def sample_a_given_v(self, v, out=None):
        rSample/generate an auxiliary state given a visible state

        :param v: The visible state

After Change


                  active given the hidden and auxiliary states
        :rtype torch.Tensor:
        
        return torch.addmm(
            torch.addmm(self.visible_bias.data, h, self.weights_W.data, out=out),
            a,
            self.weights_U.data,
            out=out,
        ).sigmoid_()

    def sample_a_given_v(self, v, out=None):
        rSample/generate an auxiliary state given a visible state
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 16

Instances


Project Name: PIQuIL/QuCumber
Commit Name: 10bdd46d76d35cfba3a484b007ea3e14af801813
Time: 2019-12-09
Author: emerali@users.noreply.github.com
File Name: qucumber/rbm/purification_rbm.py
Class Name: PurificationRBM
Method Name: prob_v_given_ha


Project Name: PIQuIL/QuCumber
Commit Name: 10bdd46d76d35cfba3a484b007ea3e14af801813
Time: 2019-12-09
Author: emerali@users.noreply.github.com
File Name: qucumber/rbm/purification_rbm.py
Class Name: PurificationRBM
Method Name: prob_a_given_v


Project Name: PIQuIL/QuCumber
Commit Name: 10bdd46d76d35cfba3a484b007ea3e14af801813
Time: 2019-12-09
Author: emerali@users.noreply.github.com
File Name: qucumber/rbm/binary_rbm.py
Class Name: BinaryRBM
Method Name: prob_h_given_v


Project Name: PIQuIL/QuCumber
Commit Name: 10bdd46d76d35cfba3a484b007ea3e14af801813
Time: 2019-12-09
Author: emerali@users.noreply.github.com
File Name: qucumber/rbm/binary_rbm.py
Class Name: BinaryRBM
Method Name: prob_v_given_h


Project Name: PIQuIL/QuCumber
Commit Name: 10bdd46d76d35cfba3a484b007ea3e14af801813
Time: 2019-12-09
Author: emerali@users.noreply.github.com
File Name: qucumber/rbm/purification_rbm.py
Class Name: PurificationRBM
Method Name: prob_v_given_ha


Project Name: PIQuIL/QuCumber
Commit Name: 10bdd46d76d35cfba3a484b007ea3e14af801813
Time: 2019-12-09
Author: emerali@users.noreply.github.com
File Name: qucumber/rbm/purification_rbm.py
Class Name: PurificationRBM
Method Name: prob_h_given_v