Add weight and bias functions to LayerNorm (#1306)

This commit is contained in:
jwnz
2023-11-10 00:09:01 +09:00
committed by GitHub
parent 73d02f4f57
commit e6697471bb

View File

@ -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 {