simoninithomas / Deep_reinforcement_learning_Course

Implementations from the free course Deep Reinforcement Learning with Tensorflow and PyTorch
http://www.simoninithomas.com/deep-rl-course
3.74k stars 1.23k forks source link

Deep Q Learning - Doom #32

Open aneekdas96 opened 5 years ago

aneekdas96 commented 5 years ago

state, stacked_frames = stack_frames(stacked_frames, state, True) File "doom_rl.py", line 80, in stack_frames frame = preprocess_frame(state) File "doom_rl.py", line 71, in preprocess_frame preprocessed_frame = transform.resize(normalized_frame, [84,84]) File "C:\Users\dcane\Anaconda3\envs\tf_gpu\lib\site-packages\skimage\transform_warps.py", line 169, in resize preserve_range=preserve_range) File "C:\Users\dcane\Anaconda3\envs\tf_gpu\lib\site-packages\skimage\transform_warps.py", line 896, in warp _clip_warp_output(image, warped, order, mode, cval, clip) File "C:\Users\dcane\Anaconda3\envs\tf_gpu\lib\site-packages\skimage\transform_warps.py", line 648, in _clip_warp_output min_val = input_image.min() File "C:\Users\dcane\Anaconda3\envs\tf_gpu\lib\site-packages\numpy\core_methods.py", line 32, in _amin return umr_minimum(a, axis, None, out, keepdims, initial) ValueError: zero-size array to reduction operation minimum which has no identity

CodeGrinder96 commented 5 years ago

Has someone managed to solve this? Im having the same problem. It is rather similar to #23, however the solution did not solve it for me.

sourabhMajumdar commented 5 years ago

Has someone managed to solve this? Im having the same problem. It is rather similar to #23, however the solution did not solve it for me.

I am also having simmilar problem on windows 10 and anaconda environenment, any fixes will be highly appreciated

Florisbruinsma commented 5 years ago

I think I had this problem to, the issue is that the frames you get have the color channel first instead of last. If you want check if you have the same issue, print the shape of the frames in preprocessing_frame. Because the grayscaling might screw up your frame because the color channel is first. To solve it just transpose the frame

David-Sangojinmi commented 4 years ago

I think I had this problem to, the issue is that the frames you get have the color channel first instead of last. If you want check if you have the same issue, print the shape of the frames in preprocessing_frame. Because the grayscaling might screw up your frame because the color channel is first. To solve it just transpose the frame

Hi Could you post a code solution as to how I could transpose the frame?