Skip to content

Functional affine documentation for Version 1.6.0 on torchvision.functional.transform.affine does not match code #2551

Closed
@Mut1nyJD

Description

@Mut1nyJD

📚 Documentation

If you check the documentation on pytorch.org go to Libraries torchvision/ transforms / functional transforms

https://pytorch.org/docs/stable/torchvision/transforms.html#functional-transforms

Look at torchvision.transforms.functional.affine
the documentation says under parameters:

img (PIL Image or Tensor) – image to be rotated.

But when you actually use a tensor as input using the official pywheel torchvision0.7cu101 package a tensor import is not supported if you look at the source code torchvision/transforms/functional.py from the installed package, there is a line like this:

if not _is_pil_image(img):
raise TypeError('img should be PIL Image. Got {}'.format(type(img)))

Also that source code from the installed package for the function does not match the source link in the pytorch.,org online documentation

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions