2. Building a deep learning workflow

Once your data is ready (see Chapter 1), you can build the actual deep learning workflow: define a model, train it, and evaluate it. ClinicaDL abstracts away most of PyTorch’s complexity while providing tools to modify the default behavior and customise your training and validation logic.

  1. Defining a model — define a neural network, a loss and an optimizer, as well as your training and evaluation logic.

  2. Training — run the training loop, and resume it if it gets interrupted.

  3. Evaluating — compute metrics on validation and test data.

  4. Callbacks — plug non-essential logic (logging, early stopping, checkpointing, etc.) into the training loop.