MCPcopy Create free account
hub / github.com/evilsocket/cake / conv_transpose1d

Method conv_transpose1d

cake-core/src/backends/mod.rs:633–652  ·  view source on GitHub ↗
(
        &self,
        x: &Tensor,
        weight: &Tensor,
        bias: Option<&Tensor>,
        padding: usize,
        output_padding: usize,
        stride: usize,
        dilation: usize,
    

Source from the content-addressed store, hash-verified

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.

Callers 3

conv_transpose1dFunction · 0.80
forwardMethod · 0.80

Implementers 5

mod.rscake-core/src/backends/rocm/mod.rs
mod.rscake-core/src/backends/cpu/mod.rs
mod.rscake-core/src/backends/metal/mod.rs
mod.rscake-core/src/backends/vulkan/mod.rs
mod.rscake-core/src/backends/cuda/mod.rs

Calls

no outgoing calls

Tested by 1