grenade-0.1.0: Practical Deep Learning in Haskell

Copyright(c) Huw Campbell 2016-2017
LicenseBSD2
Stabilityexperimental
Safe HaskellNone
LanguageHaskell98

Grenade.Layers.Relu

Description

 

Synopsis

Documentation

data Relu Source #

A rectifying linear unit. A layer which can act between any shape of the same dimension, acting as a diode on every neuron individually.

Constructors

Relu 

Instances

Show Relu Source # 

Methods

showsPrec :: Int -> Relu -> ShowS #

show :: Relu -> String #

showList :: [Relu] -> ShowS #

Serialize Relu Source # 

Methods

put :: Putter Relu #

get :: Get Relu #

UpdateLayer Relu Source # 
KnownNat i => Layer Relu (D1 i) (D1 i) Source # 

Associated Types

type Tape Relu (D1 i :: Shape) (D1 i :: Shape) :: * Source #

Methods

runForwards :: Relu -> S (D1 i) -> (Tape Relu (D1 i) (D1 i), S (D1 i)) Source #

runBackwards :: Relu -> Tape Relu (D1 i) (D1 i) -> S (D1 i) -> (Gradient Relu, S (D1 i)) Source #

(KnownNat i, KnownNat j) => Layer Relu (D2 i j) (D2 i j) Source # 

Associated Types

type Tape Relu (D2 i j :: Shape) (D2 i j :: Shape) :: * Source #

Methods

runForwards :: Relu -> S (D2 i j) -> (Tape Relu (D2 i j) (D2 i j), S (D2 i j)) Source #

runBackwards :: Relu -> Tape Relu (D2 i j) (D2 i j) -> S (D2 i j) -> (Gradient Relu, S (D2 i j)) Source #

(KnownNat i, KnownNat j, KnownNat k) => Layer Relu (D3 i j k) (D3 i j k) Source # 

Associated Types

type Tape Relu (D3 i j k :: Shape) (D3 i j k :: Shape) :: * Source #

Methods

runForwards :: Relu -> S (D3 i j k) -> (Tape Relu (D3 i j k) (D3 i j k), S (D3 i j k)) Source #

runBackwards :: Relu -> Tape Relu (D3 i j k) (D3 i j k) -> S (D3 i j k) -> (Gradient Relu, S (D3 i j k)) Source #

type Gradient Relu Source # 
type Gradient Relu = ()
type Tape Relu (D1 i) (D1 i) Source # 
type Tape Relu (D1 i) (D1 i) = S (D1 i)
type Tape Relu (D2 i j) (D2 i j) Source # 
type Tape Relu (D2 i j) (D2 i j) = S (D2 i j)
type Tape Relu (D3 i j k) (D3 i j k) Source # 
type Tape Relu (D3 i j k) (D3 i j k) = S (D3 i j k)