@brief Returns weights file_format as string. */
| 340 | } |
| 341 | /** @brief Returns weights file_format as string. */ |
| 342 | static 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 | |
| 359 | void dump_weights::write_specific_proto(lbann_data::Callback& proto) const |
| 360 | { |
no outgoing calls
no test coverage detected