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