Thanks for your reply. Just looked up clamp function, but it’s not exactly what I need. Specifying min=0 would not remove zeros if I get it right. Picking some value bigger 0 for min would result in legitimate small values being ‘clamped’ as well…
Some way to iterate over a Tensor’s values and overwriting them if needed would be just as fine for the time being. I’m new to PyTorch/libTorch and I’m having quite some difficulties finding stuff in the documentation and getting things up and running.
Any hints would be welcome.