@SimonW is right. I miss ths namespace first time. and I search the torchvision.transform and find in torchvison.transform’s Docs
Transforms are common image transformations. They can be chained together using Compose. Additionally, there is the torchvision.transforms.functional module. Functional transforms give fine-grained control over the transformations.
details in
https://pytorch.org/docs/stable/torchvision/transforms.html#torchvision.transforms.functional.to_tensor 481