| 39 | |
| 40 | template <class... Ts> |
| 41 | static program parse_tf_from(const tf_options& options, Ts&&... xs) |
| 42 | { |
| 43 | tf::tf_parser parser; |
| 44 | parser.is_nhwc = options.is_nhwc; |
| 45 | parser.batch_size = options.batch_size; |
| 46 | parser.map_input_dims = options.map_input_dims; |
| 47 | parser.output_node_names = options.output_node_names; |
| 48 | |
| 49 | #ifndef NDEBUG |
| 50 | // Log the program when it can't be parsed |
| 51 | try |
| 52 | { |
| 53 | parser.parse_from(std::forward<Ts>(xs)...); |
| 54 | } |
| 55 | catch(...) |
| 56 | { |
| 57 | std::cerr << parser.prog << std::endl; |
| 58 | throw; |
| 59 | } |
| 60 | #else |
| 61 | parser.parse_from(std::forward<Ts>(xs)...); |
| 62 | #endif |
| 63 | return std::move(parser.prog); |
| 64 | } |
| 65 | |
| 66 | program parse_tf(const std::string& name, const tf_options& options) |
| 67 | { |
no test coverage detected