02716e101ec2a8eb7284f95b17a7e589ffbc075d,ch06/01_dqn_pong.py,ImageWrapper,_observation,#ImageWrapper#Any#,34
Before Change
def _observation(self, obs):
obs = imresize(obs, (110, 84))
obs = obs.mean(axis=-1, keepdims=True)
obs = obs[self.X_OFS:self.X_OFS+84, :, :]
obs = np.moveaxis(obs, 2, 0)
return obs.astype(np.float32) / 255.0
class BufferWrapper(gym.ObservationWrapper):
def __init__(self, env, n_steps):
After Change
def _observation(self, obs):
img = Image.fromarray(obs)
img = img.convert("YCbCr")
img = img.resize((self.TARGET_SIZE, self.TARGET_SIZE))
data = np.asarray(img.getdata(0), np.uint8).reshape(img.size)
return np.expand_dims(data, 0)
class BufferWrapper(gym.ObservationWrapper):
def __init__(self, env, n_steps, dtype=np.uint8):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 02716e101ec2a8eb7284f95b17a7e589ffbc075d
Time: 2017-10-18
Author: max.lapan@gmail.com
File Name: ch06/01_dqn_pong.py
Class Name: ImageWrapper
Method Name: _observation
Project Name: arraiy/torchgeometry
Commit Name: 73317ca61e33b42353fc4b3010f586124954ca18
Time: 2019-12-19
Author: diegovd0296@gmail.com
File Name: examples/data_augmentation.py
Class Name: DummyDataset
Method Name: __getitem__
Project Name: arraiy/torchgeometry
Commit Name: dcd394f4a5bddb1fc97ae4a7224e00147fc110a3
Time: 2020-01-15
Author: diegovd0296@gmail.com
File Name: examples/data_augmentation.py
Class Name: DummyDataset
Method Name: __getitem__