Yup. In torch you can use torchscript and in jax you can 'jit' a function and both turn your NN function into a fairly easily compliable form which could then be translated to wasm.
Here's a cool project that does something like this (though I believe it's basically superseded by torchscript): https://github.com/podgorskiy/tensor4 Here it is running stylegan in the browser (via wasm): http://podgorskiy.com/static/stylegan/stylegan.html