2ca9af3e7717279defb5f62404eeb2c4befac3e4,src/garage/tf/policies/categorical_mlp_policy.py,CategoricalMLPPolicy,_initialize,#CategoricalMLPPolicy#,95
Before Change
def _initialize(self):
Initialize policy.
with tf.compat.v1.variable_scope(self.name) as vs:
self._variable_scope = vs
state_input = tf.compat.v1.placeholder(tf.float32,
shape=(None, None,
self._obs_dim))
self._dist = self.model.build(state_input).dist
self._f_prob = tf.compat.v1.get_default_session().make_callable(
[tf.argmax(self._dist.sample(), -1), self._dist.probs],
feed_list=[state_input])
def build(self, state_input, name=None):
Build policy.
Args:
After Change
state_input = tf.compat.v1.placeholder(tf.float32,
shape=(None, None,
self._obs_dim))
dist = self.build(state_input).outputs
self._f_prob = tf.compat.v1.get_default_session().make_callable(
[tf.argmax(dist.sample(), -1), dist.probs],
feed_list=[state_input])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: rlworkgroup/garage
Commit Name: 2ca9af3e7717279defb5f62404eeb2c4befac3e4
Time: 2020-06-29
Author: ahtsans@gmail.com
File Name: src/garage/tf/policies/categorical_mlp_policy.py
Class Name: CategoricalMLPPolicy
Method Name: _initialize
Project Name: rlworkgroup/garage
Commit Name: 2ca9af3e7717279defb5f62404eeb2c4befac3e4
Time: 2020-06-29
Author: ahtsans@gmail.com
File Name: src/garage/tf/policies/gaussian_mlp_policy.py
Class Name: GaussianMLPPolicy
Method Name: build
Project Name: rlworkgroup/garage
Commit Name: 2ca9af3e7717279defb5f62404eeb2c4befac3e4
Time: 2020-06-29
Author: ahtsans@gmail.com
File Name: src/garage/tf/policies/categorical_cnn_policy.py
Class Name: CategoricalCNNPolicy
Method Name: _initialize