(
&self,
x: &Tensor,
weight: &Tensor,
bias: Option<&Tensor>,
padding: usize,
output_padding: usize,
stride: usize,
dilation: usize,
| 631 | /// Matches candle_nn::ConvTranspose1d::forward() semantics. |
| 632 | #[allow(clippy::too_many_arguments)] |
| 633 | fn conv_transpose1d( |
| 634 | &self, |
| 635 | x: &Tensor, |
| 636 | weight: &Tensor, |
| 637 | bias: Option<&Tensor>, |
| 638 | padding: usize, |
| 639 | output_padding: usize, |
| 640 | stride: usize, |
| 641 | dilation: usize, |
| 642 | groups: usize, |
| 643 | ) -> Result<Tensor> { |
| 644 | let out = x.conv_transpose1d(weight, padding, output_padding, stride, dilation, groups)?; |
| 645 | match bias { |
| 646 | Some(b) => { |
| 647 | let b = b.reshape((1, b.dim(0)?, 1))?; |
| 648 | out.broadcast_add(&b) |
| 649 | } |
| 650 | None => Ok(out), |
| 651 | } |
| 652 | } |
| 653 | |
| 654 | /// 2D convolution: `conv2d(x, weight) + bias`. |
| 655 | /// Matches candle_nn::Conv2d::forward() semantics. |
no outgoing calls