e0a6320eea05765e913448d81f2fe9a0185cc2b7,qucumber/rbm/rbm.py,ComplexRBM,compute_batch_gradients,#ComplexRBM#Any#Any#Any#Any#Any#Any#,637

Before Change


				// gradient. Use the actual data point, v0.
				g_weights_amp -= torch.einsum("i,j->ij",(h0_amp_batch[row_count], v0)) / batch_size 
				g_vb_amp      -= v0 / batch_size
				g_hb_amp      -= h0_amp_batch[row_count] / batch_size

			else:
				// Compute the rotated gradients.

After Change


				// If there are no non-trivial unitaries for the data point v0, 
				// calculate the positive phase of regular (i.e. non-complex RBM)
				// gradient. Use the actual data point, v0.
				prob_amp = F.sigmoid(F.linear(v0, self.rbm_amp.weights, self.rbm_amp.hidden_bias))
				g_weights_amp -= torch.einsum("i,j->ij", (prob_amp, v0)) / batch_size
				g_vb_amp      -= v0 / batch_size
				g_hb_amp      -= prob_amp / batch_size
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: PIQuIL/QuCumber
Commit Name: e0a6320eea05765e913448d81f2fe9a0185cc2b7
Time: 2018-07-06
Author: ijsdevlu@edu.uwaterloo.ca
File Name: qucumber/rbm/rbm.py
Class Name: ComplexRBM
Method Name: compute_batch_gradients


Project Name: HyperGAN/HyperGAN
Commit Name: 4608f590d88eeaf1661e3911a7ee943f75269321
Time: 2017-06-07
Author: martyn@255bits.com
File Name: hypergan/losses/category_loss.py
Class Name: CategoryLoss
Method Name: _create


Project Name: explosion/thinc
Commit Name: a88f1cd9d4aba6e8a0abc156aa0d64c165967bd9
Time: 2015-12-19
Author: honnibal@gmail.com
File Name: tests/test_neural_net.py
Class Name:
Method Name: test_xor_deep