4b5f6967ad76666a376bd69dcb5aaf966c8facb6,variance_reduction/baseline_comparison_prototype.py,,,#,92
Before Change
// action = 1 if np.random.uniform() < tfprob else 0
// action = tfprob
action = 5 * (tfprob - 0.5)
print(action)
xs.append(x) // observation
// y = 1 if action == 0 else 0 // a "fake label"
ys.append(action)
After Change
// Run the policy network and get an action to take.
tfscore = sess.run(score, feed_dict={observations: x})
action = np.random.normal(loc=tfscore[0][:Out],
scale=np.abs(tfscore[0][Out:]))
xs.append(x) // observation
ys.append(action)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: flow-project/flow
Commit Name: 4b5f6967ad76666a376bd69dcb5aaf966c8facb6
Time: 2017-02-11
Author: cathywu@eecs.berkeley.edu
File Name: variance_reduction/baseline_comparison_prototype.py
Class Name:
Method Name:
Project Name: tensorlayer/tensorlayer
Commit Name: 910e1e544793c0ca9859a5a4f1c0171104166dc3
Time: 2019-03-10
Author: jingqing.zhang15@imperial.ac.uk
File Name: tests/layers/test_layers_core_basedense_dropout.py
Class Name: Layer_Core_Test
Method Name: test_layerlist
Project Name: SPFlow/SPFlow
Commit Name: 558f7ff3f0d5ffcba377647bdfba7dfdc0793abd
Time: 2018-06-20
Author: molina@cs.tu-darmstadt.de
File Name: src/spn/tests/test_cpp.py
Class Name: TestCPP
Method Name: test_bcpp