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

Public Member Functions

 __init__ (self, batch_size, weights_path, test_data_dir)
 
 load_model (self)
 
 create_data_generator (self, input_shape)
 
 evaluate (self)
 

Public Attributes

 batch_size = batch_size
 
 weights_path = weights_path
 
 test_data_dir = test_data_dir
 
dict stop_training_flag = {'stop': False}
 

Detailed Description

A class to handle model evaluation.

Attributes:
    batch_size (int): Batch size for evaluation.
    weights_path (str): Path to the trained model weights.
    test_data_dir (str): Directory containing validation data.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
batch_size,
weights_path,
test_data_dir )
Initialize the ModelEvaluator with given parameters.

Args:
    batch_size (int): Batch size for evaluation.
    weights_path (str): Path to the trained model weights.
    val_data_dir (str): Directory containing validation data.

Member Function Documentation

◆ create_data_generator()

create_data_generator ( self,
input_shape )
Create the data generator for test data.

Args:
    input_shape (tuple): Input shape of the model.

Returns:
    CustomDataGenerator: Instance of the custom data generator.

◆ evaluate()

evaluate ( self)
Evaluate the model on the test data.

Returns:
    tuple: Test data loss and accuracy.

◆ load_model()

load_model ( self)
Load the Keras model from the specified weights path.

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

Member Data Documentation

◆ batch_size

batch_size = batch_size

◆ stop_training_flag

dict stop_training_flag = {'stop': False}

◆ test_data_dir

test_data_dir = test_data_dir

◆ weights_path

weights_path = weights_path

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