ganarchist-0.1.0.0: Switching loss prediction of High-Voltage GaN Half-Bridges
Safe HaskellSafe-Inferred
LanguageHaskell2010

Net

Description

Neural Network Definition

Synopsis

Documentation

data NetSpec Source #

Neural Network Specification

Constructors

NetSpec 

Fields

  • numX :: !Int

    Number of input neurons

  • numY :: !Int

    Number of output neurons

Instances

Instances details
Show NetSpec Source # 
Instance details

Defined in Net

Eq NetSpec Source # 
Instance details

Defined in Net

Methods

(==) :: NetSpec -> NetSpec -> Bool #

(/=) :: NetSpec -> NetSpec -> Bool #

Randomizable NetSpec Net Source #

Neural Network Weight initialization

Instance details

Defined in Net

Methods

sample :: NetSpec -> IO Net

data Net Source #

Network Architecture

Constructors

Net 

Fields

  • fc0 :: !Linear
     
  • fc1 :: !Linear
     
  • fc2 :: !Linear
     
  • fc3 :: !Linear
     
  • fc4 :: !Linear
     

Instances

Instances details
Generic Net Source # 
Instance details

Defined in Net

Associated Types

type Rep Net :: Type -> Type #

Methods

from :: Net -> Rep Net x #

to :: Rep Net x -> Net #

Show Net Source # 
Instance details

Defined in Net

Methods

showsPrec :: Int -> Net -> ShowS #

show :: Net -> String #

showList :: [Net] -> ShowS #

Parameterized Net Source # 
Instance details

Defined in Net

Methods

flattenParameters :: Net -> [Parameter]

_replaceParameters :: Net -> ParamStream Net

Randomizable NetSpec Net Source #

Neural Network Weight initialization

Instance details

Defined in Net

Methods

sample :: NetSpec -> IO Net

type Rep Net Source # 
Instance details

Defined in Net

type Rep Net = D1 ('MetaData "Net" "Net" "ganarchist-0.1.0.0-9QYZE19qg6EIDkcjYi0eiF" 'False) (C1 ('MetaCons "Net" 'PrefixI 'True) ((S1 ('MetaSel ('Just "fc0") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Linear) :*: S1 ('MetaSel ('Just "fc1") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Linear)) :*: (S1 ('MetaSel ('Just "fc2") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Linear) :*: (S1 ('MetaSel ('Just "fc3") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Linear) :*: S1 ('MetaSel ('Just "fc4") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Linear)))))

forward :: Net -> Tensor -> Tensor Source #

Neural Network Forward Pass with scaled Data

noGrad :: Parameterized f => f -> IO f Source #

Remove Gradient for tracing / scripting

saveCheckPoint :: FilePath -> Net -> Optim -> IO () Source #

Save Model and Optimizer Checkpoint

loadCheckPoint :: FilePath -> NetSpec -> IO (Net, Optim) Source #

Load a Saved Model and Optimizer CheckPoint

traceModel :: Int -> [String] -> [String] -> (Tensor -> Tensor) -> IO ScriptModule Source #

Trace and Return a Script Module

unTraceModel :: ScriptModule -> Tensor -> Tensor Source #

Trace to Function

saveInferenceModel :: FilePath -> ScriptModule -> IO () Source #

Save a Traced ScriptModule

loadInferenceModel :: FilePath -> IO ScriptModule Source #

Load a Traced ScriptModule