Skip to main content

apply_activation

Function apply_activation 

Source
pub fn apply_activation(x: &Tensor, name: &str) -> Result<Tensor>
Expand description

Apply activation function matching Hugging Face hidden_act.

ยงErrors

Returns ModelError::UnsupportedArchitecture for unknown activation names.