Use the following file to set up the environment.
All the files needed for running the code are in scripts. The shell file to run
- training is
cmdline.sh(which callstrain.py) - inference is
runeval.sh(which callseval.py)
An example run command on terminal
source cmdline.sh
The folders which are used for the workshop submission are:
modelsscriptsutils
Please ignore the other folders mentioned below because they were used for experimental ideas which were not included in the workshop submission.
diffusionprngquanttorch_utils
The main code is adopted from the DiT repo. Significant changes are done to implement multione which is described at various parts of the code through comments.
This file contains all the arguments required for running training. It also calls the 4 main functions get_data, get_models , get_trainsetup and train_batch. It also runs the epoch-wise training for these models.
Contains the functions get_data, get_models , get_trainsetup and train_batch. The first three are straight-forward, each providing dataloader, models (teacher and student) and the optimization setup. The last one has multiple training setups such GET, DMD, Multione and Layer. Each of them are explained with comments in the corresponding functions which are called.
If you want to modify the model architecture, go and make the changes in models/model.py. If you want to modify other the training setup, go to utils/trainutils.py and change the train_batch function by adding a new if statement for your setup. Write the corresponding function below it.