package owl-base

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

Source file owl_algodiff_core_sig.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# 1 "src/base/algodiff/owl_algodiff_core_sig.ml"
module type Sig = sig
  module A : Owl_types_ndarray_algodiff.Sig

  (** {6 Type definition} *)

  include Owl_algodiff_types_sig.Sig with type elt := A.elt and type arr := A.arr

  (** {6 Core functions} *)

  val tag : unit -> int
  (** TODO *)

  val primal : t -> t
  (** TODO *)

  val primal' : t -> t
  (** TODO *)

  val zero : t -> t
  (** TODO *)

  val reset_zero : t -> t
  (** TODO *)

  val tangent : t -> t
  (** TODO *)

  val adjref : t -> t ref
  (** TODO *)

  val adjval : t -> t
  (** TODO *)

  val shape : t -> int array
  (** TODO *)

  val row_num : t -> int
  (** number of rows *)

  val col_num : t -> int
  (** number of columns *)

  val numel : t -> int
  (** number of elements *)

  val clip_by_value : amin:A.elt -> amax:A.elt -> t -> t
  (** other functions, without tracking gradient *)

  val clip_by_l2norm : A.elt -> t -> t
  (** other functions, without tracking gradient *)

  val copy_primal' : t -> t
  (** TODO *)

  val tile : t -> int array -> t
  (** TODO *)

  val repeat : t -> int array -> t
  (** TODO *)

  val pack_elt : A.elt -> t
  (** convert from ``elt`` type to ``t`` type. *)

  val unpack_elt : t -> A.elt
  (** convert from ``t`` type to ``elt`` type. *)

  val pack_flt : float -> t
  (** convert from ``float`` type to ``t`` type. *)

  val _f : float -> t
  (** A shortcut function for ``F A.(float_to_elt x)``. *)

  val unpack_flt : t -> float
  (** convert from ``t`` type to ``float`` type. *)

  val pack_arr : A.arr -> t
  (** convert from ``arr`` type to ``t`` type. *)

  val unpack_arr : t -> A.arr
  (** convert from ``t`` type to ``arr`` type. *)

  (* functions to report errors, help in debugging *)

  val deep_info : t -> string
  (** TODO *)

  val type_info : t -> string
  (** TODO *)

  val error_binop : string -> t -> t -> 'a
  (** TODO *)

  val error_uniop : string -> t -> 'a
  (** TODO *)
end
OCaml

Innovation. Community. Security.