Struct DropoutOptions¶
Defined in File dropout.h
Page Contents
Struct Documentation¶
-
struct DropoutOptions¶
Options for the
Dropout
module.Example:
Dropout model(DropoutOptions().p(0.42).inplace(true));
Public Functions
-
DropoutOptions(double p = 0.5)¶
-
inline auto p(const double &new_p) -> decltype(*this)¶
The probability of an element to be zeroed. Default: 0.5.
-
inline auto p(double &&new_p) -> decltype(*this)¶
-
inline const double &p() const noexcept¶
-
inline double &p() 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¶
-
DropoutOptions(double p = 0.5)¶