Rate this Page

Struct HardtanhOptions#

Page Contents

Struct Documentation#

struct HardtanhOptions#

Options for the Hardtanh module.

Example:

Hardtanh
model(HardtanhOptions().min_val(-42.42).max_val(0.42).inplace(true));

Public Functions

inline auto min_val(const double &new_min_val) -> decltype(*this)#

minimum value of the linear region range. Default: -1

inline auto min_val(double &&new_min_val) -> decltype(*this)#
inline const double &min_val() const noexcept#
inline double &min_val() noexcept#
inline auto max_val(const double &new_max_val) -> decltype(*this)#

maximum value of the linear region range. Default: 1

inline auto max_val(double &&new_max_val) -> decltype(*this)#
inline const double &max_val() const noexcept#
inline double &max_val() noexcept#
inline auto inplace(const bool &new_inplace) -> decltype(*this)#

can optionally do the operation in-place. Default: False

inline auto inplace(bool &&new_inplace) -> decltype(*this)#
inline const bool &inplace() const noexcept#
inline bool &inplace() noexcept#