Coverage for source/model/model_blue_prints/base_blue_print.py: 100%

3 statements  

« prev     ^ index     » next       coverage.py v7.8.0, created at 2025-05-30 15:13 +0000

1# model/model_blue_prints/base_blue_print.py 

2 

3from tensorflow.keras import Model 

4 

5class BaseBluePrint(): 

6 """ 

7 Base class for model blue prints. 

8 

9 This class serves as an abstract base for different neural network architecture 

10 blueprints used in the application. All model blueprint implementations should 

11 inherit from this class and implement the instantiate_model method. 

12 """ 

13 

14 def instantiate_model(self, *args) -> Model: 

15 """ 

16 Creates and returns a Keras model instance based on the blueprint. 

17 

18 This is an abstract method that should be implemented by all subclasses. 

19 The implementation should construct a neural network architecture and 

20 return it as a Keras Model object. 

21 

22 Parameters: 

23 *args: Variable length argument list for model configuration. 

24 

25 Returns: 

26 Model: A Keras model to be compiled further. 

27 

28 Raises: 

29 NotImplementedError: If the method is not implemented by a subclass. 

30 """ 

31 

32 raise NotImplementedError("Subclasses must implement this method")