I am using python 3.6 and would like to build a subclass from different possible classes.
So a toy example would be:
class MNISTArchitecture:
def __init__(self, inputs):
self.input_pl = inputs
self.learning_rate = LEARNING_RATE
self.batch_size = BATCH_SIZE
self.encoder
self.decoder
class CIFARArchitecture:
def __init__(self, inputs):
self.input_pl = inputs
self.learning_rate = LEARNING_RATE
self.batch_size = BATCH_SIZE
self.encoder
self.decoder
And then build a class that could inherit from first architecture or the second one:
class AutoEncoder(Architecture):
def __init__(self, input_pl, dataset):
super().__init__(input_pl)
self.dataset = dataset
self.anomalous_label = anomalous_label
self.build_graph()
I guess I could do multi-class inheritance and build the second class from all different classes (architectures), but I don't want python to build a huge graph (because I have more than 2 architectures).
Hope it is clear, please tell me if any other information is needed.
Best