Add fuse-conv-bn method for Conv2d (#1196)

* Add fuse-conv-bn method for Conv2d

* no unwrap

* run rustfmp and clippy
This commit is contained in:
jamjamjon
2023-10-27 22:56:50 +08:00
committed by GitHub
parent e2826e70b3
commit b3181455d5
3 changed files with 27 additions and 7 deletions

View File

@ -109,6 +109,10 @@ impl BatchNorm {
&self.running_var
}
pub fn eps(&self) -> f64 {
self.eps
}
pub fn weight_and_bias(&self) -> Option<(&Tensor, &Tensor)> {
self.weight_and_bias.as_ref().map(|v| (&v.0, &v.1))
}