5ec418e8146079d6797bb15b0f5e777862815df6,env.py,Env,reset,#Env#,54

Before Change


  def reset(self):
    observation = self._reset()
    // Press fire (raw action 1) to reset game if needed
    if 1 in self.actions.keys():
      observation, _, done = self.step(1)
      if done:
        self._reset()
      observation, _, done = self.step(2)
      if done:
        self._reset()
    return observation
 
  def step(self, action):
    // Repeat action 4 times, max pool over last 2 frames

After Change


    observation = self._get_state()
    self.state_buffer.append(observation)
    self.lives = self.ale.lives()
    return torch.stack(list(self.state_buffer), 0)

  def step(self, action):
    // Repeat action 4 times, max pool over last 2 frames
    frame_buffer = torch.zeros(2, 84, 84, device=self.device)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Kaixhin/Rainbow
Commit Name: 5ec418e8146079d6797bb15b0f5e777862815df6
Time: 2018-05-07
Author: design@kaixhin.com
File Name: env.py
Class Name: Env
Method Name: reset


Project Name: neubig/nn4nlp-code
Commit Name: f31488d65a98107e03f2045f3c5e2f927dab067d
Time: 2019-01-18
Author: mysteryvaibhav@gmail.com
File Name: 03-wordemb-pytorch/wordemb-cbow.py
Class Name:
Method Name: calc_sent_loss


Project Name: neubig/nn4nlp-code
Commit Name: f31488d65a98107e03f2045f3c5e2f927dab067d
Time: 2019-01-18
Author: mysteryvaibhav@gmail.com
File Name: 03-wordemb-pytorch/wordemb-skip.py
Class Name:
Method Name: calc_sent_loss