nn_models module¶
This module defines the Keras architectures for the Neural Networks used in the project. It includes simple models, multi-input models, and functions for hyperparameter tuning.
- nn_models.final_model(flux_band_shape, flux_hist_shape, input_data_shape)[source]¶
Constructs the final three-input Neural Network architecture. Inputs are: Flux Band, Flux History, and Additional Features (e.g., Coordinates, Index).
- Parameters:
flux_band_shape (tuple) – Shape tuple for Flux Band input.
flux_hist_shape (tuple) – Shape tuple for Flux History input.
input_data_shape (tuple) – Shape tuple for Additional Features input.
- Returns:
A compiled Keras Model.
- Return type:
keras.models.Model
- nn_models.hp_final_model(hp)[source]¶
Constructs a tunable version of the final three-input architecture for Keras Tuner. Allows tuning of layer sizes, dropout, and learning rate.
- Parameters:
hp (keras_tuner.HyperParameters) – Hyperparameters object from Keras Tuner.
- Returns:
A compiled Keras Model ready for tuning.
- Return type:
keras.models.Model
- nn_models.hp_model_lr(hp)[source]¶
Builds a tunable sequential model that also tunes the learning rate.
- Parameters:
hp (keras_tuner.HyperParameters) – Hyperparameters object from Keras Tuner.
- Returns:
A compiled Keras Model with tunable learning rate.
- Return type:
keras.models.Sequential
- nn_models.paper_model(flux_band_shape, flux_hist_shape)[source]¶
Builds a multi-input neural network model based on the reference paper architecture. It takes flux bands and flux history as separate inputs.
- Parameters:
flux_band_shape (tuple) – Shape of the flux band input features.
flux_hist_shape (tuple) – Shape of the flux history input features.
- Returns:
A compiled Keras Model.
- Return type:
keras.models.Model