pub struct LstmScales {
pub input_scale: f32,
pub hidden_scale: f32,
pub cell_scale: f32,
pub lut_input_scale: f32,
pub input_weight_scales: [f32; 4],
pub recurrent_weight_scales: [f32; 4],
}Expand description
The float scales a QLstmCell is calibrated from (C++ QLSTMScales).
Gates are in the order i, f, g, o.
Fields§
§input_scale: f32Scale of the input tensor.
Scale of the hidden state.
cell_scale: f32Scale of the cell state.
lut_input_scale: f32Scale of the LUTs’ input grid, shared by every gate and the cell’s tanh.
input_weight_scales: [f32; 4]Per gate, the scale of the symmetric input weights.
recurrent_weight_scales: [f32; 4]Per gate, the scale of the symmetric recurrent weights.
Trait Implementations§
Source§impl Clone for LstmScales
impl Clone for LstmScales
impl Copy for LstmScales
Source§impl Debug for LstmScales
impl Debug for LstmScales
Source§impl PartialEq for LstmScales
impl PartialEq for LstmScales
impl StructuralPartialEq for LstmScales
Auto Trait Implementations§
impl Freeze for LstmScales
impl RefUnwindSafe for LstmScales
impl Send for LstmScales
impl Sync for LstmScales
impl Unpin for LstmScales
impl UnsafeUnpin for LstmScales
impl UnwindSafe for LstmScales
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more