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

Run

Description

Run Model Training

Synopsis

Documentation

data Batch Source #

A single batch of Data

Constructors

Batch 

Fields

  • xs :: !Tensor

    Input Data

  • ys :: !Tensor

    Output Data

Instances

Instances details
Show Batch Source # 
Instance details

Defined in Run

Methods

showsPrec :: Int -> Batch -> ShowS #

show :: Batch -> String #

showList :: [Batch] -> ShowS #

Eq Batch Source # 
Instance details

Defined in Run

Methods

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

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

data TrainState Source #

Training State

Constructors

TrainState 

Fields

validStep :: Net -> Batch -> Tensor Source #

Validation Step without gradient

validEpoch :: [Batch] -> StateT TrainState IO () Source #

Validation Epoch

trainStep :: LearningRate -> Net -> Optim -> Batch -> IO (Net, Optim, Tensor) Source #

Training Step with Gradient

trainEpoch :: [Batch] -> StateT TrainState IO () Source #

Training Epoch

shuffleData :: Tensor -> Tensor -> StateT TrainState IO [Batch] Source #

Data Shuffler

runTraining :: Tensor -> Tensor -> StateT TrainState IO Net Source #

Training in State Monad

train :: Int -> IO () Source #

Main Training Function

testModel :: [String] -> (Tensor -> Tensor) -> Tensor -> Tensor -> IO () Source #