Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

"Integer argument expected" for img.crop #19

Open
ajbrock opened this issue Jun 7, 2019 · 0 comments
Open

"Integer argument expected" for img.crop #19

ajbrock opened this issue Jun 7, 2019 · 0 comments

Comments

@ajbrock
Copy link

ajbrock commented Jun 7, 2019

Installing and switching to the accimage backend breaks my transforms.RandomResizedCrop. The fix I've found is modifying crop() in torchvisions.transforms.functional so that it does

img.crop((int(j), int(i), int(j + w), int(i + h)))

instead of

img.crop((j, i, j + w, i + h))

(sidenote: this library is deliciously fast)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant