MishaLaskin / curl

CURL: Contrastive Unsupervised Representation Learning for Sample-Efficient Reinforcement Learning
MIT License
561 stars 88 forks source link

A bug when cropping images? #11

Open yosider opened 3 years ago

yosider commented 3 years ago

Hi, thank you for your great research! I'm afraid I think there is a bug at the random_crop function in utils.py: https://github.com/MishaLaskin/curl/blob/23b0880708c29b078b0a25e62ff31fb587587b18/utils.py#L244-L245 I think the crop_max should be modified as crop_max + 1. If left as it is, the bottom and rightmost columns of the image are not included in cropped_image. Also, an error occurs when output_size==img_size. I'm sorry if I'm wrong :)