MCPcopy Create free account
hub / github.com/dhbloo/rapfi / parseLossType

Function parseLossType

Rapfi/command/tuning.cpp:47–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47LossType parseLossType(std::string lossType)
48{
49 if (lossType == "L1")
50 return LossType::L1;
51 else if (lossType == "L2")
52 return LossType::L2;
53 else if (lossType == "BCE")
54 return LossType::BCE;
55 else
56 throw std::invalid_argument("unknown loss type " + lossType);
57}
58
59void validateConfig(size_t epochs, const TuningConfig &cfg)
60{

Callers 1

tuningMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected