5f229ae1c23263175c8b089c481b80229adc64e0,qucumber/nn_states/neural_state.py,NeuralStateBase,gradient,#NeuralStateBase#,275

Before Change


                    samp = samples[indices == i, :]
                    sample_grad = self.rotated_gradient(basis, samp)
                    grad[0] += sample_grad[0]  // Accumulate amplitude RBM gradient
                    grad[1] += sample_grad[1]  // Accumulate phase RBM gradient
                else:
                    sample_grad = [
                        self.rbm_am.effective_energy_gradient(samples[indices == i, :]),

After Change


                bases = np.array(list(bases)).reshape(1, -1)

            unique_bases, indices = np.unique(bases, axis=0, return_inverse=True)
            indices = torch.Tensor(indices).to(samples)

            for i in range(unique_bases.shape[0]):
                basis = unique_bases[i, :]
                rot_sites = np.where(basis != "Z")[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: PIQuIL/QuCumber
Commit Name: 5f229ae1c23263175c8b089c481b80229adc64e0
Time: 2019-12-23
Author: emerali@users.noreply.github.com
File Name: qucumber/nn_states/neural_state.py
Class Name: NeuralStateBase
Method Name: gradient


Project Name: eriklindernoren/PyTorch-GAN
Commit Name: fc9e5824ad7bd3094f5012dc6fc3d2348481a2f4
Time: 2019-04-02
Author: eriklindernoren@live.se
File Name: implementations/bicyclegan/bicyclegan.py
Class Name:
Method Name: sample_images


Project Name: tristandeleu/pytorch-maml-rl
Commit Name: 551436a8106f3292db2f7d1a6da3462f2aa8bb6b
Time: 2018-06-14
Author: tristan.deleu@gmail.com
File Name: maml_rl/policies/normal_mlp.py
Class Name: NormalMLPPolicy
Method Name: __init__