Struct PReLUOptions

Page Contents

Struct Documentation

struct torch::nn::PReLUOptions

Options for the PReLU module.


PReLU model(PReLUOptions().num_parameters(42));

Public Functions

auto num_parameters(const int64_t &new_num_parameters) -> decltype(*this)

number of a to learn.

Although it takes an int as input, there is only two values are legitimate: 1, or the number of channels at input. Default: 1

auto num_parameters(int64_t &&new_num_parameters) -> decltype(*this)
const int64_t &num_parameters() const noexcept
int64_t &num_parameters() noexcept
auto init(const double &new_init) -> decltype(*this)

the initial value of a. Default: 0.25

auto init(double &&new_init) -> decltype(*this)
const double &init() const noexcept
double &init() noexcept


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources