diff --git a/csrc/net/openvino/openvino_net.cpp b/csrc/net/openvino/openvino_net.cpp index 1176967c9..050658f97 100644 --- a/csrc/net/openvino/openvino_net.cpp +++ b/csrc/net/openvino/openvino_net.cpp @@ -86,10 +86,10 @@ Result OpenVINONet::Init(const Value& args) { OUTCOME_TRY(auto raw_bin, model.ReadFile(config.weights)); try { - std::ofstream xml_out(tmp_xml); + std::ofstream xml_out(tmp_xml, std::ios::binary); xml_out << raw_xml; xml_out.close(); - std::ofstream bin_out(tmp_bin); + std::ofstream bin_out(tmp_bin, std::ios::binary); bin_out << raw_bin; bin_out.close(); } catch (const std::exception& e) {