MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / bind_conv_transpose1d

Function bind_conv_transpose1d

src/models/miocodec/weights.cpp:262–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262MioCodecConvTranspose1dWeights bind_conv_transpose1d(
263 const MioCodecWeights & weights,
264 const std::string & prefix,
265 int64_t in_channels,
266 int64_t out_channels,
267 int64_t kernel_size,
268 int stride = 1,
269 int padding = 0,
270 int dilation = 1,
271 bool use_bias = true) {
272 MioCodecConvTranspose1dWeights conv;
273 conv.config = {
274 in_channels,
275 out_channels,
276 kernel_size,
277 stride,
278 padding,
279 dilation,
280 use_bias,
281 };
282 conv.weights.weight = require_loaded_tensor(weights, prefix + ".weight", {in_channels, out_channels, kernel_size});
283 if (use_bias) {
284 conv.weights.bias = require_loaded_tensor(weights, prefix + ".bias", {out_channels});
285 }
286 return conv;
287}
288
289std::vector<float> fold_weight_norm(
290 const std::vector<float> & weight_g,

Callers 1

bind_component_weightsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected