simoninithomas/Deep_reinforcement_learning_Course

ValueError: zero-size array to reduction operation minimum which has no identity

saams4u opened this issue · 1 comments

Hey, so I ran an identical version of the code in the notebook for the Deep Q Learning w/ Doom Tutorial and got an unexpected traceback error:

**File "", line 346, in
state, stacked_frames = stack_frames(stacked_frames, state, True)

File "", line 120, in stack_frames
frame = preprocess_frame(state)

File "", line 93, in preprocess_frame
preprocessed_frame = transform.resize(normalized_frame, [84,84])

File "/home/saams4u/.local/lib/python3.6/site-packages/skimage/transform/_warps.py", line 169, in resize
preserve_range=preserve_range)

File "/home/saams4u/.local/lib/python3.6/site-packages/skimage/transform/_warps.py", line 894, in warp
_clip_warp_output(image, warped, order, mode, cval, clip)

File "/home/saams4u/.local/lib/python3.6/site-packages/skimage/transform/_warps.py", line 646, in _clip_warp_output
min_val = input_image.min()

File "/home/saams4u/.local/lib/python3.6/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**

Not sure what the problem is exactly...

JL321 commented

Check your deadly_corridor.cfg file - the version that you have might not correspond with the settings of the notebook. Just replicate the cfg used in the repo - notably, make sure that your screen_resolution and screen_format are RES_160x120 and GRAY8 respectively.