21fa4e7e38567e083f98c559f8f2ae0c5573ba0f,ch15/lib/model.py,AgentA2C,__call__,#AgentA2C#,56
Before Change
mu_v, var_v = self.net(states_v)
mu = mu_v.data.cpu().numpy()
sigma = torch.sqrt(var_v).data.cpu().numpy()
actions = np.random.normal(mu, sigma)
actions = np.clip(actions, -1, 1)
return actions, agent_states
After Change
mu_v = self.net(states_v)
mu = mu_v.data.cpu().numpy()
logstd = self.net.logstd.data.cpu().numpy()
actions = mu + np.exp(logstd) * np.random.normal(size=logstd.shape)
actions = np.clip(actions, -1, 1)
return actions, agent_states
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 3
Instances
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 21fa4e7e38567e083f98c559f8f2ae0c5573ba0f
Time: 2018-02-11
Author: max.lapan@gmail.com
File Name: ch15/lib/model.py
Class Name: AgentA2C
Method Name: __call__
Project Name: rasbt/mlxtend
Commit Name: 364625b410d7978ec6837d57d4057c9fc6afde88
Time: 2016-03-12
Author: mail@sebastianraschka.com
File Name: mlxtend/regressor/base.py
Class Name: _BaseRegressor
Method Name: _init_weights
Project Name: rasbt/mlxtend
Commit Name: 15b8e291b4f100036059013106d0a68dd6ddbf7b
Time: 2016-03-16
Author: mail@sebastianraschka.com
File Name: mlxtend/regressor/base.py
Class Name: _BaseRegressor
Method Name: _init_weights
Project Name: rasbt/mlxtend
Commit Name: 364625b410d7978ec6837d57d4057c9fc6afde88
Time: 2016-03-12
Author: mail@sebastianraschka.com
File Name: mlxtend/classifier/base.py
Class Name: _BaseClassifier
Method Name: _init_weights
Project Name: hyperopt/hyperopt-sklearn
Commit Name: 897e1f85ca99903641763ca399afa25aa1ff68c8
Time: 2014-02-14
Author: james.bergstra@gmail.com
File Name: hpsklearn/components.py
Class Name:
Method Name: svc_sigmoid
Project Name: rasbt/mlxtend
Commit Name: 15b8e291b4f100036059013106d0a68dd6ddbf7b
Time: 2016-03-16
Author: mail@sebastianraschka.com
File Name: mlxtend/classifier/base.py
Class Name: _BaseClassifier
Method Name: _init_weights