DeepTrain
Abstract away boilerplate train loop and data loading code, without making it into a black box.
template library tensorflow deeptrain code

DeepTrain is founded on control and introspection: full knowledge and manipulation of the train state.

What does it do?

Abstract away boilerplate train loop and data loading code, without making it into a black box. Code is written intuitively and fully documented. Everything about the train state can be seen via dedicated attributes; which batch is being fit and when, how long until an epoch ends, intermediate metrics, etc.

DeepTrain is not a “wrapper” around TF; while currently only supporting TF, fitting and data logic is framework-agnostic.

Features

Train Loop

  • Control: iteration-, batch-, epoch-level customs
  • Resumability: interrupt-protection, can pause mid-training
  • Tracking & reproducibility: save & load model, train state, random seeds, and hyperparameter info
  • Callbacks at any stage of training or validation

Data Pipeline

  • AutoData: need only path to directory, the rest is inferred (but can customize)
  • Faster SSD loading: load larger batches to maximize read speed utility
  • Flexible batch size: can differ from that of loaded files, will split/combine
  • Stateful timeseries: splits up a batch into windows, and reset_states() (RNNs) at end
  • Iter-level preprocessor: pass batch & labels through Preprocessor() before feeding to model
  • Loader function: define custom data loader for any file extension, handled by DataLoader()

Introspection

  • Data: batches and labels are enumerated by “set nums”; know what’s being fit and when
  • Model: auto descriptive naming; gradients, weights, activations visuals
  • Train state: single-image log of key attributes & hyperparameters for easy reference

Utilities

  • Preprocessing: batch-making and format conversion methods
  • Calibration: classifier prediction threshold; best batch subset selection (for e.g. ensembling)
  • Algorithms: convenience methods for object inspection & manipulation
  • Callbacks: reusable methods with other libraries supporting callbacks

Don't forget to tag @OverLordGoldDragon in your comment, otherwise they may not be notified.

Authors community post
Share this project
Similar projects
PyTorch Lightning
The lightweight PyTorch wrapper for ML researchers. Scale your models. Write less boilerplate.
Top collections