I hope this is the right place for this. I'm looking for a natural generalisation of the following 'shifted' sigmoid function $\tilde{\sigma} : \mathbb{R} \rightarrow \mathbb{R}$ defined by
$$\tilde{\sigma} (x) = \frac{2}{1 + e^{-x}} - 1$$
that maps $\mathbb{R}$ smoothly into $(-1, 1)$ to a function $\tilde{\sigma}_n : \mathbb{R}^n \rightarrow \mathbb{R}^n$ that satifies $||\tilde{\sigma}_n|| \le 1$ throughout $\mathbb{R}^n$. Ideally, $\tilde{\sigma}_n$ would retain the property that its definite integral can be written out explicitly, too.
Motivation (warning: machine learning):
! I'm trying to think of a way to transform a continuous function $f : \mathbb{R}^n \rightarrow \mathbb{R}^n$ into one with gradient norm at most one everywhere. This has application to calculation of the Wasserstein distance between two probability distributions (https://en.wikipedia.org/wiki/Wasserstein_metric#Dual_representation_of_W1) which is one of the biggest leaps towards the SOTA generative models (e.g https://thispersondoesnotexist.com/). My idea is for a neural net to learn a function $\tilde{f} : \mathbb{R}^n \rightarrow \mathbb{R}^n$, and then apply a transform like the sigmoid function, and then work out the path integral $$ \int \tilde{\sigma_n} \left(\tilde{f}\right) . d\mathbf{r} $$ which will then always have gradient norm at most one everywhere.