package owl-base

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

Module Owl_algodiff_core.MakeSource

Parameters

Signature

module A : Owl_types_ndarray_algodiff.Sig with type arr = A.arr with type elt = A.elt
Type definition
include Owl_algodiff_types_sig.Sig with type elt := A.elt and type arr := A.arr
Sourcetype t =
  1. | F of A.elt
  2. | Arr of A.arr
  3. | DF of t * t * int
  4. | DR of t * t ref * op * int ref * int * int ref
Sourceand adjoint = t -> t ref -> (t * t) list -> (t * t) list
Sourceand register = t list -> t list
Sourceand label = string * t list
Core functions
Sourceval tag : unit -> int

TODO

Sourceval primal : t -> t

TODO

Sourceval primal' : t -> t

TODO

Sourceval zero : t -> t

TODO

Sourceval reset_zero : t -> t

TODO

Sourceval tangent : t -> t

TODO

Sourceval adjref : t -> t ref

TODO

Sourceval adjval : t -> t

TODO

Sourceval shape : t -> int array

TODO

Sourceval row_num : t -> int

number of rows

Sourceval col_num : t -> int

number of columns

Sourceval numel : t -> int

number of elements

Sourceval clip_by_value : amin:A.elt -> amax:A.elt -> t -> t

other functions, without tracking gradient

Sourceval clip_by_l2norm : A.elt -> t -> t

other functions, without tracking gradient

Sourceval copy_primal' : t -> t

TODO

Sourceval tile : t -> int array -> t

TODO

Sourceval repeat : t -> int array -> t

TODO

Sourceval pack_elt : A.elt -> t

convert from ``elt`` type to ``t`` type.

Sourceval unpack_elt : t -> A.elt

convert from ``t`` type to ``elt`` type.

Sourceval pack_flt : float -> t

convert from ``float`` type to ``t`` type.

Sourceval _f : float -> t

A shortcut function for ``F A.(float_to_elt x)``.

Sourceval unpack_flt : t -> float

convert from ``t`` type to ``float`` type.

Sourceval pack_arr : A.arr -> t

convert from ``arr`` type to ``t`` type.

Sourceval unpack_arr : t -> A.arr

convert from ``t`` type to ``arr`` type.

Sourceval deep_info : t -> string

TODO

Sourceval type_info : t -> string

TODO

Sourceval error_binop : string -> t -> t -> 'a

TODO

Sourceval error_uniop : string -> t -> 'a

TODO

OCaml

Innovation. Community. Security.