30 auto frontend = std::make_unique<Frontend>();
34 std::ifstream ifs{
cmdline.at(0)};
37 throw std::runtime_error(
"Prototxt file open fail");
40 if (!
from_txt(ifs, *frontend->prototxt()))
42 throw std::runtime_error(
"Filling prototxt fail");
48 std::ifstream ifs{
cmdline.at(1), std::ios::binary};
51 throw std::runtime_error(
"Caffemodel file open fail");
54 if (!
from_bin(ifs, *frontend->caffemodel()))
56 throw std::runtime_error(
"Filling caffemodel fail");
60 return std::move(frontend);
std::unique_ptr< enco::Frontend > make_frontend(const cmdline::View &cmdline)