How does MonotonicMLP work? #44
-
Hi, I been looking for kind of network that is monotonically increasing (except for normalising flows) and the Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @CaioDaumann,
Now how does it work? One way to construct a monotonic function is by adding (not substracting) several monotonic functions together. So, to construct a monotonic MLP, you simply have to impose the weights of the linear layers to be positive, and the activation functions to be monotonic. In Zuko's implementation, the weights are made positive by taking their absolute value (an alternative would be to use softplus or exp), and the activation function is |
Beta Was this translation helpful? Give feedback.
Hello @CaioDaumann,
zuko.nn.MonotonicMLP
is indeed a monotonic MLP, that is a (parametric) functionNow how does it work? One way to construct a monotonic function is by adding (not substracting) several monotonic functions together. So, to construct a monotonic MLP, you simply have to impose the weights of the linear layers to be positive, and the activation functions to be monotonic.
In Zuko's implementation, the weights are made positive by taking their absolute value (an alternative would be to use softplus or exp), and the activation function is$ELU(x)$ for half the hidden feat…