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

Function parse_dlib_xml

tools/convert_dlib_nets_to_caffe/main.cpp:773–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

771// ----------------------------------------------------------------------------------------
772
773std::vector<layer> parse_dlib_xml(
774 const matrix<long,4,1>& input_tensor_shape,
775 const string& xml_filename
776)
777{
778 doc_handler dh;
779 parse_xml(xml_filename, dh);
780 if (dh.layers.size() == 0)
781 throw dlib::error("No layers found in XML file!");
782
783 if (dh.layers.back().type != "input")
784 throw dlib::error("The network in the XML file is missing an input layer!");
785
786 compute_output_tensor_shapes(input_tensor_shape, dh.layers);
787
788 return dh.layers;
789}
790
791// ----------------------------------------------------------------------------------------
792

Callers 1

Calls 5

parse_xmlFunction · 0.85
errorClass · 0.85
sizeMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected