MLP: Multi layer-perceptron
Description
Generate a multi-layer perceptron, used in RNVP transforms.
Usage
MLP(hidden_sizes, device = "cpu")
Value
Returns a torch::nn_module representing the MLP.
The module has the following method:
forward(x)
Applies each linear layer in hidden_sizes followed by a LeakyReLU activation (except after
the final layer). Returns a torch::torch_tensor whose last dimension equals the
last element of hidden_sizes.