-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
How does Kernex handle borders and out-of-bounds indices, especially with padding="same"? I skimmed the source code but did not find it. Very superficially it seems to me that it performs 0-padding. Is this the case?
If yes, it would be useful to support different schemes like "mirror", "edge", or ideally dropping the out-of-bounds indices.
Repro:
from pylab import *
import jax.numpy as jnp
import kernex
@kernex.kmap(kernel_size=(11, 11), padding="same")
def kernel(patch):
return jnp.mean(patch)
data = ones((100, 100))
out = kernel(data)
figure()
plot(out[50], "+-", label="Kernex")
plot(ones_like(out[50]), "+-", label="Ideal")
legend()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels