Expose the weights and biases in transposed convolutions. (#1727)

This commit is contained in:
Laurent Mazare 2024-02-18 10:35:01 +01:00 committed by GitHub
parent 41416d2376
commit 678d44a7f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 16 additions and 0 deletions

View File

@ -109,6 +109,14 @@ impl ConvTranspose1d {
pub fn config(&self) -> &ConvTranspose1dConfig {
&self.config
}
pub fn weight(&self) -> &Tensor {
&self.weight
}
pub fn bias(&self) -> Option<&Tensor> {
self.bias.as_ref()
}
}
impl crate::Module for ConvTranspose1d {
@ -258,6 +266,14 @@ impl ConvTranspose2d {
pub fn config(&self) -> &ConvTranspose2dConfig {
&self.config
}
pub fn weight(&self) -> &Tensor {
&self.weight
}
pub fn bias(&self) -> Option<&Tensor> {
self.bias.as_ref()
}
}
impl crate::Module for ConvTranspose2d {