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
When using batch dimensions on parameter variables, the computation is performed only on the first row. Here is a simple example with gaussian kernel convolution:
importtorchfrompykeops.torchimportLazyTensor, Genreddevice="cuda"iftorch.cuda.is_available() else"cpu"B, M, N=3, 5, 4x=LazyTensor(torch.rand(1, M, 1, 1, device=device))
y=LazyTensor(torch.rand(1, 1, N, 1, device=device))
p=LazyTensor(torch.rand(B, 1, 1, 1, device=device))
res= (-p*(x-y)**2).exp().sum(dim=2)
print(res.reshape((B,M)))
This happens both in cpu and gpu modes.
This is due I think to the way we handle size of the output in the code. There is a confusion with the variable nx that sometimes refers to the size of the output (B*M in the previous example) and sometimes to the size of the i variables (M).
The text was updated successfully, but these errors were encountered:
When using batch dimensions on parameter variables, the computation is performed only on the first row. Here is a simple example with gaussian kernel convolution:
Output gives
This happens both in cpu and gpu modes.
This is due I think to the way we handle size of the output in the code. There is a confusion with the variable
nx
that sometimes refers to the size of the output (B*M
in the previous example) and sometimes to the size of thei
variables (M
).The text was updated successfully, but these errors were encountered: