9ddf959bb26d5d15d4a0c9ddd6821a262866214c,a2c/a2c.py,Runner,update_obs,#Runner#,231

Before Change


    self.group_id = [0 for _ in range(nenv)]

  def update_obs(self, obs): // (self.nenv, 32, 32, 2)
    obs = np.asarray(obs, dtype=np.int32).swapaxes(1, 2).swapaxes(2, 3)
    self.obs = np.roll(self.obs, shift=-1, axis=3)
    self.obs[:, :, :, -1:] = obs[:, :, :, :]
    // could not broadcast input array from shape (4,1,32,32) into shape (4,4,32)

After Change


  def update_obs(self, obs): // (self.nenv, 32, 32, 2)
    //obs = np.asarray(obs, dtype=np.int32).swapaxes(1, 2).swapaxes(2, 3)
    self.obs = np.roll(self.obs, shift=-3, axis=3)
    new_map = np.zeros((self.nenv, 32, 32, 3))
    new_map[:,:,:,-1] = obs[:,0,:,:]
    for env_num in range(self.nenv):
      marine0 = self.xy_per_marine[env_num]["0"]
      marine1 = self.xy_per_marine[env_num]["1"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: chris-chris/pysc2-examples
Commit Name: 9ddf959bb26d5d15d4a0c9ddd6821a262866214c
Time: 2017-11-03
Author: sjhshy@gmail.com
File Name: a2c/a2c.py
Class Name: Runner
Method Name: update_obs


Project Name: astorfi/TensorFlow-World
Commit Name: 874382bfb96b92dcfdd6326ba83c54ad1e9d42f2
Time: 2017-06-26
Author: amirsina.torfi@gmail.com
File Name: codes/2-basics_in_machine_learning/linear_regression/code/linear_regression.py
Class Name:
Method Name:


Project Name: kundajelab/dragonn
Commit Name: 38512d92a8682a62e73c5b9e86366888be374532
Time: 2019-05-29
Author: annashcherbina@gmail.com
File Name: dragonn/interpret/ism.py
Class Name:
Method Name: in_silico_mutagenesis


Project Name: UFAL-DSG/tgen
Commit Name: 695eaf421c7ac5d3f52136358b8c0c9794582a07
Time: 2015-04-09
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/rank_mlp.py
Class Name: FeedForwardLayer
Method Name: __init__