mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Add weight and bias functions to LayerNorm (#1306)
This commit is contained in:
@ -95,6 +95,14 @@ impl LayerNorm {
|
||||
eps,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn weight(&self) -> &Tensor {
|
||||
&self.weight
|
||||
}
|
||||
|
||||
pub fn bias(&self) -> Option<&Tensor> {
|
||||
self.bias.as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
impl crate::Module for LayerNorm {
|
||||
|
Reference in New Issue
Block a user