Model Builder
- model.build.build_evaluator(cfg) Evaluator
Build an evaluator object based on the provided configuration.
- Parameters:
cfg (dict) – The configuration dictionary containing the evaluator settings.
- Returns:
An instance of the Evaluator class.
- Return type:
- Raises:
ValueError – If the metric specified in the configuration is not supported.
- model.build.build_feature_extractor(cfg) FeatureExtractor
Builds a feature extractor based on the configuration provided.
- Parameters:
cfg (dict) – The configuration dictionary containing the model settings.
- Returns:
The instantiated feature extractor object.
- Return type:
- Raises:
ValueError – If the specified feature extractor type is not supported.
- model.build.build_feature_predictor(cfg) FeaturePredictor
Builds a feature predictor based on the configuration provided.
- Parameters:
cfg (dict) – The configuration dictionary containing the model parameters.
- Returns:
The built feature predictor object.
- Return type:
FeaturePredictor
- Raises:
ValueError – If the specified feature predictor type is not supported.
- model.build.build_model(cfg) ExtractorPredictor
Builds a model based on the provided configuration.
- Parameters:
cfg (dict) – The configuration dictionary containing model parameters.
- Returns:
The built model.
- Return type:
model
- Raises:
ValueError – If the model type specified in the configuration is not supported.
- model.build.build_pretrained_model(cfg, weights_file) ExtractorPredictor
Build a pretrained model based on the provided configuration and weights file.
- Parameters:
cfg (dict) – Configuration dictionary containing model specifications.
weights_file (str) – Path to the weights file.
- Returns:
Pretrained model instance.
- Return type:
- Raises:
ValueError – If the specified model type is not supported.