Configuration Files for Training

This page gives a tutorial on how to generate your custom training configuration files.

This configuration files can be used to select datasets, training configuration, and active learning settings. These files are in json format.

{
        "model": {
                "architecture": "resnet18",
                "target_classes": 10
        },
        "train_parameters": {
                "lr": 0.001,
                "batch_size": 1000,
                "n_epoch": 50,
                "max_accuracy": 0.95,
                "isreset": true,
                "islogs":  true,
                "logs_location": "./logs.txt"
        },

        "active_learning":{
                "strategy": "badge",
                "budget": 1000,
                "rounds": 15,
                "initial_points":1000,

                "strategy_args":{
                        "batch_size" : 1000,
                        "lr":0.001
                }
        },
        "dataset":{
                "name":"cifar10"
        }
}

The configuration files consists of following sections:

  1. Model

  2. Training Parameters

  3. Active Learning Configuration

  4. Dataset

Symbol (%) represents mandatory arguments

model

  1. architecture %
    • Model architecture to be used, Presently it supports the below mentioned architectures.
      1. resnet18

      2. two_layer_net

  2. target_classes %
    • Number of output classes for prediction.

  3. input_dim
    • Input dimension of the dataset. To be mentioned while using two layer net.

  4. hidden_units_1
    • Number of hidden units to be used in the first layer. To be mentioned while using two layer net.

train_parameters

  1. lr %
    • Learning rate to be used for training.

  2. batch_size %
    • Batch size to be used for training.

  3. n_epoch %
    • Maximum number of epochs for the model to train.

  4. max_accuracy
    • Maximum training accuracy after which training should be stopped.

  5. isreset
    • Reset weight whenever the model training starts.
      1. True

      2. False

  6. islogs
    • Log training output.
      1. True

      2. False

  7. logs_location %
    • Location where logs should be saved.

active_learning

  1. strategy %
    • Active learning strategy to be used.
      1. badge

      2. glister

      3. entropy_sampling

      4. margin_sampling

      5. least_confidence

      6. core_set

      7. random_sampling

      8. fass

      9. bald_dropout

      10. adversarial_bim

      11. kmeans_sampling

      12. baseline_sampling

      13. adversarial_deepfool

  2. budget %
    • Number of points to be selected by the active learning strategy.

  3. rounds %
    • Total number of rounds to run active learning for.

  4. initial_points
    • Initial number of points to start training with.

  5. strategy_args
    • Arguments to pass to the strategy. It varies from strategy to strategy. Please refer to the documentation of the strategy that is being used.

dataset

  1. name
    • Name of the dataset to be used. It presently supports following datasets.
      1. cifar10

      2. mnist

      3. fmnist

      4. svhn

      5. cifar100

      6. satimage

      7. ijcnn1

You can refer to various configuration examples in the configs/ folders of the DISTIL repository.