torch.nn.functional.glu
-
torch.nn.functional.
glu
(input, dim=- 1) → Tensor[source] The gated linear unit. Computes:
where input is split in half along dim to form a and b, is the sigmoid function and is the element-wise product between matrices.
torch.nn.functional.
glu
(input, dim=- 1) → Tensor[source]The gated linear unit. Computes:
where input is split in half along dim to form a and b, is the sigmoid function and is the element-wise product between matrices.