Learnable wavelet neural networks for cosmological inference