Struct rust_bert::mobilebert::NoNorm [−][src]
pub struct NoNorm { /* fields omitted */ }Expand description
No-normalization option for MobileBERT
Basic module performing a linear multiplication using trained coefficients and bias
Implementations
Creates a new NoNorm layer of given hidden size.
Arguments:
- hidden_size - input tensor’s hidden size
Example
use rust_bert::mobilebert::NoNorm;
use tch::{nn, Device};
let device = Device::Cpu;
let p = nn::VarStore::new(device);
let hidden_size = 512;
let no_norm = NoNorm::new(&p.root(), hidden_size);Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NoNorm
impl UnwindSafe for NoNorm
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self
