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

Function weights_string

src/callbacks/debug.cpp:64–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62/** Get human-readable string describing weights and optimizer. */
63template <typename TensorDataType>
64std::string weights_string(const data_type_weights<TensorDataType>& w)
65{
66 std::stringstream msg;
67 msg << "weights \"" << w.get_name() << "\" (";
68 const auto* opt = w.get_optimizer();
69 if (opt == nullptr) {
70 msg << "no";
71 }
72 else {
73 msg << opt->get_type();
74 }
75 msg << " optimizer)";
76 return msg.str();
77}
78
79/** Get human-readable string describing current batch step. */
80std::string batch_step_string(const model& m)

Callers 2

on_optimize_beginMethod · 0.85
on_optimize_endMethod · 0.85

Calls 3

get_optimizerMethod · 0.80
get_nameMethod · 0.45
get_typeMethod · 0.45

Tested by

no test coverage detected