Skip to content
Snippets Groups Projects
Commit 14de28dc authored by Michele Alberti's avatar Michele Alberti Committed by François Bobot
Browse files

[tests] Same output value from two different NN calls.

parent 0d884dad
No related branches found
No related tags found
No related merge requests found
...@@ -66,26 +66,25 @@ let create_new_nn env input_vars outputs : string = ...@@ -66,26 +66,25 @@ let create_new_nn env input_vars outputs : string =
| Ok { nier = Ok g; _ } -> g | Ok { nier = Ok g; _ } -> g
in in
let input () = let input () =
let o = let node =
IR.Node.create IR.Node.create
(Concat { inputs = List.map ~f:convert_term old_nn_args; axis = 0 }) (Concat { inputs = List.map ~f:convert_term old_nn_args; axis = 0 })
in in
let o = let node =
if Ir.Nier_simple.Shape.equal o.shape (IR.input_shape old_nn) if Ir.Nier_simple.Shape.equal node.shape (IR.input_shape old_nn)
then o then node
else else
IR.Node.create IR.Node.create
(Reshape (Reshape
{ {
input = o; input = node;
shape = shape =
IR.Node.constant_int_array IR.Node.constant_int_array
(Ir.Nier_simple.Shape.to_array (IR.input_shape old_nn)); (Ir.Nier_simple.Shape.to_array (IR.input_shape old_nn));
allowzero = 0; allowzero = 0;
}) })
in in
node
o
in in
let out = IR.Node.replace_input input (IR.output old_nn) in let out = IR.Node.replace_input input (IR.output old_nn) in
Ir.Nier_simple.Node.gather_int out old_index Ir.Nier_simple.Node.gather_int out old_index
......
...@@ -96,7 +96,7 @@ Test verify on acasxu ...@@ -96,7 +96,7 @@ Test verify on acasxu
> ensures { let o1, o2 = result in o1 .>= o2 /\ o2 .>= o1 } = > ensures { let o1, o2 = result in o1 .>= o2 /\ o2 .>= o1 } =
> let i = normalize_input j in > let i = normalize_input j in
> let o1 = (nn@@i)[clear_of_conflict] in > let o1 = (nn@@i)[clear_of_conflict] in
> let o2 = (nn@@i)[clear_of_conflict] in > let o2 = (nn@@i)[weak_left] in
> o1, o2 > o1, o2
> >
> (* goal P1: > (* goal P1:
......
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