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):
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):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
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: developmentseed/label-maker
Commit Name: fb28a0ead4d54681320eb38a49d7f692a532cba0
Time: 2020-08-18
Author: marthamorrissey93@gmail.com
File Name: label_maker/utils.py
Class Name:
Method Name: get_tile_tif
Project Name: pymc-devs/pymc3
Commit Name: c6131064c6467e0927cfdb77b0488dc715aef75d
Time: 2019-02-28
Author: luciano.paz.neuro@gmail.com
File Name: pymc3/distributions/discrete.py
Class Name: Categorical
Method Name: logp