meszlili96 / NaturalComputing

1 stars 0 forks source link

Design a general framework #7

Closed EvgeniyaMartynova closed 4 years ago

EvgeniyaMartynova commented 4 years ago

The goal is to make it easier to run different experiments. The features to be added:

EvgeniyaMartynova commented 4 years ago

The steps to create a new type of GAN:

  1. Create a separate file and add classes for generator and discriminator as well as a function for custom weights initialization if needed there. See nets.py for an example.
  2. In gan.py file create a subclass of GAN which defines new GAN objects, implement abstract methods, override parent implementation if necessary.
  3. If you need to define a new dataset, it can be done in data.py file. However, image_dataset() function seems to be enough for image datasets
  4. To run the GAN training from IDE, create a subclass of Options class in gan.py file with the additional options you need or use an existing subclass. In main() function of train.py file set up opt and gan variable as needed.
  5. To run the GAN training from shell, create a shell script that runs train_opt.py script and passes the necessary options. In train_opt.py main() function set up gan variable.