4f04391f1dfc718da74d2153f6812b3002d93235,a2c_ppo_acktr/algo/gail.py,ExpertDataset,__getitem__,#ExpertDataset#,140
Before Change
return self.trajectories["lengths"].sum()
def __getitem__(self, i):
traj_idx = 0
while self.trajectories["lengths"][traj_idx] <= i:
i -= self.trajectories["lengths"][traj_idx]
traj_idx += 1
return self.trajectories["states"][traj_idx][i], self.trajectories[
"actions"][traj_idx][i],
After Change
return self.length
def __getitem__(self, i):
traj_idx, i = self.get_idx[i]
return self.trajectories["states"][traj_idx][i], self.trajectories[
"actions"][traj_idx][i]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: ikostrikov/pytorch-a2c-ppo-acktr
Commit Name: 4f04391f1dfc718da74d2153f6812b3002d93235
Time: 2019-04-07
Author: ikostrikov@gmail.com
File Name: a2c_ppo_acktr/algo/gail.py
Class Name: ExpertDataset
Method Name: __getitem__
Project Name: miso-belica/sumy
Commit Name: c16886fefa4cca5f7b45e52ff2fcb1b89876c70a
Time: 2013-03-05
Author: miso.belica@gmail.com
File Name: sumy/algorithms/luhn.py
Class Name: LuhnMethod
Method Name: __remove_trailing_zeros
Project Name: UFAL-DSG/tgen
Commit Name: a3c24e5e3222592a0c4e002ac47e3b7e048327d1
Time: 2014-03-26
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/tgen_random.py
Class Name: RandomTTreeGenerator
Method Name: generate_tree