MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ diagnose()

std::string MayaFlux::Yantra::HubertPhonemeModel::diagnose ( const Kakshya::TensorSet & weights)
staticnodiscard

Check that a tensor set holds the weights the network needs.

Parameters
weightsCandidate weights.
Returns
Empty when usable, otherwise the first missing tensor or shape mismatch.

Definition at line 380 of file HubertPhonemeModel.cpp.

381{
382 if (std::string reason = TensorKernels::check_tensors(weights, front_specs()); !reason.empty()) {
383 return reason;
384 }
385 if (std::string reason = TensorKernels::check_tensors(weights, position_specs()); !reason.empty()) {
386 return reason;
387 }
388 for (uint32_t block = 0; block < k_blocks; ++block) {
389 if (std::string reason = TensorKernels::check_tensors(weights, block_specs(block)); !reason.empty()) {
390 return reason;
391 }
392 }
393 return {};
394}
std::string check_tensors(const Kakshya::TensorSet &weights, std::span< const TensorRequirement > required)
Whether a set holds every required tensor with the required shape.

References MayaFlux::Yantra::TensorKernels::check_tensors(), and diagnose().

Referenced by diagnose(), and HubertPhonemeModel().

Here is the call graph for this function:
Here is the caller graph for this function: