Add clone to various nn layers. (#910)

This commit is contained in:
Laurent Mazare
2023-09-20 11:33:51 +01:00
committed by GitHub
parent f685b2231c
commit 7b1ddcff47
7 changed files with 11 additions and 11 deletions

View File

@ -60,7 +60,7 @@ impl From<f64> for LayerNormConfig {
}
// This layer norm version handles both weight and bias so removes the mean.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct LayerNorm {
weight: Tensor,
bias: Option<Tensor>,
@ -143,7 +143,7 @@ pub fn layer_norm<C: Into<LayerNormConfig>>(
}
/// RmsNorm is a specialized version of the LayerNorm module.
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct RmsNorm(LayerNorm);
impl RmsNorm {