9bdbb11cf27060e7847a87dcdf691dd6b96ce6df,rlkit/data_management/obs_dict_replay_buffer.py,ObsDictRelabelingBuffer,random_batch,#ObsDictRelabelingBuffer#,171
Before Change
possible_future_obs_idxs = self._idx_to_future_obs_idx[i]
// This is generally faster than random.choice. Makes you wonder what
// random.choice is doing
num_options = len(possible_future_obs_idxs)
next_obs_i = int(np.random.randint(0, num_options))
future_obs_idxs.append(possible_future_obs_idxs[next_obs_i])
future_obs_idxs = np.array(future_obs_idxs)
resampled_goals[-num_future_goals:] = self._next_obs[
After Change
if num_future_goals > 0:
//// better future obs sample algorithm
future_indices = indices[-num_future_goals:]
possible_future_obs_lens = np.array([len(self._idx_to_future_obs_idx[i]) for i in future_indices])
next_obs_idxs = (np.random.random(num_future_goals) * possible_future_obs_lens).astype(np.int)
future_obs_idxs = np.array([self._idx_to_future_obs_idx[ids][next_obs_idxs[i]] for i, ids in enumerate(future_indices)])
resampled_goals[-num_future_goals:] = self._next_obs[
self.achieved_goal_key
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: vitchyr/rlkit
Commit Name: 9bdbb11cf27060e7847a87dcdf691dd6b96ce6df
Time: 2020-08-09
Author: 38036768+YangRui2015@users.noreply.github.com
File Name: rlkit/data_management/obs_dict_replay_buffer.py
Class Name: ObsDictRelabelingBuffer
Method Name: random_batch
Project Name: scikit-image/scikit-image
Commit Name: b8a5e5db6c2c0ff9540d84c11c05b21fc6023ae6
Time: 2020-05-04
Author: rfezzani@gmail.com
File Name: skimage/color/colorconv.py
Class Name:
Method Name: rgba2rgb
Project Name: titu1994/DenseNet
Commit Name: 516c2a4c7e8f92e1ea299e966215c2ffe4c5b980
Time: 2016-12-07
Author: titu1994@gmail.com
File Name: cifar10.py
Class Name:
Method Name: