5886ac2bd8593b69f87181b20d2d4ddaa27dfbce,tf_agents/networks/encoding_network.py,EncodingNetwork,call,#EncodingNetwork#Any#Any#Any#,124

Before Change


      batch_squash = utils.BatchSquash(outer_rank)

    // Get single observation out regardless of nesting.
    states = tf.cast(nest.flatten(observation)[0], tf.float32)

    if self._batch_squash:
      states = batch_squash.flatten(states)

After Change


      outer_rank = nest_utils.get_outer_rank(
          observation, self.input_tensor_spec)
      batch_squash = utils.BatchSquash(outer_rank)
      observation = nest.map_structure(batch_squash.flatten, observation)

    if self._preprocessing_layers is None:
      processed = observation
    else:
      processed = []
      for obs, layer in zip(
          nest.flatten_up_to(self.input_tensor_spec, observation),
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: tensorflow/agents
Commit Name: 5886ac2bd8593b69f87181b20d2d4ddaa27dfbce
Time: 2019-01-18
Author: ebrevdo@google.com
File Name: tf_agents/networks/encoding_network.py
Class Name: EncodingNetwork
Method Name: call


Project Name: google-research/google-research
Commit Name: da6b040e254710f0df907d838db51f4f2cc9bf93
Time: 2021-03-08
Author: ldennis@google.com
File Name: social_rl/multiagent_tfagents/multiagent_ppo.py
Class Name: MultiagentPPO
Method Name: get_single_agent_specs


Project Name: google-research/google-research
Commit Name: da6b040e254710f0df907d838db51f4f2cc9bf93
Time: 2021-03-08
Author: ldennis@google.com
File Name: social_rl/multiagent_tfagents/multiagent_ppo.py
Class Name: MultiagentPPO
Method Name: extract_single_agent_trajectory


Project Name: ray-project/ray
Commit Name: 1775e89f262111791fabfd40f80a24f74738fe54
Time: 2020-04-28
Author: sven@anyscale.io
File Name: rllib/models/tf/tf_action_dist.py
Class Name: MultiActionDistribution
Method Name: logp