mirror of
https://github.com/huggingface/candle.git
synced 2025-06-17 19:18:50 +00:00
Expose the weights and biases in transposed convolutions. (#1727)
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user