| 46 | } |
| 47 | |
| 48 | bool lite::example::register_example( |
| 49 | std::string example_name, const ExampleFunc& fuction) { |
| 50 | auto map = get_example_function_map(); |
| 51 | if (map->find(example_name) != map->end()) { |
| 52 | printf("example_name: %s Error!!! This example is registed yet\n", |
| 53 | example_name.c_str()); |
| 54 | return false; |
| 55 | } |
| 56 | (*map)[example_name] = fuction; |
| 57 | return true; |
| 58 | } |
| 59 | |
| 60 | std::shared_ptr<Tensor> lite::example::parse_npy( |
| 61 | const std::string& path, LiteBackend backend) { |