MCPcopy Create free account
hub / github.com/pytorch/tutorials / observation

Method observation

intermediate_source/mario_rl_tutorial.py:200–205  ·  view source on GitHub ↗
(self, observation)

Source from the content-addressed store, hash-verified

198 self.observation_space = Box(low=0, high=255, shape=obs_shape, dtype=np.uint8)
199
200 def observation(self, observation):
201 transforms = T.Compose(
202 [T.Resize(self.shape, antialias=True), T.Normalize(0, 255)]
203 )
204 observation = transforms(observation).squeeze(0)
205 return observation
206
207
208# Apply Wrappers to environment

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected