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

[verification] Prefer using the ls name associated to NIER because unique.

parent 7cc8d403
No related branches found
No related tags found
No related merge requests found
......@@ -93,18 +93,15 @@ let create_env loadpath =
let write_nier_as_onnx onnx_out_dir =
Language.iter_nn (fun ls nn ->
match nn.nn_nier with
| Some g -> (
| Some nn_nier -> (
try
if not (Stdlib.Sys.file_exists onnx_out_dir)
then Stdlib.Sys.mkdir onnx_out_dir 0o755;
let filename =
Stdlib.Filename.(basename nn.nn_filename |> remove_extension)
in
let filename =
Fmt.str "%s%s%s.nier.onnx" onnx_out_dir Stdlib.Filename.dir_sep
filename
ls.ls_name.id_string
in
Onnx.write g filename;
Onnx.write nn_nier filename;
Logs.debug ~src:Logging.src_nier (fun m ->
m "@[Wrote NIER as ONNX in file '%s'@]" filename)
with Sys_error msg ->
......
......@@ -21,7 +21,7 @@ Test verify
> (0.5:t) .< (nn@@i)[0] .< (0.5:t)
> end
> EOF
[DEBUG]{NIER} Wrote NIER as ONNX in file 'out/TestNetworkONNX.nier.onnx'
[DEBUG]{NIER} Wrote NIER as ONNX in file 'out/onnx_nn.nier.onnx'
Goal G: Unknown ()
Data should be 0.135
......
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