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

Function load_weight_norm_conv_transpose1d

src/models/heartmula/codec.cpp:121–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 weights.bias = store.load_f32_tensor(source, prefix + ".bias", {out_channels});
120 }
121 return weights;
122}
123
124modules::ConvTranspose1dWeights load_weight_norm_conv_transpose1d(
125 core::BackendWeightStore & store,
126 const assets::TensorSource & source,
127 const std::string & prefix,
128 assets::TensorStorageType storage_type,
129 int64_t in_channels,
130 int64_t out_channels,
131 int64_t kernel_size,
132 bool use_bias = true) {
133 modules::ConvTranspose1dWeights weights;
134 const auto shape = core::TensorShape::from_dims({in_channels, out_channels, kernel_size});
135 weights.weight = store.make_from_f32(
136 shape,
137 storage_type,
138 effective_weight_norm_dim0(source, prefix, {in_channels, out_channels, kernel_size}));
139 if (use_bias) {
140 weights.bias = store.load_f32_tensor(source, prefix + ".bias", {out_channels});
141 }
142 return weights;
143}

Callers 1

Calls 3

make_from_f32Method · 0.80
load_f32_tensorMethod · 0.80

Tested by

no test coverage detected