* [tf2tflite] driver can takes customop.conf as param
This commit enable Driver to take customop.conf as the 5th param.
Signed-off-by: Hyun Sik Yoon <hyunsik.yoon@samsung.com>
* optional param: '--customop <customop.conf path>'
* remove strcmp, parse conf before calling import
* nyi error
}
};
+void print_help()
+{
+ std::cerr << "Usage: tf2tflite <path/to/info> <path/to/pb> <path/to/tflite/model> " << std::endl
+ << "Options: --customop <path/to/customop.conf>" << std::endl;
+}
+
} // namespace
#define LOGGER(name) \
{
LOGGER(l);
- if (argc != 4)
+ // TODO We need better args parsing in future
+ if (!(argc == 4 or argc == 6))
{
- std::cerr << "ERROR: tf2tflite <path/to/info> <path/to/pb> <path/to/tflite/model>" << std::endl;
+ print_help();
return 255;
}
}
}
+ if (argc == 6) // optional parameter: path of customop.conf
+ {
+ if (std::string{argv[4]} == "--customop")
+ {
+ // TODO fill info from customop.conf
+ throw std::runtime_error("Not yet implemented");
+ }
+ else
+ {
+ print_help();
+ return 255;
+ }
+ }
+
std::cout << "Read '" << info_path << "' - Done" << std::endl;
std::cout << "Import from '" << tf_path << "'" << std::endl;