bb403781182c6e31d3bf5de16f42b0cb0d8421f7,baselines/common/atari_wrappers.py,WarpFrame,_observation,#WarpFrame#Any#,127
Before Change
def _observation(self, obs):
frame = np.dot(obs.astype("float32"), np.array([0.299, 0.587, 0.114], "float32"))
frame = np.array(Image.fromarray(frame).resize((self.res, self.res),
resample=Image.BILINEAR), dtype=np.uint8)
return frame.reshape((self.res, self.res, 1))
class FrameStack(gym.Wrapper):
def __init__(self, env, k):
Buffer observations and stack across channels (last axis).
After Change
def _observation(self, frame):
frame = cv2.cvtColor(frame, cv2.COLOR_RGB2GRAY)
frame = cv2.resize(frame, (self.width, self.height), interpolation=cv2.INTER_AREA)
return frame[:, :, None]
class FrameStack(gym.Wrapper):
def __init__(self, env, k):
Stack k last frames.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: openai/baselines
Commit Name: bb403781182c6e31d3bf5de16f42b0cb0d8421f7
Time: 2017-10-25
Author: joschu@openai.com
File Name: baselines/common/atari_wrappers.py
Class Name: WarpFrame
Method Name: _observation
Project Name: sentinel-hub/eo-learn
Commit Name: f98c89cef62a2d6b09d93d95cee334e388c3aa02
Time: 2019-08-22
Author: devis.peressutti@sinergise.com
File Name: mask/eolearn/mask/snow_mask.py
Class Name: TheiaSnowMask
Method Name: _resample_red
Project Name: deepchem/deepchem
Commit Name: 5203ac107aa94483739479054df6d10355145cf0
Time: 2020-06-22
Author: taransinghania1612@gmail.com
File Name: deepchem/trans/transformers.py
Class Name: DataTransforms
Method Name: crop