Ecto-Trigger 1.0
Loading...
Searching...
No Matches
ModelLoader Class Reference

Static Public Member Functions

 create_model (input_shape, alpha, dropout_rate=0.5, freeze_base=False)
 
 load_keras_model (str weights_path)
 

Detailed Description

A utility class to load Keras and TFLite models.

Member Function Documentation

◆ create_model()

create_model ( input_shape,
alpha,
dropout_rate = 0.5,
freeze_base = False )
static
Create a binary classification model using MobileNetV2 as the base. This method uses the MobileNetv2 implementation from Keras and adds 

Args:
    input_shape (tuple): Input shape for the model (height, width, channels).
    alpha (float): Width multiplier for MobileNetV2.
    dropout_rate (float): Dropout rate for the dropout layer. Default is 0.5.
    freeze_base (bool): Whether or not to make the base model trainable. 
Returns:
    tf.keras.Model: Compiled Keras model.

◆ load_keras_model()

load_keras_model ( str weights_path)
static
Load a trained Keras model from an HDF5 file and print its summary.

Args:
    weights_path (str): Path to the .hdf5 weights file.

Returns:
    tf.keras.Model: Loaded Keras model.

The documentation for this class was generated from the following file: