package owl-base

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Parameters

Signature

include sig ... end
module Graph : sig ... end
val eval_graph : Graph.graph -> unit
module Optimiser = Graph.Optimiser
val shape_or_value : Optimiser.Operator.Symbol.Shape.Type.t -> string
val graph_to_dot : graph -> string
val graph_to_trace : graph -> string
val save_graph : 'a -> string -> unit
val load_graph : string -> 'a * 'b
val invalidate_rvs : graph -> unit
val is_iopair_safe : 'a Owl_graph.node -> 'a Owl_graph.node -> bool
val update_iopair : graph -> unit
val remove_unused_iopair : 'a Owl_graph.node array -> 'b array -> 'a Owl_graph.node array * 'b array
val optimise : graph -> unit
module Operator = Graph.Optimiser.Operator
val estimate_complexity : 'a Owl_graph.node array -> int * int
val optimise_nodes : Operator.Symbol.Shape.Type.attr Owl_graph.node array -> unit
val empty : int array -> Symbol.Shape.Type.arr
val zeros : int array -> Symbol.Shape.Type.arr
val ones : int array -> Symbol.Shape.Type.arr
val create : int array -> Symbol.Shape.Type.elt -> Symbol.Shape.Type.arr
val sequential : ?a:Symbol.Shape.Type.elt -> ?step:Symbol.Shape.Type.elt -> int array -> Symbol.Shape.Type.arr
val gaussian : ?mu:Symbol.Shape.Type.elt -> ?sigma:Symbol.Shape.Type.elt -> int array -> Symbol.Shape.Type.arr
val bernoulli : ?p:Symbol.Shape.Type.elt -> int array -> Symbol.Shape.Type.arr
val init : int array -> (int -> Symbol.Shape.Type.elt) -> Symbol.Shape.Type.arr
val shape : Symbol.Shape.Type.arr -> int array
val numel : Symbol.Shape.Type.arr -> int
val set : Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.elt -> unit
val get_slice : int list list -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val set_slice : int list list -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> unit
val copy_ : out:'a -> 'b -> 'c
val reset : Symbol.Shape.Type.arr -> unit
val reshape : Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr
val tile : Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr
val repeat : Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr
val concatenate : ?axis:int -> Symbol.Shape.Type.arr array -> Symbol.Shape.Type.arr
val split : ?axis:int -> 'a -> 'b -> 'c
val draw : ?axis:int -> Symbol.Shape.Type.arr -> int -> Symbol.Shape.Type.arr * 'a array
val print : ?max_row:'a -> ?max_col:'b -> ?header:'c -> ?fmt:'d -> 'e -> unit
val sum_reduce : ?axis:int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val transpose_conv1d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr
val transpose_conv2d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr
val transpose_conv3d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr
val dilated_conv1d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr
val dilated_conv2d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr
val dilated_conv3d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr
val max_pool1d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr
val max_pool2d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr
val max_pool3d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr
val avg_pool1d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr
val avg_pool2d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr
val avg_pool3d : ?padding:Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr
val transpose_conv1d_backward_input : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val transpose_conv1d_backward_kernel : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val transpose_conv2d_backward_input : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val transpose_conv2d_backward_kernel : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val transpose_conv3d_backward_input : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val transpose_conv3d_backward_kernel : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val dilated_conv1d_backward_input : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val dilated_conv1d_backward_kernel : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val dilated_conv2d_backward_input : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val dilated_conv2d_backward_kernel : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val dilated_conv3d_backward_input : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val dilated_conv3d_backward_kernel : Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val max_pool1d_backward : Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val max_pool2d_backward : Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val max_pool3d_backward : Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val avg_pool1d_backward : Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val avg_pool2d_backward : Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val avg_pool3d_backward : Owl_types.padding -> Symbol.Shape.Type.arr -> int array -> int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val row_num : Symbol.Shape.Type.arr -> int
val col_num : Symbol.Shape.Type.arr -> int
val rows : Symbol.Shape.Type.arr -> int array -> Symbol.Shape.Type.arr
val copy_row_to : Symbol.Shape.Type.arr -> 'a -> 'b -> unit
val copy_col_to : Symbol.Shape.Type.arr -> 'a -> 'b -> unit
val transpose : ?axis:int array -> Symbol.Shape.Type.arr -> Symbol.Shape.Type.arr
val to_rows : Symbol.Shape.Type.arr -> 'a array
val of_array : 'a -> 'b -> 'c
val of_arrays : 'a -> 'b
val op_to_str : Shape.Type.op -> string
val is_random_variable : Shape.Type.op -> bool
val refnum : 'a Owl_graph.node -> int
val node_shape : Shape.Type.attr Owl_graph.node -> int array
val node_numel : Shape.Type.attr Owl_graph.node -> int
val is_shape_unkown : Shape.Type.attr Owl_graph.node -> bool
val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit
val shape_to_str : int array option array -> string
val node_to_str : Shape.Type.attr Owl_graph.node -> string
val node_to_arr : Shape.Type.t -> Shape.Type.arr
val arr_to_node : Shape.Type.arr -> Shape.Type.t
val node_to_elt : Shape.Type.t -> Shape.Type.elt
val elt_to_node : Shape.Type.elt -> Shape.Type.t
val make_node : ?name:string -> ?value:Shape.Type.Device.value array -> ?shape:int array option array -> ?freeze:bool -> ?reuse:bool -> ?state:Shape.Type.state -> Shape.Type.op -> Shape.Type.attr Owl_graph.node
val make_then_connect : ?shape:int array option array -> Shape.Type.op -> Shape.Type.attr Owl_graph.node array -> Shape.Type.attr Owl_graph.node
val var_arr : ?shape:int array -> string -> Shape.Type.arr
val var_elt : string -> Shape.Type.elt
val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr
val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt
val set_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array -> unit
val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit
val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit
val get_reuse : Shape.Type.attr Owl_graph.node -> bool
val set_vnode : Shape.Type.attr Owl_graph.node -> Shape.Type.t array -> unit
val is_inherited : Shape.Type.attr Owl_graph.node -> bool
val is_var : Shape.Type.attr Owl_graph.node -> bool
val is_const : Shape.Type.attr Owl_graph.node -> bool
val is_arr : Shape.Type.attr Owl_graph.node -> bool
val is_elt : Shape.Type.attr Owl_graph.node -> bool
val is_assigned : Shape.Type.attr Owl_graph.node -> bool
val check_assigned : Shape.Type.attr Owl_graph.node -> unit
val is_valid : Shape.Type.attr Owl_graph.node -> bool
val validate : Shape.Type.attr Owl_graph.node -> unit
val invalidate : Shape.Type.attr Owl_graph.node -> unit
val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit
val is_freeze : Shape.Type.attr Owl_graph.node -> bool
val freeze : Shape.Type.attr Owl_graph.node -> unit
val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit
val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit
val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit
val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit
val float_to_elt : float -> Shape.Type.elt
val elt_to_float : Shape.Type.elt -> float
val infer_shape : Type.op -> Type.attr Owl_graph.node array -> int array option array
and attr = Make_Nested(Owl_computation_engine.Make_Graph(Owl_computation_cpu_device.Make(A))).Graph.Optimiser.Operator.Symbol.Shape.Type.attr = {
  1. mutable op : op;
  2. mutable freeze : bool;
  3. mutable reuse : bool;
  4. mutable state : state;
  5. mutable shape : int array option array;
  6. mutable value : Device.value array;
  7. mutable vnode : t array;
}
and op = Make_Nested(Owl_computation_engine.Make_Graph(Owl_computation_cpu_device.Make(A))).Graph.Optimiser.Operator.Symbol.Shape.Type.op =
  1. | Noop
  2. | Var
  3. | Const
  4. | Empty of int array
  5. | Zeros of int array
  6. | Ones of int array
  7. | Create of int array
  8. | Sequential of int array
  9. | Uniform of int array
  10. | Gaussian of int array
  11. | Bernoulli of int array
  12. | Init of int array * int -> elt
  13. | Get of int array
  14. | Set of int array
  15. | GetSlice of int list list
  16. | SetSlice of int list list
  17. | Copy
  18. | Reset
  19. | Reshape of int array
  20. | Reverse
  21. | Tile of int array
  22. | Repeat of int array
  23. | Concatenate of int
  24. | Split of int * int array
  25. | Draw of int * int
  26. | Map of elt -> elt
  27. | Fold of int * elt -> elt -> elt
  28. | Scan of int * elt -> elt -> elt
  29. | OneHot of int
  30. | Abs
  31. | Neg
  32. | Floor
  33. | Ceil
  34. | Round
  35. | Sqr
  36. | Sqrt
  37. | Log
  38. | Log2
  39. | Log10
  40. | Exp
  41. | Sin
  42. | Cos
  43. | Tan
  44. | Sinh
  45. | Cosh
  46. | Tanh
  47. | Asin
  48. | Acos
  49. | Atan
  50. | Asinh
  51. | Acosh
  52. | Atanh
  53. | Min of int
  54. | Max of int
  55. | Sum of int
  56. | SumReduce of int array
  57. | Signum
  58. | Sigmoid
  59. | Relu
  60. | Min'
  61. | Max'
  62. | Sum'
  63. | L1norm'
  64. | L2norm'
  65. | L2NormSqr'
  66. | ClipByValue
  67. | ClipByL2norm
  68. | Pow
  69. | ScalarPow
  70. | PowScalar
  71. | Atan2
  72. | ScalarAtan2
  73. | Atan2Scalar
  74. | Hypot
  75. | Min2
  76. | Max2
  77. | Add
  78. | Sub
  79. | Mul
  80. | Div
  81. | AddScalar
  82. | SubScalar
  83. | MulScalar
  84. | DivScalar
  85. | ScalarAdd
  86. | ScalarSub
  87. | ScalarMul
  88. | ScalarDiv
  89. | FMA
  90. | EltEqual
  91. | EltNotEqual
  92. | EltLess
  93. | EltGreater
  94. | EltLessEqual
  95. | EltGreaterEqual
  96. | EltEqualScalar
  97. | EltNotEqualScalar
  98. | EltLessScalar
  99. | EltGreaterScalar
  100. | EltLessEqualScalar
  101. | EltGreaterEqualScalar
  102. | Conv1d of Owl_types.padding * int array
  103. | Conv2d of Owl_types.padding * int array
  104. | Conv3d of Owl_types.padding * int array
  105. | TransposeConv1d of Owl_types.padding * int array
  106. | TransposeConv2d of Owl_types.padding * int array
  107. | TransposeConv3d of Owl_types.padding * int array
  108. | DilatedConv1d of Owl_types.padding * int array * int array
  109. | DilatedConv2d of Owl_types.padding * int array * int array
  110. | DilatedConv3d of Owl_types.padding * int array * int array
  111. | MaxPool1d of Owl_types.padding * int array * int array
  112. | MaxPool2d of Owl_types.padding * int array * int array
  113. | MaxPool3d of Owl_types.padding * int array * int array
  114. | AvgPool1d of Owl_types.padding * int array * int array
  115. | AvgPool2d of Owl_types.padding * int array * int array
  116. | AvgPool3d of Owl_types.padding * int array * int array
  117. | Conv1dBackwardInput of int array
  118. | Conv1dBackwardKernel of int array
  119. | Conv2dBackwardInput of int array
  120. | Conv2dBackwardKernel of int array
  121. | Conv3dBackwardInput of int array
  122. | Conv3dBackwardKernel of int array
  123. | TransposeConv1dBackwardInput of int array
  124. | TransposeConv1dBackwardKernel of int array
  125. | TransposeConv2dBackwardInput of int array
  126. | TransposeConv2dBackwardKernel of int array
  127. | TransposeConv3dBackwardInput of int array
  128. | TransposeConv3dBackwardKernel of int array
  129. | DilatedConv1dBackwardInput of int array * int array
  130. | DilatedConv1dBackwardKernel of int array * int array
  131. | DilatedConv2dBackwardInput of int array * int array
  132. | DilatedConv2dBackwardKernel of int array * int array
  133. | DilatedConv3dBackwardInput of int array * int array
  134. | DilatedConv3dBackwardKernel of int array * int array
  135. | MaxPool1dBackward of Owl_types.padding * int array * int array
  136. | MaxPool2dBackward of Owl_types.padding * int array * int array
  137. | MaxPool3dBackward of Owl_types.padding * int array * int array
  138. | AvgPool1dBackward of Owl_types.padding * int array * int array
  139. | AvgPool2dBackward of Owl_types.padding * int array * int array
  140. | AvgPool3dBackward of Owl_types.padding * int array * int array
  141. | RowNum
  142. | ColNum
  143. | Row
  144. | Rows of int array
  145. | CopyRowTo
  146. | CopyColTo
  147. | Dot of bool * bool * elt * elt
  148. | Inv
  149. | Trace
  150. | Transpose of int array
  151. | ToRows
  152. | OfRows
  153. | Scalar_Add
  154. | Scalar_Sub
  155. | Scalar_Mul
  156. | Scalar_Div
  157. | Scalar_Pow
  158. | Scalar_Atan2
  159. | Scalar_Abs
  160. | Scalar_Neg
  161. | Scalar_Sqr
  162. | Scalar_Sqrt
  163. | Scalar_Exp
  164. | Scalar_Log
  165. | Scalar_Log2
  166. | Scalar_Log10
  167. | Scalar_Signum
  168. | Scalar_Floor
  169. | Scalar_Ceil
  170. | Scalar_Round
  171. | Scalar_Sin
  172. | Scalar_Cos
  173. | Scalar_Tan
  174. | Scalar_Sinh
  175. | Scalar_Cosh
  176. | Scalar_Tanh
  177. | Scalar_Asin
  178. | Scalar_Acos
  179. | Scalar_Atan
  180. | Scalar_Asinh
  181. | Scalar_Acosh
  182. | Scalar_Atanh
  183. | Scalar_Relu
  184. | Scalar_Sigmoid
  185. | Fused_Adagrad of float * float
val make_device : unit -> device
val arr_to_value : A.arr -> value
val value_to_arr : value -> A.arr
val elt_to_value : A.elt -> value
val value_to_elt : value -> A.elt
val value_to_float : value -> float
OCaml

Innovation. Community. Security.