interfaces.py 948 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 reset(self):
  14. """
  15. Resets the trained GAN to an random state.
  16. """
  17. raise NotImplementedError
  18. def train(self, dataSet):
  19. """
  20. Trains the GAN.
  21. """
  22. raise NotImplementedError
  23. def generateDataPoint(self):
  24. """
  25. Generates one synthetic data-point.
  26. """
  27. return self.generateData(1)[0]
  28. def generateData(self, numOfSamples=1):
  29. """
  30. Generates a list of synthetic data-points.
  31. *numOfSamples* is an integer > 0. It gives the number of generated samples.
  32. """
  33. raise NotImplementedError