Skip to main content

ClikaRT::nn::GLU

class

Header: ClikaRT/nn/generated/activation.h
Inherits: ClikaRT::nn::Module

Gated linear unit: splits the input in half along dim and multiplies the first half by the sigmoid of the second; the size of dim must be even and the output halves it. The module form of ClikaRT::ops::glu, which documents the full contract (shapes, dtypes, errors); construct once, then call it like a function.

Member functions​

GLU(GLUOptions)​

explicit GLU(GLUOptions options = {})

Constructs the module from options (every default when omitted).

Declared in ClikaRT/nn/generated/activation.h, line 990

GLU(int64_t)​

explicit GLU(std::int64_t dim)

GLU(dim): the positional form of GLUOptions(dim).

Declared in ClikaRT/nn/generated/activation.h, line 992

forward()​

Tensor forward(Tensor input) const

forward_impl, unwrapped: raises ClikaRT::Error on failure.

Declared in ClikaRT/nn/generated/activation.h, line 1003

operator()()​

Tensor operator()(Tensor input) const

Same as forward.

Declared in ClikaRT/nn/generated/activation.h, line 1007

options()​

const GLUOptions& options() const

The settings this module was constructed with.

Declared in ClikaRT/nn/generated/activation.h, line 1011