[Bug]: is_image_space
works poorly with Gymnasium's FrameStackObservation
#2090
Labels
bug
Something isn't working
documentation
Improvements or additions to documentation
help wanted
Help from contributors is welcomed
🐛 Bug
MRC 👇
From here it seems to be due to the fact that sb3 expects images to be tensors of dimension strictly equal to 3.
I am wondering why not setting the check to be
>=3
instead of strictly equal. In this way, one would still pass the image check (though I reckon might have problems withNatureCNN
as I am not sure how it would handle 4-dimensional tensors).Worth adding that:
TransformObservation
env wrapper fromgymnasium
, merging the two first dimension into oneWorth saying this can have very unintended consequence: if one passes an image through Gymnasium's frame stacking and then uses sb3, the image won't be recognized as such, as the feature extractor for that image will be set to be
Flatten
(instead ofNatureCNN
).Happy to open a PR to change this check, but I wanted to double check it made sense first!
To Reproduce
see above
Relevant log output / Error message
System Info
Checklist
The text was updated successfully, but these errors were encountered: