Skip to main content

MLPLayer

Trait MLPLayer 

Source
pub trait MLPLayer: Send + Sync {
    // Required method
    fn forward(&self, hidden_states: &Tensor) -> Result<Tensor>;
}
Expand description

MLP trait for expert networks in MoE layers

Required Methods§

Source

fn forward(&self, hidden_states: &Tensor) -> Result<Tensor>

Forward pass through the MLP

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§