| 26 | } |
| 27 | |
| 28 | TensorValue build_streaming_convtranspose1d( |
| 29 | engine::core::ModuleBuildContext & ctx, |
| 30 | const TensorValue & input, |
| 31 | const engine::modules::ConvTranspose1dWeights & weights, |
| 32 | int64_t in_channels, |
| 33 | int64_t out_channels, |
| 34 | int64_t kernel_size, |
| 35 | int stride, |
| 36 | bool use_bias) { |
| 37 | auto output = ConvTranspose1dModule({ |
| 38 | in_channels, |
| 39 | out_channels, |
| 40 | kernel_size, |
| 41 | stride, |
| 42 | 0, |
| 43 | 1, |
| 44 | use_bias, |
| 45 | }).build(ctx, input, weights); |
| 46 | const int64_t crop = kernel_size - stride; |
| 47 | if (crop <= 0) { |
| 48 | return output; |
| 49 | } |
| 50 | return SliceModule({2, 0, output.shape.dims[2] - crop}).build(ctx, output); |
| 51 | } |
| 52 | |
| 53 | TensorValue build_seanet_residual_block( |
| 54 | engine::core::ModuleBuildContext & ctx, |
no test coverage detected