Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Neural Network Definition
Synopsis
- data NetSpec = NetSpec {}
- data Net = Net {}
- forward :: Net -> Tensor -> Tensor
- noGrad :: Parameterized f => f -> IO f
- saveCheckPoint :: FilePath -> Net -> Optim -> IO ()
- loadCheckPoint :: FilePath -> NetSpec -> IO (Net, Optim)
- traceModel :: Int -> [String] -> [String] -> (Tensor -> Tensor) -> IO ScriptModule
- unTraceModel :: ScriptModule -> Tensor -> Tensor
- saveInferenceModel :: FilePath -> ScriptModule -> IO ()
- loadInferenceModel :: FilePath -> IO ScriptModule
Documentation
Neural Network Specification
Network Architecture
Instances
Generic Net Source # | |
Show Net Source # | |
Parameterized Net Source # | |
Defined in Net flattenParameters :: Net -> [Parameter] _replaceParameters :: Net -> ParamStream Net | |
Randomizable NetSpec Net Source # | Neural Network Weight initialization |
type Rep Net Source # | |
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))))) |
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