| 192 | const engine::core::TensorValue & input, |
| 193 | const engine::modules::ConvTranspose1dWeights & weights, |
| 194 | const engine::core::TensorShape & output_shape) { |
| 195 | engine::core::TensorValue output; |
| 196 | for (int64_t batch_index = 0; batch_index < input.shape.dims[0]; ++batch_index) { |
| 197 | const auto matrix_input = view_batch_matrix(ctx, input, batch_index, config.in_channels, input.shape.dims[2]); |
| 198 | auto batch_output = engine::core::wrap_tensor( |
| 199 | ggml_conv_transpose_1d( |
| 200 | ctx.ggml, |
| 201 | weights.weight.tensor, |
| 202 | matrix_input.tensor, |
| 203 | config.stride, |
| 204 | config.padding, |
| 205 | config.dilation), |
| 206 | engine::core::TensorShape::from_dims({1, config.out_channels, output_shape.dims[2]}), |
| 207 | GGML_TYPE_F32); |
| 208 | output = output.valid() ? engine::modules::ConcatModule({0}).build(ctx, output, batch_output) : batch_output; |
no test coverage detected