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

Function deserialize

dlib/svm/assignment_function.h:228–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226 typename feature_extractor
227 >
228 void deserialize (
229 assignment_function<feature_extractor>& item,
230 std::istream& in
231 )
232 {
233 feature_extractor fe;
234 matrix<double,0,1> weights;
235 double bias;
236 bool force_assignment;
237 int version = 0;
238 deserialize(version, in);
239 if (version != 2)
240 throw serialization_error("Unexpected version found while deserializing dlib::assignment_function.");
241
242 deserialize(fe, in);
243 deserialize(weights, in);
244 deserialize(bias, in);
245 deserialize(force_assignment, in);
246
247 item = assignment_function<feature_extractor>(weights, bias, fe, force_assignment);
248 }
249
250// ----------------------------------------------------------------------------------------
251

Callers

nothing calls this directly

Calls 1

serialization_errorClass · 0.85

Tested by

no test coverage detected