diff options
Diffstat (limited to 'candle-core/src/conv.rs')
-rw-r--r-- | candle-core/src/conv.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/candle-core/src/conv.rs b/candle-core/src/conv.rs index 3455247b..d9e0a9ab 100644 --- a/candle-core/src/conv.rs +++ b/candle-core/src/conv.rs @@ -71,18 +71,14 @@ pub struct ParamsConvTranspose2D { impl ParamsConvTranspose2D { pub(crate) fn out_h(&self) -> usize { let dilation = 1; - (self.i_h - 1) * self.stride - 2 * self.padding - + dilation * (self.k_h - 1) - + self.output_padding - + 1 + (self.i_h - 1) * self.stride + dilation * (self.k_h - 1) + self.output_padding + 1 + - 2 * self.padding } pub(crate) fn out_w(&self) -> usize { let dilation = 1; - (self.i_w - 1) * self.stride - 2 * self.padding - + dilation * (self.k_w - 1) - + self.output_padding - + 1 + (self.i_w - 1) * self.stride + dilation * (self.k_w - 1) + self.output_padding + 1 + - 2 * self.padding } pub(crate) fn out_dims(&self) -> Vec<usize> { |