Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Run Model Training
Synopsis
- data Batch = Batch {}
- data TrainState = TrainState {}
- validStep :: Net -> Batch -> Tensor
- validEpoch :: [Batch] -> StateT TrainState IO ()
- trainStep :: LearningRate -> Net -> Optim -> Batch -> IO (Net, Optim, Tensor)
- trainEpoch :: [Batch] -> StateT TrainState IO ()
- shuffleData :: Tensor -> Tensor -> StateT TrainState IO [Batch]
- runTraining :: Tensor -> Tensor -> StateT TrainState IO Net
- train :: Int -> IO ()
- testModel :: [String] -> (Tensor -> Tensor) -> Tensor -> Tensor -> IO ()
Documentation
A single batch of Data
data TrainState Source #
Training State
TrainState | |
|
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