Skip to main content
Skip table of contents

Creating a Training Config for your Model

The Training Configuration in XNAT has several components that pull together several sets of parameters that are used when launching training. You can find the elements of this configuration among the model resources that you downloaded when Installing a Model. Here are the components of the XNAT Training Configuration.

ComponentResourceDescription
Config Templateconfig/config_train.jsonA pretrained model will have a set of parameters tuned for model training, including the number of epochs and learning rate. Enter those here as a JSON object.
Config Parameters(user judgement)

Of the parameters that are made available in the config template, only a few should be made available to users to alter at runtime:

  • epochs: number of iterations of training to perform
  • learning rate: Usually a very small decimal number, e.g "0.0001"
  • validation frequency in epochs: if your dataset contains "train" and "validate" data, specify how often to use the "validate" data for comparison
  • training summary recording interval: this is rarely used
  • use scanning window: this is rarely used
Dataset Templateconfig/dataset_0.jsonA pretrained model should have an example dataset object, giving you a template for how to specify files to submit for training. This part of the configuration strips away those actual files, but retains the dataset metadata that your model expects
Dataset Parameters(user judgement)Of the files you submit in your dataset, this set of parameters lets you specify how many (or what percentage) to set as "train", "validate", and/or "test".

Creating a Training Configuration

  1. From your project's home page, go to the Machine Learning tab and click the "Open Machine Learning Dashboard" button.
  2. In the tabs on the left, click Training Configs.
  3. At the bottom of the listing of installed configurations, click "New Training Configuration". This will take you to the config editor screen:

  4. Give your config a name in the Label input. Do not use space characters in the label.
  5. Using the Config Template input will open a code editor, which provides real-time validation of your JSON code. Enter the contents of your config_train.json file here, making any changes as needed.
  6. Select which configuration parameters should be customizeable at runtime using the checkboxes for Config Parameters. Note that the default settings for these params will come from your Config Template.
  7. Using the Dataset Template input will open a code editor, which provides real-time validation of your JSON code. Enter the contents of your dataset_0.json file here, then remove the following JSON attributes and their contents:
    • numTraining: ##  (an integer count of files)
    • numTest: ## (an integer count of files)
    • test: [ ... ] (contains a list of files)
    • training: [ ... ] (contains a list of files)
    • validation: [ ... ] (contains a list of files)
  8. Select whether to split your dataset up into bundles of "train", "validate", and "test" data by entering integer values into the inputs for Dataset Parameters. If your three integers add up to 100, they will be treated as percentages. If they do not, they will be treated as integer counts of files.
  9. Save your configuration.

If you go back to the Training Dashboard, you will be able to see your new configuration listed in the table. You can view various aspects of the config, or edit the entire thing.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.