
Last chance! 50% off unlimited learning
Sale ends in
Applies the gated linear unit function
nn_glu(dim = -1)
(int): the dimension on which to split the input. Default: -1
Input: *
means, any number of additional
dimensions
Output:
# NOT RUN {
if (torch_is_installed()) {
m <- nn_glu()
input <- torch_randn(4, 2)
output <- m(input)
}
# }
Run the code above in your browser using DataLab