e2d3382bb4132ddb8aa586bf3c4c570be414f6af,tensorforce/models/policies/categorical_one_hot_policy.py,CategoricalOneHotPolicy,sample,#CategoricalOneHotPolicy#Any#Any#,44
Before Change
return self.dist
def sample(self, state, sample=True):
output_dist = self.session.run(self.outputs, {self.state: [state]})
output_dist = output_dist.ravel()
if sample:
action = self.dist.sample(dict(policy_output=output_dist))
After Change
return self.dist
def sample(self, state, sample=True):
sample = super(CategoricalOneHotPolicy, self).sample(state)
output_dist = sample[0]
output_dist = output_dist.ravel()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: reinforceio/tensorforce
Commit Name: e2d3382bb4132ddb8aa586bf3c4c570be414f6af
Time: 2017-03-26
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/policies/categorical_one_hot_policy.py
Class Name: CategoricalOneHotPolicy
Method Name: sample
Project Name: reinforceio/tensorforce
Commit Name: e2d3382bb4132ddb8aa586bf3c4c570be414f6af
Time: 2017-03-26
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/policies/gaussian_policy.py
Class Name: GaussianPolicy
Method Name: sample
Project Name: rail-berkeley/softlearning
Commit Name: 5d97c32fba6dab5ff8009bf350a4209f3ea5684d
Time: 2018-05-22
Author: kristian.hartikainen@gmail.com
File Name: sac/policies/gmm.py
Class Name: GMMPolicy
Method Name: get_actions