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

Function load_resblock

src/framework/audio/flashsr.cpp:131–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131ResBlockWeights load_resblock(
132 core::BackendWeightStore & store,
133 const std::shared_ptr<const engine::assets::TensorSource> & source,
134 const std::string & block_id,
135 int64_t kernel) {
136 ResBlockWeights block;
137 for (int i = 0; i < 3; ++i) {
138 block.convs1[i] = load_conv(
139 store,
140 *source,
141 conv_weight_name(block_id, 1, i),
142 conv_bias_name(block_id, 1, i),
143 kFlashSrChannels,
144 kFlashSrChannels,
145 kernel);
146 block.convs2[i] = load_conv(
147 store,
148 *source,
149 conv_weight_name(block_id, 2, i),
150 conv_bias_name(block_id, 2, i),
151 kFlashSrChannels,
152 kFlashSrChannels,
153 kernel);
154 }
155 for (int i = 0; i < 6; ++i) {
156 block.activations[i] = load_activation(store, source, "resblocks." + block_id + ".activations." + std::to_string(i));
157 }
158 return block;
159}
160
161std::vector<float> make_diagonal_filter_weights(const std::vector<float> & filter, bool upsample) {
162 if (filter.size() != kFlashSrActivationKernel) {

Callers 1

load_from_directoryMethod · 0.70

Calls 5

conv_weight_nameFunction · 0.85
conv_bias_nameFunction · 0.85
load_convFunction · 0.70
load_activationFunction · 0.70
to_stringFunction · 0.50

Tested by

no test coverage detected