Skip to content

[docs] RandomResizeCrop signature quirks #3763

@vadimkantorov

Description

@vadimkantorov
  1. Why do we need to have so much precision: 1.333333333333? 1.3 would suffice and be more readable
  2. <InterpolationMode.BILINEAR: 'bilinear'>. It's not clear from this if the enum should be preferred or the constant (and it's also not copy-pastable in the code). It's also not clear which type is used for InterpolationMode, especially given that for a long time only PIL.Image.InterpolationMode was supported, hence even new codebases are using the legacy PIL types: https://github.com/facebookresearch/dino/blob/58aabc0/main_dino.py#L420
  3. Why does InterpolationMode live in torchvision.transforms.functional whereas the type using it lives in torchvision.transforms? This enum is basic enough to deserve placement in torchvision.transforms directly IMHO.
  4. The doc text mentions torchvision.transforms.InterpolationMode, but it's incorrect since the type currently lives in transforms.functional: https://pytorch.org/vision/master/transforms.html?highlight=randomresizedcrop#torchvision.transforms.functional.InterpolationMode

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions