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

Method TimestepEmbeddingModule

src/framework/modules/conditioning_modules.cpp:223–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221}
222
223TimestepEmbeddingModule::TimestepEmbeddingModule(TimestepEmbeddingConfig config) : config_(config) {
224 require_positive(config_.frequency_embedding_size, "TimestepEmbeddingConfig.frequency_embedding_size");
225 require_positive(config_.hidden_size, "TimestepEmbeddingConfig.hidden_size");
226 if (config_.frequency_embedding_size % 2 != 0) {
227 throw std::runtime_error("TimestepEmbeddingConfig.frequency_embedding_size must be even");
228 }
229}
230
231core::TensorValue TimestepEmbeddingModule::build(
232 core::ModuleBuildContext & ctx,

Callers

nothing calls this directly

Calls 1

require_positiveFunction · 0.70

Tested by

no test coverage detected