Helpers to read and write training loop state
Reads LoopState from file
Returned value may be passed to training loop constructors to initialize loop state
device onto which to load tensors
file on disk
LoopState
Returns a function which returns an IO writing the loop state to file
Writes loop state into file