pub fn prelu(num_channels: Option<usize>, vs: VarBuilder<'_>) -> Result<PReLU>
Expand description
Create or initialize a new PReLU layer.
This uses some default name for weights, namely "weight"
.
ยงArguments
num_channels
- The number of channels. UseNone
to have as single trainable value andSome
for a 1D vector with the appropriate number of channels. When applying theforward
function, the input tensor shapes
should either be one dimension with this number of channels or ifs.len() >= 2
it should haves[1]
equal to this number.