Describe the bug
torchvision.transforms.functional.affine() throws "Can only index with tensors that are scalars (zero-dim) native IndexError"
To Reproduce
using F = TorchSharp.torchvision.transforms.functional;
var img =
F.affine(
rand(new long[] { 1, 1, 48, 48 }),
angle: 0f,
translate: new[] { 0, 0 },
scale: 1f,
shear: new[] { 1f, 1f },
interpolation: InterpolationMode.Bilinear,
fill: 0);
Expected behavior
Should work with tensor that is 4D, float32 and on CPU
Please complete the following information:
- OS: Windows 11
- Package Type torchsharp-cuda-windows
- Version 0.105.1