Shortcuts

Struct GELUOptions

Page Contents

Struct Documentation

struct GELUOptions

Options for the GELU module.

Example:

GELU model(GELUOptions().approximate("none"));

Public Functions

inline auto approximate(const std::string &new_approximate) -> decltype(*this)

Specifies the approximation to apply to the output.

inline auto approximate(std::string &&new_approximate) -> decltype(*this)
inline const std::string &approximate() const noexcept
inline std::string &approximate() noexcept

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources