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

Before 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.
				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

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: jfkirk/tensorrec
Commit Name: db4c8744b0c7fa95502e1172dd4c597e62e55b0e
Time: 2018-02-27
Author: james.f.kirk@gmail.com
File Name: tensorrec/loss_graphs.py
Class Name: WMRBLossGraph
Method Name: loss_graph


Project Name: tensorlayer/tensorlayer
Commit Name: 0158adf689bfee1b0a2a1d3718dd1c83829d005c
Time: 2017-12-18
Author: jorgemf@gmail.com
File Name: example/tutorial_imagenet_distributed.py
Class Name:
Method Name: run_evaluator