274ec230054107d30bb91de43ec42b7393170928,qucumber/utils/training_statistics.py,,NLL,#,97

Before Change


    Z = nn_state.compute_normalization(space)
    eps = 0.000001
    if train_bases is None:
        for i in range(len(samples)):
            NLL -= (cplx.norm_sqr(nn_state.psi(samples[i])) + eps).log()
            NLL += Z.log()
    else:

After Change


                    if samples[i, nn_state.num_visible - j - 1] == 1:
                        ind += pow(2, j)
                probs_r = cplx.norm_sqr(psi_r[:, ind]) / Z
                NLL -= probs_to_logits(probs_r).item()
    return (NLL / float(len(samples))).item()


def KL(nn_state, target_psi, space, bases=None, **kwargs):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: PIQuIL/QuCumber
Commit Name: 274ec230054107d30bb91de43ec42b7393170928
Time: 2019-07-17
Author: emerali@users.noreply.github.com
File Name: qucumber/utils/training_statistics.py
Class Name:
Method Name: NLL


Project Name: hunkim/PyTorchZeroToAll
Commit Name: e6acec63de2d3e6dff20422e8b07837d33a7e670
Time: 2019-06-21
Author: hameedabdulrashid@gmail.com
File Name: 09_2_softmax_mnist.py
Class Name:
Method Name: test


Project Name: PIQuIL/QuCumber
Commit Name: cfa828f6349317ce50a610cd31bb3dcf5e5ea211
Time: 2019-06-05
Author: emerali@users.noreply.github.com
File Name: qucumber/utils/training_statistics.py
Class Name:
Method Name: fidelity