We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9617b6e + 74cafde commit 895c82aCopy full SHA for 895c82a
envs.py
@@ -19,10 +19,10 @@ def _process_frame42(frame):
19
# aren't close enough to the pixel boundary.
20
frame = cv2.resize(frame, (80, 80))
21
frame = cv2.resize(frame, (42, 42))
22
- frame = frame.mean(2)
+ frame = frame.mean(2, keepdims=True)
23
frame = frame.astype(np.float32)
24
frame *= (1.0 / 255.0)
25
- frame = np.reshape(frame, [1, 42, 42])
+ frame = np.moveaxis(frame, -1, 0)
26
return frame
27
28
0 commit comments