You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.cpp 859 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * \file lite/load_and_run/src/main.cpp
  3. *
  4. * This file is part of MegEngine, a deep learning framework developed by
  5. * Megvii.
  6. *
  7. * \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved.
  8. */
  9. #include <gflags/gflags.h>
  10. #include <string>
  11. #include "strategys/strategy.h"
  12. int main(int argc, char** argv) {
  13. std::string usage = "load_and_run <model_path> [options...]";
  14. if (argc < 2) {
  15. printf("usage: %s\n", usage.c_str());
  16. return -1;
  17. }
  18. gflags::SetUsageMessage(usage);
  19. gflags::SetVersionString("1.0");
  20. gflags::ParseCommandLineFlags(&argc, &argv, true);
  21. std::string model_path = argv[1];
  22. auto strategy = lar::StrategyBase::create_strategy(model_path);
  23. strategy->run();
  24. gflags::ShutDownCommandLineFlags();
  25. return 0;
  26. }
  27. // vim: syntax=cpp.doxygen foldmethod=marker foldmarker=f{{{,f}}}