Skip to content
Snippets Groups Projects
Commit a1079453 authored by Michele Alberti's avatar Michele Alberti
Browse files

Warn about the unavailability of nier due to errors.

parent 498610f2
No related branches found
No related tags found
No related merge requests found
...@@ -119,7 +119,7 @@ let produce_cfg (g : Oproto.Onnx.GraphProto.t) = ...@@ -119,7 +119,7 @@ let produce_cfg (g : Oproto.Onnx.GraphProto.t) =
| "MaxPool" -> NCFG.Node.MaxPool | "MaxPool" -> NCFG.Node.MaxPool
| "Conv" -> NCFG.Node.Conv | "Conv" -> NCFG.Node.Conv
| "Identity" -> NCFG.Node.Identity | "Identity" -> NCFG.Node.Identity
| _ -> raise (ParseError ("Unsupported ONNX operator: " ^ o))) | _ -> raise (ParseError ("Unsupported ONNX operator " ^ o)))
in in
List.fold ~f:(fun acc n -> get_node_operator_cfg n :: acc) ~init:[] ns List.fold ~f:(fun acc n -> get_node_operator_cfg n :: acc) ~init:[] ns
in in
......
...@@ -95,7 +95,14 @@ let onnx_parser env _ filename _ = ...@@ -95,7 +95,14 @@ let onnx_parser env _ filename _ =
match model with match model with
| Error s -> Loc.errorm "%s" s | Error s -> Loc.errorm "%s" s
| Ok { n_inputs; n_outputs; nier } -> | Ok { n_inputs; n_outputs; nier } ->
let nier = Result.ok nier (* TODO: Warn about parsing errors? *) in let nier =
match nier with
| Error msg ->
Logs.warn (fun m ->
m "Cannot build network intermediate representation:@ %s" msg);
None
| Ok nier -> Some nier
in
register_nn_as_tuple n_inputs n_outputs filename nier env register_nn_as_tuple n_inputs n_outputs filename nier env
let ovo_parser env _ filename _ = let ovo_parser env _ filename _ =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment