Skip to content

Commit 895c82a

Browse files
authored
Merge pull request #47 from atgambardella/master
changed reshape to moveaxis
2 parents 9617b6e + 74cafde commit 895c82a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

envs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ def _process_frame42(frame):
1919
# aren't close enough to the pixel boundary.
2020
frame = cv2.resize(frame, (80, 80))
2121
frame = cv2.resize(frame, (42, 42))
22-
frame = frame.mean(2)
22+
frame = frame.mean(2, keepdims=True)
2323
frame = frame.astype(np.float32)
2424
frame *= (1.0 / 255.0)
25-
frame = np.reshape(frame, [1, 42, 42])
25+
frame = np.moveaxis(frame, -1, 0)
2626
return frame
2727

2828

0 commit comments

Comments
 (0)