Commit 97a5dc1c authored by Aymeric Varasse's avatar Aymeric Varasse
Browse files

Changes type of RW_Linearized_ReLu_params

parent 952c0ae2
......@@ -244,7 +244,7 @@ module Vertex = struct
| Pool_params of (ksize*stride option*pads option*dilations option)
| Conv_params of (ksize*stride option*pads option*dilations option)
| Transpose_params of shape
| RW_Linearized_ReLu_params of (float * float * float) list
| RW_Linearized_ReLu_params of (((float * float * float) list) * ((string, float) Base.Hashtbl.t list * int))
let str_op_params p = match p with
| Transpose_params s ->
let str_sh = str_shape s
......@@ -273,7 +273,7 @@ module Vertex = struct
let list_to_string l = String.concat ~sep:";" l in
list_to_string string_list
in
"RW_Linearized_ReLu_params: "^(str_lin l)
"RW_Linearized_ReLu_params: "^(str_lin (fst l))
type t = {
id: id;
name: string option;
......
......@@ -137,7 +137,7 @@ module Vertex : sig
| Pool_params of (ksize*stride option*pads option*dilations option)
| Conv_params of (ksize*stride option*pads option*dilations option)
| Transpose_params of shape
| RW_Linearized_ReLu_params of (float * float * float) list
| RW_Linearized_ReLu_params of (((float * float * float) list) * ((string, float) Base.Hashtbl.t list * int))
val str_op_params : operator_parameters -> string
......
......@@ -415,7 +415,7 @@ let pp_relu_linear tname n env t g =
let n_op = match n.operator_parameters with
| Some p -> (match p with
| IR.Vertex.RW_Linearized_ReLu_params x -> x
| IR.Vertex.RW_Linearized_ReLu_params x -> Base.fst x
| _ -> failwith "Something is odd with the type of the operator_parameters")
| None -> failwith "Something is odd with the operator_parameters"
in
......@@ -430,7 +430,7 @@ let pp_relu_linear tname n env t g =
(* (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) *)
(Base.List.nth_exn to_activate idx_1) idx_0
with
| true -> "(assert (= |CELL_"^tname^idx_str^"| |CELL_"^pname^idx_str^"|))"
| true -> "(assert (= |CELL_"^tname^idx_str^"| |CELL_"^pname^idx_str^"|))\n (assert (> 0"
| false -> begin match t with
| Linear_Real_Theory | Real_Theory -> "(assert (= |CELL_"^tname^idx_str^"| 0))"
| Float_Theory -> "(assert (= |CELL_"^tname^idx_str^"| (_ +zero 11 53)))"
......
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