GLU module
Applies the gated linear unit function where is the first half of the input matrices and is the second half.
nn_glu(dim = -1)
dim
: (int): the dimension on which to split the input. Default: -1*
means, any number of additional dimensionsif (torch_is_installed()) { m <- nn_glu() input <- torch_randn(4, 2) output <- m(input) }
Useful links