For some parameters of the kernels, some of the weights of the kernel can become very small. By removing those very small values, we can reduce the size of the kernel by a lot, which might allow us to fit previously larger-than-memory sparse matrices into memory, and in any case reduces the time needed to convolve data.
To allow doing that, we could introduce a new weight_threshold parameter to the kernel creation functions, and I think the removal should happen in create_sparse to share the implementation across different kernels.
For some parameters of the kernels, some of the weights of the kernel can become very small. By removing those very small values, we can reduce the size of the kernel by a lot, which might allow us to fit previously larger-than-memory sparse matrices into memory, and in any case reduces the time needed to convolve data.
To allow doing that, we could introduce a new
weight_threshold
parameter to the kernel creation functions, and I think the removal should happen increate_sparse
to share the implementation across different kernels.cc @jmdelouis