Commit f7e3135d authored by Aymeric Varasse's avatar Aymeric Varasse
Browse files

Adapt pp_relu_linear to CAMUS network

parent 2a949e57
......@@ -11,6 +11,9 @@ let ilist_to_string l =
let print_ints l = Printf.printf "%s" (ilist_to_string l)
let print_int i = Printf.printf "%d" i
let print_bool = Printf.printf "%B"
let print_strs l = List.iter (fun s -> Printf.printf "%s," s) l
let print_str com s = Printf.printf "%s: %s" com s
......@@ -418,14 +421,12 @@ let pp_relu_linear tname n env t g =
let is_positive x = if (x >= 0.) then true else false in
let is_positive_tuple (x0, x1, x2) = [is_positive x0; is_positive x1; is_positive x2] in
let to_activate = Base.List.concat_map ~f:is_positive_tuple n_op in
List.iter print_bool to_activate;
let relu_cell_to_smt idx =
(* List.iter print_int idx; *)
List.iter print_int idx;
let idx_str = stringify_int idx in
let idx_0 = Base.List.nth_exn idx 0 in
let idx_1 = Base.List.nth_exn idx 1 in
(* let idx_2 = Base.List.nth_exn idx 2 in
let idx_3 = Base.List.nth_exn idx 3 in *)
(* match Base.List.nth_exn to_activate (idx_1 * (Base.Int.of_float(Base.Float.sqrt (Base.Float.of_int(List.length n_op))))
+ idx_0 * (Base.Int.of_float(Base.Float.sqrt (Base.Float.of_int(List.length n_op))))
(* + idx_0 * 3 *)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment