interfaces.py 817 B

1234567891011121314151617181920212223242526272829303132333435
  1. """
  2. This module contains used interfaces for testing the Generative Adversarial Networks.
  3. """
  4. class GanBaseClass:
  5. """
  6. Base class for the Generative Adversarial Network.
  7. It defines the interface used by the Exercise class.
  8. """
  9. def __init__(self):
  10. """
  11. Initializes the class.
  12. """
  13. def train(self, dataSet):
  14. """
  15. Trains the GAN.
  16. """
  17. raise NotImplementedError
  18. def generateDataPoint(self):
  19. """
  20. Generates one synthetic data-point.
  21. """
  22. return self.generateData(1)[0]
  23. def generateData(self, numOfSamples=1):
  24. """
  25. Generates a list of synthetic data-points.
  26. *numOfSamples* is an integer > 0. It gives the number of generated samples.
  27. """
  28. raise NotImplementedError