tensor-safe-0.1.0.0: Create valid deep neural network architectures

Safe HaskellNone
LanguageHaskell2010

TensorSafe

Description

This module declares what is visible to use TensorSafe as an API.

Synopsis

Documentation

data JavaScript Source #

Support for JavaScript compilation

Constructors

JavaScript 

data Python Source #

Support for Python compilation

Constructors

Python 
Instances
Show Python Source # 
Instance details

Defined in TensorSafe.Compile.Expr

Generator Python Source # 
Instance details

Defined in TensorSafe.Compile.Expr

generate :: Generator l => l -> CNetwork -> Text Source #

Adds supports for a language. Generates a CNetwork to Text

generateFile :: Generator l => l -> CNetwork -> Text Source #

Similar to generate, but also adds necessary header and module lines of text so as to have the CNetwork compiled at a separate file.

data INetwork :: [Type] -> [Shape] -> Type Source #

A network that defines a specific sequence of layers with the corresponding shape transformation along the network. It's an Instance of a Network: given a Network and a initial Shape, this type structure can be generated automatically using the type functions defined in this module, like Out and MkINetwork.

Instances
(Show x, Show (INetwork xs rs)) => Show (INetwork (x ': xs) (i ': rs)) Source # 
Instance details

Defined in TensorSafe.Network

Methods

showsPrec :: Int -> INetwork (x ': xs) (i ': rs) -> ShowS #

show :: INetwork (x ': xs) (i ': rs) -> String #

showList :: [INetwork (x ': xs) (i ': rs)] -> ShowS #

Show (INetwork ([] :: [Type]) (i ': ([] :: [Shape]))) Source # 
Instance details

Defined in TensorSafe.Network

Methods

showsPrec :: Int -> INetwork [] (i ': []) -> ShowS #

show :: INetwork [] (i ': []) -> String #

showList :: [INetwork [] (i ': [])] -> ShowS #

ValidNetwork ls ss => Layer (INetwork ls ss) Source #

This instance of INetwork as a Layer makes possible nesting INetworks

Instance details

Defined in TensorSafe.Network

type family MkINetwork (layers :: [Type]) (sIn :: Shape) (sOut :: Shape) :: Type where ... Source #

Creates an INetwork type validating the the expected output and the computed one match.

Equations

MkINetworkUnconstrained ls sIn sOut = MaybeType (INetwork ls (ComposeOut ls sIn)) (ValidateOutput ls sIn sOut) 

mkINetwork :: ValidNetwork xs ss => INetwork xs ss Source #

Makes a valid instance of INetwork

toCNetwork :: forall i x xs ss. (SingI i, Layer x, ValidNetwork (x ': xs) (i ': ss)) => INetwork (x ': xs) (i ': ss) -> CNetwork Source #

Compilation: Gets the initial shape using Singleton instances. Since this is the function we run for transforming an INetwork to CNetwork, the nested argument of toCNetwork' is set to False.