MCPcopy Create free account
hub / github.com/davisking/dlib / serialize

Function serialize

dlib/mlp/mlp_kernel_1.h:329–355  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327// ----------------------------------------------------------------------------------------
328
329 inline void serialize (
330 const mlp_kernel_1& item,
331 std::ostream& out
332 )
333 {
334 try
335 {
336 serialize(item.input_nodes, out);
337 serialize(item.first_hidden_nodes, out);
338 serialize(item.second_hidden_nodes, out);
339 serialize(item.output_nodes, out);
340 serialize(item.alpha, out);
341 serialize(item.momentum, out);
342
343 serialize(item.w1, out);
344 serialize(item.w2, out);
345 serialize(item.w3, out);
346
347 serialize(item.w1m, out);
348 serialize(item.w2m, out);
349 serialize(item.w3m, out);
350 }
351 catch (serialization_error& e)
352 {
353 throw serialization_error(e.info + "\n while serializing object of type mlp_kernel_1");
354 }
355 }
356
357 inline void deserialize (
358 mlp_kernel_1& item,

Callers

nothing calls this directly

Calls 1

serialization_errorClass · 0.85

Tested by

no test coverage detected