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

Function require_channel_param

src/framework/audio/flashsr.cpp:63–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63std::vector<float> require_channel_param(
64 const std::shared_ptr<const engine::assets::TensorSource> & source,
65 const std::string & name) {
66 const auto tensor = source->require_f32_tensor(name);
67 if (tensor.shape.rank != 3 || tensor.shape.dims[0] != 1 ||
68 tensor.shape.dims[1] != kFlashSrChannels || tensor.shape.dims[2] != 1) {
69 throw std::runtime_error("FlashSR tensor shape mismatch for " + name + ": " + shape_string(tensor));
70 }
71 return tensor.values;
72}
73
74std::string conv_weight_name(const std::string & block_id, int group, int index) {
75 return "resblocks." + block_id + ".convs" + std::to_string(group) + "." +

Callers 1

load_activationFunction · 0.85

Calls 2

require_f32_tensorMethod · 0.80
shape_stringFunction · 0.70

Tested by

no test coverage detected