package tiny_libs

  1. Overview
  2. Docs
From-scratch libraries for teaching: graphics, audio, compression, crypto, networking and more

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.3.6.tar.gz
md5=7c636383d146d30ac6f2fa234a6253c8
sha512=c79f3823c5f8f57e5038eb640d487c61168b84aa07c61999d6622ef9fd0c890e2b03b4c6a7cdbbe9352a49e25dda00ac7bb14693cee8e3d7beeed251351a2af0

doc/tiny_libs.ai_learning/Net/index.html

Module NetSource

Sourcetype activation =
  1. | Sigmoid
  2. | Tanh
  3. | Relu
  4. | Linear
Sourceval squash : activation -> float -> float
Sourceval slope : activation -> z:float -> a:float -> float
Sourcetype layer = {
  1. w : Matrix.t;
  2. b : Matrix.t;
  3. f : activation;
}
Sourcetype t = layer list
Sourceval make : seed:int -> ?hidden:activation -> ?last:activation -> int list -> t
Sourceval forward : t -> float array -> float array
Sourceval sizes : t -> int list
Sourceval weights : t -> int
Sourcetype pass = {
  1. input : Matrix.t;
  2. steps : (Matrix.t * Matrix.t) list;
}
Sourceval forward_pass : t -> float array -> pass
Sourceval output : pass -> float array