馃挘 Machine learning which might blow up in your face 馃挘
at master 53 lines 1.4 kB view raw
1module Grenade ( 2 -- | This is an empty module which simply re-exports public definitions 3 -- for machine learning with Grenade. 4 5 -- * Exported modules 6 -- 7 -- | The core types and runners for Grenade. 8 module Grenade.Core 9 10 -- | The neural network layer zoo 11 , module Grenade.Layers 12 13 14 -- * Overview of the library 15 -- $library 16 17 -- * Example usage 18 -- $example 19 20 ) where 21 22import Grenade.Core 23import Grenade.Layers 24 25{- $library 26Grenade is a purely functional deep learning library. 27 28It provides an expressive type level API for the construction 29of complex neural network architectures. Backing this API is and 30implementation written using BLAS and LAPACK, mostly provided by 31the hmatrix library. 32 33-} 34 35{- $example 36A few examples are provided at https://github.com/HuwCampbell/grenade 37under the examples folder. 38 39The starting place is to write your neural network type and a 40function to create a random layer of that type. The following 41is a simple example which runs a logistic regression. 42 43> type MyNet = Network '[ FullyConnected 10 1, Logit ] '[ 'D1 10, 'D1 1, 'D1 1 ] 44> 45> randomMyNet :: MonadRandom MyNet 46> randomMyNet = randomNetwork 47 48The function `randomMyNet` witnesses the `CreatableNetwork` 49constraint of the neural network, and in doing so, ensures the network 50can be built, and hence, that the architecture is sound. 51-} 52 53