MCPcopy Create free account
hub / github.com/LBANN/lbann / to_string

Function to_string

src/callbacks/dump_weights.cpp:342–357  ·  view source on GitHub ↗

@brief Returns weights file_format as string. */

Source from the content-addressed store, hash-verified

340}
341/** @brief Returns weights file_format as string. */
342static std::string to_string(dump_weights_internal::FileFormat const& format)
343{
344 using Text = dump_weights_internal::TextFileFormat;
345 using Binary = dump_weights_internal::BinaryFileFormat;
346 using DistBinary = dump_weights_internal::DistributedBinaryFileFormat;
347
348 if (is<Text>(format))
349 return "text";
350 else if (is<Binary>(format))
351 return "binary";
352 else if (is<DistBinary>(format))
353 return "distributed_binary";
354 else
355 LBANN_ERROR("Unknown format type.");
356 return "unknown"; // unreachable but silences compiler warnings.
357}
358
359void dump_weights::write_specific_proto(lbann_data::Callback& proto) const
360{

Callers 15

report_resultsMethod · 0.70
exchange_modelsMethod · 0.70
evaluateFunction · 0.70
on_batch_beginMethod · 0.70
operator()Method · 0.70
on_forward_prop_endMethod · 0.70
on_backward_prop_endMethod · 0.70
write_specific_protoMethod · 0.70
on_epoch_beginMethod · 0.70
on_epoch_endMethod · 0.70
on_validation_beginMethod · 0.70
on_validation_endMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected