You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the addition of torch tensor support for the transforms (following #1375), there are two operators that will require extra attention in order for them to be as efficient as the PIL implementations.
Indeed, while we can implement resize via torch.nn.functional.interpolate and rotate via torch.nn.functional.grid_sample, those operators for now only support floating-point types, so for now we need to perform a .float() -> interpolate() -> byte() in order to maintain compatibility, which is wasteful.
It would be great if they could be extended to support uint8 (and maybe other integer types) as well.
A first PR adding support for uint8 to nearest mode interpolate has been sent in pytorch/pytorch#35029
Something to keep in mind: the interpolate function is under optimization in pytorch/pytorch#34864, so this should be kept in mind to avoid conflicts.
The text was updated successfully, but these errors were encountered:
Hi @karthikprasad , this is planned work, but without a real ETA yet. If this is useful to you, we may be able to bump the priority. I'll reach out internally
🚀 Feature
With the addition of torch tensor support for the transforms (following #1375), there are two operators that will require extra attention in order for them to be as efficient as the PIL implementations.
Indeed, while we can implement
resize
viatorch.nn.functional.interpolate
androtate
viatorch.nn.functional.grid_sample
, those operators for now only support floating-point types, so for now we need to perform a.float() -> interpolate() -> byte()
in order to maintain compatibility, which is wasteful.It would be great if they could be extended to support
uint8
(and maybe other integer types) as well.A first PR adding support for uint8 to
nearest
mode interpolate has been sent in pytorch/pytorch#35029Something to keep in mind: the interpolate function is under optimization in pytorch/pytorch#34864, so this should be kept in mind to avoid conflicts.
The text was updated successfully, but these errors were encountered: